Skip to content

[codex] fix resilient coordinator triage output#458

Draft
VIVAAN-DHAWAN wants to merge 1 commit into
nexu-io:mainfrom
VIVAAN-DHAWAN:codex/resilient-triage-comments
Draft

[codex] fix resilient coordinator triage output#458
VIVAAN-DHAWAN wants to merge 1 commit into
nexu-io:mainfrom
VIVAAN-DHAWAN:codex/resilient-triage-comments

Conversation

@VIVAAN-DHAWAN

@VIVAAN-DHAWAN VIVAAN-DHAWAN commented May 24, 2026

Copy link
Copy Markdown

Fixes #456

Summary

  • tolerate coordinator triage JSON wrapped in markdown fences or surrounding prose
  • default missing single-label fields to safe coordinator choices and choose the first allowed label when a model returns extra allowed values, including multiple dispatch labels
  • ignore irrelevant labels for unclear/out-of-scope decisions
  • guide triage comments toward a warmer maintainer style modeled after recent lefarcen issue responses: acknowledge the reporter, reference concrete issue details, name routing/status, and give one next step

Root cause

The coordinator treated the LLM response as exact raw JSON and rejected otherwise usable decisions when models returned fenced JSON, prose-wrapped JSON, missing label groups, extra labels on non-valid dispositions, or more than one dispatch label. That made triage silently no-op in common agent-output cases.

Validation

Notes

I sampled recent lefarcen comments on nexu-io/open-design issues nexu-io/open-design#2815, nexu-io/open-design#2801, nexu-io/open-design#2794, and nexu-io/open-design#2785. The common pattern was warm acknowledgement, concrete issue recap, explicit routing/status, and a clear next step; this PR adds that guidance to the coordinator prompt without changing the comment stamping/disclosure path.

@VIVAAN-DHAWAN VIVAAN-DHAWAN force-pushed the codex/resilient-triage-comments branch from e75c50d to 2df343a Compare May 24, 2026 10:26
@PerishCode PerishCode added looper:lab Temporary Looper Network lab trigger looper:target:20m-lab-1 Temporary Looper Network lab target and removed looper:lab Temporary Looper Network lab trigger looper:target:20m-lab-1 Temporary Looper Network lab target labels Jun 8, 2026

@quangdang46 quangdang46 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

πŸ€– Hermes QA Report | PR #458 β€” [codex] fix resilient coordinator triage output

Verdict: APPROVED βœ… β€” Code is well-structured, properly tested, and addresses a concrete silent-noop bug.

Quality Gates

Check Result
go vet ./... βœ… PASS
go build ./... βœ… PASS
go test ./internal/coordinator/triage/... βœ… PASS (15/15)

Code Review Summary

What this PR does (3 changes in 2 files, +197/βˆ’20):

  1. Resilient JSON parsing β€” Adds extractJSON() that strips markdown fences (```json) and prose wrapping before json.Unmarshal, so the coordinator no longer silently no-ops when LLMs return fenced or prose-wrapped JSON output.

  2. Graceful defaulting β€” Replaces strict requireExactlyOne() with requireAllowedOrDefault() that tolerates missing label fields by falling back to sensible defaults (kind β†’ kind/feature, area β†’ area/runtime for bugs, dispatch β†’ dispatch/plan, complexity β†’ complexity/m). Labels from out-of-scope/unclear dispositions are now ignored instead of rejected.

  3. Warmer comment style β€” Added maintainer-style comment guidance to the prompt with reporter @-mention, concrete issue reference, clear next steps. Added area/sweeper to allowed areas.

Positives:

  • Properly tested: 133 new lines of tests covering fenced JSON, text-wrapped JSON, missing labels, extra labels, out-of-scope ignore, first-allowed selection, and warm-style prompt guidance. All existing tests preserved.
  • Clean design: The extractJSON β†’ requireAllowedOrDefault chain is simple, composable, and easy to verify. No new abstractions introduced.
  • Well-scoped: 197 additions focusing only on the triage output parsing layer. No scope creep.
  • PR body is substantive: Root cause analysis, validation with live testing on 5 repos, and concrete examples of what broke.

Concerns:

  • None. Code is clean, tests are thorough, changes are minimal and well-justified.

Recommendation

Ready to merge. The upstream origin/main has drifted significantly (137 file diff from branch base), so the PR will need a rebase/merge before landing, but the code itself is clean.

Reviewed at 2026-06-21 from Hermes QA cron.

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.

Didnt work on my mac with opencode

3 participants