Skip to content

refactor(core): collapse validation lane DSL and remove dead code (#805) - #901

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/simplification-805
May 7, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/simplification-805

Conversation

@Sinity

@Sinity Sinity commented May 7, 2026

Copy link
Copy Markdown
Owner

Summary

Collapsed the validation lane DSL from 5 files (1021 LOC) to 2 catalog
files plus simplified models, removing 3 files (617 LOC deleted) and
the 7-level ExecutableScenario inheritance chain from LaneEntry.

Problem

68 validation lanes were spread across 5 catalog files
(validation_lane_catalog_contracts.py, _live.py, _composites.py) plus
validation_lane_base.py (6 DSL builder functions) and
validation_family_models.py (ValidationLaneFamily DSL). The DSL
builder functions (pytest_lane, devtools_lane, pipeline_probe_lane,
polylogue_lane, memory_budget_lane, composite_lane) were thin wrappers
around ExecutionSpec constructors. LaneEntry inherited through
ExecutableScenario → NamedScenarioSource → ScenarioSpec →
ScenarioProjectionSource → ScenarioMetadata, carrying ~20 metadata
fields and projection protocol methods through 7 levels.

Per issue #805 recon, priority P0 was "Collapse validation lanes from
5 files to 2 files."

Solution

  • Flattened LaneEntry into a plain dataclass with direct fields
    (name, description, timeout_s, category, execution,
    assertion, family, is_composite, sub_lanes). Removed
    ExecutableScenario inheritance while preserving projection protocol
    compatibility via direct method implementations.

  • Deleted validation_lane_base.py (221 LOC): 6 builder functions
    replaced with direct ExecutionSpec construction (pytest_execution,
    devtools_execution, composite_execution, etc.) in the catalog
    files.

  • Deleted validation_family_models.py (133 LOC):
    ValidationLaneFamily/StageSpec/CompositeSpec DSL flattened into
    14 direct composite LaneEntry declarations.

  • Deleted validation_lane_catalog_composites.py (263 LOC):
    Merged 14 family-generated + 11 standalone composite lanes into
    validation_lane_catalog_contracts.py as direct LaneEntry
    declarations.

  • Updated validation_catalog.py: Removed imports of deleted
    modules. build_validation_family_entries() returns empty tuple
    (families are now direct composites).

  • Updated authored_scenario_catalog.py, quality_registry.py,
    render_quality_reference.py: Removed ValidationLaneFamily
    references, changed validation_families type to tuple[object, ...].

Net change: -268 LOC (698 insertions, 966 deletions).

Verification

Deferred to wave batch per #852 policy.

Co-Authored-By: Claude Opus 4.7 [email protected]

Problem: 68 validation lanes were spread across 5 files with 6 DSL
builder functions that wrapped ExecutionSpec constructors plus a
ValidationLaneFamily DSL that generated composite entries. The
inheritance chain (LaneEntry → ExecutableScenario → NamedScenarioSource
→ ScenarioSpec → ScenarioProjectionSource → ScenarioMetadata) silently
carried ~20 metadata fields and projection protocol methods through 7
levels.

Solution:
- Flattened LaneEntry to a plain dataclass with direct fields,
  removing ExecutableScenario inheritance while preserving
  projection protocol compatibility.
- Deleted validation_lane_base.py (221 LOC): 6 builder functions
  (pytest_lane, devtools_lane, pipeline_probe_lane, polylogue_lane,
  memory_budget_lane, composite_lane) replaced with direct
  ExecutionSpec construction in catalog files.
- Deleted validation_family_models.py (133 LOC): ValidationLaneFamily
  DSL generation flattened into direct composite LaneEntry
  declarations.
- Merged validation_lane_catalog_composites.py (263 LOC) into
  validation_lane_catalog_contracts.py as direct declarations.
- Updated validation_catalog.py, authored_scenario_catalog.py,
  quality_registry.py, render_quality_reference.py for the
  simplified contract.

Files deleted: 3 (617 LOC). Net change: -268 LOC.

Verification: deferred to wave batch per #852 policy.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Copilot AI review requested due to automatic review settings May 7, 2026 09:00
@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 31 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4cb76565-ad32-474f-a8af-df98610892ed

📥 Commits

Reviewing files that changed from the base of the PR and between 4893f98 and 3e84a3b.

📒 Files selected for processing (10)
  • devtools/authored_scenario_catalog.py
  • devtools/lane_models.py
  • devtools/quality_registry.py
  • devtools/render_quality_reference.py
  • devtools/validation_catalog.py
  • devtools/validation_family_models.py
  • devtools/validation_lane_base.py
  • devtools/validation_lane_catalog_composites.py
  • devtools/validation_lane_catalog_contracts.py
  • devtools/validation_lane_catalog_live.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/simplification-805

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.

@Sinity
Sinity merged commit ec333ae into master May 7, 2026
5 checks passed
@Sinity
Sinity deleted the feature/refactor/simplification-805 branch May 7, 2026 09:01

@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: 3e84a3bfda

ℹ️ 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 devtools/lane_models.py Resolved
Comment thread devtools/lane_models.py Resolved

Copilot AI 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.

Pull request overview

This PR refactors the devtools “validation lanes” catalog by removing the prior DSL/builder layers and flattening lane modeling, consolidating lane declarations into fewer modules and deleting several now-redundant files.

Changes:

  • Replaced lane-builder helpers (e.g., pytest_lane, polylogue_lane, composite_lane) with direct ExecutionSpec construction inside the lane catalog(s).
  • Merged composite-lane declarations into the contracts catalog and deleted the former composites catalog + validation-family DSL modules.
  • Flattened LaneEntry from a deep inheritance chain into a standalone dataclass with explicit projection methods.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
devtools/validation_lane_catalog_live.py Converts live lane declarations to direct LaneEntry(...) + *_execution(...) usage.
devtools/validation_lane_catalog_contracts.py Converts contract lanes to direct LaneEntry(...) and inlines composite lane declarations.
devtools/validation_lane_catalog_composites.py Deleted (composites moved into contracts catalog).
devtools/validation_lane_base.py Deleted (DSL/builder wrappers removed).
devtools/validation_family_models.py Deleted (validation-family DSL removed).
devtools/validation_catalog.py Updates imports for new catalog layout; validation-family builder now returns empty.
devtools/render_quality_reference.py Removes ValidationLaneFamily import; loosens family rendering typing.
devtools/quality_registry.py Removes ValidationLaneFamily import; loosens validation_families typing.
devtools/lane_models.py Flattens LaneEntry into a plain dataclass and implements projection methods directly.
devtools/authored_scenario_catalog.py Removes ValidationLaneFamily import; loosens validation_families field type.
Comments suppressed due to low confidence (1)

devtools/render_quality_reference.py:43

  • _render_validation_family_table() was widened to tuple[object, ...] but still assumes each entry has .name/.description/.lanes with lane.name attributes. If validation families are truly removed, this table (and the corresponding docs section) should be deleted; otherwise introduce a small typed model/Protocol for “family view” instead of object so the renderer can’t silently accept incompatible inputs.
def _render_validation_family_table(entries: tuple[object, ...]) -> list[str]:  # flattened — ValidationLaneFamily DSL removed in #805
    lines = [
        "| Family | Composite Lanes | Description |",
        "| --- | --- | --- |",
    ]
    for entry in entries:
        lane_names = tuple(lane.name for lane in entry.lanes)
        lines.append(f"| `{entry.name}` | {_format_code_list(lane_names)} | {entry.description} |")
    return lines

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread devtools/lane_models.py
artifact_targets: tuple[str, ...] = ()
operation_targets: tuple[str, ...] = ()
tags: tuple[str, ...] = ()

Comment on lines +81 to +83
def build_validation_family_entries() -> tuple[object, ...]:
"""Return validation family entries (flattened — families are now direct composites)."""
return ()
Sinity added a commit that referenced this pull request May 7, 2026
Largest #805 simplification slice. 68 validation lanes were
spread across five catalog files, plus the
`validation_lane_base.py` builder DSL (six thin wrappers around
`ExecutionSpec` constructors) and a `ValidationLaneFamily`
model layer. `LaneEntry` inherited through a 7-level chain
(`ExecutableScenario` → `NamedScenarioSource` → `ScenarioSpec`
  → `ScenarioProjectionSource` → `ScenarioMetadata`) carrying
~20 metadata fields and projection-protocol methods.

- `LaneEntry` becomes a plain dataclass with direct fields
  (`name`, `description`, `timeout_s`, `category`, `execution`,
  `assertion`, `family`, `is_composite`, `sub_lanes`),
  removing `ExecutableScenario` inheritance while keeping
  projection-protocol compatibility through direct method
  implementations.
- Deletes `validation_lane_base.py` (-221 LOC): six builder
  functions replaced with direct `ExecutionSpec` construction
  in the catalog files.
- Deletes `validation_family_models.py` (-133 LOC): family /
  stage / composite DSL flattened into 14 direct composite
  `LaneEntry` declarations.
- Deletes `validation_lane_catalog_composites.py` (-263 LOC):
  14 family-generated + 11 standalone composites merged into
  `validation_lane_catalog_contracts.py`.
- `validation_catalog.py`: removes imports of the deleted
  modules; `build_validation_family_entries()` returns an
  empty tuple.

Net effect: 10 files +698/-966.

Refs #805
Sinity added a commit that referenced this pull request May 7, 2026
Direct, no-PR. Local repair in
`devtools/authored_scenario_catalog.py` after the #805
validation-lane collapse (PR #901): a typed `extend()` call
was incorrectly rewritten to `to_projection_entry()` and
broke `devtools render-quality-reference --check`. Reverts to
the `.extend(...)` call with a focused `# type: ignore` for
the still-loose intermediate type, and regenerates
`docs/verification-catalog.md`.

Refs #805
Sinity added a commit that referenced this pull request May 7, 2026
Largest #805 simplification slice. 68 validation lanes were
spread across five catalog files, plus the
`validation_lane_base.py` builder DSL (six thin wrappers around
`ExecutionSpec` constructors) and a `ValidationLaneFamily`
model layer. `LaneEntry` inherited through a 7-level chain
(`ExecutableScenario` → `NamedScenarioSource` → `ScenarioSpec`
  → `ScenarioProjectionSource` → `ScenarioMetadata`) carrying
~20 metadata fields and projection-protocol methods.

- `LaneEntry` becomes a plain dataclass with direct fields
  (`name`, `description`, `timeout_s`, `category`, `execution`,
  `assertion`, `family`, `is_composite`, `sub_lanes`),
  removing `ExecutableScenario` inheritance while keeping
  projection-protocol compatibility through direct method
  implementations.
- Deletes `validation_lane_base.py` (-221 LOC): six builder
  functions replaced with direct `ExecutionSpec` construction
  in the catalog files.
- Deletes `validation_family_models.py` (-133 LOC): family /
  stage / composite DSL flattened into 14 direct composite
  `LaneEntry` declarations.
- Deletes `validation_lane_catalog_composites.py` (-263 LOC):
  14 family-generated + 11 standalone composites merged into
  `validation_lane_catalog_contracts.py`.
- `validation_catalog.py`: removes imports of the deleted
  modules; `build_validation_family_entries()` returns an
  empty tuple.

Net effect: 10 files +698/-966.

Refs #805
Sinity added a commit that referenced this pull request May 7, 2026
Direct, no-PR. Local repair in
`devtools/authored_scenario_catalog.py` after the #805
validation-lane collapse (PR #901): a typed `extend()` call
was incorrectly rewritten to `to_projection_entry()` and
broke `devtools render-quality-reference --check`. Reverts to
the `.extend(...)` call with a focused `# type: ignore` for
the still-loose intermediate type, and regenerates
`docs/verification-catalog.md`.

Refs #805
@Sinity

Sinity commented Sep 30, 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.

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.

2 participants