Skip to content

test: add generated scenario proof subjects - #356

Merged
Sinity merged 1 commit into
masterfrom
feature/test/generated-scenario-proof-subjects
Apr 22, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/test/generated-scenario-proof-subjects

Conversation

@Sinity

@Sinity Sinity commented Apr 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #196.

Adds generated-world and workload scenario families to the proof-obligation catalog so missing generated validation coverage is visible as proof subjects instead of relying on ad hoc live/archive checks.

Problem

The proof catalog had command, schema, provider, operation, artifact, repair, error, trace, diagnostic, and workflow subjects, but the missing generated scenario families from #196 were still not first-class proof subjects. That left generated coverage gaps documented in prose rather than routable through catalog claims and affected-obligation checks.

Solution

  • Added generated.scenario_family subjects for nine generated-world/workload families.
  • Added three generated-scenario claims for family registration, deterministic local implemented scenarios, and semantic claim mapping.
  • Added a static evidence runner for generated scenario claims.
  • Marked implemented local deterministic families for pathological raw reruns, destructive-preview safety, repair convergence, and archive substrate laws.
  • Marked remaining generated families as explicit migration tasks with issue-linked semantic claim mappings.
  • Updated the generated verification catalog and proof tests.

Verification

  • ruff check polylogue/proof tests/unit/proof/test_generated_scenario_obligations.py tests/unit/proof/test_catalog.py
  • pytest -q tests/unit/proof/test_catalog.py tests/unit/proof/test_generated_scenario_obligations.py tests/unit/proof/test_structural_error_evidence.py tests/unit/devtools/test_render_verification_catalog.py
  • pytest -q tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py tests/unit/devtools/test_affected_obligations.py
  • devtools render-all --check
  • devtools affected-obligations --path polylogue/proof/generated_scenarios.py
  • devtools verify
  • pre-push devtools verify --quick

@coderabbitai

coderabbitai Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f4c2035e-7046-4c43-84fa-7ba7164071bb

📥 Commits

Reviewing files that changed from the base of the PR and between b5955e5 and 865d93e.

📒 Files selected for processing (9)
  • docs/verification-catalog.md
  • polylogue/proof/__init__.py
  • polylogue/proof/catalog.py
  • polylogue/proof/generated_scenarios.py
  • polylogue/proof/rendering.py
  • polylogue/proof/runners.py
  • polylogue/proof/subjects.py
  • tests/unit/proof/test_catalog.py
  • tests/unit/proof/test_generated_scenario_obligations.py

📝 Walkthrough

Walkthrough

This pull request adds support for "generated scenario families" as a new proof subject type in the verification catalog system. It introduces new data models, catalog claims, an evidence runner, and comprehensive tests to enable proof-based validation of generated scenario characteristics including registration, local determinism, and semantic claim mappings.

Changes

Cohort / File(s) Summary
Core Generated Scenario Models
polylogue/proof/generated_scenarios.py
New module defining GeneratedScenarioFamily, SemanticClaimMapping dataclasses, a tuple of concrete scenario family instances (GENERATED_SCENARIO_FAMILIES), and generated_scenario_subjects() function to compile families into SubjectRef objects.
Proof Catalog System
polylogue/proof/catalog.py, polylogue/proof/subjects.py
Added generated.scenario_family subject queries to catalog; integrated three new claims (generated.scenario.family_registered, generated.scenario.local_deterministic, generated.scenario.semantic_claim_mapping) with evidence schemas, bug classes, and runner bindings; extended subject discovery to include generated scenario families.
Evidence Runner Implementation
polylogue/proof/runners.py
New public runner run_generated_scenario_evidence() dispatching on claim id to three private helpers that extract metadata, validate attributes, compute check fields, and produce evidence envelopes with appropriate outcome status.
Public API Exports
polylogue/proof/__init__.py
Added exports for run_generated_scenario_evidence (from runners) and generated_scenario_subjects (from subjects).
Catalog Rendering
polylogue/proof/rendering.py
Added "Generated Scenario Subjects" section to markdown catalog with helper function filtering and rendering generated scenario families as markdown table with status, world, workload, and semantic claims.
Documentation Snapshot
docs/verification-catalog.md
Updated metrics: subjects 9024→9033, claims 19→22, runner bindings 19→22, proof obligations 9090→9112; added "Generated Scenario Subjects" section listing 9 scenario families with attributes.
Test Coverage
tests/unit/proof/test_catalog.py, tests/unit/proof/test_generated_scenario_obligations.py
Extended catalog test assertions for new claims and subject kind; added comprehensive test suite validating generated scenario families, determinism invariants, semantic claim mappings, and evidence runner behavior for all three claim types.

