Skip to content

v1.69.1.0 fix(setup): install scripts in slim runtime roots - #2682

Open
yangsf5 wants to merge 3 commits into
garrytan:mainfrom
yangsf5:fix/install-scripts-runtime-assets
Open

v1.69.1.0 fix(setup): install scripts in slim runtime roots#2682
yangsf5 wants to merge 3 commits into
garrytan:mainfrom
yangsf5:fix/install-scripts-runtime-assets

Conversation

@yangsf5

@yangsf5 yangsf5 commented Aug 24, 2026

Copy link
Copy Markdown

Why (in your own words)

Slim installs put bin/ and lib/ into each host runtime root but leave out the top-level scripts/ directory. Several shipped commands load runtime data and TypeScript modules from ../scripts, so a normal install can make gstack-question-preference, gstack-developer-profile, and gstack-brain-cache fail even though the same commands work from a full source checkout. This keeps bin/, lib/, and scripts/ together for every slim runtime root instead of maintaining a second, easy-to-drift manifest of six runtime files.

I searched existing issues and pull requests before opening this. #2198 is the closest open PR, but it only adds lib/ to the OpenCode install path. #2305 covered an earlier missing-lib/ failure, and #2454 / #2604 covered per-skill Claude runtime assets. None covers the missing top-level scripts/ dependency across Agents, Codex, Factory, OpenCode, Cursor, and Kiro runtime roots.

Live evidence

The same temporary runtime root was exercised before and after adding scripts/. These are the real command results from macOS arm64 with Bun 1.4.0:

PRE-FIX: bin + lib, scripts missing
check: Cannot find module './scripts/one-way-doors.ts' imported from /private/tmp/gstack-pr-repro.KFmUaM/runtime/[eval]
question-preference exit=1
DERIVE: registry or signals file missing, cannot derive
developer-profile --derive exit=1
error: Cannot find module './scripts/archetypes.ts' from '/private/tmp/gstack-pr-repro.KFmUaM/runtime/[eval]'
developer-profile --vibe exit=1
error: Cannot find module '../scripts/brain-cache-spec' from '/private/tmp/gstack-pr-repro.KFmUaM/runtime/bin/gstack-brain-cache'
brain-cache meta exit=1

POST-FIX: bin + lib + scripts
ASK_NORMALLY
question-preference exit=0
DERIVE: ok — 0 events, 0 skills, 0 questions
developer-profile --derive exit=0
Builder-Coach
Balanced steering. Makes room for the agent to propose and challenge.
developer-profile --vibe exit=0
{
  "schema_version": "1.0.0",
  "endpoint_hash": "local",
  "last_refresh": {},
  "last_attempt": {}
}
brain-cache meta exit=0

The focused install matrix runs the real setup shell blocks and the same commands through every affected runtime root:

$ bun test test/setup-runtime-lib-command.test.ts
16 pass
0 fail
277 expect() calls
Ran 16 tests across 1 file. [10.74s]

Scope

  • Changed: Install scripts/ beside bin/ and lib/ in Agents sidecars; Codex, Factory, OpenCode, Cursor, and Kiro runtime roots; and Cursor repository sidecars. Align declarative host defaults, OpenCode's override, host-authoring docs, and the Windows curated test list with that runtime contract.
  • Verified live by: A direct pre-fix/post-fix command transcript; 16 focused real-command install tests across Unix symlink and Windows copy modes; and the broader setup suite with 198 passing tests, 0 failures, and 1,107 assertions. bash -n setup, git diff --check, and the public-repo redaction scan also pass (the scan reports version-number-only medium false positives and zero high findings).
  • Did NOT test: A physical Windows machine. The copy-install branch is covered by the focused tests and force-included in the windows-latest lane. No paid model evals were run because this changes installer assets, not prompts. The full free suite on the updated branch has four failures in two files: three brain-cache-roundtrip timeouts and one symlink-equivalent gstack-gbrain-sync failure. A detached pristine origin/main worktree at ad84005 reproduces all four failure cases (and two additional brain-cache timeouts), while all tests in this change's scope pass.

Liveness proof (required)

GSTACK PR typed live into the author's terminal:

GSTACK PR typed live in a terminal

Checklist

  • Liveness screenshot attached: GSTACK PR typed live into a real surface (not edited onto the image)
  • This is not a generated-file-only diff (source installer, host definitions, tests, and docs were edited)
  • No ETHOS.md edits, and no changes to voice / founder perspective / YC references
  • New public command / external service / host adapter has an accepted issue linked (N/A: no new command, service, or adapter)
  • Linked issue or reproduction: the failing and fixed command transcript is included above

Documentation

  • docs/ADDING_A_HOST.md now states that a slim runtime root must keep bin/, lib/, and scripts/ together.
  • CHANGELOG.md records the user-visible failure mode, affected hosts, and regression coverage for v1.69.1.0.
  • No new public command, flag, or configuration surface was added, so no separate how-to or tutorial is needed.

yangsf5 and others added 2 commits August 24, 2026 20:13
Keep bin, lib, and scripts together across Agents, Codex, Factory, OpenCode, Cursor, and Kiro installs. Add Unix symlink and Windows copy regression coverage for commands that load runtime assets from scripts.
Co-Authored-By: OpenAI Codex <noreply@openai.com>
@trunk-io

trunk-io Bot commented Aug 24, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@yangsf5
yangsf5 marked this pull request as ready for review August 24, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant