Skip to content

fix: distinguish Python schema extensions from official contracts - #31

Merged
TonisOrmisson merged 1 commit into
mainfrom
fix/schema-extension-contracts
Sep 10, 2026
Merged

TonisOrmisson merged 1 commit into
mainfrom
fix/schema-extension-contracts

Conversation

@TonisOrmisson

@TonisOrmisson TonisOrmisson commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Alignment block 1. Emit Python-owned schema-change plan/frontend identifiers; accept legacy serialized plan IDs without rewriting their canonical bytes, hashes, operations or historical audits. Official Plan 0.1/0.2 boundaries remain unchanged. Documentation covers upgrade ordering and older-reader incompatibility. No version bump or publication.

Validation: 420 passed, 9 skipped, 53 deselected (nonservices), focused 121 passed, compileall and diff check passed. Exact specification 864e844. Independent read-only review: No findings. Service CI remains required.

Summary by CodeRabbit

  • New Features

    • Schema-changing plans and SPSS output now use dedicated Python extension contract identifiers.
    • Existing legacy schema-change plans remain supported with unchanged semantics, canonical JSON, hashes, and stored audit records.
    • Recompiling schema-changing syntax produces the new plan identity and hash.
  • Documentation

    • Clarified supported transformation plans, SPSS frontend coverage, contract ownership, and legacy compatibility.
    • Documented that no migration is required for existing stored audits.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 71dbcb4d-bcc4-4a04-a70d-dc8ff866e08c

📥 Commits

Reviewing files that changed from the base of the PR and between e772089 and 1a4dbdb.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • docs/transformations.md
  • src/openstatspec/frontends/spss/compiler.py
  • src/openstatspec/transform/plan.py
  • tests/test_inplace_transform.py
  • tests/test_transform_frontend.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change assigns Python-owned identifiers to schema-change plans and SPSS output. It preserves legacy v0.3 plan loading, canonical serialization, hashes, and stored audits. Tests cover contract validation, round trips, compilation, and in-place application.

Changes

Schema-change contract compatibility

Layer / File(s) Summary
Define Python-owned contracts
src/openstatspec/transform/plan.py, src/openstatspec/frontends/spss/compiler.py, docs/transformations.md, CHANGELOG.md
The code defines Python-owned plan and SPSS contract identifiers. Documentation and changelog entries describe official contract ownership and legacy compatibility.
Validate current and legacy plans
src/openstatspec/transform/plan.py, tests/test_transform_frontend.py
Validation accepts the new and legacy schema-change contracts. Official Plan 0.1 and 0.2 contracts reject schema operations. Legacy plans retain canonical JSON and hashes, while relabeling produces a new hash.
Preserve apply and audit compatibility
tests/test_inplace_transform.py
In-place schema changes preserve dataset and table identity. Tests verify audit rows, frontend contract recording, legacy plan application, and later SPSS schema changes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1a4db

Schema-changing SPSS plans now use Python-owned identifiers while legacy plans remain compatible and historical hashes and audits are preserved. The change is ready to merge pending normal CI.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (2 skipped: 2… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: separating Python-owned schema extensions from official contracts.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 4 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/schema-extension-contracts

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.

@TonisOrmisson
TonisOrmisson merged commit 200a421 into main Sep 10, 2026
29 checks passed
@TonisOrmisson
TonisOrmisson deleted the fix/schema-extension-contracts branch September 10, 2026 14:01
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.

1 participant