Skip to content

DTE-v2 final ship plan - 39-unit 400-line redo of the DTE series (supersedes #28) #35

Description

@easonLiangWorldedtech

Tracking issue for the DTE-v2 recreation. Replaces this fork's #28 (closed as superseded) and the old upstream series: PRs Zoo-Code-Org#1336 Zoo-Code-Org#1338 Zoo-Code-Org#1354 Zoo-Code-Org#1355 Zoo-Code-Org#1356 Zoo-Code-Org#1359 Zoo-Code-Org#1361 Zoo-Code-Org#1366 Zoo-Code-Org#1379 and issues Zoo-Code-Org#1328 Zoo-Code-Org#1329 Zoo-Code-Org#1330 Zoo-Code-Org#1331 Zoo-Code-Org#1332 Zoo-Code-Org#1376 Zoo-Code-Org#1377 Zoo-Code-Org#1378 - all closed as superseded on 2026-09.

Unit status (maintained as PRs open/merge)

Seq Unit Scope Stack base PR a+d (measured) State
1 U1 experimental toggle + settings (copy fix m9) main upstream Zoo-Code-Org#1521 @ 39762bf81 397 DONE — CI 22/22 green on 39762bf81 (incl. mutation-diff); CR settled, 4/4 RCs addressed, no new findings (vi mô hình; handler+ClineProvider round-trip; 4-theme Docker baselines; re-review RCs incl. 3936323331 false+unset save-payload round-trip); head additively merges upstream main 0d937c050; local mutation gate 2/2 killed at 39762bf81; final wrap-up comment posted (5544529700, pings @edelauna); awaiting maintainer approval/merge
2 U2 per-request effort resolution (reasoning.ts) U1 upstream Zoo-Code-Org#1522 @ efbd336e5 114 undrafted; 2nd sync head efbd336e5 additively merges U1's final head 39762bf81 (last Zoo-Code-Org#1521 CR fix — false/unset persistence cases in SettingsView.spec.tsx, +23/−10; U2's 3 files byte-identical to 18f488fa5); local gates green on efbd336e5 (types 11/11, webview settings suites 26/26 incl. the new false-path test, mutation gate 17/17 Killed CI-faithful vs main tip 0d937c050); CI on 18f488fa5 all green (4 stale CANCELLED superseded by fresh SUCCESS); CR finding 3936500327 (false save path — cumulative U1 content) addressed in-thread, fixed in efbd336e5; CR re-review in flight
3 U3 task-local runtime effort + switch re-validation (m1a) U2 upstream Zoo-Code-Org#1523 @ c5b48aa7e 398 undrafted (2026-09-05); 2nd sync head c5b48aa7e merges U2's new tip efbd336e5 (U1's final head 39762bf81 now in stack); U3's 2 files byte-identical through the sync; local gates green on c5b48aa7e (check-types 11/11, vitest 8/8, mutation 25/25 Killed standalone vs efbd336e5); body updated (head/stack-base/gate lines); CI + CR re-review in flight — CR reviews cumulative diff (standalone range = 398)
4 U4 history persistence (taskMetadata) U3 drafted (fork head d70b40ad3) 253 drafted 2026-09-05 (waiting-time sync): head d70b40ad3 additively merges U3 final head c5b48aa7e (U1's last CR fix in stack); U4's 5 files byte-identical to 111cf40ae; local gates green on d70b40ad3 (check-types 11/11, eslint 0, vitest 18/18, mutation 4/4 Killed vs c5b48aa7e); body drafted (u4-upstream-body.md); restore-guard kill test (L42) in head; held for upstream slot (plan §2.2 max-3-open) — push+open when a slot frees
5 U5 anthropic adaptive effort envelope U4 drafted (fork head ed4d4adf9) 360 drafted 2026-09-05 (waiting-time sync): unit commit bb70d4f1b (mutation-gate fix folded in) + sync merge of U4 head d70b40ad3 (pre-fix sync head 54c033aa8); first gate run: 4 Survived → fixed same PR (L42): 1 default-branch kill test + 2 equivalent-mutant directives (equivalence proof in body; maintainer approval requested); local gates green on ed4d4adf9 (check-types 11/11, eslint 0, vitest 21/21, mutation 25/25 Killed vs d70b40ad3); body drafted (u5-upstream-body.md); held for upstream slot (plan §2.2 max-3-open)
6 U25a hermetic OpenRouter fallback catalog (M4) main - - pending
7 U6 tool schema/prompt/mode filter + effort enum (m7) U5 - - pending
8 U13 new_task input - FINAL strict schema + hardening (B1/M7/m3/n6/n7) U5 - - pending
9 U7 SetThinkingEffortTool core (incl. m8 test via union) U6 - - pending
10 U14 orchestrator task-level specs (B1-corrected) U13 - - pending
11 U8 tool guards + user-write reseed API (m4a) U7 - - pending
12 U15 orchestrator tool + parser specs (n7 parity) U14 - - pending
13 U9 parser + presenter (m6 documented skip) U8 - - pending
14 U16 ChatView subtask UI + visible caption (m13) U15 - - pending
15 U10 task runtime wiring U9 - - pending
16 U17 ChatView spec remainder + provider delegation U16 - - pending
17 U11 chat row display + localized aria (m10/n3) U10 - - pending
18 U18 extension host wiring + ask gate (m2/n6) U17 - - pending
19 U12 i18n dte-3 strings x18 locales (n1/n2) U18 - - pending
20 U19 thinkingEffort utilities (D3 note) U11 - - pending
21 U20 message handling + refusal line + two-writer test (m4b/m5) U19 - - pending
22 U21 state push + provider-change merge safety (m1b) U20 - - pending
23 U22 composer toggle (n4 dead prop removed) U21 - - pending
24 U23 TaskHeader chip + NEW visual story + a11y (M6/m11) U22 - - pending
25 U24a i18n dte-4 locales 1/2 (9 locales) U23 - - pending
26 U24b i18n dte-4 locales 2/2 (9 locales) U24a - - pending
27 U25 e2e proxy + fixtures (after U5 + U25a merged) main - - pending
28 U26 e2e tool + switching part 1 (m16 pin) U25 - - pending
29 U27 e2e switching part 2 U26 - - pending
30 U28 e2e new_task fixtures (after dte-5 units merged) main - - pending
31 U29 e2e new_task part 1 (m17 proxy generalize) U28 - - pending
32 U30 e2e new_task part 2 (m17 dedup) U29 - - pending
33 U36 e2e user composer-toggle flow (M5, after U20/U21 merged) main - - pending
34 U31 F7 capability fill-in + LM Studio wire fix (M1) U18 - - pending
35 U32a F7 schema + OpenAICompat panel + round-trip test (m15) U31 - - pending
36 U32b F7 LM Studio/Ollama/LiteLLM/Friendli panels (M2) U32a - - pending
37 U33 F7 webview resolution - shared extract (m14) U32b - - pending
38 U33b F7 i18n x18 locales (n8 optional) U33 - - pending
39 U34 F7 integration specs U33b - - pending
- U35 (micro) F7 e2e touch-up main (after U34) - - pending

Risk flags (quick reference — review pass 2026-09-04)

  • Near 400 (hunk-tune at push; reserved split point ready): U3 ~385 · U7 ~400 · U9 ~394 · U10 ~396 · U14 ~394 · U17 ~400 · U25 ~385 · U32a ~380.
  • External conflict watch: U22 — ChatTextArea.tsx anchors overlap open upstream feat(ollama): add reasoning effort selectors and gate on Enable Thinking Zoo-Code-Org/Zoo-Code#1345; if it lands first, rebase U22 onto it (§10 watch item).
  • Hunk-surgery heavy (mixed pre-existing files — double-check per §5 step 2): U3/U10/U13 (Task.ts), U13 (NewTaskTool.ts), U22 (ChatTextArea.tsx), U9 (NativeToolCallParser.ts / presentAssistantMessage.ts), U16 (ChatView.tsx), U16/U17 (ChatView.spec.tsx).
  • Locale-heavy (18-locale weight inflates a+d — poor merge-rule candidates): U12 (~162), U24a/U24b (~207 each), U33b (~198).
  • Timing: wave-6 e2e addenda (U25–U30, U35, U36) open only after base units merge — longest lead time.

DTE Final Ship Plan — "Ship It All" (DTE-v2, finalized 2026-09)

This is the single execution source of truth. It supersedes plans/dte-400line-recreation-plan.md (kept as historical inventory) and folds in every actionable finding from plans/dte-gap-review.md. Everything below is final: content source, unit ledger, trigger order, decisions, and the ship-all acceptance gate.

  • Base of record: upstream/main (re-verify per branch; wave-1 base b2f63d366 unless main advanced).
  • Content source of record (binding): the verified union tree origin/feat/dte-trial-all @ 27a2e97df — file content via git show 27a2e97df:<path>, hunks via git diff <base>..27a2e97df -- <path>.
  • Rule that replaces the old per-branch source: never extract from a per-PR head. Per-PR heads are internally inconsistent — b17373bb9 (dte-3 tip) lacks the dte-5/dte-7-lineage fixes, 6eba686c1 (dte-5 tip) ships the strict-schema-breaking new_task.ts (B1), and 65ee7b5e6 (dte-7 tip) lacks the A5 orchestrator hardening (M7) and the dte-3 12-line effort-rank test (m8). Only the union is complete.

Union-tree verification (ran 2026-09, results pinned)

Check Result
git merge-base --is-ancestor b17373bb9 27a2e97df exit 0 — full dte-3 lineage (incl. the 12-line custom-legacy effort-rank fallback test) is inside the union; m8 resolves for free by extracting U7/U8 from the union
git grep custom-legacy 27a2e97df hit in src/core/tools/__tests__/setThinkingEffortTool.spec.ts
new_task.ts @ union FINAL strict-valid form: thinking_effort = ["string","null"] pattern, all four params in required (B1 shape) with the explanatory comment
NewTaskTool.ts @ union orchestrator hardening present (startLevels filter at :94, empty-capability wording :106-107) — M7 shape
DTE e2e files @ union all present: thinking-effort-proxy.ts, fixtures/thinking-effort.ts, thinking-effort-tool/switching.test.ts, new-task-thinking-effort.test.ts (i.e. the dte-3→dte-7 comment drift and the 11-line teardown hygiene are already in the union content)
taskMetadata.spec.ts src/core/task-persistence/__tests__/taskMetadata.spec.ts at dte-2 tip and at the union (U4 file list confirmed)
locale count @ union 18 locales carry the DTE chat keys and the F7 settings keys (not 17 — every ×17 in the base plan becomes ×18)

1. Decisions (all resolved — no open questions block execution)

ID Decision Where it lands
D1 o3-family wire override fix (M3) = post-merge follow-up PR (out of DTE diff surface, pre-existing upstream code); filed in tracking issue #35 at ship §5 follow-ups
D2 composer-toggle e2e boundary (M5) = in the redo as new unit U36 (incl. minimal simulateWebviewMessage test-API affordance) Wave 6
D3 unsupported-model silent absence (m12) = kept by design; each dte-4 unit's PR body carries the one-line note "control renders only when the model advertises supportsReasoningEffort; F7 profiles can declare efforts in settings" U19–U24b PR bodies
D4 F7 field rendered in all five provider panels (M2) → U32 split into U32a/U32b Wave 7
line counting = additions+deletions (strictest), standalone diff vs stack base; PNG baselines excluded from arithmetic, listed in PR body §3 rule
CLOSED NOW (2026-09-04, overrides the earlier close-on-replacement-merge decision): old 9 PRs (Zoo-Code-Org#1336 Zoo-Code-Org#1338 Zoo-Code-Org#1354 Zoo-Code-Org#1355 Zoo-Code-Org#1356 Zoo-Code-Org#1359 Zoo-Code-Org#1361 Zoo-Code-Org#1366 Zoo-Code-Org#1379) + 8 DTE issues (Zoo-Code-Org#1328 Zoo-Code-Org#1329 Zoo-Code-Org#1330 Zoo-Code-Org#1331 Zoo-Code-Org#1332 Zoo-Code-Org#1376 Zoo-Code-Org#1377 Zoo-Code-Org#1378) closed as superseded upstream; fork #28 (tracking) + fork PR #29 (trial) closed as superseded; each close comment links the new tracking issue easonLiangWorldedtech/Zoo-Code#35. Branch feat/dte-trial-all is never deleted (content-source reference; tag dte-legacy/union 27a2e97df created in Phase 0). Upstream Zoo-Code-Org#1326/Zoo-Code-Org#1327 (F1 adaptive-thinking display fix) intentionally left open — its content is not in the union content source and merges independently §6 / §10
m6 (generic missing-nativeArgs error) = skipped, documented in U9's PR body (parser already logs the payload) U9
n9 (fixed sleep(1500) e2e teardown) and n10 (EXPLICIT test wire-assertion omission) = kept, house pattern / documented choice n/a

2. Execution policy (in order, max 3 in flight)

  1. Strict trigger order: open units only in the §4 sequence. A unit opens when its stack base branch exists (stacked) or is merged (e2e/main units), and a slot is free.
  2. Max 3 open DTE-v2 PRs at any time (all tracks combined). Open the next in sequence when a slot frees (merge, or reviewer-ready after the CodeRabbit loop). No bursts.
  3. Stack hygiene: after a merge, rebase the next stacked unit onto merged main (shallow stacks). e2e/main units (U25a, U25–U30, U36) open only after their base units are merged and rebase onto plain main (maintainer policy).
  4. CodeRabbit rate: ≤4 included reviews/hour — stagger pushes; burst commits auto-pause review (resume with /resume).
  5. Subagent/worker parallelism: at most 3 concurrent workers, triggered in the same sequence as the PRs.
  6. Merge rule (optional, evaluated at push time): two or more adjacent units in the same wave may ship as one PR when (a) their measured combined a+d ≤ 350 (headroom for amendments + locale weight), (b) they share no hunk-surgery file with overlapping ranges, and (c) the combined mutation-diff scope stays fully killable in one Stryker run. Record the merge in the DTE-v2 final ship plan - 39-unit 400-line redo of the DTE series (supersedes #28) #35 ledger (both unit rows → same PR #). Never merge across wave/stack boundaries or to rescue an over-budget unit — split instead.

3. Line-counting rule (binding)

  1. Measure the standalone diff: git diff --shortstat <stack-base> <branch> — the number GitHub shows against that base.
  2. Counted = additions + deletions. Binary (PNG baselines) excluded from arithmetic, listed in PR body.
  3. Hard budget: ≤400 counted lines per PR. Measure before opening (dry-run git diff --shortstat on the staged commit), not after CI. If the measure lands ≥380, restructure before pushing — move the next natural describe block / hunk group (the reserved split point) into the next unit — and re-measure. Never approve around the budget.
  4. Mutation-gate corollary: every changed coverable line needs its killing test in the same PR (mutation-diff gates on changed code). The amendment ledger (§7) tests are no exception.

4. Final unit ledger (39 units; sequence column = trigger order)

Targets are estimates from the old branches ± amendments; measure every unit at push time and hunk-tune if over (⚠ marks units estimated ≥380).

Wave 1 — base (base: main)

Seq Unit PR title (draft) Files (source: git show 27a2e97df:<path>) Amendments Target
1 U1 feat(settings): dynamic thinking effort experimental toggle (DTE-1) all 23 files of dte-1 (settings schema, ExperimentalSettings UI, experiment flag, 18 locales) m9: rewrite the DTE flag description in all 18 locales — flag gates the agent-side tool only; manual in-chat control is always available (+~36) ~235

Wave 2 — dte-2 content (stacked after U1)

Seq Unit PR title (draft) Files Amendments Target
2 U2 feat(api): per-request effective reasoning-effort resolution (DTE-2a) reasoning.ts (+45), api/index.ts (+9), dte-effective-reasoning-effort.spec.ts (+58), experiments.spec.ts (1/28) ~140
3 U3 feat(task): task-local runtime thinking effort state (DTE-2b) Task.ts (+132/−3), Task.runtime-thinking-effort.test.ts core describes (≈220/394) m1a: capability re-validation on mid-task model switch (override cleared/clamped + observable say) + tests (+~30) ⚠ ~385
4 U4 feat(persistence): persist task thinking effort to history (DTE-2c) taskMetadata.ts (+13/−1), history.ts (+8), taskMetadata.spec.ts (+81), Task test remainder (~174) ~277
5 U5 feat(anthropic): adaptive thinking-effort envelope (DTE-2d) anthropic.ts (+43/−1), anthropic-adaptive-effort.spec.ts (+297), ExperimentalSettings.spec.tsx (1/75) ~319

Wave 3 — dte-3 content (stacked after U5) · Wave 4 — dte-5 content (parallel track, stacked after U5's head)

Seq Unit PR title (draft) Files Amendments Target
6 U25a ★new test(api): hermetic aimock fallback catalog for OpenRouter fetcher (base: main; env-gated, main-safe) src/api/providers/fetchers/openrouter.ts (+~40: honor E2E_MOCK_MODEL_LIST_FALLBACK), bundled minimal catalog (openai/gpt-5, openai/gpt-5.1 with supported_parameters: ["reasoning"], +~25), fetcher test (+~20) M4 ~85
7 U6 feat(tools): set_thinking_effort schema, prompt, mode filter (DTE-3a) native-tools/set_thinking_effort.ts (+49), native-tools/index.ts (+2), filter-tools-for-mode.ts (+41), filter-thinking-effort.spec.ts (+151), packages/types experiment/tool/shared files (+46) m7: enum: ["none","minimal","low","medium","high","xhigh","max"] on the effort property + spec (+~14) ~305
8 U13 feat(orchestrator): new_task thinking-effort input (DTE-5a) NewTaskTool.ts (+95/−14), Task.ts (+56/−2), new_task.ts prompt (+6), shared/tools.ts (+3/−2), newTaskTool.spec.ts (+12), new-task-delegation.spec.ts (+6) — all from the union tree (FINAL shapes) B1 (FINAL strict schema — free via union source), m3 (mistake-guardrail triplet +~23), M7 (canonical normalize filter +~10), n6 ("disable"→undefined at the child re-validation consumer +~6), n7 (sibling parity with SetThinkingEffortTool normalization) ~235
9 U7 feat(tools): SetThinkingEffortTool core (DTE-3b) SetThinkingEffortTool.ts core hunks (+200), setThinkingEffortTool.spec.ts part 1 (+220/504) — union tree; includes the 12-line custom-legacy effort-rank fallback test (m8) ⚠ ~400 (hunk-tune)
10 U14 test(orchestrator): new_task effort task-level specs (DTE-5b) Task.new-task-effort.spec.ts (+194), newTaskThinkingEffort.spec.ts part 1 (~+200/407) — union assertions (B1-corrected shape) B1 (corrected schema assertions) ⚠ ~394
11 U8 feat(tools): set_thinking_effort guards (escalation cap, oscillation, capability) (DTE-3c) SetThinkingEffortTool.ts remainder (+106), setThinkingEffortTool.spec.ts part 2 (+284/−10) m4a: export recordUserThinkingEffortWrite(task, effort) for guard-history reseed + API unit tests (+~15) ~385
12 U15 test(orchestrator): new_task effort tool + parser specs (DTE-5c) newTaskThinkingEffort.spec.ts part 2 (~+207/−6), NativeToolCallParser.spec.ts (+51), NativeToolCallParser.ts (+6) — union content n7 parity check on the filter behavior ~264
13 U9 feat(parser): parse and present set_thinking_effort tool calls (DTE-3d) NativeToolCallParser.ts (+20), presentAssistantMessage.ts (+12), both parser/presenter specs (+362) m6 skipped — one line in PR body ⚠ ~394
14 U16 feat(webview): subtask thinking-effort UI in ChatView (DTE-5d) ChatView.tsx (+154/−47), ChatView.spec.tsx part 1 (~+125/−5) m13: visible caption/tooltip on the ask effort selector (reuses existing i18n) (+~14) ~345
15 U10 feat(task): wire set_thinking_effort into task runtime (DTE-3e) Task.ts (+105/−1), Task.runtime-thinking-effort.test.ts dte-3 adds (~+290/311) ⚠ ~396
16 U17 test(webview): ChatView effort spec remainder + provider delegation (DTE-5e) ChatView.spec.tsx part 2 (~+125/−4), provider-delegation.spec.ts (+291/−2) ⚠ ~400 (hunk-tune at push)
17 U11 feat(webview): display set_thinking_effort results in chat row (DTE-3f) ChatRow.tsx (+26), ChatRow.thinking-effort.spec.tsx (+120), ExperimentalSettings.spec.tsx (+75), Task test remainder (~21), vscode-extension-host.ts (+4) m10: localize the <Brain> aria-label (toggleTitle key or aria-hidden; +~14); n3: de-emoji the spec fixture + fix stale describe label (±4) ~263
18 U18 feat(webview): wire new_task effort through extension host (DTE-5f) ClineProvider.ts (+50/−9), webviewMessageHandler.ts (+8/−1), webviewMessageHandler.spec.ts (+36/−3), vscode-extension-host.ts (+8/−1) m2: write-side ask-type gate + webview state reset on ask change + tests (+~45); n6 consumer mapping ~160
19 U12 feat(i18n): translate set_thinking_effort strings (18 locales) (DTE-3g) locales/*/chat.json +5 ×18, */settings.json +4 ×18 n1: ja keeps the (experimental) marker + noun-phrase name; n2: zh-TW typography (full-width comma, Zoo(自動) spacing) ~162

Wave 5 — dte-4 content (stacked after U11's head)

Seq Unit PR title (draft) Files Amendments Target
20 U19 feat(webview): thinking-effort utilities (DTE-4a) thinkingEffort.ts (+82), thinkingEffort.spec.ts (+178) D3: no change — silent absence kept; PR body note ~260
21 U20 feat(webview): thinking-effort message handling (DTE-4b) webviewMessageHandler.ts (+54), webviewMessageHandler.thinking-effort.spec.ts (+141) m5: refusal-style say line for unsupported user values (+~30); m4b: call recordUserThinkingEffortWrite + two-writer oscillation test (+~35) ~260
22 U21 feat(webview): push thinking-effort state to webview (DTE-4c) ClineProvider.ts (+51), ClineProvider.spec.ts (+154/−3) m1b: provider-change path keeps the DTE merge (no silent (task as any).apiConfiguration overwrite of the merged copy) + tests (+~22) ~230
23 U22 feat(webview): ThinkingEffortToggle composer component (DTE-4d) ThinkingEffortToggle.tsx (+118), ThinkingEffortToggle.spec.tsx (+238), ChatTextArea.tsx anchors n4: remove the dead disabled prop (−12); Zoo-Code-Org#1345 anchor watch (rebase onto it if it merges first) ~344
24 U23 feat(webview): thinking-effort chip in TaskHeader + visual snapshots (DTE-4e) TaskHeader.tsx (+37/−1), TaskHeader.thinking-effort.spec.tsx (+166), ThinkingEffortToggle.visual.tsx (+32), .visual.fixture.tsx (+27), ChatRow.thinking-effort.spec.tsx (+15), + PNG baselines M6: NEW chip + effort-line gallery story (chat-screen story with TaskHeader chip + ChatRow line; ≥ dark+light; PNG baselines in PR body, +~50); m11: chip tabIndex={0} + aria-label from chipTooltip (+~26) ~350
25 U24a ★split feat(i18n): thinking-effort UI strings, locales 1/2 (DTE-4f-a) locales/* (~15/8 ×9: en, zh-TW, zh-CN, ja, ko, de, fr, es, ca) locale pass quality (n1/n2 style) ~207
26 U24b ★split feat(i18n): thinking-effort UI strings, locales 2/2 (DTE-4f-b) locales/* (~15/8 ×9: pt-BR, ru, tr, nl, it, pl, hi, id, vi) ~207

Wave 6 — e2e addenda (open only after base units merged; rebase onto main; content: union tree)

Seq Unit PR title (draft) Files Amendments Target
27 U25 test(e2e): DTE request capture proxy + fixtures (DTE-3e2e-a) thinking-effort-proxy.ts (+212), fixtures/thinking-effort.ts (+159), runTest.ts (+2), old setThinkingEffortTool.spec.ts −12 requires U25a merged (hermetic catalog) ⚠ ~385
28 U26 test(e2e): set_thinking_effort tool + switching workflow (DTE-3e2e-b) thinking-effort-tool.test.ts (+166), thinking-effort-switching.test.ts part 1 (~+130/263) m16: pin the baseline (strictEqual against the documented default) (+~6) ~302
29 U27 test(e2e): set_thinking_effort switching suite remainder (DTE-3e2e-c) thinking-effort-switching.test.ts part 2 (~+133) ~133
30 U28 test(e2e): new_task effort fixtures (DTE-5e2e-a) fixtures/subtasks.ts (+189), runTest.ts (+2/−1) ~192
31 U29 test(e2e): new_task thinking-effort workflow part 1 (DTE-5e2e-b) new-task-thinking-effort.test.ts part 1 (~+260/501) m17: generalize the shared proxy (options: path/upstreams; headersSent guard) + reuse — dedup ~90 lines inline (+30/−40) ~250
32 U30 test(e2e): new_task thinking-effort workflow part 2 (DTE-5e2e-c) new-task-thinking-effort.test.ts part 2 (~+241) m17 dedup (−30) ~210
33 U36 ★new test(e2e): user composer-toggle thinking-effort flow (DTE-4e2e) packages/types/src/api.ts (+~15: RooCodeTestAPI.simulateWebviewMessage(msg)), src/extension/api.ts (+~12), provider test-hook wiring (+~20), suite/composer-toggle-thinking-effort.test.ts (+~75; marker-prompt fixture, sequenceIndex: 0, asserts the captured reasoning.effort equals the user-selected level via withOpenRouterCaptureProxy), marker fixture (+~15) M5 (open after U20/U21 merged) ~140

Wave 7 — F7 content (stacked after U18's head)

Seq Unit PR title (draft) Files Amendments Target
34 U31 feat(api): declared reasoning-effort capability for OpenAI-compatible providers (F7a) model-capabilities.ts (+34), openai.ts (+14/−1), lm-studio.ts (+12/−2), base-openai-compatible-provider.ts (+11/−1), friendli.ts (+11/−1), native-ollama.ts (+17/−5), router-provider.ts (+27/−10), model-capabilities.spec.ts (+61), native-ollama.spec.ts (+66) M1: LM Studio request now sends reasoning_effort via getModelParams({format:"openai"}) + getOpenAiReasoning (sibling pattern of openai.ts:170) + request-layer test asserting the body field (+~40) ~335
35 U32a ★split feat(settings): supported effort levels — schema + OpenAI-compatible panel (F7b-a) provider-settings/common.ts (+10/−1), provider-settings.test.ts (+55), OpenAICompatible.tsx (+48/−21), OpenAICompatible.spec.tsx (+128), SupportedEffortLevels.tsx (+67), ExperimentalSettings.tsx (+8) m15: import/export round-trip spec case (valid array / [] / omitted) + one request-construction assertion for the declared flow (+~35) ⚠ ~380
36 U32b ★new feat(settings): supported effort levels — LM Studio/Ollama/LiteLLM/Friendli panels (F7b-b) LMStudio.tsx/Ollama.tsx/LiteLLM panel/Friendli.tsx (+~25 each: render SupportedEffortLevels gated on profile shape), ApiOptions.tsx wiring, panel specs (+~40 each) M2/D4 ~250
37 U33 feat(webview): F7 effort resolution in thinking-effort utilities (F7c) thinkingEffort.ts (+56/−7), thinkingEffort.spec.ts (+139/−5) m14: default = extract the shared capability resolution into packages/types (single implementation; both mirrors delegate) + packages/types spec (+~90); fallback if the extraction is messier: pinned parity-table test (+~40) ~300
38 U33b ★split feat(i18n): F7 settings strings, 18 locales (F7c-i18n) locales/*/settings.json (~8/3 ×18) n8 (optional): hint notes the Ollama xhigh/max→"high" clamp ~198
39 U34 test(api): F7 declared-effort integration specs (F7d) f7-declared-reasoning-effort.spec.ts (+249), SetThinkingEffortTool.ts (+21), NewTaskTool.ts (+11/−2), filter-tools-for-mode.ts (+10/−10), newTaskThinkingEffort.spec.ts (+34/−6) ~343
U35 (micro) test(e2e): F7 touch-up in new_task e2e suite new-task-thinking-effort.test.ts (+11) — base main, opens after U34 merged ~11–60

Totals: 39 units (38 full + 1 micro). Old-series own content ≈10,800 lines + amendments ≈900 lines ≈ 11,700 counted lines ÷ 400 ≈ 29 minimum; 39 units reflects natural feature boundaries + the required splits.

Risk flags (quick reference — review pass 2026-09-04)

  • Near 400 (hunk-tune at push; reserved split point ready): U3 ~385 · U7 ~400 · U9 ~394 · U10 ~396 · U14 ~394 · U17 ~400 · U25 ~385 · U32a ~380.
  • External conflict watch: U22 — ChatTextArea.tsx anchors overlap open upstream feat(ollama): add reasoning effort selectors and gate on Enable Thinking Zoo-Code-Org/Zoo-Code#1345; if it lands first, rebase U22 onto it (§10 watch item).
  • Hunk-surgery heavy (mixed pre-existing files — double-check per §5 step 2): U3/U10/U13 (Task.ts), U13 (NewTaskTool.ts), U22 (ChatTextArea.tsx), U9 (NativeToolCallParser.ts / presentAssistantMessage.ts), U16 (ChatView.tsx), U16/U17 (ChatView.spec.tsx).
  • Locale-heavy (18-locale weight inflates a+d — poor merge-rule candidates): U12 (~162), U24a/U24b (~207 each), U33b (~198).
  • Timing: wave-6 e2e addenda (U25–U30, U35, U36) open only after base units merge — longest lead time.

5. Per-PR workflow (identical for every unit)

  1. Worktree: git worktree add -b feat/dte-v2-<seq>-<slug> C:\work\Zoo-Code-fork\wt-dte-v2-<seq> <stack-base> + pnpm install --frozen-lockfile.
  2. Extract from the union tree (§0): whole-file git show 27a2e97df:<path> > <file>; mixed files via hunk-level surgery (git diff <base>..27a2e97df -- <path> → hand-separated patches / edit to old content minus later-unit hunks). Apply the unit's §4 amendments on top. git status --short after every staging step. Hunk-surgery double-check (mixed files): git diff <stack-base> HEAD -- <paths> against the 27a2e97df hunk set for the file — every expected hunk present, no later-unit hunk leaked in (those belong to the stacked unit), no stray edits to pre-existing content. The §9 content-fidelity check is the final net; this catches per-unit mistakes early.
  3. Local gates (all before push):
    • pnpm --dir src exec eslint --prune-suppressions --max-warnings=0 <each touched src file> — suppression counts never increase.
    • pnpm check-types (repo root); targeted vitest suites for every touched package (run from the package declaring Vitest).
    • node scripts/find-missing-translations.js if locale files changed (18 locales, src/i18n and webview-ui/src/i18n where keys are used).
    • themes:check only if visual baselines were regenerated (Docker artifact; never hand-edit playwright/themes/*).
  4. Line budget gate: git diff --shortstat <stack-base> HEAD → a+d ≤ 400 (§3); split if over.
  5. Commit & push (one logical commit, conventional message) → open draft PR against <stack-base> with the §6 body (stack note + budget statement mandatory; D3 note for dte-4 units; amendment list with finding IDs).
  6. CI (§7) all green, incl. mutation-diff (expect ~30 min) and codecov/patch.
  7. CodeRabbit loop until review complete with no actionable comments (push fixes or reply with reasoning).
  8. Undraft → human maintainer approves → merge.
  9. Bookkeeping: unit ledger row (PR #, head SHA, final measured a+d), fork tracking issue DTE-v2 final ship plan - 39-unit 400-line redo of the DTE series (supersedes #28) #35, plans/dynamic-thinking-effort-plan.md §10; mark the old PR(s) this unit replaces (already closed as superseded — keep the link in the close comment thread).

6. PR body template

Part of the DTE-v2 stack (≤400-line redo of <old PR #>); this PR: <one-line scope>.

**Stack**: base = `<stack base>` (or `main`). Standalone diff vs that base:
**<A> additions + <D> deletions = <A+D> lines (≤400 budget).** GitHub's number vs `main` will
look larger until lower stack PRs merge — review the standalone range.

**Related issue**: #<n>
**Amendments folded in** (from `plans/dte-gap-review.md`): <finding IDs + one line each, or "none">

**Out of scope**: <what this unit deliberately leaves for later units>

**Pre-submission checklist**:
- [ ] CI locally: check-types, targeted vitest, eslint --prune-suppressions (no count increase)
- [ ] i18n: all 18 locales updated + find-missing-translations clean (if keys added)
- [ ] Tests accompany all changed lines (mutation gate: no changed line waits for a later PR)
- [ ] Visual baselines (if UI): committed from Docker/CI artifact, listed below
- [ ] Line budget measured vs stack base (number above)

**Binary files in this PR**: <PNG baselines, or "none">

**Verification**: <commands + local results, incl. e2e mock run if e2e files touched>

7. CI targets (upstream/main b2f63d366; re-verify per push)

Workflow What must hold
code-qa.yml all jobs green (dependency-review, invisible-chars, check-translations, knip, compile, build-vsix, unit-test lanes); codecov/patch green
e2e.yml e2e-mock green (fixtures must stay valid JSON — never // comments inside fixture JSON)
visual-regression.yml 0 drift; baselines from Docker/CI artifact only
codeql.yml no new findings
mutation-testing.yml mutation-diff green — changed lines have in-PR killing tests
label-pr-review-state.yml ci-pendingcoderabbit-review-activedraft-approved

Undraft gate: all of the above green + CodeRabbit review complete with no actionable comments + final comment posted (findings → what changed; local verification; standalone a/d numbers).

8. Gap-amendment ledger (disposition of all 37 gap-review items)

In-PR (verified at merge of the listed unit): B1→U13/U14 · M1→U31 · M2→U32b · M4→U25a · M5→U36 · M6→U23 · M7→U13 (union source) · M8→the split itself · m1→U3+U21 · m2→U18 · m3→U13 · m4→U8+U20 · m5→U20 · m7→U6 · m8→U7/U8 (union source — free) · m9→U1 · m10→U11 · m11→U23 · m13→U16 · m14→U33 · m15→U32a · m16→U26 · m17→U29/U30 · n1/n2→U12 (+U24a quality pass) · n3→U11 · n4→U22 · n6→U13/U18 · n7→U13/U15/U18 · n8→U33b (optional) · n11→this document.

Documented keeps (no code change): m6 (U9 PR body) · m12/D3 (dte-4 PR bodies) · n9 (house pattern) · n10 (documented choice).

Post-merge follow-ups (file in tracking issue easonLiangWorldedtech/Zoo-Code#35; the list below is embedded in #35's body — file the concrete PRs as they open and check the rows off there):

  1. M3 — o3-family wire override fix (openai.ts handleO3FamilyMessageresolveEffectiveReasoningEffort; drop the static as "low"|"medium"|"high" cast) + tests. ~40–60 lines.
  2. n5shouldUseReasoningEffort capability-absent branch: compare selected effort vs capability/default (PoE 400 risk).
  3. n8 — Ollama xhigh/max→"high" clamp note in the settings hint (if not folded into U33b).
  4. m10 family — repo-wide aria-label localization sweep (pre-existing ApiConfigSelector/ModeSelector/… patterns).
  5. n9 — event-based settle for e2e teardown sleeps (only on flake).

9. Ship-all acceptance gate ("it's all shipped" checklist)

10. Phase 0 (one-time prep)

git fetch upstream main
git tag dte-legacy/union 27a2e97df     # content source of record
# legacy tips (history only): dte-1 5db5cf4c8, dte-2 77ec064d3, dte-3 b17373bb9,
#   dte-4 bc1c1e4b8, dte-5 6eba686c1, dte-3-e2e 0b335c682, dte-5-e2e 471490b44, dte-7 65ee7b5e6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions