[codex] Centralize runtime configuration#67
Draft
snbafana wants to merge 7 commits into
Draft
Conversation
e5180bc to
82762d2
Compare
82762d2 to
2264303
Compare
a38350c to
8ba7bdd
Compare
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
This PR replaces the broad
CUED_*environment-variable surface with a smaller configuration model:src/core/config.ts.env.exampleand dotenv use to secrets / credential file pathsCUED_HOME/CUED_DB_PATHprocess isolation with--config path/to/config.json--api-urldaemon.envloading to a credential allowlist--channel stable|internalThis is stacked on
codex/agent-example-promptsto keep this PR diff scoped to the config cleanup. Once that branch lands, this can be retargeted tomain.Diff shape
Current PR size is 100 files, +1918/-1497. The breadth comes from systematically replacing env reads at each call site, updating tests that used env for isolation, and replacing worker env IPC with structured stdin. The largest buckets are:
src/core/config.ts.env.examplecleanupThe remaining direct
process.envusage is intentionally limited to secrets, test/process sentinels, subprocess environment pass-through, and shell-script internals.Validation
Local checks run before commit/push:
pnpm check:biomepnpm typecheckpnpm test(75 files, 496 tests)pnpm exec vitest run src/core/config.test.ts src/cli-paths.test.tsgo test ./...innative/helpers/slack-goswift test --package-path native/macos/CuedNative -c releasebash -non touched shell scriptsCommit/push hooks also passed:
pnpm check:ci-local, includingcheck:app-quality,pnpm build,pnpm test, andcheck:native:macos.Review follow-up
Two review-agent passes were run. The first found release metadata, Chromium path, permissions script lookup, and dotenv cwd-scope issues. The second found packaged permissions context, explicit macOS config fallback, and installer channel regressions. The current commit fixes those findings.