Repository navigation
refactor(devtools): group lab commands (#2126) - #2137
Conversation
Problem: #2126 is collapsing devtools command sprawl into owner-shaped groups. Verification-lab, schema, scenario, probe, policy, and read-snapshot commands still lived as unrelated top-level verification commands. What changed: move the lab/scenario/schema/probe/policy/read-snapshot surfaces under devtools lab; keep the catalog as the only command authority; update validation lane execution specs, CI/release references, generated docs, and focused tests. This also updates self-verify wording to read-surface snapshots instead of stale v22/golden-master language. Verification: devtools test tests/unit/devtools/test_devtools_main.py tests/unit/devtools/test_command_catalog.py tests/unit/devtools/test_render_devtools_reference.py tests/unit/devtools/test_render_quality_reference.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_validation_lanes.py tests/unit/devtools/test_execution_specs.py tests/unit/devtools/test_xtask.py tests/unit/devtools/test_pipeline_probe.py tests/unit/devtools/test_regression_capture.py tests/unit/devtools/test_schema_lab_commands.py tests/unit/devtools/test_generated_surfaces.py (286 passed). devtools verify --quick (exit_code 0, run_id 20260618T230218Z-quick-3018563-68da0c0f). Ref #2126
|
Warning Review limit reached
More reviews will be available in 49 minutes and 19 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughAll flat and hyphenated ChangesDevtools lab command hierarchy rename
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46feef0591
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
devtools/regression_capture.py (1)
27-35:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAlign
--inputhelp text with the renamed probe command.Line 34 still uses legacy “Pipeline-probe” wording while Line 27 has moved to
lab probe pipeline. This leaves CLI help inconsistent.Suggested patch
- help="Pipeline-probe JSON summary path. Reads stdin when omitted or set to '-'.", + help="Lab probe pipeline JSON summary path. Reads stdin when omitted or set to '-'.",🤖 Prompt for 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. In `@devtools/regression_capture.py` around lines 27 - 35, The help text for the `--input` argument uses outdated terminology "Pipeline-probe" while the description above it has been updated to use "lab probe pipeline". Update the help parameter in the `--input` add_argument call to replace "Pipeline-probe JSON summary path" with wording that aligns with "lab probe pipeline" terminology to maintain consistency across the CLI help text.devtools/regression_cases.py (1)
85-95:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUpdate the validation error wording to the renamed command surface.
Line 87 still references “pipeline probe” while Lines 85 and 94 use
lab probe pipeline. Keep this message aligned so failures point to the correct command family.Suggested patch
- raise ValueError("pipeline probe regression cases require `probe` and `result` summary keys") + raise ValueError("lab probe pipeline regression cases require `probe` and `result` summary keys")🤖 Prompt for 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. In `@devtools/regression_cases.py` around lines 85 - 95, The ValueError validation message in the from_probe_pipeline method currently references "pipeline probe regression cases" but the docstring and the source field assignment both use "lab probe pipeline". Update the error message text where it says "pipeline probe regression cases require" to instead say "lab probe pipeline regression cases require" to keep the terminology consistent across the method.
🤖 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 `@tests/unit/devtools/test_verify.py`:
- Around line 37-40: The _pytest_marker_expr function finds the last occurrence
of the "-m" flag in the command list but does not verify that a value exists
after it. If the command ends with "-m", accessing command[marker_indexes[-1] +
1] will raise an IndexError instead of providing a clear assertion error
message. Add a bounds check assertion after the existing assert marker_indexes
line to ensure that marker_indexes[-1] + 1 is a valid index within the command
list before attempting to access the marker value.
---
Outside diff comments:
In `@devtools/regression_capture.py`:
- Around line 27-35: The help text for the `--input` argument uses outdated
terminology "Pipeline-probe" while the description above it has been updated to
use "lab probe pipeline". Update the help parameter in the `--input`
add_argument call to replace "Pipeline-probe JSON summary path" with wording
that aligns with "lab probe pipeline" terminology to maintain consistency across
the CLI help text.
In `@devtools/regression_cases.py`:
- Around line 85-95: The ValueError validation message in the
from_probe_pipeline method currently references "pipeline probe regression
cases" but the docstring and the source field assignment both use "lab probe
pipeline". Update the error message text where it says "pipeline probe
regression cases require" to instead say "lab probe pipeline regression cases
require" to keep the terminology consistent across the method.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5e48b491-e2fa-4a94-9286-9ab53b63eed8
📒 Files selected for processing (42)
.github/workflows/ci.ymlAGENTS.mdREADME.mddevtools/click_dispatch.pydevtools/command_catalog.pydevtools/evidence_dashboard.pydevtools/regression_capture.pydevtools/regression_cases.pydevtools/release_readiness.pydevtools/render_quality_reference.pydevtools/run_validation_lanes.pydevtools/self_verify.pydevtools/validation_lane_catalog_contracts.pydevtools/validation_lane_catalog_live.pydevtools/verify.pydevtools/xtask.pydocs/devtools.mddocs/generate.mddocs/internals.mddocs/plans/mk3-execution-log.mddocs/plans/release-readiness-gate.mddocs/plans/scenario-coverage.yamldocs/plans/static-rendering-surface-classification.mddocs/plans/test-quality-coverage.yamldocs/providers/index.mddocs/schema-annotations.mddocs/schema.mddocs/test-quality-workflows.mddocs/visual-evidence.mdpolylogue/scenarios/execution.pytests/integration/test_schema_operator_workflow.pytests/unit/daemon/test_web_reader.pytests/unit/devtools/test_command_catalog.pytests/unit/devtools/test_devtools_main.pytests/unit/devtools/test_execution_specs.pytests/unit/devtools/test_pipeline_probe.pytests/unit/devtools/test_regression_capture.pytests/unit/devtools/test_render_devtools_reference.pytests/unit/devtools/test_render_quality_reference.pytests/unit/devtools/test_validation_lanes.pytests/unit/devtools/test_verify.pytests/unit/devtools/test_xtask.py
Problem: automated review found three stale or fragile spots after the lab command grouping: two user-facing messages still used old pipeline-probe wording and one test helper could raise IndexError on malformed argv.\n\nWhat changed: align the regression-capture/regression-case text with devtools lab probe pipeline and add an explicit bounds assertion before reading the pytest marker value.\n\nVerification: devtools test tests/unit/devtools/test_regression_capture.py tests/unit/devtools/test_verify.py (57 passed); devtools verify --quick (exit 0, run_id 20260618T231312Z-quick-3047787-e2dce7e7).\n\nRef #2126
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Moves verification-lab, schema, scenario, probe, policy, and read-snapshot commands under the
devtools labnamespace. This is the next #2126 command-sprawl slice after release and workspace grouping.Problem
The remaining verification bucket still mixed normal verify gates with verification-lab commands: scenario baselines, schema package operations, validation lanes, runtime graph projections, pipeline probes, regression capture, and read-surface snapshots. Those commands share a lab/evidence owner but were exposed as unrelated top-level commands.
Solution
devtools lab scenario,devtools lab schema roundtrip,devtools lab probe pipeline,devtools lab graph, anddevtools lab lanes.devtools/command_catalog.pyas the only command authority; no alias ledger or hidden compatibility commands.self-verifyin the public surface todevtools lab snapshot read-surfaceand update stale v22/golden-master help wording.Verification
devtools test tests/unit/devtools/test_devtools_main.py tests/unit/devtools/test_command_catalog.py tests/unit/devtools/test_render_devtools_reference.py tests/unit/devtools/test_render_quality_reference.py tests/unit/devtools/test_verify.py tests/unit/devtools/test_validation_lanes.py tests/unit/devtools/test_execution_specs.py tests/unit/devtools/test_xtask.py tests/unit/devtools/test_pipeline_probe.py tests/unit/devtools/test_regression_capture.py tests/unit/devtools/test_schema_lab_commands.py tests/unit/devtools/test_generated_surfaces.py— 286 passed.devtools verify --quick— exit_code 0, run_id20260618T230218Z-quick-3018563-68da0c0f.devtools verify --quick— exit_code 0, run_id20260618T230307Z-quick-3021887-038275c3.Ref #2126
Summary by CodeRabbit
Documentation
Chores
devtools lab <subcommand>structure (e.g.,lab scenario,lab schema,lab probe,lab lanes).