Skip to content

Phase 2: estate emitter contract hardenings (declared, red, node/bash, schema) - #2

Merged
GmanFooFoo merged 1 commit into
mainfrom
bob/estate-emitter-phase2-hardenings
Jul 8, 2026
Merged

Phase 2: estate emitter contract hardenings (declared, red, node/bash, schema)#2
GmanFooFoo merged 1 commit into
mainfrom
bob/estate-emitter-phase2-hardenings

Conversation

@GmanFooFoo

Copy link
Copy Markdown
Member

What

Extends test-stats-action for the three stats.json contract hardenings (2026-07-07) — dispatch brief · contract. Purely additive — the working runner-parsers are untouched.

The three hardenings

  1. tests.declared — new declared input (same type:runner:path format). Executed-but-ungated / --list-only counts, held separate from total/byType. The neckarshore-website 308 → 87 over-count fix.
  2. red/red_detail — new test_result + red_detail inputs. 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).
  3. total = executed AND CI-gated AND disjoint — documented in action.yml + README; caller routes gated lines → runners, ungated → declared.

Plus (required by the DoD's fixture A): node/bash runners — 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

Gate Result
Golden A — md-viewer 54 total=54, byType={unit:8, integration:13, e2e:33} disjoint, declared={}, red:false — from real captures
Golden B — declared split total=87 (vitest 85 + unittest 2, real), declared={e2e:293} — 293 not in total
Golden C — red red:true, non-null red_detail, file still written
Schema validation in CI tests/stats.schema.json (draft-07) + tests/validate-schema.sh (ajv-cli@5.0.0) — A/B/C all valid
Existing bats stay green 18 → 28 tests, no regression to runner-parsers
README declared, red, node/bash runners, cascade/disjoint example, provenance

Provenance note

All fixtures are real captured reporter output, except the single documented shape fixture declared/website-e2e-list.txt (real playwright --list format, illustrative 293 count) that exercises the declared-split routing — parsing is covered by the captured playwright fixture (197).

Not in this PR (per brief)

  • Pilot wiring of md-viewer's ci.yml + stats-config.json (a write to a non-action repo) — follow-up.
  • Phase 4 aggregator (freshness gate, red[]/stale[], declared roll-up) — Linus-lane.

MASCHIN PIR: read-the-code, reproduce fixtures A/B/C, confirm no grep + contract-valid.

🤖 Generated with Claude Code

…, 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
@GmanFooFoo
GmanFooFoo merged commit 7a53ad0 into main Jul 8, 2026
2 checks passed
@GmanFooFoo
GmanFooFoo deleted the bob/estate-emitter-phase2-hardenings branch July 8, 2026 03:16
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