fix(plan-tune): reject never-ask on one-way ids at --write - #2607
Open
szsunyuan wants to merge 1 commit into
Open
fix(plan-tune): reject never-ask on one-way ids at --write#2607szsunyuan wants to merge 1 commit into
szsunyuan wants to merge 1 commit into
Conversation
--check already ignored those prefs; --write still stored them and --stats counted them as a working NEVER_ASK. Refuse the write and count leftover on-disk prefs as INERT_ONE_WAY. 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)
I set
never-askonplan-eng-review-arch-findingand--statssaid it worked. The next--checkstill asked, with a note that one-way doors ignore that pref. So the file lied: it stored a preference that can never fire.--writeis what I want to stop. If the id is one-way, refusenever-askandask-only-for-one-way(exit 1, name the door type, don't touch the file).--statsshould sayINERT_ONE_WAYfor leftovers already on disk, notNEVER_ASK: 1.always-askon a one-way id is fine — that matches what--checkalready does.Fixes #2488. Related: #2489 (closed — registry path made this easier to hit), #2490 (product split, out of scope), #2390 / #2429 (same
--writefunction, unknown-source exit 2, already on tip).Why this shape
Issue author asked for reject-at-write plus honest
--statsfor prefs written before the fix. Storing the value and labeling it INERT is the weaker pair — not done.CONTRIBUTING's wave rule: if two PRs fix the same thing, keep the smaller one. This is 2 files, on current
main. Fine to absorb into a wave.What it does
--write never-ask/ask-only-for-one-wayon a one-way id exits 1, namesdoor_type: one-way, does not write, does not append an event.--write always-askon a one-way id still succeeds.--statscounts leftover one-way suppressing prefs asINERT_ONE_WAY. WorkingNEVER_ASKis only prefs that--checkwould actuallyAUTO_DECIDE.--checktests that still need a planted one-way pref write the file directly, because--writenow refuses them.What it deliberately does not do
plan-eng-review-arch-finding(Split plan-eng-review-arch-finding: one-way architecture forks vs two-way code-derived defect findings (the only safely-tunable class is currently unreachable) #2490)ask-only-for-one-wayalias semantics--writeon*-split-*ids (that carve-out stays--check-only)--write(no summary on the write path)VERSION/CHANGELOG/ README--statsis honesty for old files)/ship(wave stamps version)AI was used for assistance.
Live evidence
Same isolated
GSTACK_HOME, same payload,cwd= repo:Before (
upstream/mainbinary):After (this branch):
Planted leftover file (a pref written before this reject existed):
Scope
bin/gstack-question-preference,test/gstack-question-preference.test.tsbun test test/gstack-question-preference.test.ts(52 pass)bun run testbrowse/playwright/pdf shards failed here (missing Chromium,make-pdftimeouts) — none of those files are in this diff.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)Test plan
bun test test/gstack-question-preference.test.ts→ 52 pass--writeonplan-eng-review-arch-finding+never-ask→ exit 1, file stays{}--write always-askon the same id still succeeds--statson a planted one-waynever-ask→INERT_ONE_WAY: 1,NEVER_ASK: 0Fork PRs do not get eval secrets; the free file above is the gate.