Skip to content

Enrich trace v0 with blocker_codes#3

Merged
aid-ninja merged 2 commits into
mainfrom
trace-blocker-codes
Jun 21, 2026
Merged

Enrich trace v0 with blocker_codes#3
aid-ninja merged 2 commits into
mainfrom
trace-blocker-codes

Conversation

@aid-ninja

Copy link
Copy Markdown
Contributor

Summary

  • Adds blocker_codes: string[] (sorted, unique, deterministic) to every trace artifact — the distinct blocker codes (E_*) seen across a run.
  • Schema stays additionalProperties: false; blocker_codes is a new required key.
  • Conformance asserts the field exists, is a sorted unique string[], and contains the expected E_* codes for a driver run.
  • trace.md updated.

Why

blocker_codes is what lets the upcoming bean-lessons analyzer rank which gate conditions fire most (evidence bars, open risks, conflicts, verifier failures) — the most actionable signal for improving bean itself. Trace v0 stored blocker counts only. This is a trace-format correction, kept separate from the analyzer so the contract change is reviewable on its own.

trace v0 is unreleased, so no migration.

Validation

  • npm test
  • node test/conformance.mjs
  • cargo fmt --check --manifest-path rs/Cargo.toml

🤖 Generated with Claude Code

aid-ninja and others added 2 commits June 20, 2026 23:38
Adds blocker_codes (sorted, unique string[]) to every trace artifact — the distinct blocker
codes (E_*) seen across the run. This is the field the upcoming bean-lessons analyzer needs to
rank which gate conditions fire most (weak load-bearing, open risks, conflicts, verifier
failures); trace v0 previously stored only blocker COUNTS.

- bean-run: derive blocker_codes from the open-front keys; emit alongside the counts.
- schemas/trace.schema.json: new required key, array of unique strings; top level stays
  additionalProperties:false.
- conformance: asserts the field exists, is a sorted unique string[], and contains the expected
  E_OPEN_RISK for the driver fixture.
- trace.md updated.

trace v0 is unreleased, so no migration.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…osed), not final-state

Per review of #3: make the docs/schema explicit that blocker_codes is the set of distinct
codes seen across all rounds — including blockers later closed — not a count and not
final-state-only. Code already behaves this way (derived from blockers_seen, not final).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@aid-ninja aid-ninja merged commit b8c8c21 into main Jun 21, 2026
3 checks passed
@aid-ninja aid-ninja deleted the trace-blocker-codes branch June 21, 2026 04:42
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