fix: enforce sprint gate machine target - #745
Conversation
Co-Authored-By: brainlayerCodex-b88e45fa running gpt-5.6-sol <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_98948f98-87c5-485b-9c11-4b91d01625e7) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review — brainlayerCodex-b88e45fa (worker) · codex/gpt-5.6-sol |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Python | Sep 1, 2026 3:41p.m. | Review ↗ | |
| Swift | Sep 1, 2026 3:41p.m. | Review ↗ | |
| JavaScript | Sep 1, 2026 3:41p.m. | Review ↗ | |
| Shell | Sep 1, 2026 3:41p.m. | Review ↗ | |
| Secrets | Sep 1, 2026 3:41p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ed9c155d9
ℹ️ 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".
| machine_target = config.get("machine_target") | ||
| if not args.fixture and machine_target is None: | ||
| return fail("machine target is missing") | ||
| if not args.fixture and any(key not in machine or machine[key] != value for key, value in machine_target.items()): |
There was a problem hiding this comment.
Require a complete machine target
When machine_target is empty or omits either os or architecture, this expression validates only the supplied fields (any(...) is false for {}), so the live gate can execute and report PASS on an unintended host. Since this guard is meant to prevent cross-machine results, reject incomplete targets before running any checks.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in bbaddc3f. Live mode now rejects an object missing either required os or architecture key before any check runs. Regression coverage includes both {} and {"os":"Darwin"} and asserts rc=1, JSON FAIL, and an empty checks array.
— brainlayerCodex-b88e45fa (worker) · codex/gpt-5.6-sol
Co-Authored-By: brainlayerCodex-b88e45fa running gpt-5.6-sol <noreply@anthropic.com>
|
@codex review — brainlayerCodex-b88e45fa (worker) · codex/gpt-5.6-sol |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_656b609c-ebab-400b-9cbc-f40a0f2d4934) |
|
@codex review — brainlayerCodex-b88e45fa (worker) · codex/gpt-5.6-sol |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
machine_targetbefore a live gate run touches any check.search_latencyasSKIPPEDon any other calibrated-target host while MCP, resource, and WAL checks still run.--fixturereplays exempt from live-host enforcement.Portability decision
Option (b) is the smallest honest shape because no second-machine latency baseline exists yet. Its consequence is explicit: the M1's latency is never gated even though releases require both Macs. A skipped latency check deliberately leaves
status=PASSandrc=0so the other three standalone checks complete, while the top-levelskippedarray exposes partial coverage.The first release or CI consumer that wires this gate up MUST assert
skipped == []; otherwise the field is decoration. Option (a), per-hostname latency baselines for both Macs, is the tracked follow-up.Known rowed defects
checks: []currently produces a vacuous PASS.This remains deliberately rowed to PR-0e under the tight-loop rule.
Test plan
python3 -m pytest -q tests/test_sprint_gate.py— 23 passed.ruff check scripts/sprint_gate.py tests/test_sprint_gate.py— clean.ruff format --check scripts/sprint_gate.py tests/test_sprint_gate.py— clean.bbaddc3f; 0 failures.test_live_gate_runs_latency_on_calibrated_host; clean branch passes.Review
bbaddc3f.— brainlayerCodex-b88e45fa (worker) · codex/gpt-5.6-sol
Note
Medium Risk
Changes release-gate semantics (PASS with skipped latency) and pre-check validation; consumers must enforce
skipped == []to avoid silent partial coverage.Overview
Live sprint gate runs now validate corpus
machine_targetandlatency_baseline_msbefore any check executes, emitting structured JSON failures (emptychecks, specificerror) when config is missing, invalid, or mismatched with the host.--fixturereplays stay exempt.On hosts that match the machine target but not the baseline’s calibrated hostname,
search_latencyis reported asSKIPPED(with running vs calibrated hostname in details) while MCP, resource, and WAL checks still run. Overallstatuscan bePASSwhen checks are onlyPASSorSKIPPED, and a top-levelskippedlist names partial coverage—release wiring must treat non-emptyskippedas incomplete gating.Tests add
deterministic_live_config/run_live_confighelpers and cover mismatch, invalid targets, baseline validation, skip vs run on calibrated host, and baseline optional when latency isn’t selected.Reviewed by Cursor Bugbot for commit bbaddc3. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Enforce
machine_targetvalidation and skipsearch_latencyon uncalibrated hosts insprint_gatemainnow validates thatmachine_targetexists, is a dict with at leastosandarchitecture, and exactly matches the running machine (extra keys cause a mismatch)search_latencyis selected, validateslatency_baseline_msis a dict with ahostname; skips the check with aSKIPPEDresult if the current host doesn't match the calibrated hostnameSKIPPEDresults count as passing for overall status; askippedlist is added to the JSON output payloadfail()helper and exit before running checksmachine_target(in sprint_gate.py) now fail with rc=1 instead of proceeding; any config with extra keys inmachine_targetwill failMacroscope summarized bbaddc3.