Repository navigation
refactor: rebuild schema generation and audit boundary contracts - #258
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 3 minutes and 20 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 (27)
✨ 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: 112cdd7aa6
ℹ️ 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".
## Summary Renew the schema generation, audit, and tooling boundary layer around explicit JSON/document contracts instead of loose schema-payload traversal. ## Problem The schema authoring and audit surface was still one of the remaining path-dependent strata in the renewal program. Audit walkers/checks, generation helpers, sampling utilities, validator resolution, and tooling registry seams still mixed runtime meaning with broad mapping/object payload flow, while the surrounding tests relied on repeated deep indexing into JSON unions. Closes #257 Ref #250 ## Solution - rebuilt schema audit walkers/checks around explicit JSON normalization and typed traversal helpers - tightened generation, sampling, redaction, observation-identity, tooling-diff, validator-resolution, and operator-inference contracts so internal flow stays on modeled payload/document shapes - widened selected source-side entry contracts only where callers naturally provide schema-like mappings, instead of forcing spurious narrowing at the public edge - added shared schema-access helpers for tests and aligned the schema contract/property tests around those helpers - suppressed the known Hypothesis filter-too-much false negative in rendering preservation so the verification baseline stays honest and green ## Verification - `mypy tests/unit/core/test_schema_generation.py tests/unit/core/test_privacy_guards.py tests/unit/core/test_schema_privacy.py tests/unit/core/test_sampling.py tests/unit/core/test_schema_laws.py tests/unit/core/test_schema_annotation_contracts.py tests/unit/core/test_audit.py polylogue/schemas/audit_checks.py polylogue/schemas/operator_inference.py polylogue/schemas/generation_models.py polylogue/schemas/tooling_registry.py polylogue/schemas/validator_resolution.py tests/infra/schema_access.py` - `pytest -q tests/unit/core/test_audit.py tests/unit/core/test_sampling.py tests/unit/core/test_schema_generation.py tests/unit/core/test_schema_privacy.py tests/unit/core/test_privacy_guards.py tests/unit/core/test_schema_laws.py tests/unit/core/test_schema_annotation_contracts.py` - `pytest -q tests/property/test_rendering_preservation.py -k json_yaml_agree_on_identity` - `devtools verify`
The schema authoring and audit surface was one of the remaining path-dependent strata. Audit walkers/checks, generation helpers, sampling utilities, validator resolution, and tooling registry seams mixed runtime meaning with broad mapping/object payload flow, while the surrounding tests relied on repeated deep indexing into JSON unions. Rebuilds schema audit walkers/checks around explicit JSON normalization and typed traversal helpers. Tightens generation, sampling, redaction, observation-identity, tooling-diff, validator- resolution, and operator-inference contracts so internal flow stays on modeled payload/document shapes. Widens selected source-side entry contracts only where callers naturally provide schema-like mappings, instead of forcing spurious narrowing at the public edge. Adds shared schema-access helpers for tests and aligns the schema contract/property tests around those helpers. Also suppresses the known Hypothesis filter-too-much false negative in rendering preservation so the verification baseline stays honest and green. Verification: mypy + pytest over schema generation / privacy / sampling / audit / annotation-contract suites; property test for JSON/YAML rendering identity; devtools verify green. Closes #257 Ref #250
The schema authoring and audit surface was one of the remaining path-dependent strata. Audit walkers/checks, generation helpers, sampling utilities, validator resolution, and tooling registry seams mixed runtime meaning with broad mapping/object payload flow, while the surrounding tests relied on repeated deep indexing into JSON unions. Rebuilds schema audit walkers/checks around explicit JSON normalization and typed traversal helpers. Tightens generation, sampling, redaction, observation-identity, tooling-diff, validator- resolution, and operator-inference contracts so internal flow stays on modeled payload/document shapes. Widens selected source-side entry contracts only where callers naturally provide schema-like mappings, instead of forcing spurious narrowing at the public edge. Adds shared schema-access helpers for tests and aligns the schema contract/property tests around those helpers. Also suppresses the known Hypothesis filter-too-much false negative in rendering preservation so the verification baseline stays honest and green. Verification: mypy + pytest over schema generation / privacy / sampling / audit / annotation-contract suites; property test for JSON/YAML rendering identity; devtools verify green. Closes #257 Ref #250
The schema authoring and audit surface was one of the remaining path-dependent strata. Audit walkers/checks, generation helpers, sampling utilities, validator resolution, and tooling registry seams mixed runtime meaning with broad mapping/object payload flow, while the surrounding tests relied on repeated deep indexing into JSON unions. Rebuilds schema audit walkers/checks around explicit JSON normalization and typed traversal helpers. Tightens generation, sampling, redaction, observation-identity, tooling-diff, validator- resolution, and operator-inference contracts so internal flow stays on modeled payload/document shapes. Widens selected source-side entry contracts only where callers naturally provide schema-like mappings, instead of forcing spurious narrowing at the public edge. Adds shared schema-access helpers for tests and aligns the schema contract/property tests around those helpers. Also suppresses the known Hypothesis filter-too-much false negative in rendering preservation so the verification baseline stays honest and green. Verification: mypy + pytest over schema generation / privacy / sampling / audit / annotation-contract suites; property test for JSON/YAML rendering identity; devtools verify green. Closes #257 Ref #250
|
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. |
Summary
Renew the schema generation, audit, and tooling boundary layer around explicit JSON/document contracts instead of loose schema-payload traversal.
Problem
The schema authoring and audit surface was still one of the remaining path-dependent strata in the renewal program. Audit walkers/checks, generation helpers, sampling utilities, validator resolution, and tooling registry seams still mixed runtime meaning with broad mapping/object payload flow, while the surrounding tests relied on repeated deep indexing into JSON unions.
Closes #257
Ref #250
Solution
Verification
mypy tests/unit/core/test_schema_generation.py tests/unit/core/test_privacy_guards.py tests/unit/core/test_schema_privacy.py tests/unit/core/test_sampling.py tests/unit/core/test_schema_laws.py tests/unit/core/test_schema_annotation_contracts.py tests/unit/core/test_audit.py polylogue/schemas/audit_checks.py polylogue/schemas/operator_inference.py polylogue/schemas/generation_models.py polylogue/schemas/tooling_registry.py polylogue/schemas/validator_resolution.py tests/infra/schema_access.pypytest -q tests/unit/core/test_audit.py tests/unit/core/test_sampling.py tests/unit/core/test_schema_generation.py tests/unit/core/test_schema_privacy.py tests/unit/core/test_privacy_guards.py tests/unit/core/test_schema_laws.py tests/unit/core/test_schema_annotation_contracts.pypytest -q tests/property/test_rendering_preservation.py -k json_yaml_agree_on_identitydevtools verify