Repository navigation
test: compile schema provider obligations - #344
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 42 seconds. ⌛ 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 selected for processing (10)
✨ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f677dc9b2
ℹ️ 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".
| enum_values = _polylogue_value_enum(schema) | ||
| if enum_values and "enum" not in cleaned: | ||
| cleaned["enum"] = enum_values |
There was a problem hiding this comment.
Restrict enum injection to type-compatible schema nodes
strip_schema_extensions() now adds enum to every object containing x-polylogue-values, but annotations are also present on non-scalar combinator branches. In the current codex schema (polylogue/schemas/providers/codex/versions/v1/elements/conversation_record_stream.schema.json.gz), $.properties.payload.properties.source.anyOf[1] is type: object with x-polylogue-values: ["cli"]; this logic turns that branch into type: object + enum: ["cli"], which is unsatisfiable and prevents generation of that object variant. That silently reduces schema-driven crashlessness coverage and can hide parser defects in now-unreachable branches.
Useful? React with 👍 / 👎.
Closes #332 ## Summary - Add typed provider capability metadata for `codex`, `claude-code`, and `chatgpt`. - Compile provider capability subjects into the proof catalog and bind identity/partial-coverage claims. - Translate `x-polylogue-values` into JSON Schema `enum` for schema-driven Hypothesis generation. - Add evidence runners and tests proving schema value generation and provider capability obligations. ## Problem Schema annotations and provider semantics were still partly outside the proof-obligation vocabulary. The catalog had initial schema annotation subjects, but provider capability semantics were not typed subjects, and `schema_conformant_payload()` stripped `x-polylogue-*` metadata before Hypothesis generation could use it. ## Solution - Added `polylogue/lib/provider_capabilities.py` as the substrate record for provider capability facts and native-to-canonical identity mappings. - Added `provider.capability.*` subjects in `polylogue/proof/subjects.py`. - Added `provider.capability.identity_bridge` and `provider.capability.partial_coverage_declared` claims plus static runner bindings in `polylogue/proof/catalog.py`. - Added provider capability rendering to `docs/verification-catalog.md`. - Added proof runners for schema value-generation closure and provider capability metadata checks in `polylogue/proof/runners.py`. - Updated `tests/infra/strategies/schema_driven.py` so `x-polylogue-values` drives generation as JSON Schema `enum` before the extension key is stripped. ## Verification ```text pytest -q -n 0 tests/unit/proof tests/unit/sources/test_schema_driven.py ruff check polylogue/lib/provider_capabilities.py polylogue/proof tests/unit/proof tests/unit/sources/test_schema_driven.py tests/infra/strategies/schema_driven.py mypy polylogue/lib/provider_capabilities.py polylogue/proof tests/unit/proof/test_schema_provider_obligations.py tests/infra/strategies/schema_driven.py devtools render-all --check pytest -q -n 0 tests/unit/sources/test_parser_crashlessness.py tests/property/test_schema_roundtrip.py tests/property/test_semantic_properties.py devtools verify --quick devtools verify git push -u origin feature/test/schema-provider-obligations ``` The push hook reran `devtools verify --quick` successfully.
Schema annotations and provider semantics were still partly outside the proof-obligation vocabulary. The catalog had initial schema annotation subjects, but provider capability semantics weren't typed subjects, and `schema_conformant_payload()` stripped `x-polylogue-*` metadata before Hypothesis generation could use it. Adds `lib/provider_capabilities.py` as the substrate record for provider capability facts and native-to-canonical identity mappings for `codex`, `claude-code`, and `chatgpt`. Adds `provider.capability.*` subjects in `proof/subjects.py`, plus `provider.capability.identity_bridge` and `provider.capability.partial_coverage_declared` claims with static runner bindings in `proof/catalog.py`. Adds provider capability rendering to `docs/verification-catalog.md` and proof runners for schema value-generation closure and provider capability metadata checks in `proof/runners.py`. Updates `tests/infra/strategies/schema_driven.py` so `x-polylogue-values` drives generation as JSON Schema `enum` before the extension key is stripped. Verification: ruff + mypy + pytest over proof, schema-driven, parser-crashlessness, schema-roundtrip, and semantic-properties suites; devtools render-all --check, verify and --quick green. Closes #332
Schema annotations and provider semantics were still partly outside the proof-obligation vocabulary. The catalog had initial schema annotation subjects, but provider capability semantics weren't typed subjects, and `schema_conformant_payload()` stripped `x-polylogue-*` metadata before Hypothesis generation could use it. Adds `lib/provider_capabilities.py` as the substrate record for provider capability facts and native-to-canonical identity mappings for `codex`, `claude-code`, and `chatgpt`. Adds `provider.capability.*` subjects in `proof/subjects.py`, plus `provider.capability.identity_bridge` and `provider.capability.partial_coverage_declared` claims with static runner bindings in `proof/catalog.py`. Adds provider capability rendering to `docs/verification-catalog.md` and proof runners for schema value-generation closure and provider capability metadata checks in `proof/runners.py`. Updates `tests/infra/strategies/schema_driven.py` so `x-polylogue-values` drives generation as JSON Schema `enum` before the extension key is stripped. Verification: ruff + mypy + pytest over proof, schema-driven, parser-crashlessness, schema-roundtrip, and semantic-properties suites; devtools render-all --check, verify and --quick green. Closes #332
Schema annotations and provider semantics were still partly outside the proof-obligation vocabulary. The catalog had initial schema annotation subjects, but provider capability semantics weren't typed subjects, and `schema_conformant_payload()` stripped `x-polylogue-*` metadata before Hypothesis generation could use it. Adds `lib/provider_capabilities.py` as the substrate record for provider capability facts and native-to-canonical identity mappings for `codex`, `claude-code`, and `chatgpt`. Adds `provider.capability.*` subjects in `proof/subjects.py`, plus `provider.capability.identity_bridge` and `provider.capability.partial_coverage_declared` claims with static runner bindings in `proof/catalog.py`. Adds provider capability rendering to `docs/verification-catalog.md` and proof runners for schema value-generation closure and provider capability metadata checks in `proof/runners.py`. Updates `tests/infra/strategies/schema_driven.py` so `x-polylogue-values` drives generation as JSON Schema `enum` before the extension key is stripped. Verification: ruff + mypy + pytest over proof, schema-driven, parser-crashlessness, schema-roundtrip, and semantic-properties suites; devtools render-all --check, verify and --quick green. Closes #332
|
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. |
Closes #332
Summary
codex,claude-code, andchatgpt.x-polylogue-valuesinto JSON Schemaenumfor schema-driven Hypothesis generation.Problem
Schema annotations and provider semantics were still partly outside the proof-obligation vocabulary. The catalog had initial schema annotation subjects, but provider capability semantics were not typed subjects, and
schema_conformant_payload()strippedx-polylogue-*metadata before Hypothesis generation could use it.Solution
polylogue/lib/provider_capabilities.pyas the substrate record for provider capability facts and native-to-canonical identity mappings.provider.capability.*subjects inpolylogue/proof/subjects.py.provider.capability.identity_bridgeandprovider.capability.partial_coverage_declaredclaims plus static runner bindings inpolylogue/proof/catalog.py.docs/verification-catalog.md.polylogue/proof/runners.py.tests/infra/strategies/schema_driven.pysox-polylogue-valuesdrives generation as JSON Schemaenumbefore the extension key is stripped.Verification
The push hook reran
devtools verify --quicksuccessfully.