Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .2119/verdicts/REQ-003.1.8--f0911761e205.json

This file was deleted.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-003.1.8.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .2119/verdicts/REQ-003.2.2.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .2119/verdicts/REQ-003.4.2.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .2119/verdicts/REQ-003.8.2.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .2119/verdicts/REQ-005.2.6.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .2119/verdicts/REQ-008.1.2.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .2119/verdicts/REQ-008.2.1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .2119/verdicts/REQ-008.2.2.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .2119/verdicts/REQ-010.2.1--d99f97668eda.json

This file was deleted.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-010.2.1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-013.1.1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-013.1.2.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-013.2.1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-013.2.2.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-013.3.1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .2119/verdicts/REQ-013.4.1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ review_model: "opus" # advisory, platform-specific; default recommends
# "a capable, cost-effective model"
shared_evidence: [] # globs of shared fixtures/helpers hashed into every
# test-quality review (see docs/scaling.md)
evidence_groups: # optional scoped helper invalidation: per-feature
storage: # groups mapping covering test-file globs to helper/
tests: ["tests/storage/**"] # fixture globs hashed only into reviews
evidence: ["helpers/storage.ts"] # those tests cover (see docs/scaling.md)
comment_leaders: [] # extra comment leaders for annotation lines, beyond
# //, #, *, /*, --, ;, %, <!--
audit: "off" # "always" generates adversarial audits of passing
Expand Down
33 changes: 33 additions & 0 deletions docs/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,39 @@ shared_evidence:
Their content then joins every test-quality hash. The cost is honest churn: editing a shared
helper re-opens every dependent review, which is exactly what should happen.

## `evidence_groups` for scoped helper invalidation

A universal `shared_evidence` list couples every review to every shared file. Declare per-feature
groups when most helpers serve one feature, keeping the global list for genuinely universal
helpers:

```yaml
# .2119.yml
shared_evidence:
- tests/helpers/** # universal: joins every test-quality hash
evidence_groups:
storage:
tests: ["tests/storage/**"]
evidence: ["helpers/storage.ts", "fixtures/storage/**"]
parser:
tests: ["tests/parser/**"]
evidence: ["helpers/parser.ts"]
```

A requirement's review hash then includes only the groups its covering tests belong to, so
changing a storage helper re-opens storage reviews and leaves parser reviews current. The
declared globs themselves join the hash: adding, removing, or editing a mapping invalidates the
verdicts that depended on it, so a dependency cannot be quietly dropped under an old approval. A
group whose `tests` or `evidence` globs match no files fails `check` loudly — a typo must not
read as coverage. Cosmetic glob reordering does not invalidate: the declaration is canonicalized
before hashing.

The integrity caveat is the mapping's own reviewability. A group is a declared dependency
boundary; a helper the tests really use but no group declares (and no global list covers) keeps
old approvals alive across edits to itself. Review `evidence_groups` changes like code: the globs
are a claim about what the evidence depends on. Groups do not attempt semantic change detection
and never delete evidence; they only make invalidation match the declared boundary.

## Periodic adversarial audits (cross-provider)

Fresh context is not fresh framing: reviewers sharing one model family and one instruction
Expand Down
46 changes: 46 additions & 0 deletions specs/REQ-013-evidence-groups.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# REQ-013: Evidence Groups

## Overview

`shared_evidence` (REQ-003.1.8) protects verdicts against neutered helpers by
joining every matching file into every test-quality hash. The cost is coupling:
one universal list means one helper edit re-opens every review, which pushes
adopters toward under-declaring helpers — the opposite failure, where an omitted
dependency silently preserves an approval over weakened evidence.

Evidence groups make that boundary explicit and scoped. A group declares which
covering test files it applies to (`tests`) and which helper/fixture files those
tests depend on (`evidence`). A requirement's review hash then includes only the
groups its covering tests belong to, plus any global `shared_evidence`, so
weakening an applicable helper still invalidates its dependent verdicts while
editing one feature's helpers no longer re-opens another feature's reviews.

This is deliberately a declarative mapping, not a dependency analyzer: the
declaration is itself part of the review identity, so adding, removing, or
editing a group invalidates the verdicts that depended on it, and a group whose
globs match no files fails `check` loudly instead of reading as coverage. The
declared boundary is only as trustworthy as its review — an omitted helper is a
claim that no review catches mechanically, so group edits deserve the same
scrutiny as the code they gate. This implements the narrower-invalidation
direction from issue #38 (and the scoped-groups proposal on issue #27) as a
config capability; it deletes no evidence and detects no semantic equivalence.

## Requirements

### REQ-013.1: Group declaration

1. The optional `evidence_groups` config key MUST declare named groups, each mapping covering test-file globs (`tests`) to helper/fixture globs (`evidence`).
2. A declared group with a missing or empty `tests` or `evidence` list MUST be rejected with an error naming the group, rather than silently read as an empty mapping.

### REQ-013.2: Scoped hash binding

1. A test-quality review hash MUST include the content of every repository file matched by the `evidence` globs of each group whose `tests` globs match at least one of the requirement's covering test files, so weakening an applicable helper invalidates the verdicts that depend on it.
2. A test-quality review hash MUST include each applicable group's declared `tests` and `evidence` globs, so adding, removing, or editing a dependency mapping changes the review IDs of the verdicts that depended on it.

### REQ-013.3: Loud unresolved groups

1. A declared group whose `tests` globs or `evidence` globs match no repository files MUST produce a check violation naming the group and the unmatched globs, rather than silently treating the declared coverage as satisfied.

### REQ-013.4: Inapplicable isolation

1. A requirement's review hash MUST NOT include the content of, or the declared globs of, groups whose `tests` globs match none of the requirement's covering test files, so editing one feature's helpers or mappings does not change another feature's review IDs.
Loading
Loading