17da0aafe3
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2.1 KiB
2.1 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 01-materialize-steer-attachments | Materialize steer attachments | complete | 1 | plan.md |
|
|
|
Task 01: Materialize Steer Attachments
Summary
Resolve claimed attachment descriptors before a steer dispatches into a live turn. Keep the resolution outside the prompt lifecycle lock and make a resolution failure terminal for that message.
In scope
- Materialize in
SendPromptSteerWithDispatchCallbackbeforetryDispatchSteer. - Return a no-dispatch result when the active generation ends before steer delivery, so the orchestrator owns the ordinary prompt fallback.
- Release the steer admission slot and retry queued draining after a pre-dispatch materialization failure.
- Return the materialization error instead of dispatching or falling back.
- Record materialize uploads in
newMockAgentServerfor assertions. - Add the three lifecycle regression tests named in the plan.
Out of scope
- Claim admission, upload limits, retention, and delivery-mode selection.
- The Playwright scenario, which is Task 02.
Acceptance
- A steer into a generating turn reaches agentctl with a resolved filename and no bare attachment ID.
- The ordinary prompt route uploads attachment bytes exactly once.
- A materialization failure returns an error and dispatches no prompt frame.
- Existing steer generation and ordering behavior is unchanged.
Verification
gofmt -l apps/backend/internal/agent/runtime/lifecycle
(cd apps/backend && go test ./internal/agent/runtime/lifecycle -run 'TestSendPromptSteer' -count=1 -race)
(cd apps/backend && go test ./internal/agent/runtime/lifecycle -count=1)
make -C apps/backend lint
Files likely touched
apps/backend/internal/agent/runtime/lifecycle/session.goapps/backend/internal/agent/runtime/lifecycle/session_steer_test.goapps/backend/internal/agent/runtime/lifecycle/session_test.go