Skip to content

[CTX-0014] feat(ipc): allow optional snapshot_version in ai params - #32

Merged
Xuepoo merged 1 commit into
mainfrom
carryctx/ctx-0014
Oct 16, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
carryctx/ctx-0014

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

bitty-ipc#31: optional u64 snapshot_version allow-listed on all 13 ai.* params validators via one helper. No flips, no enforcement change. Endpoint tripwire/pin-bump follows in bitty-ai.\n\nReview: APPROVE (PX-0045 ctx-0014-reviewer).\nGates: just check + just check-all-features, green.\n\nPriority: P2 | Area: ipc | Labels: feat,P2 | Milestone: v0.1.0 | RFC: AIQ-38 | Task: CTX-0014 | Closes: #31

Summary by CodeRabbit

  • New Features
    • AI requests can now include an optional snapshot version. The value must be an unsigned integer; requests without it remain accepted.
  • Bug Fixes
    • Invalid snapshot version values, duplicate keys, and unrelated unknown fields continue to be rejected.
  • Documentation
    • Clarified snapshot version handling and the fallback when it is omitted. Enforcement of the value remains unchanged.

Allow-list one optional u64 snapshot_version on all 13 ai.* params
validators via one helper. No flips, no enforcement change. Closes
bitty-ipc#31; endpoint tripwire/pin-bump follows in bitty-ai.

Review: APPROVE (PX-0045 ctx-0014-reviewer).
Gates: just check + just check-all-features, green.

Priority: P2 | Area: ipc | Labels: feat,P2 | Milestone: v0.1.0
RFC: AIQ-38 | Task: CTX-0014 | Closes: #31
@Xuepoo Xuepoo added this to the v0.1.0 milestone Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc5974ea-87b7-485f-b80d-6e736b05c0c6
📥 Commits

Reviewing files that changed from the base of the PR and between 44fd1fd and d67c393.

📒 Files selected for processing: 2
  • crates/bitty-ipc-api/src/schema.rs
  • docs/s2-wiring-batch1.md

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

📝 Walkthrough

The IPC schemas for all 13 ai.* methods now accept an optional top-level snapshot_version as a u64. The change validates its shape but does not add enforcement. Other unknown fields, duplicate keys, and nested or result placements remain rejected.

Changes: AI params snapshot_version allowance

Layer / File(s) Summary
Allow and validate snapshot_version
crates/bitty-ipc-api/src/schema.rs
All 13 ai.* params schemas allow an optional top-level snapshot_version and validate present values as u64. Existing unknown-field checks remain.
Test and document the allowance
crates/bitty-ipc-api/src/schema.rs, docs/s2-wiring-batch1.md
Tests cover absent and present values, numeric bounds, malformed and duplicate values, nested placement, and unrelated unknown fields. The wiring note records the allowance and separate follow-up work.

Priority: ⬇️ Low

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

Change: Feature

Merge Risk: ⚪ Minimal · up to d67c3

This change lets AI method params carry an optional snapshot_version without changing enforcement. The supplied context shows no merge-blocking risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 31.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 1 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed 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: allowing an optional snapshot_version in AI parameter schemas.
Linked Issues check Passed Issue #31 requires an optional top-level u64 snapshot_version in the params schemas for all 13 ai.* methods. The supplied change summary reports one shared helper and coverage for all 13 methods…
Out of Scope Changes check Passed The changes stay within issue #31 scope. The schema change implements the per-method allow-list entries. The added tests verify the required acceptance and refusal behavior. The documentation records …
Full details: Linked Issues check

Explanation

Issue #31 requires an optional top-level u64 snapshot_version in the params schemas for all 13 ai.* methods. The supplied change summary reports one shared helper and coverage for all 13 methods. It also reports full u64 boundary checks, refusal of malformed values, duplicate keys, nested placement, and unrelated unknown fields. The reviewed schema source documents that the field is params-only and that other unknown fields remain refused. No enforcement change is reported.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #31 scope. The schema change implements the per-method allow-list entries. The added tests verify the required acceptance and refusal behavior. The documentation records the allowance and identifies the separate bitty-ai follow-up. No unrelated product behavior or enforcement change is evidenced.

Full details: Docstring Coverage

Explanation

Docstring coverage is 31.82% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 1 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@Xuepoo
Xuepoo merged commit f201911 into main Oct 16, 2026
11 checks passed
@Xuepoo
Xuepoo deleted the carryctx/ctx-0014 branch October 16, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CTX-0014] feat(ipc): allow optional snapshot_version in ai.* params schemas

1 participant