Repository navigation
Conversation
Signed-off-by: Nik Cubrilovic <[email protected]>
Contributor
Author
|
Landed in bundle #1805, rebase-merged to main. nik |
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.
Closes #296. Part of #637.
What
A cached page entry now records
fan: { cluster, rep }: its fan-out cluster key and the page key of the representative whose template verdicts it holds. A candidate replay is re-checked in the loop (fanReplayable), where every earlier page has already resolved its cluster (a changed page by parsing, an unchanged one from its entry), so the representative is the first page of the cluster in crawl order exactly as in a fresh audit:Acceptance
a run with a cache fans out template-scoped rules(fannedRuleRuns > 0 cold, warm replays all pages), replaces the old exclusivity test.changing a cluster's representative re-runs members that inherited its verdict(afterChange and fullyReplayed both equal a fresh audit; non-vacuous check that the change moved the report). Existinga fully-replayed audit matches a fresh one across a template clusterand parity tests pass.fanReplayableforced to true, the representative test and the toggle test fail (verified).Gates
bun test tests/rule-cache-replay-golden.test.ts: 13 passmake validate: 62 passDocs (docs/cli/audit.mdx) and CHANGELOG Unreleased/Fixed updated. No rule meta text changed: the private rule catalog does not need regenerating. The agent skill needs no change.
Residual: a replayed representative's recorded verdict strips only a
pageUrlequal to its own page (what the stamp sets).