-
Notifications
You must be signed in to change notification settings - Fork 2
Allow config overrides for logging and silence warn toasts #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2304f4b
Merge pull request #57 from open-hax/dev
riatzukiza f5871c4
Allow config to override logging and silence warn toasts
riatzukiza aa8e1c9
Fixed unsafe mutable export with getter function
opencode-agent[bot] 5aa5dcd
Merge branch 'dev' into logging-config-overrides
riatzukiza e0f2509
Added config override assertions to logger tests.
opencode-agent[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Environment Variables Audit | ||
|
|
||
| ## Context | ||
|
|
||
| - User requested a list/summary of all environment variables used by this repository. | ||
|
|
||
| ## Sources (code refs) | ||
|
|
||
| - lib/logger.ts:12-27,428-435 (logging flags, rotation tuning via env, generic accessor) | ||
| - lib/config.ts:72-76 (CODEX_MODE override) | ||
| - scripts/sync-github-secrets.mjs:5-10,63-65,106-114 (default secret names, repo detection, env lookup) | ||
| - scripts/review-response-context.mjs:7-10,104-110 (GitHub Actions paths/outputs) | ||
| - scripts/detect-release-type.mjs:18-21,30-31 (release base ref/head sha overrides) | ||
|
|
||
| ## Environment variables and purposes | ||
|
|
||
| - `ENABLE_PLUGIN_REQUEST_LOGGING` (`lib/logger.ts:7`): when "1", persist detailed request logs. | ||
| - `DEBUG_CODEX_PLUGIN` (`lib/logger.ts:8`): when "1", enable debug logging/console output (unless NODE_ENV=test). | ||
| - `NODE_ENV` (`lib/logger.ts:10`): if "test", suppress console logging during tests. | ||
| - `CODEX_LOG_MAX_BYTES` (`lib/logger.ts:16`): max rolling log file size before rotation (default 5MB). | ||
| - `CODEX_LOG_MAX_FILES` (`lib/logger.ts:17`): how many rotated log files to keep (default 5). | ||
| - `CODEX_LOG_QUEUE_MAX` (`lib/logger.ts:18`): max queued log entries before overflow warning (default 1000). | ||
| - `CODEX_SHOW_WARNING_TOASTS` (`lib/logger.ts:15`): when "1", allow warning-level toasts (config default keeps them off). | ||
| - `CODEX_MODE` (`lib/config.ts:72-76`): if set, overrides config; "1" enables Codex bridge/tool mapping, otherwise disables. | ||
| - `GITHUB_REPOSITORY` (`scripts/sync-github-secrets.mjs:63-65`): optional repo inference fallback for syncing secrets. | ||
| - `NPM_TOKEN`, `OPENCODE_API_KEY`, `OPENCODE_API_URL`, `RELEASE_BASE_REF` (`scripts/sync-github-secrets.mjs:5-10`): default env names expected when syncing secrets (first two required, latter two optional unless explicitly requested). | ||
| - `GITHUB_EVENT_PATH` (`scripts/review-response-context.mjs:7-10`): required path to event payload in review-comment workflow. | ||
| - `GITHUB_OUTPUT` (`scripts/review-response-context.mjs:104-110`): optional path to append action outputs. | ||
| - `RELEASE_BASE_REF` (`scripts/detect-release-type.mjs:18-21`): optional override for release comparison base. | ||
| - `GITHUB_SHA` (`scripts/detect-release-type.mjs:30-31`): optional head sha override (falls back to git rev-parse HEAD). | ||
|
|
||
| ## Existing issues/PRs | ||
|
|
||
| - None identified during this audit. | ||
|
|
||
| ## Definition of done | ||
|
|
||
| - Enumerate all environment variables referenced in code/scripts with locations and purposes; provide user-facing summary. | ||
|
|
||
| ## Notes | ||
|
|
||
| - Secret sync script can read any env name specified via CLI args in addition to defaults; above list reflects defaults plus repo inference variables. | ||
| - Logging-related env vars can be overridden in ~/.opencode/openhax-codex-config.json via the `logging` block. |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.