fix: resolve 8 behavioral bugs from audit (session reset, symlink roots, budget overflow, precedence, TOCTOU, banner, /rules show) - #20
Merged
Conversation
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
Resolves all eight independently reproduced behavioral issues from the audit.
RED-first evidence
expected undefined to match object { systemPrompt: StringContaining{…} }expected null to be '/var/folders/.../repo'expected 278 to be less than or equal to 200(static) andexpected 313 to be less than or equal to 200(dynamic)expected [ 'AGENTS.md', 'CLAUDE.md' ] to deeply equal [ 'AGENTS.md' ]expected [ Array(2) ] to deeply equal [ '~/.config/opencode/AGENTS.md' ]Error: No such file or directoryexpected false to be true/rules showmissing ID:expected [ { message: 'Rule body', …(1) } ] to deeply equal [ { …(2) } ]Verification
npm test- 14 files, 252 tests passed in one runnpm run check- passed (tsgo --noEmitandbiome check .; Biome reports its existing deprecated-config info only)Atomic commits
19d7a14fix(session): reset state when disabled0f15eb4fix(project-root): resolve symlinked start paths519fa4ffix(formatter): include framing in result budget1607f33fix(engine): honor dynamic root rule precedenced44c48ffix(finder): honor user-home file precedencec907414fix(project-root): tolerate disappearing start paths49ec7a5fix(ui): match diagnostics by absolute rule path68b27aafix(commands): reject missing rule show idsSummary by cubic
Fixes eight audit-reported bugs to make rule discovery, formatting, and UI more reliable. Improves precedence handling, symlinked root resolution, and command validation.
session_start, even when disabled, so re-enabling works correctly.AGENTS.mdoverCLAUDE.md)./rules show; notify with an error when omitted.Written for commit 484b305. Summary will update on new commits.