Project Info
A developer tool that detects performance regressions, creates bounded Codex repair goals, and verifies fixes through protected checks before merge. Live dashboard: https://codex-benchmark-guardian.vercel.app Source code: https://github.com/OmprakashSahani/codex-benchmark-guardian Real regression-to-fix proof: https://github.com/OmprakashSahani/codex-benchmark-guardian/pull/20
Inspiration
Functional tests can pass while performance quietly gets worse. A pull request may preserve correct behavior but increase latency, consume more memory, slow down an important workflow, or reduce throughput. These regressions are often discovered only after deployment, when they are more expensive and risky to investigate. Many benchmark tools can compare numbers or fail a CI job, but the workflow often stops at the alert. Developers must still determine why the change matters, investigate the likely cause, prepare a focused repair task, verify that the repair genuinely restored performance, and ensure that the benchmark policy was not weakened merely to obtain a passing result. I built Codex Benchmark Guardian to close that gap. It turns benchmark evidence into a clear release decision, actionable triage, a bounded Codex repair goal, and protected verification before merge. The project follows one central principle: Codex may help investigate and repair a regression, but it must not control the benchmark policy, manipulate the evidence, approve its own work, or merge the pull request.
What it does
Codex Benchmark Guardian compares baseline and current benchmark evidence and determines whether a proposed change introduces a material performance regression. It supports metrics where higher values are worse, including: latency; runtime; memory usage; error rate. It also supports metrics where lower values are worse, including: throughput; accuracy; recall; success rate. For every comparison, Guardian can produce: percentage changes; regression decisions; severity classifications; deterministic release-readiness scoring; metric-specific triage guidance; Markdown and HTML reports; a GitHub issue handoff; a bounded Codex Goal; an immutable Repair Contract; CI and pull-request guardrail artifacts. The complete workflow is: benchmark evidence → regression decision → triage → bounded Codex repair → protected verification → human approval The project can be used through: a production Next.js dashboard; a FastAPI analysis endpoint; a Python command-line interface; an additional Streamlit interface; a protected GitHub pull-request benchmark gate. Production experience The primary product experience is a production dashboard built with Next.js 15, TypeScript, Tailwind CSS, FastAPI, and a deterministic Python analysis engine. The results are organized into five sections: Overview Metrics Triage Codex Goal Handoff Pack Developers can: choose from permanent example scenarios; upload or edit baseline and current benchmark JSON; configure per-metric directions; choose a regression threshold; inspect readiness, severity, and metric changes; review investigation guidance; copy or download the generated Codex Goal; inspect the complete Handoff Pack; replay a real pull request from regression to verified repair. The frontend does not duplicate the benchmark or repair policy. It sends the evidence to FastAPI, while the Python engine remains the only source of truth. The verified Codex Repair Loop The central feature of the project is the verified Codex Repair Loop. When a material regression is detected, Guardian builds an immutable Repair Contract from the benchmark evidence. The contract defines: whether a repair is required; the exact evidence requiring attention; the repair objective; actions Codex is allowed to perform; actions Codex is forbidden from performing; required validation commands; protected completion criteria; conditions under which Codex must stop and report. For a genuine regression, Codex may: inspect the relevant implementation and history; form evidence-backed root-cause hypotheses; implement the smallest maintainable correction; add or update regression tests; run approved project checks; rerun the relevant protected benchmark; review the final diff. Codex may not: lower or bypass regression thresholds; change metric directions to hide a failure; modify or replace the original benchmark evidence; selectively choose a passing run; weaken the protected harness or evaluator; delete or relax tests merely to pass; hard-code expected benchmark results; declare the pull request Ready; merge automatically. A repair is complete only when: all required project checks pass; fresh evidence is produced by the protected workflow or trusted evaluator; the fresh evidence reports zero material regressions; the release status is Ready; the final diff has been reviewed; a human approves the merge. This prevents the repair process from changing the rules used to judge its own success. Verification-only behavior A trustworthy agent workflow must also know when not to change code. When valid benchmark evidence contains no material regressions, Guardian creates a verification-only contract. In this state: no implementation change is authorized; no test modification is authorized; speculative cleanup and refactoring are prohibited; Codex inspects and verifies the supplied evidence; protected verification is still required; human approval is still required; the system reports that no code repair is needed. This distinction prevents an AI agent from inventing work simply because it was given access to a repository. Proven on a real pull request I validated the full workflow using a real pull request in the project repository. The pull request introduced an intentionally inefficient repeated lookup in PR-comment generation. Functional tests continued to pass, but the protected benchmark gate detected a serious performance regression: Metric: pr_gate_generation_latency_ms Regression: +135.21% Severity: Critical Release readiness: Needs Review Score: 70/100 Guardian generated benchmark evidence, investigation guidance, a Codex handoff, validation commands, and protected finish conditions. Codex traced the regression to a repeated linear lookup performed for every regressed metric, producing approximately quadratic behavior. The focused repair: removed the redundant lookup; restored linear behavior; preserved output content and ordering; added deterministic regression coverage. The protected workflow then produced fresh evidence: Material regressions: 0 Release readiness: Ready Score: 100/100 The benchmark threshold, metric directions, protected evaluator, provenance, and human approval requirement remained unchanged throughout the repair. This demonstrates the project’s main value: Guardian can detect a performance problem that ordinary functional testing misses and guide a safe repair without allowing the repair process to weaken the guardrail. Protected pull-request benchmark gate The project includes a protected GitHub pull-request benchmark workflow. It compares the exact protected base revision and pull-request head using: the same GitHub-hosted runner; separate restricted containers; identical workload and measurement settings; a benchmark harness copied from the protected base branch; a trusted evaluator from the protected base branch; deterministic benchmark evidence and provenance. The untrusted pull-request code cannot modify the evaluator, threshold, metric-direction policy, protected baseline, or workflow definition used to judge it. A separate trusted publisher validates the workflow and pull-request identity before posting or updating the benchmark decision on GitHub. The publisher never executes pull-request code. This separation is important because an automated performance gate is only trustworthy when the code being evaluated cannot redefine the rules used to evaluate itself. Codex Handoff Pack Guardian generates a complete set of artifacts that developers can inspect, assign, download, or use in another workflow. Depending on the interface and whether a repair is required, the Handoff Pack includes equivalent forms of: the Codex repair goal; the Repair Contract in Markdown and JSON; benchmark reports in Markdown and HTML; release-readiness guidance; regression triage; a GitHub issue handoff; a generated CI workflow; pull-request decision content; trusted gate summaries. When a regression exists, Guardian exposes the bounded repair workflow. When no repair is required, speculative implementation instructions are hidden and only verification-safe guidance is presented. Every representation is generated deterministically from the same Python evidence and policy. How I built it The project uses: Python 3.12 for benchmark analysis and repair policy; Typer for the command-line interface; Rich for readable terminal output; FastAPI for the production analysis API; Next.js 15 and TypeScript for the production frontend; Tailwind CSS for responsive presentation; Streamlit for an additional local Python-first interface; Pytest for automated testing; Ruff for linting and formatting; GitHub Actions and Docker for protected pull-request evaluation; deterministic Markdown, HTML, JSON, and YAML generation. The project currently includes 162 automated Python tests, along with frontend linting, TypeScript checks, production builds, workflow validation, protected benchmark checks, and manual production verification. Judges and developers can start with the live dashboard or run the project locally: The project supports modern desktop and mobile browsers for the hosted dashboard. The local Python tools require Python 3.12 or newer, while the protected repository gate runs through GitHub Actions and Docker on Ubuntu runners. How I used Codex and GPT-5.6 I used Codex with GPT-5.6 throughout the project as an engineering collaborator. Codex helped with: implementation planning; focused code changes; test generation; debugging; CLI and API development; frontend integration; workflow hardening; documentation; pull-request review; security and edge-case analysis. Codex contributed to features including: multi-metric benchmark comparison; higher-is-worse and lower-is-worse metric handling; deterministic readiness scoring; regression triage; Markdown and HTML reporting; CI failure behavior; the Handoff Pack; GitHub issue and workflow generation; the protected PR benchmark gate; FastAPI and Next.js integration; the Repair Contract; repair-required and verification-only Codex Goals. Codex reviews also found meaningful issues that were corrected before merge. For example: verification-only contracts initially inherited actions that could authorize implementation and test changes; verification-only Codex Goals initially ended with an unconditional repair-loop instruction; fresh protected verification evidence needed to be distinguished from immutable original failing evidence; a legacy speculative fix prompt remained accessible after switching to a verification-only result; stale artifact selection could preserve content from a previous dashboard scenario; protected workflow paths and read-only container behavior required focused corrections. These findings improved correctness, security, compatibility, and the safety of the agent workflow. I retained responsibility for: defining the product problem; selecting the architecture; designing the readiness policy; establishing the protected evidence model; deciding the Codex safety boundaries; reviewing and accepting changes; validating production behavior; approving and merging pull requests. Codex assisted with implementation and review. It did not define the benchmark policy, approve its own work, declare a repair successful, deploy the application, or merge changes. Challenges Separating real regressions from benchmark noise Performance measurements can fluctuate because of runner noise and environmental variation. I addressed this through paired base-versus-head measurements on the same runner, consistent benchmark settings, explicit thresholds, deterministic evaluation, and preserved provenance. Protecting the evaluator from untrusted code A pull request should not be able to change the workflow, harness, or evaluator that decides whether it passes. Designing a secure boundary between protected base code, untrusted pull-request code, and a write-capable GitHub publisher required careful workflow architecture, isolated containers, restricted permissions, and several rounds of testing and review. Supporting different metric meanings An increase is harmful for latency but beneficial for throughput. The system therefore supports per-metric directions instead of applying one assumption to every benchmark value. Designing safe Codex behavior A prompt that simply says “fix the benchmark” could encourage threshold changes, evidence manipulation, test weakening, overfitting, or unnecessary edits. The Repair Contract required a more explicit model of: allowed actions; prohibited changes; trusted evidence; completion criteria; stop conditions; human authority. Keeping every interface consistent The CLI, Streamlit app, FastAPI service, Next.js dashboard, GitHub workflows, reports, and generated artifacts all needed to use the same underlying policy. I kept the Python engine as the canonical source of truth and avoided duplicating decision logic in the frontend. What I learned This project taught me that adding an AI agent to a developer workflow is not only a prompting problem. It is also a systems, security, evidence, and authority-design problem. I learned how to: design deterministic benchmark comparisons; model metric direction and severity correctly; create CI-friendly release decisions; build trusted base-versus-head performance evaluation; preserve benchmark provenance; separate untrusted execution from trusted publication; turn benchmark evidence into bounded agent instructions; distinguish repair from verification; design for human approval rather than uncontrolled automation; use Codex iteratively for implementation, debugging, testing, and review. Most importantly, I learned that trustworthy agentic development requires more than asking an AI to produce a patch. The workflow must define what the agent is allowed to change, preserve the evidence used to judge it, verify the result independently, and keep final authority with a human.
What's next
The next stage would focus on making Guardian easier to adopt across more engineering stacks. Potential improvements include: adapters for pytest-benchmark, ASV, JMH, k6, Locust, Lighthouse, and ML evaluation outputs; historical benchmark storage and trend visualization; repository-specific readiness policies; organization-level dashboards; GitHub App installation and configuration; richer measurement-noise analysis; ownership routing and notifications for affected components. The core principle will remain unchanged: Codex can help repair performance regressions, but trusted evidence and human approval must determine whether a change is safe to merge.
Codex Benchmark Guardian
Evidence-backed performance repair for pull requests
Production dashboard · Repository · Real PR #20 proof
Codex Benchmark Guardian turns a real performance regression into a bounded Codex repair task, verifies the proposed fix against protected benchmark evidence, and safely returns the pull request to Ready.
It connects deterministic benchmark analysis to a conditional repair workflow without allowing an agent to decide its own success. Python is the only source of benchmark, readiness, and repair-policy truth; the production Next.js dashboard and FastAPI API expose that engine without reimplementing its business rules.
The final merge remains a human decision.
Why It Matters
A benchmark failure is only the start of a repair. A useful system must preserve the evidence, explain what regressed, constrain what may change, distinguish repair from verification, and prove the outcome with a trusted evaluator.
Codex Benchmark Guardian provides that chain:
- deterministic comparison across higher-is-worse and lower-is-worse metrics
- severity classification, readiness scoring, and evidence-backed triage
- an immutable Repair Contract and a conditional Codex Goal
- bounded repair instructions only when material regressions exist
- a verification-only path that avoids speculative changes when evidence is clean
- a protected GitHub PR gate that makes the final benchmark-readiness decision
- a complete, portable Handoff Pack for review and automation
Judge Quickstart
Start with the live production dashboard, then verify the repository locally:
git clone https://github.com/OmprakashSahani/codex-benchmark-guardian.git
cd codex-benchmark-guardian
pip install -e ".[dev,dashboard]"
make lint
make format-check
make test
npm install
npm run lint
npm run typecheck
npm run build
Expected Python test result:
162 passed
Generate a CLI handoff and exercise both protected-gate outcomes:
make demo-handoff
make demo-pr-gate-block
make demo-pr-gate-ready
The first command writes the CLI Handoff Pack to reports/handoff/. The gate demonstrations intentionally show a blocked regression and a Ready result. For the additional local Python-first interface:
streamlit run app.py
Live Production Experience
The primary product experience is the production Next.js/FastAPI dashboard. Its result workspace is organized into five tabs:
- Overview
- Metrics
- Triage
- Codex Goal
- Handoff Pack
Users can:
- load permanent example scenarios
- upload or edit baseline, current, and direction JSON
- configure the threshold and per-metric directions
- run the deterministic Python analysis engine through FastAPI
- inspect readiness, metrics, severity, and triage
- copy or download the conditional Codex Goal
- inspect and download the complete Handoff Pack
- replay the real PR #20 regression and verified fix
The dashboard defaults to a 10% regression threshold. This repository's protected PR gate uses 25% to evaluate pull requests.
Until a new submission video is recorded, the production dashboard is the primary demo. The existing YouTube video is an earlier prototype demonstration and does not represent the current production experience.
Verified Repair Loop
flowchart LR
A[Benchmark evidence] --> B[Deterministic regression analysis]
B --> C[Readiness decision]
C --> D[Immutable Repair Contract]
D --> E[Conditional Codex Goal]
E --> F{Repair required?}
F -->|Yes| G[Bounded repair workflow]
F -->|No| H[Verification-only workflow]
G --> I[Protected benchmark verification]
H --> I
I --> J{Zero material regressions<br/>and Ready?}
J -->|No| B
J -->|Yes| K[Human approval]
K --> L[Merge]
Repair-required path
When material regressions exist, the generated goal directs Codex to:
- inspect the relevant implementation and history
- identify evidence-backed root-cause hypotheses
- implement the smallest maintainable correction
- add or update regression tests
- run only approved validation commands
- rerun the relevant benchmark
- review the final diff
- obtain fresh protected evidence
- confirm zero material regressions and Ready status
- leave merge approval to a human
Failure or incomplete evidence repeats the bounded analysis-and-repair loop; it does not authorize policy changes.
Verification-only path
When the result has zero material regressions, the system does not invent repair work. The generated goal requires the user or agent to:
- make no speculative code repair or speculative test change
- inspect the supplied evidence
- confirm that the protected workflow or trusted evaluator completed
- confirm zero material regressions and Ready status
- review the final diff only when changes already exist
- preserve human approval before merge
- continue monitoring benchmark stability
The dashboard hides the legacy speculative fix prompt from verification-only users. The API retains its codex_fix_prompt field solely for backward compatibility; codex_repair_goal.md is the canonical handoff for both paths.
Real Regression-to-Fix Proof: PR #20
Pull request #20 demonstrates the complete loop with real protected evidence.
| Stage | Result |
|---|---|
| Regression metric | pr_gate_generation_latency_ms |
| Harmful change | +135.21% |
| Protected threshold | 25% |
| Severity | critical |
| Initial readiness | Needs Review |
| Initial score | 70/100 |
| Verified fix | zero material regressions |
| Final readiness | Ready |
| Final score | 100/100 |
Workflow artifacts eventually expire, so the evidence used to replay both states is committed permanently under examples/scenarios/pr-20/. The protected verifier established benchmark readiness; Codex did not autonomously merge the pull request.
Repair Contract and Safety Model
Every analysis produces an immutable Repair Contract from the Python engine. It records the evidence, whether repair is required, allowed and forbidden actions, validation commands, and completion criteria. The Codex Goal is derived from this contract rather than from an open-ended request to improve performance.
Codex may inspect, edit, test, benchmark, and review a bounded repair. It may not:
- lower or bypass thresholds
- change metric directions to suppress failures
- manipulate original or fresh benchmark evidence
- substitute a selectively chosen passing run
- weaken the protected harness
- weaken the protected evaluator
- relax or delete tests merely to pass
- hard-code expected benchmark results
- self-declare the pull request Ready
- automatically merge the pull request
Protected verification declares benchmark readiness. A human still reviews and approves the merge.
Handoff Pack
codex_repair_goal.md is always the primary and default handoff. Dashboard downloads use review-friendly names.
Dashboard artifacts
Repair-required results expose:
codex_repair_goal.mdrepair_contract.mdrepair_contract.jsonbenchmark-report.mdbenchmark-report.htmlcodex-fix-prompt.txtgithub-issue.mdbenchmark-workflow.ymlrelease-readiness.md
Verification-only results expose the same set except codex-fix-prompt.txt, because no speculative repair prompt is appropriate.
CLI artifacts
Run:
cbg handoff-pack \
--baseline examples/baseline.json \
--current examples/current.json \
--directions-config examples/directions.json \
--threshold 10 \
--output-dir reports/handoff
The CLI preserves established filenames. The equivalents of the dashboard report, prompt, issue, workflow, and readiness downloads are report.md, report.html, codex_fix_prompt.md, github_issue.md, benchmark_guardian_ci.yml, and release_readiness.md. It also writes codex_repair_goal.md, repair_contract.md, repair_contract.json, pr_comment.md, and gate_summary.json.
The CLI currently retains codex_fix_prompt.md in a generated verification-only pack for compatibility. Consumers should use the conditional codex_repair_goal.md as the authoritative handoff.
Architecture
The production system is organized around explicit trust boundaries. The Next.js 15 App Router, TypeScript, and Tailwind CSS provide the primary product experience; FastAPI exposes the deterministic Python engine; the CLI and Streamlit reuse the same core directly. Benchmark comparison, readiness scoring, triage, and repair policy remain centralized in Python.
flowchart TB
EVIDENCE["Benchmark evidence<br/>baseline · current · directions · threshold"]
subgraph INTERFACES["Product interfaces"]
direction LR
WEB["Next.js 15 dashboard<br/>TypeScript · Tailwind CSS"]
API["FastAPI<br/>POST /api/analyze"]
CLI["Python CLI"]
ST["Streamlit<br/>local Python interface"]
WEB --> API
end
subgraph CORE["Trusted Python core — only policy source of truth"]
direction LR
CMP["Benchmark<br/>comparison"] --> REG["Regression<br/>classification"]
REG --> READY["Release-readiness<br/>scoring"]
REG --> TRIAGE["Deterministic<br/>triage"]
READY --> CONTRACT["Immutable<br/>Repair Contract"]
TRIAGE --> CONTRACT
CONTRACT --> GOAL["Conditional<br/>Codex Goal"]
CONTRACT --> PACK["Reports and<br/>Handoff Pack"]
end
subgraph EXECUTION["Bounded execution"]
direction LR
ROUTE{"Repair<br/>required?"}
REPAIR["Minimal evidence-backed repair<br/>plus regression tests"]
VERIFY["Verification only<br/>no speculative changes"]
CHECKS["Approved<br/>project checks"]
ROUTE -->|Yes| REPAIR
ROUTE -->|No| VERIFY
REPAIR --> CHECKS
VERIFY --> CHECKS
end
subgraph PROTECTED["Protected verification boundary"]
direction LR
HARNESS["Protected-base harness<br/>controls what is measured"]
EVALUATOR["Protected-base evaluator<br/>controls readiness"]
DECISION{"Zero material regressions<br/>and Ready?"}
HARNESS --> EVALUATOR --> DECISION
end
HUMAN["Human review<br/>and approval"]
MERGE["Merge"]
EVIDENCE --> WEB
EVIDENCE --> CLI
EVIDENCE --> ST
API --> CMP
CLI --> CMP
ST --> CMP
GOAL --> ROUTE
PACK -.-> ROUTE
CHECKS --> HARNESS
DECISION -->|No| CONTRACT
DECISION -->|Yes| HUMAN --> MERGE
classDef evidence fill:#f8fafc,stroke:#64748b,color:#0f172a,stroke-width:1.5px;
classDef interface fill:#eff6ff,stroke:#2563eb,color:#172554,stroke-width:1.5px;
classDef api fill:#ecfeff,stroke:#0891b2,color:#164e63,stroke-width:1.5px;
classDef core fill:#f0fdf4,stroke:#16a34a,color:#14532d,stroke-width:1.5px;
classDef contract fill:#fff7ed,stroke:#ea580c,color:#7c2d12,stroke-width:2px;
classDef execution fill:#faf5ff,stroke:#9333ea,color:#581c87,stroke-width:1.5px;
classDef protected fill:#fef2f2,stroke:#dc2626,color:#7f1d1d,stroke-width:2px;
classDef human fill:#fdf4ff,stroke:#c026d3,color:#701a75,stroke-width:2px;
class EVIDENCE evidence;
class WEB,CLI,ST interface;
class API api;
class CMP,REG,READY,TRIAGE core;
class CONTRACT,GOAL,PACK contract;
class ROUTE,REPAIR,VERIFY,CHECKS execution;
class HARNESS,EVALUATOR,DECISION protected;
class HUMAN,MERGE human;
style INTERFACES fill:#f8fbff,stroke:#60a5fa,stroke-width:2px
style CORE fill:#f7fff9,stroke:#4ade80,stroke-width:2px
style EXECUTION fill:#fdfaff,stroke:#c084fc,stroke-width:2px
style PROTECTED fill:#fff8f8,stroke:#f87171,stroke-width:2px
The diagram makes the authority boundaries explicit:
- Frontend and API adapters present results; they do not recalculate readiness or repair policy.
- The Python core generates the immutable Repair Contract and conditional Codex Goal from benchmark evidence.
- The protected-base harness controls measurement, and the protected-base evaluator controls benchmark readiness.
- Only a human approves the final merge.
Benchmark rules, readiness scoring, and repair policy are not duplicated in TypeScript. The frontend renders API results from the Python source of truth.
Permanent Example Scenarios
The production dashboard includes five scenarios:
- Standard regression — the normal regression walkthrough
- Material regression — the same evidence evaluated at the higher, more permissive 25% threshold rather than the standard scenario's 10% threshold; 10% flags smaller harmful changes, while 25% tolerates more variation and therefore flags fewer regressions, and the repository's protected PR gate uses 25% to account conservatively for shared-runner timing noise
- Clean benchmark — the verification-only path
- PR #20 regression — the real protected regression evidence
- PR #20 verified fix — the real Ready evidence after repair
Scenario inputs live in examples/scenarios/ as baseline, current, and metric-direction JSON. They can be loaded, edited, and rerun through the current Python engine.
CLI and Local Interfaces
Compare benchmark files
cbg compare-files examples/baseline.json examples/current.json \
--threshold 10 \
--directions-config examples/directions.json \
--report reports/report.md \
--html-report reports/report.html \
--fail-on-regression
--fail-on-regression still generates reports and exits nonzero when a material regression is detected. Metric directions may be higher_is_worse (for latency, runtime, memory, or error rate) or lower_is_worse (for throughput, accuracy, recall, precision, or success rate). --direction sets a fallback and --directions-config supplies per-metric overrides.
Useful discovery commands:
cbg version
cbg about
cbg --help
Streamlit
Streamlit is an additional local, Python-first interface—not the primary production dashboard:
streamlit run app.py
# or
make dashboard
It uses the same Python comparison and reporting engine as the CLI and API.
GitHub PR Benchmark Gate
The protected gate benchmarks the exact protected base SHA and PR head in separate environments on the same runner. Its fixed workload uses warm-ups and repeated high-resolution measurements, then compares median results. The 25% repository threshold is intentionally separate from the dashboard's 10% exploratory default.
The protected-base harness controls what is measured. The protected-base evaluator controls comparison, readiness, PR comments, and final enforcement. Provenance records the harness and evaluator sources, while fork pull requests benchmark and upload evidence without receiving write access for comments.
Local demonstrations:
cbg init-pr-gate
make demo-pr-gate-block
make demo-pr-gate-ready
make demo-init-pr-gate
Repositories adopting the generated gate should make benchmark-pr-gate a required status check. They may replace the project benchmark workload, but a proposed repair must not weaken the protected harness or evaluator.
Built with Codex and GPT-5.6
I used Codex with GPT-5.6 throughout the project for implementation planning, focused code changes, testing, debugging, and review.
Codex contributions
Codex helped implement and refine:
- JSON benchmark comparison and multi-metric regression detection
- mixed metric-direction handling and severity classification
- deterministic readiness scoring and regression triage guidance
- Markdown and self-contained HTML benchmark reports
- CLI commands and Codex Handoff Pack generation
- GitHub issue, workflow, and pull-request artifact generation
- Streamlit dashboard workflows
- protected GitHub PR Benchmark Gate behavior
- FastAPI analysis and Repair Contract integration
- Next.js and TypeScript dashboard integration
- permanent benchmark scenarios and real PR replay workflows
- conditional repair-required and verification-only Codex Goals
- unit, CLI, API, repair-contract, scenario, and PR-gate tests
Codex reviews also helped identify and resolve edge cases involving:
- passing and intentionally failing CI demonstrations
- generated workflow paths and safe command quoting
- mixed metric directions and relative,
./, and absolute benchmark input paths - dashboard-generated CI YAML matching the selected evidence and policy inputs
- deterministic structured and serialized Repair Contract outputs
- inert rendering of untrusted metric names
- protected benchmark evidence, harness, and evaluator boundaries
- verification-only results exposing a speculative legacy fix prompt
- stale artifact selection while switching from a repair result to a verification-only result
Human design and approval
The human developer defined and approved:
- the product problem and overall system direction
- the benchmark readiness policy and scoring behavior
- the protected harness, evaluator, and evidence model
- the safety boundaries for Codex-assisted repair
- repair-required versus verification-only behavior
- the product scope and user experience
- review acceptance and production deployment
- final pull-request merge decisions
Every Codex-assisted change was reviewed and validated using Ruff, Pytest, TypeScript checks, production builds, protected benchmark workflows, focused local Codex reviews, GitHub Codex reviews, and manual production verification.
Codex assisted with implementation and review; it did not independently define the policy, approve its own work, declare a pull request Ready, deploy the application, or merge changes.
Installation and Verification
Requirements include Python 3.12 or newer, Node.js with npm, pip, and Git.
git clone https://github.com/OmprakashSahani/codex-benchmark-guardian.git
cd codex-benchmark-guardian
pip install -e ".[dev,dashboard]"
npm install
Run the complete repository checks:
make lint
make format-check
make test
npm run lint
npm run typecheck
npm run build
The current Python suite contains 162 tests.
Project Structure
.
├── api/
│ └── index.py # FastAPI adapter for the Python engine
├── app/ # Next.js 15 App Router application
├── components/ # Production dashboard components
├── lib/ # Frontend types, fixtures, and adapters
├── src/codex_benchmark_guardian/ # Deterministic Python source of truth
│ ├── regression.py # Comparison and classification
│ ├── release_readiness.py # Readiness scoring
│ ├── repair.py # Repair Contract and conditional goal
│ ├── report.py # Markdown and HTML generation
│ ├── handoff.py # Canonical CLI Handoff Pack
│ └── pr_gate.py # Protected-gate result generation
├── benchmarks/ # Protected benchmark harness
├── examples/scenarios/ # Permanent dashboard and PR #20 evidence
├── tests/
│ ├── test_api.py # API contract coverage
│ └── test_repair.py # Repair-policy coverage
├── app.py # Additional Streamlit interface
├── AGENTS.md # Repository repair boundaries
└── README.md
License
MIT. See LICENSE.
Omprakash Sahani — ML Systems Engineer · Software Engineer · Distributed Systems
Analysis
View
Metric
- 80
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- HTMLIn code
- Next.jsIn code
- PythonIn code
- ReactIn code
- StreamlitIn code
- Tailwind CSSIn code
- TypeScriptIn code
- DockerClaimed
- Node.jsClaimed
- OpenAIClaimed
- VercelClaimed
9 of 13 appear in the indexed code. 4 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
333 KB
Source files
62
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
OmprakashSahani/codex-benchmark-guardian
94 files · 798 KB · @ bf984eb
Structure
Interface
20 files · 21%Screens, components and styles rendered to the user.
API & routing
2 files · 2%Request entry points: routes, handlers and controllers.
Application logic
42 files · 45%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python61%
- TypeScript17%
- CSS10%
- Markdown7%
- YAML4%
- HTML1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
package.json
npm · 15- lucide-react
- next
- next-themes
- react
- react-dom
- +10 more
pyproject.toml
pypi · 9- fastapi
- rich
- typer
- uvicorn
- +5 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.