Skip to content

Credit property and acceptance only on a matching passed test - #56

Merged
VirtualMachinist merged 10 commits into
mainfrom
hn/g3-credit
Nov 20, 2026
Merged

VirtualMachinist merged 10 commits into
mainfrom
hn/g3-credit

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

Slice 1.3: a credited property or acceptance layer needs a matching passed test in the run it was credited from.

  • Evidence. When property or acceptance takes the coverage run, it passes only if that run's nextest JUnit report holds a passed test whose name has a ::-separated segment starting with the layer's test_filter. No match, only failed or skipped matches, or no JUnit report is fail. The detail names the filter and the path read, or [profile.ci.junit]. Nothing is built or run a second time.
  • One rule. A layer that runs itself selects with the same rule: --no-tests=fail -E 'test(/(^|::)<escaped filter>/)' replaces the bare positional filter. That is a deliberate behaviour change: a test that only mentions the word, such as a_property_filter_that_matches_nothing_fails, is no longer evidence.
  • Keys. gates.property.test_filter (default property) and gates.acceptance.test_filter (default acceptance), in the schema and its copy and in PROTOCOL.md §6.5.1 and §9.5.
  • Acceptance. It had no command, so an enabled acceptance was not-run and exited 1. It now takes property's command and credit rule, with its own filter.
  • The kit. tests/property.rs holds nine proptest properties written from the spec: exemption date validity, the calendar, glob matching, and exemption liveness. proptest = "1" is a dev-dependency.
  • Moved expectations. The argv text in laws_gate.rs follows the new filter form. The unmapped-layer test uses miri in place of acceptance. No expectation was relaxed.

Gate at the head: nextest 499 passed, 1 skipped; 73 mutants tested in 3m: 67 caught, 6 unviable; ok: 8 command(s) passed.

🤖 Generated with Claude Code

VirtualMachinist and others added 9 commits November 19, 2026 20:50
…edit oracle

evidence.rs reads a credited run's nextest JUnit report and passes a layer
only on a passed test whose name holds the layer's test_filter. It is held
under credit.rs until the gate wiring lands. tests/property.rs has nine
proptest properties on the expiry date and glob rules. gate_credit.rs is the
stub-driven oracle for the wiring and is red until then.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A credited layer passes on a passed test with a ::-separated name segment
that starts with test_filter, so a test that only mentions the filter
mid-name is no evidence. The kit guard checks no other kit test starts a
name with property.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A credited property or acceptance layer passes only when the credited run's
nextest JUnit report holds a passed test with a :: segment starting with the
layer's test_filter (default property or acceptance). A layer that runs
itself selects tests with the same rule through -E and --no-tests=fail.
acceptance gets property's command and credit rule; it was NotRun.
gates.property.test_filter and gates.acceptance.test_filter join the schema,
section 6.5.1 and section 9.5. mod evidence moves into main.rs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Split the tag at its closing bracket instead of counting past it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A layer with no mapped command and a layer whose run kept a note both
explain themselves in the report. One function now says which, which takes
two branches out of unit_row.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The JUnit report is read from the workspace root cargo metadata names plus
nextest's store dir, never from CARGO_TARGET_DIR, and a report older than
the credited run is not evidence. A failed evidence check is carried as the
run note into stdout, detail and problems, and no longer blames a passing
coverage run. test_filter is held to letters, digits and underscore in both
schemas, so check refuses anything else and no escaping is needed. Real
nextest tests cover a moved target dir, a moved store and a stale report.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@NebuHedron
NebuHedron self-requested a review as a code owner November 20, 2026 05:01
…the stale rule

The real-nextest fixture passed every cargo subcommand but metadata to a real
cargo that has no deny on a runner, so security-advisory failed the gate;
only metadata is real now. Every evidence failure names the layer and its
filter. The stale rule compares the report's mtime with the credited run's
own start and refuses a future date. The failed-coverage and unit/integration
tests come back, and the real-nextest tests get a longer slow timeout.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@VirtualMachinist
VirtualMachinist merged commit 9744cb7 into main Nov 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant