Conversation
…ts (garrytan#1159) Generated Codex design and make-pdf skills resolve their binaries from .agents/skills/gstack/{design,make-pdf}/dist first, then from $GSTACK_DESIGN / $GSTACK_MAKE_PDF under ~/.codex/skills/gstack. Neither create_codex_runtime_root() nor create_agents_sidecar() linked those directories, so both preflights reported *_NOT_AVAILABLE on a fresh Codex install even though setup had built the binaries. Link dist/ only: make-pdf/ ships its own SKILL.md, which Codex would discover as a duplicate skill. hosts/codex.ts runtimeRoot now lists what setup installs, matching the opencode precedent. The new test builds both roots with the real setup functions and runs the exact preflight blocks the generator emits for Codex in a fresh process. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MwmFu1FwFwji6XSmnY7315
|
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)
On a Codex install,
gstack-design-shotgun,gstack-design-consultation,gstack-plan-design-reviewandgstack-make-pdfreportDESIGN_NOT_AVAILABLE/MAKE_PDF_NOT_AVAILABLEeven though./setupbuilt both binaries. The generated Codex preflights look in two places: the repo-local sidecar.agents/skills/gstack/{design,make-pdf}/distand the global root via$GSTACK_DESIGN/$GSTACK_MAKE_PDF, which point at~/.codex/skills/gstack/{design,make-pdf}/dist. Neithercreate_codex_runtime_root()norcreate_agents_sidecar()ever linked those directories, so the design flow silently degrades to HTML wireframes. This PR linksdesign/distandmake-pdf/distinto both roots. It linksdist/only, becausemake-pdf/ships its ownSKILL.mdthat Codex would pick up as a duplicate skill. It also updateshosts/codex.tsruntimeRootso the host metadata matches what setup installs, following the opencode precedent. This covers problems 2 and 3 from #1159. Problem 1 ($HOME$GSTACK_*) was already fixed in v1.64.0.0.Live evidence
create_codex_runtime_root()frommainvs this branch, run into an emptyHOMEagainst a real built install (gstack v1.87.4.0, macOS arm64), then the DESIGN SETUP and MAKE-PDF SETUP blocks copied verbatim from the generated Codexgstack-design-shotgunandgstack-make-pdfskills, each in a freshbashwith onlyHOME,PATH,GSTACK_DESIGN,GSTACK_MAKE_PDFset:In a real Codex session (codex-cli 0.154.0) with the same two links in place, the verbatim DESIGN SETUP block run through
codex execreturnsDESIGN_READY: /Users/<me>/.codex/skills/gstack/design/dist/design, providedGSTACK_DESIGNreaches the shell call (see "Not addressed here" below).New regression test, run against the unfixed
setupand then the fixed one:The test builds each root with the real
setupshell functions, then runs the exact bash block thatgenerateDesignSetup/generateMakePdfSetupemit for Codex in a fresh process, and asserts*_READY. It also assertsmake-pdf/SKILL.mdanddesign/srcdo not leak into either root. A negative control runs the pre-fix layout and expects*_NOT_AVAILABLE.Full free suite (
bun run test) on this branch fails in 63 files (CSO, PTY, autoplan, plan-count and similar), none of which exercisesetuphost roots. I ran the same 63 files on untouchedmain(a6b3a575) on the same machine and they fail there too (323 failing tests). Comparing failing test names, the branch added none. The two name-level differences were a secret-scan timing test that passes on rerun, and the sync-spawn timeout tripwire, which caught a missingtimeoutin the new test and is fixed in this commit. Targeted run on the branch:Scope
setup:create_codex_runtime_root()andcreate_agents_sidecar()linkdesign/distandmake-pdf/dist.hosts/codex.ts:runtimeRootlists what setup installs. Newtest/setup-codex-design-pdf-runtime.test.ts.mainand branchsetupagainst a real install and running the generated preflights, plus acodex execsession on macOS arm64, as above.IS_WINDOWS=1test cells. A full./setup --host codexrun from this branch on a clean machine was not done either.Not addressed here, needs a maintainer call (details in #1159): Codex runs each shell tool call in a fresh process, so the
GSTACK_*variables the generated preamble sets are empty in later blocks. With this PR the binaries are in place, but a skill run still resolvesD="/design"unless those variables reach every call, for example via[shell_environment_policy.set]in~/.codex/config.toml. Options are sketched in the issue comment.Liveness proof (required for external contributors)
Authenticated GitHub login verified with
gh api user --jq .login:mamedov.GSTACK PRtyped live into my terminal prompt:The code, tests and this description were prepared with Claude Code at my direction; I reviewed the result.
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption)🤖 Generated with Claude Code
https://claude.ai/code/session_01MwmFu1FwFwji6XSmnY7315