feat(gsd-extension): add opt-in context-pressure wrapup disable#3411
Open
gunish wants to merge 1 commit intogsd-build:mainfrom
Open
feat(gsd-extension): add opt-in context-pressure wrapup disable#3411gunish wants to merge 1 commit intogsd-build:mainfrom
gunish wants to merge 1 commit intogsd-build:mainfrom
Conversation
Contributor
🔴 PR Risk Report — CRITICAL
Affected Systems
File Breakdown
|
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.
TL;DR
What: Add an opt-in
auto_supervisor.disable_context_pressure_wrapuppreference that suppresses the context-pressure continue-here / wrap-up monitor.Why: Some repos prefer to handle context pressure by splitting work into smaller follow-up tasks instead of steering the current unit toward closeout.
How: Extend
AutoSupervisorConfig, resolve the new flag with a safe default offalse, and skip only the continue-here monitor inauto-timerswhile leaving soft/idle/hard timeout supervision unchanged.What
This PR adds a small opt-in preference to the GSD auto supervisor:
When enabled,
startUnitSupervision()does not install the context-pressure continue-here monitor that emits thegsd-auto-wrapupmessage ("**CONTEXT BUDGET WARNING — wrap up this unit now.**").The rest of supervision remains intact:
Files changed:
src/resources/extensions/gsd/preferences-types.tssrc/resources/extensions/gsd/preferences-models.tssrc/resources/extensions/gsd/auto-timers.tssrc/resources/extensions/gsd/docs/preferences-reference.mdsrc/resources/extensions/gsd/templates/PREFERENCES.mdsrc/resources/extensions/gsd/tests/auto-supervisor.test.mjssrc/resources/extensions/gsd/tests/preferences.test.tsWhy
The existing context-pressure monitor is a sensible default, but it is not the right fit for every repository.
In some repos, the better behavior under rising context pressure is:
This PR makes that behavior available explicitly without changing the default experience for existing users.
Refs #3406.
How
Implementation details:
disable_context_pressure_wrapup?: booleantoAutoSupervisorConfigresolveAutoSupervisorConfig()return the flag with a strict default offalseauto-timers.ts, short-circuit only the continue-here setup when the flag is enabledI intentionally kept validation permissive and did not broaden schema cleanup in this PR. The goal is a small, focused behavior change with minimal blast radius.
Verification
npm run typecheck:extensionsauto-supervisor.test.mjspreferences.test.tsnode --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --experimental-test-isolation=process --test src/resources/extensions/gsd/tests/integration/continue-here.test.tsnpm run buildNotes