feat(settings): dynamic thinking effort experimental toggle (DTE-1) - #36
Closed
easonLiangWorldedtech wants to merge 1 commit into
Closed
feat(settings): dynamic thinking effort experimental toggle (DTE-1)#36easonLiangWorldedtech wants to merge 1 commit into
easonLiangWorldedtech wants to merge 1 commit into
Conversation
easonLiangWorldedtech
force-pushed
the
feat/dte-v2-1-dynamic-thinking-effort
branch
from
September 4, 2026 04:02
45e90ff to
19788c0
Compare
easonLiangWorldedtech
marked this pull request as ready for review
September 4, 2026 06:36
Owner
Author
|
Superseded by upstream PR Zoo-Code-Org#1521 (DTE-v2 stack moved upstream — CodeRabbit only runs there). Same head 19788c0, same content. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the DTE-v2 stack; this PR: adds the
dynamicThinkingEffortexperimental toggle (DTE-1) — the experiment flag inpackages/types, its registration in the extension experiment registry (src/shared/experiments.ts), the localized Experimental Settings display, and the accompanying tests. First unit of the series and the pipeline validator for the v2 workflow.Stack: base =
main(U1 is the first unit of the DTE-v2 stack; no lower PRs). Standalone diff vs that base:211 additions + 6 deletions = 217 lines (≤400 budget). (measured with
git diff --shortstat ca8a22f1204c8dcfcc4751ebe82bb5b7318ef53f HEAD)Related issue: #35 (DTE-v2 series tracking)
Out of scope: the remaining DTE-v2 units (U2+): provider plumbing for the thinking-effort selection, the persisted user setting round-trip, and provider-specific behavior. This unit only introduces the experimental flag, its registry entry, the localized display, and the tests.
Pre-submission checklist:
pnpm check-types(11/11), targeted vitest (packages/types 3/3, src 11/11, webview-ui 5/5),eslint --prune-suppressions(suppression counts unchanged for every touched file)en+en) inwebview-ui/src/i18n/locales/*/settings.json+node scripts/find-missing-translations.jscleanExperimentalSettingsmechanism (asserted by the spec)Binary files in this PR: none
Verification (local, worktree
wt-dte-v2-1, basemain=ca8a22f1204c8dcfcc4751ebe82bb5b7318ef53f):pnpm check-types→ 11/11 greenpnpm --dir src exec eslint --prune-suppressions --max-warnings=0 src/shared/experiments.ts src/shared/__tests__/experiments.spec.ts→ exit 0, suppression counts unchangednode scripts/find-missing-translations.js→ clean27a2e97df: the 5 non-locale files byte-identical to the union; the 18 locale files carry exactly the spec'd key insertsgit diff --shortstat ca8a22f1204c8dcfcc4751ebe82bb5b7318ef53f HEAD→ 25 files, 211+ / 6− = 217 linesnode scripts/stryker-diff.mjs ci --base ca8a22f1204c8dcfcc4751ebe82bb5b7318ef53f --head 45e90ffa310c4eb984e0921149afd03941c9265b→ extension: 2 valid / 2 killed / 0 survived / 0 no-coverage → Passed (~7.6 min / 459 s, local, stock Stryker 10.0.0). The final head19788c031667fc1e367511fb9026607652e0f9cbadds onlyscripts/stryker-diff.test.mjs(the gate's unit test, outside the mutation manifest); the src diff is byte-identical.Mutation gate note: Stryker upstream defect workaround
This PR switches the
extensionentry ofscripts/stryker-diff.mjsto the vitestplugin's related-discovery mode (
vitestRelated: true,discoverRelatedTests: false,so
STRYKER_TEST_FILESstays empty) instead of the default explicit-test-file mode.The gate's unit tests (
scripts/stryker-diff.test.mjs,buildManifestcase) are updatedto assert the new extension-entry values (
vitestRelated: true,discoverRelatedTests: false).Why: with
@stryker-mutator/core@10.0.0+@stryker-mutator/vitest-runner@10.0.0,passing an explicit test-file list makes the mutant-test planner label static mutants
(module-scope code — here: the new experiment-flag constants in
src/shared/experiments.ts)as
mutantActivation: 'runtime'(mutant-test-planner.js:mutantActivation: testFilter ? 'runtime' : 'static'), while the vitest plugin activatesstatic mutants only in
beforeAll— after top-level code has already been evaluated.Result: systematic false
Survivedfor static code — both mutants onsrc/shared/experiments.ts:29(BooleanLiteral→true, ObjectLiteral→{}) surviveddespite
shared/__tests__/experiments.spec.tsasserting the exact replaced values.With no test-file list the planner plans
'static'activation, the same mutants areKilled(91 related test files executed; killed by the spec'sexperimentConfigsMap.DYNAMIC_THINKING_EFFORTassertion), and the gate is green(verified locally on stock 10.0.0, no patched modules).
Upstream tracking:
Killedwhen activation timing is fixed), plus a secondaryreloadEnvironmentcapability gap.Revert condition: once the upstream fix lands and the Stryker version is bumped, the
extensionentry can revert tovitestRelated: false/discoverRelatedTests: true(the faster, narrowly targeted mode). The
webviewentry keeps that mode here (this unitmutates no webview source); it carries the same latent exposure and should be switched in
the same follow-up.
Local-run note: an interrupted local gate run can leak Stryker's temp sandbox (
<package>/.stryker-tmp/), which the pre-commit hook's fullpnpm lintthen flags with spurious errors (cleanup is skipped on hard kills despitecleanTempDir: "always"); clean runs remove it. Tracked in Zoo-Code-Org#1514.