fix(preamble): gate upgrade-handling prose on update_check opt-out (#2001)#2022
Open
0xDevNinja wants to merge 2 commits into
Open
fix(preamble): gate upgrade-handling prose on update_check opt-out (#2001)#20220xDevNinja wants to merge 2 commits into
0xDevNinja wants to merge 2 commits into
Conversation
update_check: false makes gstack-update-check exit early and emit nothing, but the preamble instruction text that tells the agent how to act on UPGRADE_AVAILABLE / JUST_UPGRADED output still shipped in every generated SKILL.md. The runtime layer honored the opt-out; the instruction layer did not. Follow the same echo-then-gate convention every other runtime flag uses (PROACTIVE, SKILL_PREFIX, EXPLAIN_LEVEL, QUESTION_TUNING): - generate-preamble-bash.ts reads update_check and echoes UPDATE_CHECK so the instruction layer can see the value. - generate-upgrade-check.ts gates the UPGRADE_AVAILABLE / JUST_UPGRADED prose on UPDATE_CHECK == false. The gstack-upgrade skill's own inline-flow documentation is unchanged: a user in that skill is explicitly upgrading, so its prose is correctly out of scope. All 49 preamble-bearing SKILL.md regenerated via bun run gen:skill-docs. Fixes garrytan#2001.
Iterates every generated SKILL.md carrying the runtime config-echo cluster and asserts it echoes UPDATE_CHECK, reads the update_check config, and gates the UPGRADE_AVAILABLE / JUST_UPGRADED prose on the flag. Guards against the scope filter matching nothing. Pins the garrytan#2001 fix so the instruction layer can't silently drift back to ignoring the opt-out. Refs garrytan#2001.
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
Problem
update_check: falsecorrectly silences thegstack-update-checkbinary (exits early, emits nothing), but the instruction text telling the agent how to act on update-check output still shipped in every generatedSKILL.mdpreamble. The runtime layer honored the opt-out; the instruction layer ignored it. Same bug class as #1150, different flag.Fix — echo-then-gate, like every other runtime flag
Every other flag (
PROACTIVE,SKILL_PREFIX,EXPLAIN_LEVEL,QUESTION_TUNING) is echoed in the preamble bash and gated in the instruction layer.update_checknow follows suit:scripts/resolvers/preamble/generate-preamble-bash.ts— readsupdate_checkand echoesUPDATE_CHECK: <value>alongside the other config flags.scripts/resolvers/preamble/generate-upgrade-check.ts— prepends a gate: IfUPDATE_CHECKis"false", skip the next two lines — the binary emits nothing, so there is noUPGRADE_AVAILABLE/JUST_UPGRADEDoutput to act on.All 49 preamble-bearing
SKILL.mdregenerated viabun run gen:skill-docs.Out of scope (intentionally)
gstack-upgrade/SKILL.mddocuments its own inline upgrade flow (hand-authored in the.tmpl). A user invoking that skill is explicitly upgrading, so gating its prose would be wrong. The 50-vs-49 count difference is exactly this one file.Tests
New invariant in
test/gen-skill-docs.test.tsiterates every generated SKILL.md with the config-echo cluster and asserts it (a) echoesUPDATE_CHECK, (b) readsupdate_check, (c) gates the upgrade prose on the flag. Guards against the scope filter matching nothing.735 pass (gen-skill-docs + skill-validation), gen-skill-docs freshness check clean.
Fixes #2001.