← Back to Pull requests

feat(orchestrator): a wave's slices for one assignee in one message (M3, D1562) #333

Open
unknown opened this pull request with 332 lines diff across 4 files
View on GitHub
unknown unknown commented on Oct 28, 2026 20:03 UTC
Author

What

M3's second L3 leak (docs/plans/agents.md → M3, D1562): a wave's slices for one assignee arrive as one message.

  • slices.handoff.together { sliceIds } (new command, Zod in/out, missions.write + agents.message): hands slices as slices.handoff does (readiness, the escalation hold, thread links, active at the first step, node for another node's mission, D1545), grouped by mission and assignee, one agents.send per group. Answers { handoffs, failed }: a group that cannot be handed fails whole with its error, the other groups go on; slices already active answer handed: false and send nothing.

  • One slice gets exactly today's message and id (handoff-<slice>-<updatedAt>); several get "[Slices handed to you]" (handoffsText in brief.ts) with each slice's spec, step and review line and what they serve once; several review briefs share the room under MAX_MESSAGE_LENGTH (D1245), each cut with its review_brief address. The id of a group is a hash of its slices as planned, so a retry delivers once.

  • The orchestrator workflow hands each wave with it instead of one slices.handoff per slice.

  • slices.handoff is now handOffTogether([sliceId]), behaviour unchanged.

  • New error code SLICES_APART. docs/map.md, GLOSSARY.md (Handoff), the L3 Deferred item struck.
  • Before (the L3 run): each handoff started a turn of its own; the reviewer did the wave in its first turn and spent the others answering "Duplicate handoff".

    Evidence

    $ vp test run plugins/orchestrator/test plugins/missions/test
     Test Files  3 passed (3)
          Tests  45 passed (45)
    $ vp run --filter @jhin/plugin-orchestrator typecheck   # tsc --noEmit, clean
    $ npx knip --no-config-hints                             # clean
    $ node scripts/public-ids.ts
    public-ids: no public id removed since 624af51a15c9 (capability 46, command 386 + 2 patterns, …)
    

    New test hands one assignee's slices together, in one message (D1562): two builder slices, an owner slice and an unassigned one in one call → the unassigned one in failed (SLICE_NOT_READY), the rest active; both builder slices link the same thread; agents.conversation with the builder holds exactly one message, whose text names both slices, and the generation's turn starts with it; handing them again sends nothing (still one message). The existing orchestrator tests (one node and the mesh: a lead on another node, a node away) now run through the new path.

    The E2E civilization scenario (handed: [walls, review], two assignees) keeps its order: groups go in the order of their first slice. CI runs it.

    🤖 Generated with Claude Code

    Diff: 332 lines (+249 / -83) across 4 files Reviewer: claude[bot] Review duration: 6m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.42) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 332 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 77% · Reviewer familiarity: 35%
    41%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.347
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #333"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 41.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.1% (MEDIUM) · Higher = larger blast radius
    42.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 41.1% · Lower = rushed or shallow review
    41.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24.8% · Safe to merge
    24.8%
    Repository