Skip to content

Update Codex environment config#58

Open
jscraik wants to merge 11 commits into
mainfrom
pr-48
Open

Update Codex environment config#58
jscraik wants to merge 11 commits into
mainfrom
pr-48

Conversation

@jscraik
Copy link
Copy Markdown
Owner

@jscraik jscraik commented May 10, 2026

Summary

  • Refreshes the repo-local Codex environment config from the current project command surface.
  • Resolves merge conflicts against main and keeps docs lint inside the required check gate.

Checklist

  • Resolved merge conflicts against main.
  • Re-enabled docs lint within npm run check as requested by the current review thread.
  • Validated typecheck, lint, docs lint, and tests locally.

Testing

  • PASS: npm ci
  • PASS: ./node_modules/.bin/tsc -p tsconfig.json --noEmit
  • PASS: ./node_modules/.bin/biome lint --diagnostic-level=error .
  • PASS: DOCS_LINT_SCOPE=staged bash scripts/docs-lint.sh
  • PASS: ./node_modules/.bin/vitest run

Review artifacts

  • Local merge-resolution commit: a4265a8
  • CodeRabbit docs-lint thread is now outdated after restoring docs lint in the check script.

Notes

This PR is ready for CI/review once GitHub reruns the template gate with the completed body.

dependabot Bot and others added 8 commits April 13, 2026 06:14
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 8.0.6 to 8.0.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.0.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 8.0.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Refresh the repo-local Codex environment file from the canonical harness template so setup and action commands stay aligned with current project scripts.

Co-authored-by: Codex <noreply@openai.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

Review Change Stack

Warning

Rate limit exceeded

@jscraik has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 11 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 02e7df45-877f-4256-81e9-10abd4c57064

📥 Commits

Reviewing files that changed from the base of the PR and between a4265a8 and 5a55648.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • .codex/environments/environment.toml
📝 Walkthrough

Walkthrough

Environment configuration file substantially expanded to wire declarative actions into executable shell commands. Setup script refactored for PATH discovery and mise integration. Core development actions (Run, Debug, Test, Prek) now invoke concrete npm scripts. New Release Finalize action added with safety guards for branch merging. Tool verification actions check availability and version. Large npm script action mapping added.

Changes

Environment Configuration & Actions

Layer / File(s) Summary
Setup Script & Environment
.codex/environments/environment.toml (lines 3–25)
Environment name updated; setup script refactored to discover local/system bin paths, conditionally run mise trust and mise install, then execute scripts/prepare-worktree.sh or fall back to npm install.
Core Development Actions
.codex/environments/environment.toml (lines 51–87)
Run, Debug, Test, Prek actions now wired to concrete commands: npm run 'dev', npm run 'lint', npm run 'test', and prek --version check.
Release Finalization Action
.codex/environments/environment.toml (lines 88–138)
New Release Finalize action added; accepts release branch argument, validates branch pattern, ensures local main is not ahead of origin/main, performs ff-only pull and merge, then pushes main with error handling.
Tool Verification & Integration
.codex/environments/environment.toml (lines 27–49, 140–405)
Tools action replicated from setup logic; many tool actions expanded to verify presence via command -v and output --help/--version; Mise action adds detached-HEAD detection, branch tracking, and runs mise trust and mise install.
NPM Script Action Mappings
.codex/environments/environment.toml (lines 406–629)
Large set of Script:* actions added to invoke corresponding npm scripts (build, postbuild, lint, typecheck, test variants, docs, audit, ci, secrets, and commit hooks).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

generated-artifacts, maintenance

🚥 Pre-merge checks | ✅ 5 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Validation Evidence ⚠️ Warning Validation evidence is vague: no exact commands, results, or canonical checks. Review found 4 unaddressed bugs: dead code, hard-coded namespace, multi-worktree failure, missing npm exec. Run scripts/check-environment.sh and npm run check with output. Provide exact Python tomllib validation. Fix review issues before merging.
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive language that doesn't convey meaningful information about the specific changes made to the environment configuration. Use a more specific title following the guidelines, such as: 'chore(codex): regenerate environment config from canonical template' or 'chore(config): update Codex environment setup and actions'.
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description is directly related to the changeset, detailing the refresh of the Codex environment config, merge conflict resolution, docs lint re-enablement, and providing test results and validation artifacts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Governance Parity ✅ Passed Governance surfaces aligned. CodeRabbit and Semgrep Cloud remain independent. GitHub Actions is active. Required checks consistent. Generated environment.toml reflects policy surfaces correctly.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-48
  • 🛠️ harness docs parity: Commit on current branch
  • 🛠️ harness docs parity: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae0e178836

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package.json Outdated
"docs:lint": "bash scripts/docs-lint.sh",
"fmt": "biome format --write .",
"check": "pnpm typecheck && pnpm lint && pnpm docs:lint && pnpm test",
"check": "pnpm typecheck && pnpm lint && pnpm test",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Re-enable docs lint in the CI check gate

Removing pnpm docs:lint from the check script means the PR pipeline no longer runs markdown linting, because the workflow still executes npm run check and does not call npm run docs:lint elsewhere (the new "Capture docs lint diff range" step only sets env vars). In pull_request/merge_group CI this allows markdown regressions to merge without any gate, which is a behavior regression from the prior pipeline.

Useful? React with 👍 / 👎.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.codex/environments/environment.toml:
- Around line 118-128: Under set -euo pipefail the standalone git pull --ff-only
origin main will abort the script on failure, making the subsequent pull_status,
conditional and recovery logic unreachable; change the code so the pull is
performed inside a conditional (e.g., if ! git pull --ff-only origin main; then
...) so you can capture its exit code into pull_status and run the existing
recovery block that checks local_main_ahead_count and exits accordingly; update
references to pull_status and keep the existing local_main_ahead_count and exit
semantics unchanged.
- Around line 175-176: The branch template currently hard-codes the user
namespace by setting
branch_base="jscraik/feature/$repo_slug-worktree-$short_sha" and then
branch_name="$branch_base"; update the generator/template that produces these
keys so the namespace is not fixed: remove the "jscraik/feature/" prefix and
instead compose branch_base from either a configurable prefix (e.g., a variable
like branch_prefix or an empty string) or omit it entirely so
branch_base="$repo_slug-worktree-$short_sha" (or
"$branch_prefix$repo_slug-worktree-$short_sha" when a prefix is provided);
ensure the template exposes that configurable variable and that branch_name
continues to reference branch_base.
- Around line 109-118: The script currently does a hard "git checkout main"
which fails in multi-worktree setups; update the release finalize template so
instead of checking out main it uses a throwaway detached checkout from origin
(e.g. "git checkout --detach origin/main") or performs the merge in a temporary
worktree and then pushes with "HEAD:main", keep the existing safety check that
reads local_main_ahead_count and the fast-forward pull behavior (git pull
--ff-only origin main) but perform those checks against the detached HEAD or
temporary worktree; also patch the autogenerating template (not this generated
file) that produces this environment.toml snippet so the change persists.
- Around line 239-243: The environment command currently probes Node-backed CLIs
by invoking "command -v vitest" and "vitest --version" (and similarly for
"markdownlint-cli2"), which will fail if they are only installed as
devDependencies; replace those probes with npm-run invocations like "npm exec --
vitest --version" (and "npm exec -- markdownlint-cli2 --version" for
markdownlint) and remove or adapt the "command -v ..." checks to rely on npm
exec success; update the command block containing "command -v vitest" and
"vitest --version" to use "npm exec -- ..." invocations so the tools are
resolved from node_modules/.bin.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2baae818-a9fe-4f09-957b-d264a08cf1f0

📥 Commits

Reviewing files that changed from the base of the PR and between 427f7bf and a4265a8.

📒 Files selected for processing (1)
  • .codex/environments/environment.toml

Comment thread .codex/environments/environment.toml Outdated
Comment thread .codex/environments/environment.toml Outdated
Comment thread .codex/environments/environment.toml Outdated
Comment thread .codex/environments/environment.toml Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e95808e065

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .codex/environments/environment.toml Outdated
Comment on lines +20 to +21
if [[ -f scripts/prepare-worktree.sh ]]; then
bash scripts/prepare-worktree.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use npm fallback when pnpm bootstrap is unavailable

The new setup path always executes bash scripts/prepare-worktree.sh whenever that file exists, which is true in this repo, so the npm install fallback is effectively unreachable. scripts/prepare-worktree.sh exits with an error when pnpm is not on PATH, so environments that have Node/npm (or only Corepack) but no standalone pnpm now fail during bootstrap even though the project lockfile and scripts are npm-based. This is a regression from the previous setup flow that installed dependencies with npm directly.

Useful? React with 👍 / 👎.

Update the generated local environment config to keep bootstrap and tool probes usable in stock checkouts, avoid checked-out-main release finalization, and remove hard-coded user branch namespaces.

Co-authored-by: Codex <noreply@openai.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5a55648d6e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread package-lock.json
"queue-microtask": "^1.2.2"
}
},
"node_modules/safer-buffer": {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore pinned lock entry for run-parallel

This change removes the node_modules/run-parallel package block from the lockfile, but @nodelib/fs.scandir still declares run-parallel as a dependency (package-lock.json line 921). Without a corresponding pinned version/resolved/integrity entry, installs can fall back to semver resolution (^1.1.9) and drift across environments, which undermines reproducible npm ci results in CI and local development.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

jscraik commented May 11, 2026

@codex fix it

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant