Skip to content

feat(repo): end every failed run in one typed failure record - #147

Merged
ryanleecode merged 7 commits into
laughable-mutation-testingfrom
diag-l2-failure-record
Oct 2, 2026
Merged

ryanleecode merged 7 commits into
laughable-mutation-testingfrom
diag-l2-failure-record

Conversation

@systemfsoftware-maker

@systemfsoftware-maker systemfsoftware-maker commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Layer 2 (plan units U2-U6).

A failed run now ends in one FailureRecord: a catalog code, its stage, structured evidence, the cause chain, the next action, a replay capsule and the trace id. The record is printed on stderr, emitted as the schema-3.0 terminal stream event, and written to reports/mutation/failure.json.

  • @systemfsoftware/stryker-js-cli-contract: failure-record.schema.ts, failure-catalog.ts (published as contract/failure-catalog.json), and render-failure.ts (terminal, markdown, GitHub annotations, SARIF text). Stream schema 3.0.
  • StageError and PrepareError are replaced by RunFailure{evidence, detail, cause}. Exit codes come from the catalog: a failing baseline test exits 5.
  • The Vitest runner reports the first project source frame as the location of a failed test and keeps its stack. File-level failures are named by their project-relative path.
  • The duplicate log lines next to the record are gone (dry-run "Initial test run failed", the gate's error and remediation logs). Terminal output shows stacks only for unclassified failures; failure.json keeps them all.

Breaking (BREAK-1): the stream schema is now 3.0, RunFailed has a new shape, StageError is removed, and startPosition is removed. A changeset for each package is included. The e2e failing-run journey asserts the record (KVM-only lane, so it runs in CI).

A failed run now emits a FailureRecord (catalog code, stage, structured evidence, cause chain, next action, replay capsule, trace id) on stderr, as the schema-3.0 terminal stream event, and in reports/mutation/failure.json. StageError and PrepareError are replaced by RunFailure, exit codes come from the failure catalog, and failed baseline tests carry project-relative file, line and stack from the Vitest runner

Verdict-Semantics: unchanged
Trunk's frozen-runner scenario read the removed StageError stage and log capture; it now reads the RunFailure evidence stage

Verdict-Semantics: unchanged
@systemfsoftware-maker
systemfsoftware-maker added this pull request to stack #152 October 2, 2026 01:45
@systemfsoftware-maker systemfsoftware-maker changed the title diag l2 failure record feat(repo): end every failed run in one typed failure record Oct 2, 2026
A successful run carries no failure code, so the e2e trace contract refused every passing run span with a missing key

Verdict-Semantics: unchanged
… failing-run record once

The summary-annotation law accepted any single annotation, so a draw with no located evidence let a constant renderer pass and the fork refused the file as vacuous on macOS. The failing-run journey checked the terminal record in two consecutive steps, which the fork refuses as a second check on the same state

Verdict-Semantics: unchanged
…io expects success

A CI rerun of the claimed-type scenario stopped after file discovery and the Then reported only that the incremental state was not JSON, so the failure that stopped the run was lost

Verdict-Semantics: unchanged
@ryanleecode
ryanleecode removed this pull request from stack #152 October 2, 2026 17:36
@ryanleecode
ryanleecode added this pull request to stack #157 October 2, 2026 17:36
@ryanleecode
ryanleecode merged commit 782fa8e into feat/agent-ready-failure-diagnostics Oct 2, 2026
10 checks passed
@ryanleecode
ryanleecode deleted the diag-l2-failure-record branch October 2, 2026 18:15

@ryanleecode ryanleecode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by the merge conductor as part of the diagnostics stack. CI green on this head except where noted in the stack summary (macOS timeouts on #151 are flaky: the same code is green on macOS in #155 and #156; the #156 stryker-js mutation shard times out until main records its first full-cost timing, as this PR's description says). Merging into feat/agent-ready-failure-diagnostics with a merge commit.

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.

2 participants