Repository navigation
Coding standards, file-size limit, safe path output, stricter acceptance scanner - #96
Merged
Merged
Conversation
The 1k rule was a reviewer duty and tests/acceptance.rs had reached 8,252 lines. Five files already over the limit are allowed at their current size; they may shrink, not grow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add clippy disallowed-methods for Path::display so a filename from an untrusted repository cannot inject terminal control sequences. Rewrite the 34 remaining src call sites mechanically (codemod: <expr>.display() -> output::display_path(&<expr>), then cargo clippy --fix for needless borrows). Tests print paths with to_string_lossy(). The file-size allowance records each file's size after rustfmt rewrapped the longer calls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The traceability scanner accepted any ID-prefixed fn, so a helper that never runs could satisfy an acceptance row. All 180 current sensors carry #[test]. Proved: with #[test] removed from G6's sensor, the old scanner passed and the new one fails with 'acceptance row G6 names missing sensor G6'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixture URLs address repos as tree/master/..., but init_repo ran plain 'git init', so on machines with init.defaultBranch=main seven inspect acceptance tests failed with 'Remote branch master not found'. CI passed only because its git still defaults to master. Requires git >= 2.28. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why the change
Reviews of tink keep flagging the same problems: one owner per act, whole renames, honest copy, about 25 Codex findings on unsafe file writes, hand-counted file sizes, and raw paths printed to the terminal. This writes the rules down and turns three of them into checks.
Special things to note
bump-release.yml(one patch release for all three changes).tests/acceptance.rs8,264,src/skillsets.rs1,667,src/lib.rs1,496,src/skills.rs1,196,src/manifest.rs1,060). The next acceptance test must first move code out ofacceptance.rs.clippy.tomlnow disallowsPath::display; the 34 remainingsrccall sites go throughoutput::display_path, which already served 105 sites. Output is unchanged for ordinary paths; control characters and backslashes are escaped (tink builds no Windows targets). Tests print withto_string_lossy(), soacceptance.rsgained only rustfmt rewrapping (+12 lines).tests/acceptance_traceability.rsnow counts only#[test]functions as sensors (Codex found it accepted any ID-prefixedfn). All 180 current sensors qualify. With#[test]removed from G6's sensor, the old scanner passed and the new one fails.init_reponow runsgit init --initial-branch=master. Seveninspectacceptance tests failed on any machine withinit.defaultBranch=main(fixtures are addressed astree/master/...); CI passed only because its git defaults tomaster.main-default Mac:cargo fmt --check,cargo clippy --all-targets -D warningsand the full suite pass (211 acceptance tests).Change outline
🤖 Generated with Claude Code