Skip to content

v1.39.2.0 feat: GSTACK_* env-shim for Conductor + gbrain/gstack setup docs#1534

Open
garrytan wants to merge 4 commits into
mainfrom
garrytan/rome-v3
Open

v1.39.2.0 feat: GSTACK_* env-shim for Conductor + gbrain/gstack setup docs#1534
garrytan wants to merge 4 commits into
mainfrom
garrytan/rome-v3

Conversation

@garrytan
Copy link
Copy Markdown
Owner

Summary

Three commits land Conductor compatibility for paid-API entry points plus the docs that explain it:

Code

  • feat: GSTACK_* env-key shim for Conductor workspaces (506ed6b) — new lib/conductor-env-shim.ts promotes GSTACK_ANTHROPIC_API_KEY / GSTACK_OPENAI_API_KEY to canonical names when canonical is empty. Imported as a side effect from the four TS entry points that hit Anthropic/OpenAI: bin/gstack-gbrain-sync.ts, bin/gstack-model-benchmark, scripts/preflight-agent-sdk.ts, test/helpers/e2e-helpers.ts.
  • test: unit coverage for conductor-env-shim (93c8a8a) — refactored the shim to export promoteConductorEnv() so unit tests can manipulate env and call it directly. Four tests cover all three branches (promote, no-overwrite, no-op).

Docs

  • docs: gbrain+gstack setup, Conductor env mapping (v1.39.2.0) (6d7dad2) — new sections in USING_GBRAIN_WITH_GSTACK.md (What you get, Path 4 / split-engine, /sync-gbrain workflow, Conductor + GSTACK_* env vars, two troubleshooting entries). New paragraph in CONTRIBUTING.md "Conductor workspaces" naming the shim and the four entry points. VERSION 1.39.1.0 → 1.39.2.0 with full release-summary CHANGELOG entry.

Test Coverage

CODE PATHS
[+] lib/conductor-env-shim.ts
  └── promoteConductorEnv()
      ├── [★★★ TESTED] GSTACK_ANTHROPIC_API_KEY → ANTHROPIC_API_KEY promotion
      ├── [★★★ TESTED] GSTACK_OPENAI_API_KEY → OPENAI_API_KEY promotion
      ├── [★★★ TESTED] canonical already set → no overwrite
      └── [★★★ TESTED] neither set → no-op

COVERAGE: 4/4 paths tested (100%)  |  QUALITY: ★★★:4  |  GAPS: 0

Tests: 387 → 391 (+4 new). Full free suite: 718 pass, 0 fail.

Pre-Landing Review

No issues found. Code surface is tiny: 14 lines of TS in the shim (fully unit-tested), 4 single-line import additions, doc updates. Heavy Codex pass skipped — the 209-line diff is mostly markdown.

Design Review

No frontend files changed — skipped.

Eval Results

No prompt-related files changed — evals skipped.

TODOS

No TODO items completed in this PR (no existing entries match this scope).

Documentation

This PR includes its own documentation as part of the planned release:

  • USING_GBRAIN_WITH_GSTACK.md — new "What you get after setup", "Path 4 (remote MCP / split-engine)", "/sync-gbrain workflow", "Conductor + GSTACK_* env vars" sections + env vars table extensions + two troubleshooting entries (silent embedding failure, FILE_TOO_LARGE watermark).
  • CONTRIBUTING.md — "Conductor workspaces" section gained a paragraph on the GSTACK_* prefix pattern, the shim file, and the four entry points already wired up.

Coverage map (Diataxis):

  • lib/conductor-env-shim.ts: reference ✅ CHANGELOG + CONTRIBUTING + USING_GBRAIN, how-to ✅ Conductor section + contributor checklist, explanation ✅ why-prefix rationale in both docs.
  • Path 4 / split-engine (already-shipped feature, newly documented): reference ✅, how-to ✅, explanation ✅.
  • /sync-gbrain workflow: reference ✅, how-to ✅ stage breakdown + --skip-failed, explanation ✅ pre-flight gating rationale.

Test plan

  • bun test test/skill-validation.test.ts test/gen-skill-docs.test.ts test/conductor-env-shim.test.ts — 718 pass, 0 fail
  • Manual verification: /sync-gbrain ran clean in this Conductor workspace with only GSTACK_OPENAI_API_KEY in env — 3294 chunks embedded, gbrain search returned ranked code regions at 0.95 top score
  • VERSION bumped, package.json synced, CHANGELOG entry at top of file in reverse-chronological order

🤖 Generated with Claude Code

garrytan and others added 3 commits May 15, 2026 17:26
New lib/conductor-env-shim.ts promotes GSTACK_ANTHROPIC_API_KEY and
GSTACK_OPENAI_API_KEY to canonical names when canonical is empty. Wired
into the four TS entry points that hit paid APIs or gbrain embeddings:
gstack-gbrain-sync.ts, gstack-model-benchmark, preflight-agent-sdk.ts,
test/helpers/e2e-helpers.ts. Side-effect-only import, 15 lines total.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
USING_GBRAIN_WITH_GSTACK.md: new "What you get after setup" section,
Path 4 (remote MCP / split-engine), /sync-gbrain workflow stages +
watermark mechanics, "Conductor + GSTACK_* env vars" section, env vars
table extended, two troubleshooting entries (silent embedding failure
and FILE_TOO_LARGE watermark block).

CONTRIBUTING.md "Conductor workspaces": new paragraph on the GSTACK_*
prefix pattern and the four entry points importing the shim.

VERSION 1.39.1.0 → 1.39.2.0 and CHANGELOG entry covering the shim +
docs (full release-summary format with before/after table).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Refactor lib/conductor-env-shim.ts to export promoteConductorEnv()
so unit tests can manipulate env and call it directly (a bare side-
effect IIFE on import isn't reachable from bun:test once cached).
The on-import IIFE still runs — existing four-entry-point imports
keep working unchanged.

test/conductor-env-shim.test.ts covers all three branches:
GSTACK_FOO present + FOO empty → promotion; FOO already set →
no-overwrite; nothing in env → no-op.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

E2E Evals: ✅ PASS

0/0 tests passed | $0 total cost | 12 parallel runners

Suite Result Status Cost

12x ubicloud-standard-8 (Docker: pre-baked toolchain + deps) | wall clock ≈ slowest suite

The prior docs framed the GSTACK_* prefix as collision-avoidance:
"Conductor exposes API keys under a GSTACK_ prefix so it never
collides with whatever the host system has set." That understates
the mechanism — Conductor actively strips ANTHROPIC_API_KEY and
OPENAI_API_KEY from every workspace's process env, so setting them
in ~/.zshrc or .env doesn't help. The fix path is to set the
GSTACK_-prefixed forms in Conductor's workspace env config; Conductor
passes those through untouched.

Three docs updated to reflect the strip, not the polite framing:
USING_GBRAIN_WITH_GSTACK.md (Conductor section), CONTRIBUTING.md
(Conductor workspaces paragraph), CHANGELOG.md (release summary).

README.md gains a "Running gstack in Conductor?" callout in the
GBrain section pointing at the canonical doc's anchor, plus a fourth
path entry (remote gbrain MCP / split-engine) that was already
documented in USING_GBRAIN but missing from the README summary.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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