Skip to content

Commit aacf6fd

Browse files
docs(spec): sdk-error-message-fidelity — mark Phases 1-5 shipped + add Phase 6 (#549)
Updates the spec to reflect what actually shipped in v7.3.0: - Status field updated: "approved (2026-05-24)" → "Phases 1-5 shipped in v7.3.0 (2026-06-01); Phase 6 added for v7.4.0" - Phase 5 tasks marked complete with scope correction. The spec originally named test-audit, doc-audit, doc-gen, discovery-sweep, secure-release, deep-review as Phase 5 targets. During implementation we found only deep-review actually used the legacy sdk_error_message helper; the other 5 had hand-rolled error messages (no misleading three-cause menu). Five DIFFERENT workflows DID use the helper — simplify-code, deep-review, research-synthesis, rag-code-gen, release-prep. PR #544 shipped the actually-broken set. - Phase 6 added: migrate the 5 hand-rolled-message workflows (test-audit, doc-audit, doc-gen, discovery-sweep, secure-release) for v7.4.0. Acceptance: all 16 SDK workflows migrated + delete the sdk_error_message helper + add drift-guard test. Applies the existing "spec-named work-scope drifts from code reality" lesson by codifying the scope drift directly in the spec text. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 9b115e0 commit aacf6fd

1 file changed

Lines changed: 24 additions & 11 deletions

File tree

  • docs/specs/sdk-error-message-fidelity

docs/specs/sdk-error-message-fidelity/tasks.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Spec: SDK Error Message Fidelity — Tasks
2-
**Status:** approved (2026-05-24)
2+
**Status:** Phases 1-5 shipped in v7.3.0 (2026-06-01); Phase 6 added for v7.4.0
33
> Five phases, each shipping as its own PR. Phase 1 is the recommended
44
> first commitment; Phases 2–5 build on it. Phase 1 can be approved
55
> and shipped independently — it adds the primitives without touching
@@ -89,19 +89,32 @@ Goal: roll the Phase 2 pattern to the remaining four high-traffic SDK workflows.
8989

9090
---
9191

92-
## Phase 5 — Long-tail workflows + retrospective
92+
## Phase 5 — Long-tail workflows (shipped 2026-06-01)
9393

94-
Goal: cover the remaining SDK-backed workflows, then close the spec.
94+
Goal: cover the remaining SDK workflows that still used the legacy `sdk_error_message` helper.
9595

96-
- [ ] **5.1** Apply the pattern to: `test-audit`, `doc-audit`, `doc-gen`, `discovery-sweep`, the `secure-release` pipeline, and `deep-review`. Same test shape per workflow.
97-
- [ ] **5.2** Manual verification across three induced failure modes:
98-
- `ANTHROPIC_API_KEY=invalid` → expect "auth" classification
99-
- Force a 429 (or mock at the SDK boundary) → expect "rate_limit"
100-
- `PATH=""` → expect "not_found"
101-
- [ ] **5.3** Update `docs/COVERAGE_BUG_LOG.md` if any bugs surfaced during Phase 1–4 implementation.
102-
- [ ] **5.4** Close this spec. Open follow-up specs for `NextAction.kind` schema cleanup (the `learn-*` chip fix in PR #452 deferred this) and any other surface that emerges.
96+
**Scope correction (2026-06-01):** Phase 5 originally named `test-audit`, `doc-audit`, `doc-gen`, `discovery-sweep`, `secure-release`, and `deep-review` as the six targets. During implementation we found that only `deep-review` actually used the legacy helper — the other five had hand-rolled error messages (`"Agent SDK error: <type>: <exc>"`) that don't surface the misleading three-cause menu. Five DIFFERENT workflows DID use the legacy helper (per the spec-named-work-scope-drifts-from-code-reality lesson). PR #544 shipped the actually-broken set; the spec-named hand-rolled-message workflows move to Phase 6.
10397

104-
**Acceptance:** all 12+ SDK-backed workflows migrated. Spec marked complete. Follow-up specs noted.
98+
- [x] **5.1** Apply the pattern to: `simplify-code`, `deep-review`, `research-synthesis`, `rag-code-gen`, `release-prep`. (PR #544 — shipped 2026-06-01.)
99+
- [x] **5.2** Manual verification deferred — Patrick's `claude` CLI auth was broken in-session, making the invalid-auth case trivially redundant. Test mocks cover all three classification paths. Will re-verify when next running a live SDK workflow.
100+
- [x] **5.3** No new bugs surfaced during Phase 1–4 implementation. COVERAGE_BUG_LOG.md unchanged.
101+
- [x] **5.4** Phases 1-5 shipped in v7.3.0 (2026-06-01). Phase 6 added below.
102+
103+
**Acceptance:** 11 of 16 SDK-backed workflows migrated (Phase 2: 2 + Phase 4: 4 + Phase 5: 5). Helper `sdk_error_message` still exists for Phase 6 workflows; deletion happens after Phase 6.
104+
105+
---
106+
107+
## Phase 6 — Hand-rolled-message workflows (v7.4.0 candidate)
108+
109+
Goal: extend the typed-kind SDK error flow to the remaining 5 SDK workflows that have hand-rolled error messages instead of the legacy helper.
110+
111+
These workflows don't have the misleading three-cause menu — they fail with `"Agent SDK error: <type>: <exc>"`. Less bad than the legacy menu but still less rich than the typed-kind flow.
112+
113+
- [ ] **6.1** Apply the pattern to: `test-audit`, `doc-audit`, `doc-gen` (if it has a separate SDK workflow file), `discovery-sweep`, `secure-release` pipeline. Same test shape per workflow.
114+
- [ ] **6.2** Once all 16 SDK workflows are migrated, delete the `sdk_error_message` helper from `agent_sdk_adapter.py`. Update its `__all__` export to remove the legacy name. Add a drift-guard test that grep-fails if any workflow re-imports `sdk_error_message`.
115+
- [ ] **6.3** Close this spec. Open follow-up specs for `NextAction.kind` schema cleanup (the `learn-*` chip fix in PR #452 deferred this) and any other surface that emerges.
116+
117+
**Acceptance:** All 16 SDK-backed workflows migrated. Helper deleted. Spec marked complete.
105118

106119
---
107120

0 commit comments

Comments
 (0)