Skip to content

test(evals): Crew seat-finish guards for #1191 - #1194

Merged
Jacksondr5 merged 3 commits into
j5/mainfrom
j5code/evals-crew-seat-finish
Nov 28, 2026
Merged

Jacksondr5 merged 3 commits into
j5/mainfrom
j5code/evals-crew-seat-finish

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Problem

#1193 (issue #1191) stops posting <j5_seat_finished> to a Captain when a Crew seat's run completes; only a failed run still posts one. A Captain then learns a member is done only if the member says so. These evals check that taking the notice away doesn't leave Captains waiting on members that never report, without adding instruction text.

What changed

Four cases in evals/j5-cli/cases/crew-seat-finish.ndjson, all sourced to #1191, on authored Acme data:

Case Kind Pass when
crew-member-done guard A builder whose commit the reviewer just passed sends its Captain the result.
crew-member-stuck guard A release seat that can't push or open the PR (gh signed out) sends its Captain a blocker.
crew-member-prep control A reviewer whose first delivery assigns it nothing sends its Captain nothing. Its brief says to send no acknowledgments.
crew-captain-assigns control A Captain reading the launch report sends the builder its assignment and does not wait, sleep or poll.

Runner support, so no case copies server text:

  • j5Turns case field (j5Turns.ts): renders a seat's first delivery (spawnFirstTurnText inside CrewTurnContext's delivery wrapper, then the Captain's message), a peer message (formatPeerEnvelope), and a Captain's launch report (crewLaunchReportText) with the server's own functions. A case places them with {{j5:<name>}} and gives only the facts. CrewTurnContext.deliveryContext is now exported for this.
  • J5 tools in earlier turns: these now load from the J5 catalog on Claude, so an earlier turn can call j5_send_message or j5_propose_crew.
  • --dry-run prints each case's conversation on the host, without a container.

Results

Old text is this branch (57fbcd771c). New text is this branch with j5code/seat-finish-failures-only merged in. Between the two, the agent-facing diff is only the Crew bullet in orchestrationInstructions.ts and the pending-seat line in crewGateNotice.ts. I checked that each runner's Claude system prompt carries its own version of the bullet. Runs used 3 samples per case at high effort.

Case Sonnet 5.5, old → new GPT-6.1 Sol, old → new
crew-member-done 3/3 → 3/3 3/3 → 3/3
crew-member-stuck 3/3 → 3/3 3/3 → 3/3
crew-member-prep 3/3 → 3/3 3/3 → 3/3
crew-captain-assigns 3/3 → 2/3 3/3 → 3/3
  • The one failure (new text, Sonnet, crew-captain-assigns): the Captain sent all three seats their assignments and ended its turn without waiting or polling, which is the behavior this case checks. It failed because it addressed the seats by seat name (to: "builder") instead of participant id. The eval's j5_send_message stand-in reports success for any to, where the real tool would presumably refuse the name and let the agent retry. The new text doesn't touch addressing, so I count this as unrelated to the change.
  • Blockers: every crew-member-stuck message to the Captain names GitHub authentication as what's needed.
  • Prep: no sample sent the Captain anything.
  • Errors: none.

