Repository navigation
docs(agents): explain the Trunk formatter pre-commit hook - #158
Merged
Merged
Conversation
A commit that restores src/ to undo a clang-format pass comes out empty because trunk-fmt-pre-commit reformats staged C files, and reformatting lines with existing clang-tidy findings makes the required Trunk check report them as new (#129).
ss-o
commented
Oct 19, 2026
ss-o
left a comment
Member
Author
There was a problem hiding this comment.
Fallback review under ADR-0026: Copilot request not registered on ebe4476
Findings
No actionable findings.
Scope: the full diff of 5d5c798...ebe4476 (AGENTS.md, 6 added lines), refs #129.
Note
The maintainer elected this fallback after the Copilot request did not register (no review_requested event). It is a self-review by the authoring agent, not an independent review or approval to merge.
Validation
- Passed: all 23 completed PR checks on ebe4476 (one skipped by its workflow), including Native, Docker and Smoke Tests and Trunk Code Quality. Locally: Trunk markdownlint and prettier clean; the pre-commit hook passed.
- Claims checked at source:
.trunk/trunk.yaml:167enablestrunk-fmt-pre-commit; themainruleset requiresTrunk Code Quality / Trunk Code Quality. - Not re-run: the 2026-09-27 empty-commit incident (PR #131) is cited from the earlier session record.
Checklist verdicts and supporting evidence
- Documentation accuracy: pass. The hook and the required check are confirmed above; the #129 link resolves.
- Placement: pass. Added under "Build and test", wrapped like the surrounding paragraphs.
- Branch name: open question.
AGENTS.mdlists onlyfeature-<id>forms while the organization runbook allowsdocs/<slug>;Validate Branch Namepassed. Recorded for the maintainer as a policy conflict, not a defect in this diff.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #129 (closed). Records in
AGENTS.mdthe two Trunk behaviors behind that issue, which were only kept in agent memory:.trunk/trunk.yamlenablestrunk-fmt-pre-commit, which reformats staged C files, so a commit that restoressrc/frommainto drop a formatting pass comes out empty; drop C changes by rebuilding the branch, and checkgit show --stat HEADbefore describing a commit.No issue owns this documentation change beyond #129; a maintainer decides whether it needs
meta:no-issue.Verification
.trunk/trunk.yamlline 167 liststrunk-fmt-pre-commit.trunk check --no-fix --filter=markdownlint,prettier AGENTS.md: no issues; the pre-commit hook passed andgit show --stat HEADlists onlyAGENTS.md.Agent handoff
No handoff needed.