Repository navigation
test(pm): pin core.quotePath=true in the real-git quoted-path fixtures - #33962
Merged
Merged
Conversation
The CONTROL rows of the NUL-path fixtures in check-governed-queue-guard and check-governed-merges witness that git C-quotes the fixture names without -z. gitFreeEnv strips GIT_* but not a user or system gitconfig, so a box with core.quotePath=false spelled the non-ASCII name raw and reddened both CONTROL rows. Pin the setting on the fixture's own git command line, beside the identity pins it already carries; -c outranks every config file level. Claude-Session: https://claude.ai/code/session_01ADHkmSDNFF5uczb7BL5Bdf Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:skills#1 · os-steve · session_01ADHkmPd7uRqHauEehGPr19 席位核对 · ACCEPT · head
|
1 task
objectstack-fleet
Bot
requested review from
hotlong and
os-zhuang
as code owners
November 15, 2026 15:05
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.
Requested by Steve · project thread
Fixes #33846
Clause-②: no
Metadata-protocol: none
维护者速读
core.quotePath=true。core.quotePath=false时,两条 CONTROL 断言会误红(只会红,不会假绿)。scripts/pm/check-governed-queue-guard.mjs的夹具g,再看scripts/pm/check-governed-merges.mjs的夹具fg。HOME=$(mktemp -d) sh -c 'git config --global core.quotePath false && node scripts/pm/check-governed-merges.mjs --self-test',预期 745 条全绿。What changes
The CONTROL rows of the NUL-path fixtures (from PR #33804) witness that git C-quotes the fixture names when a read runs without
-z. Both fixture wrappers run real git undergitFreeEnv(), which strips everyGIT_key but leavesHOME/XDG_CONFIG_HOMEand/etc/gitconfigin reach, so a box withcore.quotePath=falsein any config file spells the non-ASCII names raw and reds the two CONTROL rows.The fix adds
-c core.quotePath=trueto the command-line pins each wrapper already carries (user.email,user.name,init.defaultBranch,commit.gpgsign):scripts/pm/check-governed-queue-guard.mjs: thegwrapper of the quoted-path fixture (guard-quoted-paths-).scripts/pm/check-governed-merges.mjs: thefgwrapper of the quoted-path fixture (governed-merges-quoted-paths-).Why the
-cpin rather thanGIT_CONFIG_GLOBAL=/dev/null+GIT_CONFIG_NOSYSTEM=1: command-line-coutranks every config file level (system, global, XDG, local), so one pin covers all of them. The env route needs two variables to cover only global and system, and it would have to go throughgitFreeEnv(), which strips everyGIT_key by design, so it means changing the shared helper and its callers. The-cpin also sits in the same place as the fixture's existing identity pins.scripts/git-env.mjsis not changed, so no caller ofgitFreeEnv()moves.Forced test edits: none. No assertion, expected value or case count changed. Only the two fixture wrappers' git argument lists and their comments changed.
Tests
The acceptance asked for these runs: each self-test with
core.quotePath=falseset in a throwaway global config, before and after the fix.gitFreeEnv()stripsGIT_CONFIG_GLOBAL, so the throwaway config goes in throughHOME, plus oneXDG_CONFIG_HOMErun.--self-test--self-testHOMEwithcore.quotePath=false(ablation)HOMEwithcore.quotePath=falseXDG_CONFIG_HOMEwithcore.quotePath=falseAblation output at base (core.quotePath=false)
The newline name stays quoted under
core.quotePath=false. Only the non-ASCII names lose their quotes, which is theevery(startsWith('"'))limb the CONTROL row reads.Acceptance notes
core.quotePathpin existed in either fixture at 895783a, andgitFreeEnv()does not cover config files. One small correction: at base, neither file's comment namedcore.quotePath. The governed-merges comment said only "git would C-quote". Both comments now name it.lowrisk-rename-real-git fixture in check-governed-queue-guard is in the low-risk arm region (another card is working there) and was left alone. It uses only ASCII names, so it does not depend oncore.quotePath./etc/gitconfigleg was not run, because it would mean writing a file outside the workspace.-coutranks the system level by git's documented precedence.Verification
Gates:
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon head cd7b9ac derived 35 commands. All 35 exited 0.--ranreconciliation: "35 derived famil(ies) accounted for — 35 run, 0 NOT-MEASURED (a DERIVED zero — all 35 recorded an exit code and none of them is 3)". CI runs every other family on this PR.Derived gate list, each exit 0 at cd7b9ac
This PR changes only
scripts/pm/**and publishes nothing, so it takesskip-changeset. No governed surface is touched.Generated by Claude Code