Repository navigation
Backlog
Labels
bugSomething isn't workingepic:preflightPreflight answer: make every AI agent want Charter's governancepriority:p1Should ship this cycle
Description
Minor findings from the approving adversarial reviews of #462 (#440), #463 (#441), #465 (#444), #466 (#445) and #464 (#459). None blocked a merge. The first two give a confident wrong answer rather than unknown, so they were fixed in the integration that wired these parts into the preflight answer (PR #468). Items 3-13 are still open.
Done in PR #468
- Rank first-test candidates by direct symbol evidence, not import distance #444
test-rank.ts:199: a lowercase Windows drive letter finds no tests.rankFirstTestswithc:/.../packages/adf/src/manifest.tsreturns 0 candidates andunknown: "evidence ran out".path.resolvekeepsc:, but the graph keys useC:. Normalise seeds through the same canonical-path routine asrelativizeFilePath(feat(cli): route adf context --files modules from path tokens #452). - Detect when a file's behaviour is pinned by a contract test, and say what a change means for semver #445
contract-pins.ts:134: in semicolon-free code anexport typecan swallow a later value import.extractImports("export type Foo = {\n a: number\n}\nimport { x } from './x'\n")reports./xas type-only, so a pinned file comes backpinned: false. Anchor the import regex per statement, or tokenise.
Others
- Rank first-test candidates by direct symbol evidence, not import distance #444
test-rank.ts:318: a wrong reason whensymbolsis restricted. Withsymbols: ['resolveModules'](or an unknown name, which is dropped without a message),manifest.test.tsreads "imports manifest.ts directly but none of its exported symbols", yet it callsparseManifest. Report unknown requested symbols, and word the reason relative to the requested set. - Rank first-test candidates by direct symbol evidence, not import distance #444
test-rank.ts:78: same-named symbols reached through the barrel.packages/cli/src/index.ts(86 importers) connects almost everything withinSYMBOL_REACH=8, so a seed exporting a common name (run,format,parse) can pick up false symbol-tier hits. - Detect when a file's behaviour is pinned by a contract test, and say what a change means for semver #445
contract-pins.ts:292: surfaces are per test file, not per pinned file.index.tsis pinned only throughEXIT_CODE, yet it inherits--format json. - Detect when a file's behaviour is pinned by a contract test, and say what a change means for semver #445
contract-pins.ts:264: input casing kept on Windows.PACKAGES/cli/...returnsfile: "PACKAGES/cli/..."rather than the canonical casing. - getProjectState reports 'All constraints pass' while live evidence fails #441
project-state.ts:60: an unreadable METRICS source fails the whole call. A source that is a directory throwsEISDIR, andgetProjectStatereturnsisError, where before it returned the static validation. It should be labelledmeasured: falsewith the reason. - getProjectState reports 'All constraints pass' while live evidence fails #441
project-state.ts:56vsadf-evidence.ts:74: a non-default--ai-dirmeasures different files.getProjectStateresolves METRICS paths from the.ai/parent, whileadf evidence --auto-measureresolves them against the cwd. Withsub/.airun from the root, the two can disagree. Use one resolver (as Preflight follow-ups: task-only Binds, nested .ai/, MSYS paths, new files from subdirectories #460 item 2 also needs). - context-refresh --once and charter_context serve a stale snapshot as fresh after a branch, HEAD or working-tree change #440
context-refresh.ts:463: a refresh from a subdirectory invalidates the root snapshot.--ai-dirdefaults to cwd-relative.ai, so<sub>/.ai/context.snapshot.jsoncounts as dirty for the root. The effect is extra refreshes, never a stale answer. - context-refresh --once and charter_context serve a stale snapshot as fresh after a branch, HEAD or working-tree change #440
git-fingerprint.ts:268: serve's own runtime paths aren't ignored. With a different--configor cwd from the refresh, serve's telemetry writes makecharter_contextreportstale: true. This is a false positive only. - smart-commit.sh can't set a message or trailers, so core.adf's commit rule is unfollowable #459
smart-commit.sh:96: the message-file exclusion isn't fully path-proof. It misses a file name typed in a different case, and a path through a directory junction (Windows). The case is caught for directories, not for the file name. With--merge, a tracked and modified message file is still committed (documented). - PR feat(cli): fill Contract, Run first and Fresh in the preflight answer (#447) #468
adf-preflight.ts:243: the "nothing binds" answer is slower. Contract pins are needed to decidebinds, butgit statusisn't, and it now runs first.ci.ymlwent from a median of about 290 ms to 430 ms. Read freshness only once something binds. - PR feat(cli): fill Contract, Run first and Fresh in the preflight answer (#447) #468 tests and reasons. The two-answer
ci.ymltest inadf-preflight.test.tsstill has the 5 s default timeout. Its "under 1 s" test assertselapsed < 3000, so the title and the check disagree. Intest-rank.ts, type-only imports count as symbol evidence, and the import itself is counted (import { foo }plusfoo()gave "calls foo (3)").
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingepic:preflightPreflight answer: make every AI agent want Charter's governancepriority:p1Should ship this cycle
Activity