Repository navigation
fix(proof): drop x-polylogue-mutually-exclusive from catalog subjects - #521
Conversation
Closes #496. 8802 of 9046 proof catalog subjects (97%) were schema.annotation rows derived from inferred x-polylogue-mutually-exclusive pairs. They drowned out the rest of the catalog and verified almost nothing — the obligation is self-referential (the runner checks that the synthetic generator respects annotations the inference produced from the same corpus, so both sides come from the same inference output). Drops: - "x-polylogue-mutually-exclusive" from SELECTED_SCHEMA_ANNOTATIONS - the corresponding branch in _annotation_subjects_for_schema() - mutual_exclusion_query and the schema.mutual_exclusion.exclusive Claim from default_claims() - two assertions in tests/unit/proof/test_catalog.py Keeps the annotation itself in committed schemas (still useful for generator constraints, documentation, future operator review). Only the proof-subject minting goes away. Effect on the verification catalog snapshot: before: subjects=9046 claims=22 obligations=9149 after: subjects=246 claims=21 obligations=351 Also regenerates uv.lock (typing-extensions has been in pyproject.toml since the TypedDict pinning landed; lockfile was out of sync). Verification: devtools verify (full, ~4min) all green. Co-Authored-By: Claude <[email protected]>
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✨ 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 |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…#521) ## Summary Stops generating proof catalog subjects from `x-polylogue-mutually-exclusive`. Catalog drops from 9046 subjects / 9149 obligations to 246 / 351. Closes #496. ## Problem 8802 of 9046 proof catalog subjects (97%) were `kind="schema.annotation"` rows derived from inferred `x-polylogue-mutually-exclusive` pairs. They drowned out the rest of the catalog and verified almost nothing: 1. **Sampling artifact, not invariant.** A pair like `{fields: ['email', 'title'], parent: '$'}` (chatgpt) means "in 2122 samples, email and title never co-occurred" — not "they are mutually exclusive in the format." 2. **Self-referential.** The runner (`schema.mutual_exclusion.exclusive`, runner class `schema_static`) checks that the synthetic-payload generator does not co-populate exclusive fields. But the generator reads the same annotations to know what to avoid. Both sides of the obligation come from the same inference output. The obligation cannot detect what would matter — fresh provider data co-populating fields the inference said were exclusive — because nothing on either side looks at fresh provider data. The result: a catalog reporting 9149 obligations that looked deeply covered, while one claim accounted for 96% of obligations and produced no signal. ## Solution - `polylogue/proof/subjects.py`: drop `"x-polylogue-mutually-exclusive"` from `SELECTED_SCHEMA_ANNOTATIONS` and the corresponding branch in `_annotation_subjects_for_schema()`. - `polylogue/proof/catalog.py`: drop `mutual_exclusion_query` and the `schema.mutual_exclusion.exclusive` Claim from `default_claims()`. The `schema-annotation-static-contract` runner binding stays — it still serves `schema.values.value_closure` and `schema.foreign_key.resolves`. - `tests/unit/proof/test_catalog.py`: drop the claim id from the expected set and the obligation-count assertion for it. - `docs/verification-catalog.md`: regenerated by `devtools render-verification-catalog`. What we keep: - `x-polylogue-values` subjects (88) — discriminated-union tags and status enums; runner checks `observed_values ⊆ declared_values`, which catches genuine provider drift. - `x-polylogue-foreign-keys` subjects (7) — small, structurally verifiable. - The `x-polylogue-mutually-exclusive` annotation itself in committed schemas (still used by the generator and inference). Only the proof-subject minting goes away. Bundles a one-line `uv.lock` regeneration: `typing-extensions` has been declared in `pyproject.toml` since the TypedDict pinning landed; the lockfile was out of sync. ## Verification ``` $ nix develop -c python -c "from polylogue.proof.subjects import build_catalog_subjects; from collections import Counter; print(dict(Counter(s.kind for s in build_catalog_subjects())))" {'cli.command': 52, 'cli.json_command': 2, 'archive.query_law': 1, 'provider.capability': 3, 'operation.spec': 43, 'artifact.path': 27, 'maintenance.target': 8, 'error.surface': 2, 'trace.operation': 1, 'diagnostic.observable': 1, 'generated.scenario_family': 9, 'schema.annotation': 95, 'workflow.claim': 2} $ nix develop -c devtools verify verify: all checks passed ruff format ... ok ruff check ... ok mypy ... ok render-all ... ok verify-topology / file-budgets / test-ownership / migrations / cross-cuts ... ok pytest ... ok (172.2s) ``` Catalog snapshot delta: | | subjects | claims | obligations | | --- | ---: | ---: | ---: | | before | 9046 | 22 | 9149 | | after | 246 | 21 | 351 | ## Related - #506 — holistic assurance umbrella - #421 — claim depth (now operates on an honest base) - #494 — evidence freshness SLA (mutual-exclusion would distort the metric trivially) Co-authored-by: Claude <[email protected]>
Summary
Stops generating proof catalog subjects from
x-polylogue-mutually-exclusive. Catalog drops from 9046 subjects / 9149 obligations to 246 / 351.Closes #496.
Problem
8802 of 9046 proof catalog subjects (97%) were
kind="schema.annotation"rows derived from inferredx-polylogue-mutually-exclusivepairs. They drowned out the rest of the catalog and verified almost nothing:{fields: ['email', 'title'], parent: '$'}(chatgpt) means "in 2122 samples, email and title never co-occurred" — not "they are mutually exclusive in the format."schema.mutual_exclusion.exclusive, runner classschema_static) checks that the synthetic-payload generator does not co-populate exclusive fields. But the generator reads the same annotations to know what to avoid. Both sides of the obligation come from the same inference output. The obligation cannot detect what would matter — fresh provider data co-populating fields the inference said were exclusive — because nothing on either side looks at fresh provider data.The result: a catalog reporting 9149 obligations that looked deeply covered, while one claim accounted for 96% of obligations and produced no signal.
Solution
polylogue/proof/subjects.py: drop"x-polylogue-mutually-exclusive"fromSELECTED_SCHEMA_ANNOTATIONSand the corresponding branch in_annotation_subjects_for_schema().polylogue/proof/catalog.py: dropmutual_exclusion_queryand theschema.mutual_exclusion.exclusiveClaim fromdefault_claims(). Theschema-annotation-static-contractrunner binding stays — it still servesschema.values.value_closureandschema.foreign_key.resolves.tests/unit/proof/test_catalog.py: drop the claim id from the expected set and the obligation-count assertion for it.docs/verification-catalog.md: regenerated bydevtools render-verification-catalog.What we keep:
x-polylogue-valuessubjects (88) — discriminated-union tags and status enums; runner checksobserved_values ⊆ declared_values, which catches genuine provider drift.x-polylogue-foreign-keyssubjects (7) — small, structurally verifiable.x-polylogue-mutually-exclusiveannotation itself in committed schemas (still used by the generator and inference). Only the proof-subject minting goes away.Bundles a one-line
uv.lockregeneration:typing-extensionshas been declared inpyproject.tomlsince the TypedDict pinning landed; the lockfile was out of sync.Verification
Catalog snapshot delta:
Related