Usage (from each run's summary.md):

Run Agent tokens (input / cached / output) Claude API-price figure Shell simulator (Haiku)
Sonnet, old 131,707 / 965,161 / 15,411 about $0.78 about $0.01
Sonnet, new 145,882 / 994,754 / 14,268 about $0.83 about $0.01
Sol, old 334,076 / 1,036,928 / 6,736 none about $0.02
Sol, new 285,037 / 1,204,736 / 7,779 none about $0.01

Removing the completed-run notice caused no regression on these cases.

Since review (2026-11-28)

The branch is rebased onto j5/main, after #1125, #1228 and #1289, and is no longer stacked.

Two fixes from the Opus and Sol review:

  • Unfilled placeholders fail. Loading a case throws if any {{j5:…}} placeholder is left after filling, including in a case with no j5Turns field (j5Turns.ts, with a test in upstream.test.ts).
  • The positive cases grade content, not just the recipient. Before this fix, an "Acknowledged" sent to the right seat passed.
    • crew-member-done needs the result named: the commit, the branch, the test, or "commit". (A second review round loosened it from "the SHA and a pass", which rejected correct reports.)
    • crew-member-stuck needs the auth blocker named (auth, credential, login, signed in or token).
    • crew-captain-assigns needs the assignment's content, and the Captain must end its turn after sending (endsTurnAfter).

I regraded the saved old-text samples offline with the real grader: 24 of 24 still pass. When I replaced every message with "Acknowledged.", all 9 guard and assign samples failed. The new-text samples weren't kept, so the new-text column below hasn't been regraded under the new checks.

Caveat on all numbers below: before #1289, the j5-cli Claude runner ignored --effort, so the Sonnet samples ran at medium, not high.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior: upstream.test.ts passes; --dry-run checked the rendered turns
  • UI changes: none
  • Live testing: not applicable (eval only)
  • Upstream-owned files: none edited
  • Upstream product: no change
  • Surfaces: not applicable
  • Docs: evals/j5-cli/README.md covers j5Turns and --dry-run

Built with Claude Opus 5.5 in Claude Code (J5 Code).

🤖 Generated with Claude Code

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Nov 28, 2026 10:46pm UTC

Request Review

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 effective changed lines (test files excluded in mixed PRs). labels Nov 23, 2026
@Jacksondr5
Jacksondr5 force-pushed the j5code/evals-real-clis branch from f934dac to 69ca50c Compare November 24, 2026 03:14
@Jacksondr5
Jacksondr5 force-pushed the j5code/evals-crew-seat-finish branch from 57fbcd7 to f66dae6 Compare November 24, 2026 03:14
@Jacksondr5
Jacksondr5 force-pushed the j5code/evals-real-clis branch from 69ca50c to cbeab9e Compare November 28, 2026 21:15
Base automatically changed from j5code/evals-real-clis to j5/main November 28, 2026 21:37
@Jacksondr5
Jacksondr5 force-pushed the j5code/evals-crew-seat-finish branch from f66dae6 to d75c495 Compare November 28, 2026 21:43
Jacksondr5 and others added 2 commits November 28, 2026 17:35
Four cases for a Crew without completed-run notices: a member that
finished, a member that is blocked, a member with nothing to do yet,
and a Captain that just assigned work. Their seat deliveries, peer
messages and launch report are rendered by the server's own functions
through a new j5Turns case field. --dry-run prints a case's
conversation without a container.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed turns fail

A case's message to the Captain or builder now has to carry the result,
the blocker or the assignment, not just reach the right seat, and the
Captain's assigning case must end its turn after sending. A case with a
{{j5:...}} placeholder nothing fills now fails to load instead of sending
the literal token to the model.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…es the result or the auth blocker

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Jacksondr5
Jacksondr5 marked this pull request as ready for review November 28, 2026 22:46
@Jacksondr5
Jacksondr5 enabled auto-merge (squash) November 28, 2026 22:46
@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5d8c14e and 3942cf5.

Files selected for processing: 8

  • apps/server/src/j5/a2a/CrewTurnContext.ts
  • evals/j5-cli/README.md
  • evals/j5-cli/cases/crew-seat-finish.ndjson
  • evals/j5-cli/j5Results.ts
  • evals/j5-cli/j5Turns.ts
  • evals/j5-cli/run.ts
  • evals/j5-cli/upstream.test.ts
  • evals/j5-cli/upstream.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Jacksondr5
Jacksondr5 merged commit deac9d3 into j5/main Nov 28, 2026
43 of 45 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/evals-crew-seat-finish branch November 28, 2026 23:08

This branch was successfully deployed

1 active deployment
Preview — 3942cf52 Deployed Nov 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant