Repository navigation
Conversation
…udit and in the archive
…ut of the other counts
… test facts from the boundary sample, tolerate a missing folder in audit_tests
…mat project-configuration.md
Co-Authored-By: Claude <noreply@anthropic.com>
… ledger baselines Every ledgered scan now records, for each file it changes, the keys of the definite, unsuppressed test findings that file touched before it, capped at 100 a file with a truncated flag. ScanLedger::since composes them as test_baselines, the earliest record winning, and the turn brief judges a reported file the watcher already took in by them instead of leaving test_findings not_evaluated. A missing, cut or merged baseline still does. Also tests TurnTestFindings' cap, truncated flag and file-then-line order, and drops its unused suppressionsOf fallback. Co-Authored-By: Claude <noreply@anthropic.com>
A scan now carries test_findings_judged, set when its test findings are written, even when there were none. The archive copies it into test_findings_recorded instead of the constant 1, so the scan active at an upgrade from before the test rules, archived with no rows, reads as no record and a quality gate against it is indeterminate rather than failing on every existing finding. The column goes in migration 028, which this unreleased branch adds. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…wants Co-Authored-By: Claude <noreply@anthropic.com>
…ndings call Keeps LedgeredScanner's dependency fan-out within the maintainability budget of 15. Co-Authored-By: Claude <noreply@anthropic.com>
A stale mock is a double that no longer matches its target (ghost, arity, return drift); every other definite finding is a test finding. The dashboard gains stale, the brief gains stale per item and total_stale, and the band, Read note and turn-end head say each in its own words.
A double whose module resolved to nothing now touches the files its raw relative specifier can name, read with the TypeScript worker's TYPESCRIPT_SOURCES and REQUIRE_SUFFIXES; a reported, deleted one of them (a renamed module's old path) makes its finding affected. Ruling R13: a key counts as before only when every taken-in reported file that holds it now held it in its ledger baseline, so a later watcher scan's baseline no longer hides a ghost an earlier one made. A baseline read from a scan the test rules never judged leaves the brief not_evaluated.
…t strands Ruling R14: an edit tool cannot delete, so the old path of an rm or git mv is never reported. The deletions the turn's own diff saw (including those a ledgered scan since the turn began took in) now count as the turn's when there are at most ten; past that the diff is checkout-sized and deletions introduce nothing, with the turn still judged. The before-set is judged over the reported and those deleted files, once the diff names them.
snapshot_diff gains a test_findings section (added and removed by key, not_recorded when a side kept none) and architecture_trends a definite_test_findings and stale_test_findings figure per snapshot, null without a record. Both apply the project's current suppressions to every side.
A relative mock specifier with a .js, .jsx, .mjs or .cjs extension now resolves to the TypeScript source it compiles from first, as NodeNext and bundler resolution do, instead of being reported as a definite missing module. The mapping moves to syntax-predicates.js and a PHP test pins MockedModulePaths to it.
…introduced by deleting it A unit test over a stored missing_module whose .js specifier names the deleted .ts source, with a twin whose baseline lacks the key. The brief-level case is renamed to what it checks.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
4 of 5 tasks
This branch has not been deployed
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
Phase 2 of test fidelity shows the findings that phase 1 (#528) stores. It is stacked on #528: the PR targets
feat/test-fidelity-tsand should be retargeted tomainonce #528 merges.sha1(rule_id|sub_rule|file|target_canonical|message).knossos.jsoncan suppress findings withtest_finding_suppressionsentries of the form{rule, path?, reason?}. Arulecan be a category,CATEGORY/sub_rule, or a full rule id. Suppression applies when findings are read, so no rescan is needed.028). A scan the test rules never judged has no record, so a gate against it reportsindeterminatewithbaseline_has_no_test_findingsinstead of failing.quality_gategains anew_definite_test_findingsbudget, computed as a set difference of distinct keys. Findings also appear in SARIF: ruleId isrule_id/sub_rule, level iserrorfor definite andwarningfor warning.test_findingssection. Test doubles and test cases no longer count toward health, dead code, the agent brief or the boundary counts. Spies on lib globals (console,Date.now) are treated as external.doublesedges back from the edited production files, so a stale mock in a test file the turn never touched still counts.rm/git mv, introduces the mocks it strands. Up to 10 deletions per turn count; a turn that deletes more is treated as a checkout.knossos: 2 test doubles of PaymentGateway no longer match it (charge(): arity).knossos: this turn introduced 1 stale mock. Fix it before finishing:testChecks(default on), turns these notes off.N stale mocks · M test findings.GHOST_MEMBER,ARITY_MISMATCHorRETURN_DRIFT. Other definite findings, such as tautologies, are "test findings".snapshot_diffgains atest_findingssection, andarchitecture_trendsgains per-snapshot counts. A snapshot with no record reads as not recorded, never as 0.vi.mock('../src/X.js')now resolves toX.ts, as TypeScript does. NodeNext/ESM projects use.jsspecifiers, and they were getting definite missing-module findings.The output schema stays
1.0; every new field is additive.Review
Each task got its own review. A final whole-branch review, run on the most capable model, found two bugs:
indeterminate.Both were fixed and re-reviewed. Tasks 9–12 came out of that review and had a whole-branch review of their own, which found no Critical or Important issues.
Known costs of design rulings:
Test plan
vendor/bin/phpunit: 6,838 tests. The only failures are the 3 Rust-worker tests that also fail onmain(ProjectUnitVerificationTest×2,ReturnedReceiverTest×1).claude plugin test(218) pass. TypeScript worker vitest: 519 pass.format:check,lint:md, the file-length and maintainability checks, docstring checks, andgenerate-reference --check.test_fidelity_rescan_one_file2.10s against 8s.