2.6 KiB
2.6 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 | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 02-classify-cursor-stream-resets | Classify Cursor stream resets | done | 1 | plan.md |
|
|
|
Task 02: Classify Cursor Stream Resets
Summary
Add a dedicated deterministic fingerprint for Cursor's safe stream-reset diagnostic and map it to the existing transient transport-loss cause. Preserve the generic transport matcher and the context-cancellation safety veto.
In scope
- Dedicated runtime rule and stable classifier rule ID.
- Exact positive, prose and partial negatives, and collision tests.
- Full classification invariants and transient helper coverage.
- Explicit
[canceled]non-veto coverage.
Out of scope
- ACP event detection or suppression.
- Retry scheduling or effect-safety changes.
- Widening
transportLostRe.
Acceptance
- The stable emitted diagnostic classifies as high-confidence
CodeAgentTransportLostwith classClassTransientandAutoRetryable=true. - The rule does not match prose or incomplete transport tokens and does not change the priority of more specific existing rules.
[canceled]remains distinct from context cancellation, while existing context-cancelled composite envelopes remain non-retryable.
Verification
cd apps/backend && go test -race ./internal/agent/runtime/routingerr -run 'Test(ClassifyCursorRetriable|MatchRuntimeEnvironmentRules_CursorRetriable|IsTransientProviderError_Cursor)'
Files likely touched
apps/backend/internal/agent/runtime/routingerr/runtime_rules.goapps/backend/internal/agent/runtime/routingerr/cursor_retriable_stream_reset_test.go
Dependencies
None.
Risks
- An overly broad expression can classify user-authored prose or unrelated cancellation output as transport loss.
- Rule ordering can accidentally supersede overload or resume-corruption fingerprints.
Parallelism
parallel-safe with Task 01. The files are disjoint.
Inputs
- Provider Error Recovery criterion
.14. - Cursor classification section in the system design.
- Existing transport-loss rule and tests.
Results
- Added
cursor.retriable_stream_reset.v1with complete normalized-diagnostic matching and the existing cancellation veto. - Verification passed:
cd apps/backend && go test -race ./internal/agent/runtime/routingerr -run 'Test(ClassifyCursorRetriable|MatchRuntimeEnvironmentRules_CursorRetriable|IsTransientProviderError_Cursor)'.