Sequence Diagram

sequenceDiagram
    participant Catalog as Verification Catalog
    participant Subject as Generated Scenario Subject
    participant Obligation as Proof Obligation
    participant Runner as Evidence Runner
    participant Evidence as Evidence Envelope

    Catalog->>Subject: discover generated scenario families
    Subject->>Subject: compile to SubjectRef with metadata
    Catalog->>Obligation: create obligations from subjects × claims
    Obligation->>Runner: dispatch run_generated_scenario_evidence()
    Runner->>Subject: extract attrs (status, world, workload, claims)
    Runner->>Runner: validate presence/validity of attributes
    Runner->>Runner: compute check fields (determinism, dependency, mapping)
    Runner->>Evidence: generate EvidenceEnvelope with outcome
    Evidence->>Obligation: record observed_state & outcome status
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related issues

  • test: cover missing generated scenario families as proof subjects #196: Directly implements the acceptance criteria by introducing five+ generated scenario families as proof subjects with semantic claim families (generated.scenario.family_registered, generated.scenario.local_deterministic, generated.scenario.semantic_claim_mapping), enabling local deterministic validation and mapping coverage.

Possibly related PRs

Poem

🐰 A rabbit hops through scenarios grand,
Generated families, perfectly planned,
Local and deterministic, semantics so fine,
Proof subjects now shine in the catalog's design! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/test/generated-scenario-proof-subjects

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 852b456 into master Apr 22, 2026
11 of 12 checks passed
@Sinity
Sinity deleted the feature/test/generated-scenario-proof-subjects branch April 22, 2026 10:49

@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: 865d93e986

ℹ️ 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/proof/runners.py Resolved
Sinity added a commit that referenced this pull request Apr 22, 2026
## Summary

Closes #196.

Adds generated-world and workload scenario families to the proof-obligation catalog so missing generated validation coverage is visible as proof subjects instead of relying on ad hoc live/archive checks.

## Problem

The proof catalog had command, schema, provider, operation, artifact, repair, error, trace, diagnostic, and workflow subjects, but the missing generated scenario families from #196 were still not first-class proof subjects. That left generated coverage gaps documented in prose rather than routable through catalog claims and affected-obligation checks.

## Solution

- Added `generated.scenario_family` subjects for nine generated-world/workload families.
- Added three generated-scenario claims for family registration, deterministic local implemented scenarios, and semantic claim mapping.
- Added a static evidence runner for generated scenario claims.
- Marked implemented local deterministic families for pathological raw reruns, destructive-preview safety, repair convergence, and archive substrate laws.
- Marked remaining generated families as explicit migration tasks with issue-linked semantic claim mappings.
- Updated the generated verification catalog and proof tests.

## Verification

- `ruff check polylogue/proof tests/unit/proof/test_generated_scenario_obligations.py tests/unit/proof/test_catalog.py`
- `pytest -q tests/unit/proof/test_catalog.py tests/unit/proof/test_generated_scenario_obligations.py tests/unit/proof/test_structural_error_evidence.py tests/unit/devtools/test_render_verification_catalog.py`
- `pytest -q tests/unit/proof tests/unit/devtools/test_render_verification_catalog.py tests/unit/devtools/test_affected_obligations.py`
- `devtools render-all --check`
- `devtools affected-obligations --path polylogue/proof/generated_scenarios.py`
- `devtools verify`
- pre-push `devtools verify --quick`
Sinity added a commit that referenced this pull request Apr 22, 2026
The proof catalog had command, schema, provider, operation,
artifact, repair, error, trace, diagnostic, and workflow subjects,
but the missing generated scenario families from #196 weren't yet
first-class proof subjects. Generated coverage gaps were documented
in prose rather than routable through catalog claims and
affected-obligation checks.

