Skip to content

refactor(devtools): group lab commands (#2126) - #2137

Merged
Sinity merged 2 commits into
masterfrom
feature/refactor/devtools-lab-group-2126
Jun 18, 2026
Merged

Sinity merged 2 commits into
masterfrom
feature/refactor/devtools-lab-group-2126

Conversation

@Sinity

@Sinity Sinity commented Jun 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Moves verification-lab, schema, scenario, probe, policy, and read-snapshot commands under the devtools lab namespace. 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

  • Move lab-owned commands to grouped paths such as devtools lab scenario, devtools lab schema roundtrip, devtools lab probe pipeline, devtools lab graph, and devtools lab lanes.
  • Keep devtools/command_catalog.py as the only command authority; no alias ledger or hidden compatibility commands.
  • Update validation lane execution, CI, release-readiness, quality docs, schema docs, generated references, and focused tests to use the grouped surface.
  • Rename self-verify in the public surface to devtools lab snapshot read-surface and 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_id 20260618T230218Z-quick-3018563-68da0c0f.
  • pre-push devtools verify --quick — exit_code 0, run_id 20260618T230307Z-quick-3021887-038275c3.

Ref #2126

Summary by CodeRabbit

  • Documentation

    • Updated documentation and command examples to reflect reorganized devtools CLI commands.
  • Chores

    • Standardized devtools verification-lab command naming scheme using unified devtools lab <subcommand> structure (e.g., lab scenario, lab schema, lab probe, lab lanes).
    • Updated CI workflows, tests, and internal references to align with new command organization.

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
@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Sinity, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e0925e1c-5ed9-44bd-b6ad-d3ab1ce6d13a

📥 Commits

Reviewing files that changed from the base of the PR and between 46feef0 and a575611.

📒 Files selected for processing (3)
  • devtools/regression_capture.py
  • devtools/regression_cases.py
  • tests/unit/devtools/test_verify.py
📝 Walkthrough

Walkthrough

All flat and hyphenated devtools verification command names (e.g., lab-scenario, pipeline-probe, artifact-graph, schema-generate) are renamed to hierarchical space-separated devtools lab … subcommand forms. The rename spans the command catalog, CLI dispatch help, execution wiring, classification maps, CI, tests, and documentation.

Changes

Devtools lab command hierarchy rename

Layer / File(s) Summary
Command catalog restructuring and classification
devtools/command_catalog.py, devtools/click_dispatch.py, devtools/xtask.py, devtools/evidence_dashboard.py
VERIFICATION_LAB_COMMAND_NAMES is redefined with lab … names; all CommandSpec entries are renamed to their lab … forms with updated categories and examples; GROUP_HELP gains a lab entry; _CLASS_PREFIXES maps new lab … prefixes to their class buckets; the tracked static gate label changes from verify-schema-roundtrip to lab schema roundtrip.
Runtime execution and verification wiring
devtools/verify.py, devtools/release_readiness.py, devtools/validation_lane_catalog_contracts.py, devtools/validation_lane_catalog_live.py, devtools/regression_cases.py, devtools/regression_capture.py, devtools/self_verify.py, devtools/run_validation_lanes.py, devtools/render_quality_reference.py, polylogue/scenarios/execution.py
Verify step lists swap verify-schema-roundtrip → lab schema roundtrip and verify-schema-upgrade-lane → lab policy schema-versioning; lane catalog execution arguments change lab-scenario → lab scenario; regression_cases.py source field changes to "lab probe pipeline"; ExecutionSpec.command constructs pipeline-probe argv via control_plane_argv("lab probe pipeline", ...); usage/help text updated throughout.
Test updates for renamed commands
tests/unit/devtools/test_command_catalog.py, tests/unit/devtools/test_devtools_main.py, tests/unit/devtools/test_execution_specs.py, tests/unit/devtools/test_pipeline_probe.py, tests/unit/devtools/test_regression_capture.py, tests/unit/devtools/test_render_devtools_reference.py, tests/unit/devtools/test_render_quality_reference.py, tests/unit/devtools/test_validation_lanes.py, tests/unit/devtools/test_verify.py, tests/unit/devtools/test_xtask.py, tests/unit/daemon/test_web_reader.py, tests/integration/test_schema_operator_workflow.py
All expected argv tuples, source fields, category sets, rendered command rows, and step label lists updated to match new lab … forms; _pytest_marker_expr helper added in test_verify.py; VERIFICATION_LAB_COMMAND_NAMES imported dynamically instead of hardcoded in test_devtools_main.py.
Documentation, CI, and plan files
.github/workflows/ci.yml, README.md, AGENTS.md, docs/devtools.md, docs/generate.md, docs/internals.md, docs/schema*.md, docs/providers/index.md, docs/visual-evidence.md, docs/test-quality-workflows.md, docs/plans/*
CI showcase-verify job, all documentation command examples, plan YAMLs (scenario-coverage.yaml, test-quality-coverage.yaml), and plan markdown files updated to reference devtools lab … subcommand forms in place of all previously hyphenated or flat command names.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • Sinity/polylogue#249: Overlaps on the pipeline-probe devtools surface — that PR introduced PipelineProbeRequest; this PR retargets the same command as lab probe pipeline in command_catalog.py and polylogue/scenarios/execution.py.
  • Sinity/polylogue#353: Both modify the lab-scenario surface registration in devtools/command_catalog.py; this PR renames it from the hyphenated form to lab scenario.
  • Sinity/polylogue#577: Both touch the verify-schema-roundtrip wiring in devtools/command_catalog.py and devtools/verify.py; this PR renames it to lab schema roundtrip.

Suggested labels

type:refactor, area:cli, area:docs, area:qa

🐇 Hyphens are passé, spaces are the new art,
lab scenario hops in — a fresh, tidy start.
Each probe and each schema now lives in a tree,
devtools lab graph shows paths plain to see.
No more dashed confusion, just clean rabbit trails —
The warren is tidy, and nothing derails! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'refactor(devtools): group lab commands' accurately summarizes the main change—consolidating lab-owned verification commands under the devtools lab namespace to resolve command-sprawl.
Description check ✅ Passed The PR description follows the template structure with Summary, Problem, Solution, and Verification sections. It clearly explains the refactoring intent, affected command groupings, implementation approach, and provides concrete test verification results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/devtools-lab-group-2126

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

github-actions Bot pushed a commit that referenced this pull request Jun 18, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 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".

Comment thread polylogue/scenarios/execution.py Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 win

Align --input help 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 win

Update 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

📥 Commits

Reviewing files that changed from the base of the PR and between 257214e and 46feef0.

📒 Files selected for processing (42)
  • .github/workflows/ci.yml
  • AGENTS.md
  • README.md
  • devtools/click_dispatch.py
  • devtools/command_catalog.py
  • devtools/evidence_dashboard.py
  • devtools/regression_capture.py
  • devtools/regression_cases.py
  • devtools/release_readiness.py
  • devtools/render_quality_reference.py
  • devtools/run_validation_lanes.py
  • devtools/self_verify.py
  • devtools/validation_lane_catalog_contracts.py
  • devtools/validation_lane_catalog_live.py
  • devtools/verify.py
  • devtools/xtask.py
  • docs/devtools.md
  • docs/generate.md
  • docs/internals.md
  • docs/plans/mk3-execution-log.md
  • docs/plans/release-readiness-gate.md
  • docs/plans/scenario-coverage.yaml
  • docs/plans/static-rendering-surface-classification.md
  • docs/plans/test-quality-coverage.yaml
  • docs/providers/index.md
  • docs/schema-annotations.md
  • docs/schema.md
  • docs/test-quality-workflows.md
  • docs/visual-evidence.md
  • polylogue/scenarios/execution.py
  • tests/integration/test_schema_operator_workflow.py
  • tests/unit/daemon/test_web_reader.py
  • tests/unit/devtools/test_command_catalog.py
  • tests/unit/devtools/test_devtools_main.py
  • tests/unit/devtools/test_execution_specs.py
  • tests/unit/devtools/test_pipeline_probe.py
  • tests/unit/devtools/test_regression_capture.py
  • tests/unit/devtools/test_render_devtools_reference.py
  • tests/unit/devtools/test_render_quality_reference.py
  • tests/unit/devtools/test_validation_lanes.py
  • tests/unit/devtools/test_verify.py
  • tests/unit/devtools/test_xtask.py

Comment thread tests/unit/devtools/test_verify.py Resolved
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
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 71.F014 / P2: fixed-already at the checked revision: The pipeline probe uses _devtools_argv at polylogue/scenarios/execution.py:280. Its implementation at line 25 splits only the subcommand and expands the already-tokenized argv unchanged, preserving values containing spaces.

Only the rows listed above are dispositioned. Held findings remain open.

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