fix(evals): state the product's handoff authority in the handoff-same-task workflow fixture (#21383)

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Cases move one primary task between agents through handoffs
> - The chat eval `cases.handoff-same-task` writes a workflow document
on the case's primary task during setup
> - That document said: "Case handoff authority belongs to the actual
primary task execution." The product has no such rule.
> - #21372 changed the grader to accept the product's real rule. The
fixture text still told the agent the wrong rule.
> - This pull request rewords the sentence to match
`server/src/services/case-handoffs.ts`.
> - The benefit is that the setup does not steer the agent to a
procedure that the product does not require.

## Linked Issues or Issue Description

Refs #21372

**What happened?**
The setup workflow document in
`tests/runner-e2e/chat-catalog-domains/integrator-case-handoff.ts`
stated a handoff authority rule that the product does not have.

**Expected behavior**
The fixture states the product's rule. The assignee may hand off its own
task unless another run owns that task ("Agents may hand off only their
own task" and "Another run owns this task" in `case-handoffs.ts`).

**Steps to reproduce**
Read the `workflow_document_text` of the `cases.handoff-same-task`
setup. Compare it with the agent handoff checks in `case-handoffs.ts`.

**Paperclip version or commit**
master 3b89461210.

## What Changed

- Replace one sentence in the fixture's workflow document text. New
text: "Ordinary task authority applies to the handoff: the assignee may
hand off its own primary task unless another run owns that task."
- No grader, run bound or oracle change.

## Verification

- `node tests/runner-e2e/source-sdk-public-inputs.mjs <sha> --check`:
`changed: false`. The SDK public input pins cover `packages/shared` and
the plugin SDK only, so this fixture text is not a pinned input.
- The TestOps manifest (`chat-full-catalog-testops-manifest.json`)
records case metadata and source file names, not fixture text. It needs
no change. `node --test
tests/runner-e2e/chat-full-catalog-testops-manifest.test.mjs`: 10
passed.
- Vitest: `integrator-case-handoff`, `chat-catalog-consistency`,
`chat-catalog-fingerprint` and `chat-catalog-contract` tests: 26 passed.
- No paid run. The change is wording-only. The grader from #21372
accepts both the direct and the routed handoff, and paid run 43424861825
passed with that grader.

## Risks

- Low. Eval setup wording only. The agent now reads the true rule. The
grader already accepts both handoff routes.

## Model Used

- Anthropic Claude, model ID `claude-opus-5-5`, used through Claude Code
with tool use (shell, file edits, GitHub CLI).

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 5.5 authored and GitHub committed 2026-11-13 07:39:40 -06:00
1 parent 8af889f612
commit 11840f9904
1 file changed
+1 -1
@@ -107,7 +107,7 @@ export const integratorCaseHandoffCases = [integratorDefinition("cases", "cases.
const kickoff = await ctx.input.api.post<HandoffCaseResult>(`/api/companies/${ctx.input.fixtures.company.id}/case-handoffs`, {
idempotencyKey: `morgan-primary-${ctx.input.nonce}`, case: { create: { caseType: "customer", title: "Mobile checkout investigation", projectId: p.id, fields: { browser: "mobile Safari", observed: "Tapping Pay does nothing; keyboard activation succeeds" } } }, toAgentId: ctx.input.fixtures.agent.id, phase: "investigation",
instructions: "Read the saved customer observations and save a document with key findings on this ordinary task, keeping observation distinct from an unproven root cause. Then call the connected Website Brief read_website_brief tool to wait for the remaining source evidence. Do not complete or hand off this investigation until the person's next direction.",
workflow_document_text: `# Owners and review\nMorgan investigates this same ordinary primary task and saves findings. Riley (${reviewer.id}) is the eligible next reviewer. A later explicit human review request must preserve this task and its findings. Case handoff authority belongs to the actual primary task execution. Riley reviews the saved findings, saves a review comment, and marks this review task done without a terminal case handoff. Case closure requires a later explicit accepted-fix decision.`,
workflow_document_text: `# Owners and review\nMorgan investigates this same ordinary primary task and saves findings. Riley (${reviewer.id}) is the eligible next reviewer. A later explicit human review request must preserve this task and its findings. Ordinary task authority applies to the handoff: the assignee may hand off its own primary task unless another run owns that task. Riley reviews the saved findings, saves a review comment, and marks this review task done without a terminal case handoff. Case closure requires a later explicit accepted-fix decision.`,
initialDocuments: [{ key: "brief", title: "Customer observations", body: "Synthetic test observations: on mobile Safari, tapping the checkout Pay button has no effect. Activating the same button using a keyboard succeeds. These are observations, not proof of a specific JavaScript root cause." }],
});
const phase = await pollUntil({ label: "genuine Morgan saved findings and source wait", deadlineAt: Date.now() + 180_000, intervalMs: 1000,