Adds generated-world and workload scenario families to the
proof-obligation catalog: nine `generated.scenario_family`
subjects; three generated-scenario claims for family registration,
deterministic local implemented scenarios, and semantic claim
mapping; a static evidence runner for generated scenario claims.
Marks implemented local deterministic families for pathological raw
reruns, destructive-preview safety, repair convergence, and
archive substrate laws. Marks remaining generated families as
explicit migration tasks with issue-linked semantic claim
mappings. Updates the generated verification catalog and proof
tests.

Verification: ruff + pytest over proof / generated-scenario-
obligations / structural-error-evidence / render-verification-
catalog / affected-obligations suites; live `devtools
affected-obligations` probe on generated-scenarios module;
devtools render-all --check, verify and --quick green.

Closes #196
Sinity added a commit that referenced this pull request Apr 22, 2026
The proof catalog had command, schema, provider, operation,
artifact, repair, error, trace, diagnostic, and workflow subjects,
but the missing generated scenario families from #196 weren't yet
first-class proof subjects. Generated coverage gaps were documented
in prose rather than routable through catalog claims and
affected-obligation checks.

Adds generated-world and workload scenario families to the
proof-obligation catalog: nine `generated.scenario_family`
subjects; three generated-scenario claims for family registration,
deterministic local implemented scenarios, and semantic claim
mapping; a static evidence runner for generated scenario claims.
Marks implemented local deterministic families for pathological raw
reruns, destructive-preview safety, repair convergence, and
archive substrate laws. Marks remaining generated families as
explicit migration tasks with issue-linked semantic claim
mappings. Updates the generated verification catalog and proof
tests.

Verification: ruff + pytest over proof / generated-scenario-
obligations / structural-error-evidence / render-verification-
catalog / affected-obligations suites; live `devtools
affected-obligations` probe on generated-scenarios module;
devtools render-all --check, verify and --quick green.

Closes #196
Sinity added a commit that referenced this pull request Apr 22, 2026
The proof catalog had command, schema, provider, operation,
artifact, repair, error, trace, diagnostic, and workflow subjects,
but the missing generated scenario families from #196 weren't yet
first-class proof subjects. Generated coverage gaps were documented
in prose rather than routable through catalog claims and
affected-obligation checks.

Adds generated-world and workload scenario families to the
proof-obligation catalog: nine `generated.scenario_family`
subjects; three generated-scenario claims for family registration,
deterministic local implemented scenarios, and semantic claim
mapping; a static evidence runner for generated scenario claims.
Marks implemented local deterministic families for pathological raw
reruns, destructive-preview safety, repair convergence, and
archive substrate laws. Marks remaining generated families as
explicit migration tasks with issue-linked semantic claim
mappings. Updates the generated verification catalog and proof
tests.

Verification: ruff + pytest over proof / generated-scenario-
obligations / structural-error-evidence / render-verification-
catalog / affected-obligations suites; live `devtools
affected-obligations` probe on generated-scenarios module;
devtools render-all --check, verify and --quick green.

Closes #196
@Sinity

Sinity commented Apr 28, 2026

Copy link
Copy Markdown
Owner Author

🤖 Post-hoc audit note: this PR received bot review feedback verified against current HEAD as part of #544. 1 finding(s) confirmed still present → tracked in #550.

@Sinity
Sinity requested a review from Copilot May 1, 2026 00:44
@Sinity
Sinity requested review from Copilot and removed request for Copilot May 1, 2026 01:05
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
@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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: cover missing generated scenario families as proof subjects

1 participant