Skip to content

fix(verification): validate coverage manifest references - #702

Merged
Sinity merged 1 commit into
masterfrom
feature/fix/coverage-manifest-realized-refs
May 2, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fix/coverage-manifest-realized-refs

Conversation

@Sinity

@Sinity Sinity commented May 2, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a realized-reference pass to verify-manifests for coverage manifests and fixes stale campaign/test-quality manifest paths that the new gate catches.

Problem

#701 made coverage gaps structured lifecycle records, but coverage manifests could still claim generated/verified commands or source/test/config paths that do not exist. That kept a passive-manifest failure mode alive under #590: the row shape was valid, but the referenced consumer or evidence target could be stale.

Solution

devtools/verify_manifests.py now recursively scans docs/plans/*coverage*.yaml for locally checkable reference fields:

  • generated_by, verified_by, and verification_command must resolve to known devtools commands or accepted command families.
  • path, location, config_location, and strategies_location must point at existing files/directories.
  • locations and tests lists must point at existing files/directories.

The new gate caught stale references in campaign-coverage.yaml and test-quality-coverage.yaml; those now point at current test/benchmark files.

Verification

  • devtools verify-manifests
  • ruff check devtools/verify_manifests.py tests/unit/devtools/test_verify_manifests.py
  • pytest tests/unit/devtools/test_verify_manifests.py -q
  • devtools affected-obligations --path devtools/verify_manifests.py --path docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml
  • devtools proof-pack --path devtools/verify_manifests.py --path docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml --check
  • devtools render-quality-reference --check
  • devtools render-verification-catalog --check
  • devtools proof-pack --path docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml --markdown
  • pytest tests/unit/devtools/test_verify_manifests.py tests/unit/proof/test_catalog.py -q
  • devtools verify --quick
  • pre-push devtools verify --quick

Ref #590

Problem: coverage manifests still carried command/path claims that were not
checked against the realized tree. The new lifecycle contract from #701 made
gaps structured, but stale manifest references could still survive as passive
claims.

What changed: verify-manifests now validates locally checkable coverage
manifest references. Generated/verified/verification command fields must
resolve to known devtools commands or accepted command families, and declared
path fields/lists must point at existing repo paths. The new gate caught stale
campaign and test-quality paths, which now point to the current test and
benchmark files.

Verification: devtools verify-manifests; ruff check
devtools/verify_manifests.py tests/unit/devtools/test_verify_manifests.py;
pytest tests/unit/devtools/test_verify_manifests.py -q; devtools
affected-obligations --path devtools/verify_manifests.py --path
docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml;
devtools proof-pack --path devtools/verify_manifests.py --path
docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml
--check; devtools render-quality-reference --check; devtools
render-verification-catalog --check; devtools proof-pack --path
docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml
--markdown; pytest tests/unit/devtools/test_verify_manifests.py
tests/unit/proof/test_catalog.py -q; devtools verify --quick.

Ref #590
Copilot AI review requested due to automatic review settings May 2, 2026 13:16
@coderabbitai

coderabbitai Bot commented May 2, 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 47 minutes and 23 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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: 9a7ed3a2-a722-4988-a3f3-7a4a01a2cc87

📥 Commits

Reviewing files that changed from the base of the PR and between 62a1637 and 731a33d.

📒 Files selected for processing (4)
  • devtools/verify_manifests.py
  • docs/plans/campaign-coverage.yaml
  • docs/plans/test-quality-coverage.yaml
  • tests/unit/devtools/test_verify_manifests.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fix/coverage-manifest-realized-refs

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
Review rate limit: 0/1 reviews remaining, refill in 47 minutes and 23 seconds.

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

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown
Contributor

Polylogue Proof Pack

Refs: origin/master..HEAD
Changed paths: 4

Affected Domains

  • architecture_discipline — 1 claim(s), maturity growing
  • spec_completeness — 3 claim(s), maturity seed
Additional routed domains with zero affected claims
  • mutation_coverage — maturity growing
  • test_quality — maturity growing

Focused Gates

  • devtools verify-manifests — structural manifest changed
  • devtools affected-obligations --path devtools/verify_manifests.py — refresh structural obligation routing
  • devtools render-verification-catalog --check — coverage manifests feed proof subjects
  • devtools proof-pack --path docs/plans/campaign-coverage.yaml --markdown — coverage changes feed proof-pack gaps
  • devtools proof-pack --path docs/plans/test-quality-coverage.yaml --markdown — coverage changes feed proof-pack gaps

Required PR Gates

  • devtools verify --quick — full PR gate remains explicit
  • devtools verify — full PR gate remains explicit

Optional Confidence Gates

  • devtools build-package — deployment readiness gate; run when packaging or release confidence matters
  • nix flake check — deployment readiness gate; run when packaging or release confidence matters

Known Gaps

  • none for domains with affected claims
Additional gaps in zero-claim routed domains
  • test_quality: direct_coverage: Coverage per-module not tracked (only aggregate fail_under) [owner: test-quality; next: devtools coverage-gate], flakiness: No systematic flakiness tracking, CI retry, or quarantine [owner: test-quality; next: devtools run-validation-lanes --list], fuzz: Atheris fuzz targets not run in CI [owner: test-quality; next: devtools run-validation-lanes --list], mock_depth: Mock depth not measured or enforced [owner: test-quality; next: devtools run-validation-lanes --list]

Oracle / Cost

  • oracle mix: {"construction_sanity": 11, "drift_check": 1}
  • cost tier: {"static": 12}
  • stable affected obligations: 12
  • agent judgment cells: 0

@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: 731a33d330

ℹ️ 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/verify_manifests.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

Adds an additional verification gate to devtools verify-manifests to ensure coverage manifests don’t reference stale devtools commands or nonexistent filesystem paths, and updates a couple of coverage manifests to satisfy the new checks.

Changes:

  • Add check_coverage_references() to validate command fields (generated_by, verified_by, verification_command) and common path fields/lists in *coverage*.yaml manifests.
  • Extend unit tests to cover accepted vs rejected command/path references.
  • Refresh stale test/benchmark file references in campaign + test-quality coverage manifests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
devtools/verify_manifests.py Adds a new “realized references” pass for coverage manifests and wires it into the verifier pipeline.
tests/unit/devtools/test_verify_manifests.py Adds tests for the new coverage reference validation behavior (success + failure cases).
docs/plans/campaign-coverage.yaml Updates mutation/benchmark campaign test paths to current filenames.
docs/plans/test-quality-coverage.yaml Updates fuzz/test-quality file references to current unit test filenames.

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

_EVIDENCE_COMMANDS = {"pytest", "ruff", "mypy", "nix", "polylogue", "polylogued", "polylogue-mcp"}
_COVERAGE_COMMAND_FIELDS = {"generated_by", "verified_by", "verification_command"}
_COVERAGE_PATH_FIELDS = {"config_location", "location", "path", "strategies_location"}
_COVERAGE_PATH_LIST_FIELDS = {"locations", "tests"}
@Sinity

Sinity commented May 2, 2026

Copy link
Copy Markdown
Owner Author

Pre-merge automated review/check triage:

Additional local merge gate:

  • devtools verify passed after the PR was opened.

@Sinity
Sinity merged commit 6761f57 into master May 2, 2026
18 checks passed
@Sinity
Sinity deleted the feature/fix/coverage-manifest-realized-refs branch May 2, 2026 13:25
Sinity added a commit that referenced this pull request May 7, 2026
## Summary

Adds realized-reference validation to coverage manifests so command and path claims must point at current repo objects.

## Problem

After coverage gaps became structured lifecycle records, coverage manifests could still carry stale generated/verified command claims or source/test/config paths. That left a passive-manifest failure mode where a row had valid shape but referenced a non-existent evidence target.

## Solution

`verify-manifests` now recursively validates locally checkable coverage manifest references: generated/verified/verification commands must resolve to known devtools commands or supported command families, and declared path/list fields must exist. The new gate caught stale campaign and test-quality paths, which now point to current test and benchmark files.

## Verification

- `devtools verify-manifests`
- `pytest tests/unit/devtools/test_verify_manifests.py -q`
- `pytest tests/unit/devtools/test_verify_manifests.py tests/unit/proof/test_catalog.py -q`
- `devtools affected-obligations --path devtools/verify_manifests.py --path docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml`
- `devtools proof-pack --path devtools/verify_manifests.py --path docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml --check`
- `devtools proof-pack --path docs/plans/campaign-coverage.yaml --path docs/plans/test-quality-coverage.yaml --markdown`
- `devtools render-quality-reference --check`
- `devtools render-verification-catalog --check`
- `devtools verify --quick`
- `devtools verify`
- pre-push `devtools verify --quick`

GitHub proof-pack, lint, typecheck, nix-build, nix-check, analysis, showcase, metadata, CodeQL, and GitGuardian checks passed. GitHub pytest jobs were pending under the known CI-capacity issue; local full `devtools verify` passed.

Ref #590
@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants