Skip to content

chore(repo): bootstrap codex os guardrails#11

Open
saagar210 wants to merge 2 commits intomasterfrom
codex/chore/bootstrap-codex-os
Open

chore(repo): bootstrap codex os guardrails#11
saagar210 wants to merge 2 commits intomasterfrom
codex/chore/bootstrap-codex-os

Conversation

@saagar210
Copy link
Copy Markdown
Owner

What

  • Bootstraps global Codex Git/performance guardrails for this repository
  • Adds manifest, policy-aligned CI workflows, hooks, and perf baseline scaffolding

Why

  • Enforces consistent commit hygiene and proactive performance regression prevention by default

Testing

  • Bootstrap scaffolding only (structural validation)

Risk / Notes

  • Review any .codex/bootstrap-conflicts/*.new files and merge intentionally
  • Functional/perf budgets enforce during normal CI after merge

- Add dev:lean workflow with temporary Cargo and Vite cache locations
- Add clean:heavy and clean:all scripts for targeted and full cleanup
- Document normal vs lean dev tradeoffs and cleanup usage in README
- Update npm scripts to call local tool binaries reliably in this environment

Tests: ./scripts/verify.sh (fails in tauri smoke due ':' in workspace path)
- install global git and performance baseline payload
- add codex-os manifest and verification contracts
- align repo with global policies under /Users/d/.codex/policies

Tests: not run (bootstrap scaffolding only)
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@sonarqubecloud
Copy link
Copy Markdown

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: fe5030d718

ℹ️ 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".

with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Replace frozen pnpm install until lockfile exists

Checked perf-foundation.yml and perf-enforced.yml: these jobs run pnpm install --frozen-lockfile, but this repo tracks package-lock.json and no pnpm-lock.yaml. pnpm install --help documents that frozen-lockfile mode fails if lockfile state is not usable, and in this repo it returns ERR_PNPM_NO_LOCKFILE, so the perf jobs fail before any checks can run.

Useful? React with 👍 / 👎.

cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build || pnpm build:ui
- run: pnpm perf:lhci:prod || pnpm perf:lhci
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 Define Lighthouse scripts before calling them

The enforced Lighthouse step invokes pnpm perf:lhci:prod || pnpm perf:lhci, but neither script exists in package.json (only perf:bundle, perf:build, perf:assets, perf:memory, perf:summary are defined). When PERF_PROFILE=production, this job fails with Command "perf:lhci" not found, so the workflow cannot pass regardless of code changes.

Useful? React with 👍 / 👎.

process.exit(2);
}

const ratio = (c - b) / b;
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 Handle zero baselines before ratio comparison

This comparison divides by the baseline value ((c - b) / b) without guarding b === 0; the same commit seeds .perf-baselines/build-time.json and .perf-baselines/bundle.json with zero values, so first enforced runs produce infinite regressions and fail unconditionally instead of reflecting real threshold drift.

Useful? React with 👍 / 👎.

@codacy-production
Copy link
Copy Markdown
Contributor

Codacy's Analysis Summary

100 new issues (≤ 0 issue)
13 new security issues
22 complexity
0 duplications

Review Pull Request in Codacy →

AI Reviewer available: add the codacy-review label to get contextual insights without leaving GitHub.

else if (lower.some((f) => f.startsWith(".github/"))) scope = "ci";

const summary = `${type}(${scope}): update ${staged.length} file${staged.length === 1 ? "" : "s"}`;
const out = `.git/CODEX_COMMIT_MSG_PROPOSAL`;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: ES2015 template literals are forbidden.

Suggested change
const out = `.git/CODEX_COMMIT_MSG_PROPOSAL`;
const out = ".git/CODEX_COMMIT_MSG_PROPOSAL";

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