Skip to content

feat(trace): classify run-state failures as PR check, verification, environment, or tool - #508

Merged
castrojo merged 2 commits into
projectbluefin:mainfrom
kylerankin:fix/465-trace-failure-taxonomy
Sep 13, 2026
Merged

feat(trace): classify run-state failures as PR check, verification, environment, or tool#508
castrojo merged 2 commits into
projectbluefin:mainfrom
kylerankin:fix/465-trace-failure-taxonomy

Conversation

@kylerankin

Copy link
Copy Markdown
Contributor

Trace failures all rendered as a red ✘ that read like the pull request's own
checks going red. A workspace mismatch, an unavailable verification, or a
cancelled review were indistinguishable from a real PR check failure (#465).

Add a TraceClass taxonomy beside the visual SpanStatus: status still says
"failed"; cls says why. classStatus() collapses the four failure classes to
failure and cancelled to skipped, so the icon vocabulary never changes — only
the reason becomes distinct, shown as a badge.

classifyRunState/classifyReviewEvent/classifyLanding wired into buildPipelineSpans
and the tool/turn endings in session.ts. A run-state failure now sits on its own
span beside a real PR check, so the queue still carries the PR's checks from GitHub.

Fixtures render a distinct label for every class; all 60 tests pass.

— hive: backend=pi model=lemonade/Ornith-1.5-35B-A3B-GGUF-Q6_K

🐝 Hive Agent: contributor | SHA: c1cb116

kylerankin and others added 2 commits September 12, 2026 21:31
projectbluefin#465)

The trace rendered every run-state failure as a red ✘ that read like a PR
check failure, so a workspace mismatch, an unavailable verification, or a
cancelled review looked like the pull request's own checks went red.

Add a TraceClass taxonomy (trace.ts) alongside the visual SpanStatus: the
status still says 'failed', the class says *why*. classStatus() collapses the
four failure classes to 'failure' and cancelled to 'skipped', so the icon
vocabulary never changes — only the reason a span failed becomes distinct,
rendered as a right-hand badge.

- head_changed (projectbluefin#471) → environment / WORKSPACE, never pr-check
- review_missing/incomplete/unparsable → verification / UNVERIFIED
- mutation_failed → tool / TOOL
- cancelled review or tool call → cancelled / CANCELLED, rendered skipped
- the selected PR's failing checks → pr-check / CHECK on the root span,
  derived from PR state (ciStatus), not the run log

Wire classifyRunState/classifyReviewEvent/classifyLanding into buildPipelineSpans
and tool/turn endings in session.ts. A run-state failure now sits on its own
span beside a real PR check, so the queue still carries the PR's checks.

Adds 7 tests; all 60 pass.

Signed-off-by: kylerankin <kylerankin@users.noreply.github.com>
# Conflicts:
#	image/extension/bluefin-review/state.ts
#	tests/omp-review-mode.test.ts
@castrojo

Copy link
Copy Markdown
Contributor

Merged current main into this branch and resolved the two conflicts; both were keep-both, not either-or.

  • state.tsmain added ItemCurrency/isItemTerminalBlocked at the same anchor where this branch adds classifyRunState. Both are kept. The one real decision: this branch reimplements runStateStatus as classStatus(classifyRunState(state)), which is the point of P1 — classify trace failures by PR, verification, environment, tool, and cancellation semantics #465 — the visual status derives from the reason, so the icon cannot drift from it. I kept that and dropped main's standalone switch, rather than leaving two implementations of the same function.
  • tests/omp-review-mode.test.ts — import conflict; took the union (ciGlyph from this branch, parseMouseEvent from main).

No rebase, no --ours/--theirs, no force-push.

bash tests/omp-review-mode.sh          72/72
python3 tests/slay_state_contract.py   45/45
bash tests/bluefin-review.sh           OK
bash tests/test-registry.sh            OK

Over to CI.

@castrojo castrojo changed the title review: classify trace failures (PR check, verification, env, tool, cancel) #465 feat(trace): classify run-state failures as PR check, verification, environment, or tool Sep 13, 2026
@castrojo
castrojo merged commit 0f272ab into projectbluefin:main Sep 13, 2026
3 of 4 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.

2 participants