Phase 2: estate emitter contract hardenings (declared, red, node/bash, schema) - #2
Merged
Merged
Conversation
…, node/bash, schema
Extend the composite action for the three stats.json-contract hardenings (2026-07-07)
without touching the working jest/vitest/playwright/pytest/bats/python-direct parsers.
- tests.declared: new `declared` input (type:runner:path), held SEPARATE from
total/byType — the neckarshore-website 308->87 over-count fix.
- red/red_detail: new `test_result` + `red_detail` inputs. Non-green => red:true +
a one-line detail; the file is STILL written so the aggregator WARNs, not blind.
Green/absent => red:false, red_detail:null (backward compatible).
- total = executed AND CI-gated AND disjoint: documented in action.yml + README;
caller routes gated lines -> runners, ungated -> declared.
- node/bash runners: ok-line (TAP-lite) counters for md-viewer's hand-rolled Node
harness + bash smoke scripts. Additive; reads the runner's own printed output.
- Schema validation in CI: tests/stats.schema.json (draft-07) + tests/validate-schema.sh
(ajv-cli@5.0.0) validate every emitted stats.json against the hardened contract.
Golden fixtures (all green locally, 28 bats + schema):
- A md-viewer 54 = 8/13/33 disjoint (REAL captures), declared {}, red false
- B declared split: gated 87 (vitest 85 + unittest 2, real) / declared e2e 293 (shape)
- C red: red:true + non-null red_detail, file still written
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DUhq2kjy2y4h9TtWqg6Ljw
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.
What
Extends
test-stats-actionfor the three stats.json contract hardenings (2026-07-07) — dispatch brief · contract. Purely additive — the working runner-parsers are untouched.The three hardenings
tests.declared— newdeclaredinput (sametype:runner:pathformat). Executed-but-ungated /--list-only counts, held separate fromtotal/byType. The neckarshore-website 308 → 87 over-count fix.red/red_detail— newtest_result+red_detailinputs. Non-green →red:true+ one-line detail; the file is still written so the aggregator WARNs, not goes blind. Green/absent →red:false,red_detail:null(backward compatible).total= executed AND CI-gated AND disjoint — documented inaction.yml+ README; caller routes gated lines →runners, ungated →declared.Plus (required by the DoD's fixture A):
node/bashrunners — ok-line (TAP-lite) counters for md-viewer's hand-rolled Node harness + bash smoke scripts. Reads the runner's own printed output, never source.DoD — all green locally
total=54,byType={unit:8, integration:13, e2e:33}disjoint,declared={},red:false— from real capturestotal=87(vitest 85 + unittest 2, real),declared={e2e:293}— 293 not in totalred:true, non-nullred_detail, file still writtentests/stats.schema.json(draft-07) +tests/validate-schema.sh(ajv-cli@5.0.0) — A/B/C all validdeclared,red, node/bash runners, cascade/disjoint example, provenanceProvenance note
All fixtures are real captured reporter output, except the single documented shape fixture
declared/website-e2e-list.txt(real playwright--listformat, illustrative 293 count) that exercises the declared-split routing — parsing is covered by the captured playwright fixture (197).Not in this PR (per brief)
ci.yml+stats-config.json(a write to a non-action repo) — follow-up.red[]/stale[],declaredroll-up) — Linus-lane.MASCHIN PIR: read-the-code, reproduce fixtures A/B/C, confirm no grep + contract-valid.
🤖 Generated with Claude Code