Repository navigation
fix(acq): make kit fetch non-interactive; never prompt for git creds (#207) - #209
Merged
Merged
Conversation
…207) acq run … could drop into an interactive git credential prompt (Username for 'https://github.com') and hang/fail when fetching a hybrid/v1 kit from the (public) patterns repo — even when the user was authed via gh. Root cause: gh auth authenticates the gh CLI, not plain git, and kit-translate ran a bare git fetch with no GIT_TERMINAL_PROMPT=0 and no credential isolation, so a global git credential helper or url.*.insteadOf rewrite forced auth on a public clone. kit_translate_fetch now fetches NON-INTERACTIVELY: - GIT_TERMINAL_PROMPT=0 + GIT_ASKPASS=/bin/echo + GCM_INTERACTIVE=never on every git call, so it can never hang on a prompt. - Attempt 1 (anonymous): neutralizes any inherited credential.helper and the github.com insteadOf rewrite, so a public fetch just works. - Attempt 2 (authed retry, still prompt-disabled): system git config intact for legitimately private / enterprise-mirror sources. - Actionable error on genuine failure (gh auth setup-git; check insteadOf). - Hardening: reject a hostile dir= (absolute path / '..' / illegal chars) before any git call (defense-in-depth, parity with kit_spec_files). sbx.sh: the passthrough-on-fetch-failure warning is now loud + actionable for git+http* refs (#208 item 1) instead of a terse one-liner. docs/KNOWN_FAILURE_MODES.md: new entry #25 (the prompt symptom + gh auth setup-git fix + the prevention note). test-acq: +5 assertions (prompt disabled, anon credential-neutralizing flags, traversal dir rejected + no git call). 153/153 pass. shellcheck clean. Closes #207. Addresses #208 (item 1 fallback loudness + KNOWN_FAILURE_MODES doc). Co-authored-by: OpenCode Agent <[email protected]>
…-it 5.0.2) Markdown Quality CI gates on npm audit --audit-level=high and has been red on main since two new high-severity advisories landed against the pinned linter deps: js-yaml GHSA-52cp-r559-cp3m (YAML merge-key quadratic CPU, affects 4.0.0-4.2.0) and linkify-it GHSA-v245-v573-v5vm (mailto: quadratic DoS). Bump the overrides to js-yaml 4.3.0 (patched 4.x, still compatible with markdownlint-cli2 0.22.1) and pin linkify-it 5.0.2; regenerate lockfile. npm audit --audit-level=high: 0 vulnerabilities. Co-authored-by: OpenCode Agent <[email protected]>
rcgottlieb
approved these changes
Jul 22, 2026
rcgottlieb
approved these changes
Jul 22, 2026
rcgottlieb
approved these changes
Jul 22, 2026
The kit fetch printed a harmless-but-noisy error on every kit
('.git/info/sparse-checkout: No such file or directory') because 'git init'
does not always create .git/info/ (platform-dependent — reproduced on macOS
where it is absent right after init). Add 'mkdir -p .git/info' before the
sparse-checkout redirect. Reported live during 'acq run' (3x, one per kit);
non-fatal (fetch fell back) but should not emit errors.
Co-authored-by: OpenCode Agent <[email protected]>
rcgottlieb
approved these changes
Jul 22, 2026
rcgottlieb
approved these changes
Jul 22, 2026
mogul
reviewed
Jul 22, 2026
mogul
reviewed
Jul 22, 2026
mogul
previously approved these changes
Jul 22, 2026
mogul
left a comment
Contributor
There was a problem hiding this comment.
Approving as already-useful-as-is, though I'd like to see reference to the public/non-public status of the -playbook repository removed as irrelevant, particularly since the assertion as to the current status is not correct.
…209 review) Per @mogul's review: the messages asserted the kit repo is public, which is (a) incorrect and (b) irrelevant to the fix — the problem is plain git dropping into an interactive credential prompt (gh auth != git auth), regardless of repo visibility. Reword the kit-translate.sh + sbx.sh guidance and the KNOWN_FAILURE_MODES #25 entry to focus on the actual cause + remedy (gh auth setup-git; check url.*.insteadOf) without any public/private claim. Comment/message text only; no logic change. Co-authored-by: OpenCode Agent <[email protected]>
mogul
approved these changes
Jul 23, 2026
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.
Summary
acq run …could drop into an interactive git credential prompt (Username for 'https://github.com':) and hang/fail while fetching a hybrid/v1 kit from the public patterns repo — even when the user was authenticated viagh. Reported by a real user;gh auth setup-gitworked around it.Closes #207. Addresses #208 (fallback loudness + KNOWN_FAILURE_MODES doc).
Root cause
gh auth loginauthenticates the gh CLI, not plain git.kit_translate_fetchran a baregit fetchwith noGIT_TERMINAL_PROMPT=0and no credential isolation, so a global git credential helper or aurl.*.insteadOfrewrite forced git to authenticate to a public repo — and dropped into an interactive prompt (GitHub disabled git password auth in 2021).Fix (design approved by consensus vote, 7/7)
kit_translate_fetchnow fetches non-interactively:GIT_TERMINAL_PROMPT=0+GIT_ASKPASS=/bin/echo+GCM_INTERACTIVE=neveron every git call — it can never hang on a prompt.credential.helperand thegithub.cominsteadOfrewrite, so a public fetch just works.gh auth setup-gitand theinsteadOfcheck.dir=(absolute path /../ illegal chars) before any git call — defense-in-depth parity withkit_spec_files(from the security review).acq.backends/sbx.sh: the passthrough-on-fetch-failure warning is now loud + actionable forgit+http*refs (#208 item 1) rather than a terse one-liner, while preserving the passthrough behavior.docs/KNOWN_FAILURE_MODES.md: new entry #25 — the prompt symptom, thegh auth setup-gitfix, and the prevention note.Testing
scripts/test-acq: +5 assertions — fetch runs withGIT_TERMINAL_PROMPT=0; anonymous attempt carries the credential-neutralizing-cflags; traversaldir=rejected with no git call. 153/153 pass. shellcheck + markdownlint clean.Reviews performed
Design consensus vote (7/7 approve), plus a read-only QA/security fan-out review that verified: no shell injection (all ref-derived values double-quoted),
rm -rf .gitiscd-guarded + relative, attempt-2 can't hang, theinsteadOfneutralization is correctly github.com-scoped — and surfaced thedir=traversal gap now closed here.AI-assisted (OpenCode). Non-contract bug fix.