Skip to content

fix(ci): migrate trunk.yaml to schema v0.1 (lint/fmt blocks) - #626

Merged
KooshaPari merged 2 commits into
mainfrom
fix/trunk-config-2026-08-09
Aug 13, 2026
Merged

fix(ci): migrate trunk.yaml to schema v0.1 (lint/fmt blocks)#626
KooshaPari merged 2 commits into
mainfrom
fix/trunk-config-2026-08-09

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Aug 9, 2026

Copy link
Copy Markdown
Owner

User description

Trunk Check fails on the legacy trunk.yaml schema (the current trunk CLI reports 'missing config version, please add version: 0.1' plus unrecognized top-level keys, e.g. linters/formatters/actions/cache/env).

Migrates to schema v0.1: version: 0.1, lint.enabled + lint.definitions (preserving the custom actionlint, black --line-length 100, clippy -D warnings, mypy, ruff commands), fmt.enabled + fmt.definitions (preserving black --line-length 100 and rustfmt). Tool versions are trunk-io/plugins known-good versions. The community plugin source and legacy actions/cache/env blocks are dropped (defaults apply).

Note: validation of the Trunk Check job currently depends on trunk.io's launcher env-cache endpoints, which are returning 403 (upstream outage, reproducible locally); the schema itself is verified against the trunk docs and is identical in shape to the Apisync equivalent.


CodeAnt-AI Description

Restore Trunk Check compatibility with the current configuration schema

What Changed

  • Updates the Trunk configuration to schema version 0.1 so the current CLI can load and validate it
  • Keeps the existing lint and format checks, including custom Actionlint, Black, Clippy, mypy, Ruff, and rustfmt commands
  • Pins supported tool versions and removes legacy configuration sections that the current CLI no longer accepts

Impact

✅ Trunk Check can validate the repository with the current CLI
✅ Existing lint and formatting checks remain enabled
✅ Fewer CI configuration errors

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

The legacy trunk.yaml (top-level linters/formatters/actions/cache/env)
is rejected by the current trunk CLI with config-errors ('missing config
version, please add version: 0.1', unrecognized keys), which has been
failing the Trunk Check job. Migrate to schema v0.1 with lint.enabled /
lint.definitions (preserving the custom actionlint, black --line-length 100,
clippy -D warnings, mypy, ruff commands) and fmt.enabled / fmt.definitions
(preserving black --line-length 100 and rustfmt commands). Versions are
trunk-io/plugins known-good versions; the community plugin source and the
legacy actions/cache/env blocks are dropped (defaults apply).
Copilot AI lite review requested due to automatic review settings August 9, 2026 07:38
@codeant-ai

codeant-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed 773493f Aug 10, 2026 · 08:48 08:49
✅ Reviewed your PR f051148 Aug 09, 2026 · 07:38 07:38

@codeant-ai

codeant-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Aug 9, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f051148760

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .trunk/trunk.yaml
enabled:
- actionlint@1.7.8
- black@25.9.0
- clippy@1.65.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pin Clippy to the workspace MSRV

When the Trunk Check workflow runs on a Rust change, clippy@1.65.0 makes the Trunk v1.6.1 clippy plugin download and place Rust/Clippy 1.65 first in PATH (the plugin uses download: rust and ${linter}/bin). This workspace declares rust-version = "1.75" in Cargo.toml, so Cargo will reject the toolchain before linting; pin Clippy/Rustfmt to at least the workspace MSRV or use the CI toolchain instead.

Useful? React with 👍 / 👎.

@kilo-code-bot

kilo-code-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
.trunk/trunk.yaml 26 Pin Clippy/Rustfmt to workspace MSRV (1.75); 1.65.0 toolchain will be rejected by Cargo

WARNING

File Line Issue
.trunk/trunk.yaml 60 prettier@3.6.2 enabled without fmt.definitions entry
Files Reviewed (1 file)
  • .trunk/trunk.yaml - 2 issues

Fix these issues in Kilo Cloud


Reviewed by step-3.7-flash · Input: 73.1K · Output: 13.9K · Cached: 245.5K

Comment thread .trunk/trunk.yaml
fmt:
enabled:
- black@25.9.0
- prettier@3.6.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: prettier@3.6.2 is enabled without a fmt.definitions entry

Trunk v0.1 requires explicit command definitions for enabled formatters; black and rustfmt both have definitions, but prettier does not. If Trunk does not provide a built-in prettier command, formatting checks for Prettier-managed files will be silently skipped.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@codeant-ai

codeant-ai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:M This PR changes 30-99 lines, ignoring generated files and removed size:M This PR changes 30-99 lines, ignoring generated files labels Aug 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

@KooshaPari
KooshaPari merged commit 3a4c0fd into main Aug 13, 2026
28 of 32 checks passed
@KooshaPari
KooshaPari deleted the fix/trunk-config-2026-08-09 branch August 13, 2026 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants