Skip to content

chore(repo): bootstrap codex os guardrails#8

Open
saagar210 wants to merge 9 commits intomainfrom
codex/chore/bootstrap-codex-os
Open

chore(repo): bootstrap codex os guardrails#8
saagar210 wants to merge 9 commits intomainfrom
codex/chore/bootstrap-codex-os

Conversation

@saagar210
Copy link
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 a lean dev launcher that uses ephemeral cache locations and cleans on exit

- add targeted and full cleanup scripts for heavy and reproducible artifacts

- document normal vs lean development commands and tradeoffs

Tests: pnpm install; pnpm build; pnpm tauri dev (manual stop); pnpm tauri build (fails due tauri/api version mismatch)
- Add frontend quality checks with visual/a11y/performance CI workflows\n- Introduce token baseline and web-vitals instrumentation hook\n- Wire AGENTS hard-gate policy for UI changes\n- Promote LCP assertion from warning to blocking threshold\n\nTests: pnpm ui:gate && pnpm build:ui && pnpm exec lhci autorun
- Configure Playwright snapshot path template without OS suffixes\n- Rename visual baseline files to project-scoped portable names\n\nTests: pnpm ui:gate
- 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

Warning

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

Copy link

@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: 964b175a00

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

cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build || pnpm build:ui
- run: pnpm perf:lhci:prod || pnpm perf:lhci

Choose a reason for hiding this comment

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

P1 Badge Call an existing Lighthouse script in perf-lighthouse job

This step invokes pnpm perf:lhci:prod || pnpm perf:lhci, but the commit does not add either script to package.json, so pnpm run returns ERR_PNPM_NO_SCRIPT and the perf-lighthouse job fails whenever PERF_PROFILE == 'production'. That makes the enforced perf workflow block PRs even before Lighthouse can run; wire this step to a real script (or pnpm exec lhci autorun) instead.

Useful? React with 👍 / 👎.

process.exit(2);
}

const ratio = (c - b) / b;

Choose a reason for hiding this comment

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

P1 Badge Handle zero baselines before computing regression ratio

The regression formula divides by b unconditionally, so a zero baseline produces an infinite ratio and guaranteed failure for any non-zero metric; this commit’s new baseline files initialize buildMs and totalBytes to 0, which triggers that path immediately in enforced perf checks. Add an explicit b === 0 branch (or require non-zero baselines) to avoid permanent false regressions.

Useful? React with 👍 / 👎.

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- uses: grafana/setup-k6-action@ffe7d7290dfa715e48c2ccc924d068444c94bde2
- run: k6 run tests/perf/api.k6.js --summary-export=.perf-results/api-summary.json

Choose a reason for hiding this comment

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

P1 Badge Point perf-api workflow to a committed k6 scenario file

The workflow runs k6 run tests/perf/api.k6.js, but there is no tests/perf/ file in the repository (repo-wide file listing returns none), so this job fails as soon as PERF_BASE_URL is configured. That means production perf API gating cannot execute and becomes a hard CI failure instead of a measurement step.

Useful? React with 👍 / 👎.

Comment on lines +19 to +20
disabled={loading || props.disabled}
{...props}

Choose a reason for hiding this comment

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

P2 Badge Apply prop spread before enforcing loading disabled state

Because {...props} comes after disabled={loading || props.disabled}, a caller that passes disabled={false} will overwrite the computed disabled value and re-enable the button even while loading is true. This breaks the loading/disabled contract and can allow duplicate user actions during in-flight operations.

Useful? React with 👍 / 👎.

@sonarqubecloud
Copy link

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