fix(config): reject malformed cross_project_learnings at set - #2676
Open
szsunyuan wants to merge 1 commit into
Open
fix(config): reject malformed cross_project_learnings at set#2676szsunyuan wants to merge 1 commit into
szsunyuan wants to merge 1 commit into
Conversation
A typo was stored with exit 0, so the feature stayed off and the first-run prompt never returned. Reject like codex_reviews; do not coerce. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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.
Why (in your own words)
gstack-config set cross_project_learnings tureexited 0 and stored the typo. Skills only enable on the literaltrue, and a non-empty value suppresses the first-run prompt, so the feature stayed off and the question never came back. The official AskUserQuestion path only writestrue/false. A hand-typed typo was the hole.Reject the bad write, same as
codex_reviews. Do not coerce tofalse— a stored default still kills the empty-get sentinel.Fixes #2673. Same class as #2488 (durable bad write). Not #1726 / #1723 (those are
parseInton one-shot flags; #1726 is already on main, #1723 has #1724). Did not add anunsettoken or a new subcommand.Why this shape
Issue author named
bin/gstack-configsetand the closed-domain block. CONTRIBUTING's wave rule: if two PRs fix the same thing, keep the smaller one. This is 2 files, on currentmain. Fine to absorb into a wave.Did not follow the issue's "Expected"
pair_agentwarn-and-default. That would persist a value and still suppress the prompt.What it does
set cross_project_learningsaccepts onlytrueandfalse.not recognized, leaves the file unchanged.get(first-run sentinel) is unchanged.What it deliberately does not do
unset(author snippet; optional undo, not the typo bug)gstack-config unsettureongetskill_prefix/telemetry/ other unvalidated keysvalidate_key()(TODOS P3 leftover)VERSION/CHANGELOG/ README / ETHOS/ship(wave stamps version)AI was used for assistance.
Live evidence
Temp
GSTACK_HOMEonly — not~/.gstack/config.yaml. Same isolated dir, realbin/gstack-config.Before (
upstream/main@85fd9db):After (this branch):
Scope
bin/gstack-config(setonly),test/gstack-config-cross-project.test.tsbun test test/gstack-config-cross-project.test.ts test/gstack-config-defaults.test.ts test/gstack-config-redact-keys.test.ts test/gstack-config-key-locale.test.ts(18 pass). The two reject cases were red on tip (Expected: 1, Received: 0) before the arm existed. Fullbun run testgreen (7 shards).bun run slop:diff: no new findings in 2 files.~/.gstack/config.yaml. Healing aturealready on disk (out of scope).Liveness proof (required)
GSTACK PRtyped live into a real surface (not edited onto the image)Checklist
GSTACK PRtyped live into a real surface (not edited onto the image)cross_project_learningsvalues, silently disabling cross-project learnings with no supported way to undo it #2673Test plan
bun test test/gstack-config-cross-project.test.ts→ 4 pass (2 were red on tip)set ture→ exit 1,getemptyset truethenset ture→ stilltruegetsentinel still exit 0Fork PRs do not get eval secrets; the free file above is the gate.