Skip to content

Release iOS SDK v0.8.0 - #543

Merged
rafaelbeckel merged 1 commit into
mainfrom
release/v0.8.0
Oct 5, 2026
Merged

rafaelbeckel merged 1 commit into
mainfrom
release/v0.8.0

Conversation

@rafaelbeckel

@rafaelbeckel rafaelbeckel commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Syncs the Moss and MossRuntimeBridge source targets from the internal repo and points Package.swift at the v0.8.0 xcframework.

  • MossError has code constants and a detail with the core error text, and MossError.code follows the kind of failure. Messages carry no URLs, file paths or index names. loadIndexes reports a code per failed index.
  • Built-in models open faster: the decrypt and verify steps for moss-minilm take about 0.14 s instead of 1.85 s on an Apple M2.
  • MossSession.addDocs embeds large calls in batches: 5,000 short captions take about 20 s and 0.6 GB instead of 119 s and 9.1 GB.
  • close() and deinit deliver the final usage telemetry within 2 seconds, and failed uploads are retried.
  • A query against stored vectors of another length throws internalError instead of scoring those documents 0.
  • Breaking: range filters compare plain decimals as numbers and other values as text.
  • Native runtime sdkVersion: 0.24.0, built from usemoss/moss-sdks-internal@8cf787a2.
  • xcframework checksum: 4695db715bfbcfdd0d358fa7e0666e3d5be93e3d78af4779a785b522478ae338

Merge before publishing the draft release so the tag carries the matching sources and manifest.

🤖 Generated with Claude Code

Review in cubic

Summary by CodeRabbit

  • New Features
    • Errors now include standardized error codes and may provide additional diagnostic details.
    • Bulk index-load results now report error codes for individual failures.
  • Bug Fixes
    • Document IDs containing null characters are now rejected, and missing native results produce clearer errors.
    • Error details from native operations are preserved when available.
  • Documentation
    • Clarified model restoration, index refresh intervals, sorting order, and final telemetry delivery when closing clients or sessions.
  • Updates
    • Updated the Swift SDK framework to version 0.8.0.

…bfbcfdd0d358fa7e0666e3d5be93e3d78af4779a785b522478ae338)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ed20d5b9-5f16-4935-a686-406d8fbad8f9
📥 Commits

Reviewing files that changed from the base of the PR and between 8b17884 and d3528e3.

📒 Files selected for processing (7)
  • Package.swift
  • sdks/swift/Sources/Moss/MossClient.swift
  • sdks/swift/Sources/Moss/MossError.swift
  • sdks/swift/Sources/Moss/MossSession.swift
  • sdks/swift/Sources/Moss/MossTypes.swift
  • sdks/swift/Sources/MossRuntimeBridge/MossRuntimeBridge.c
  • sdks/swift/Sources/MossRuntimeBridge/include/MossRuntimeBridge.h

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


📝 Walkthrough

Walkthrough

The Swift package now uses the v0.8.0 framework archive. The Swift SDK adds named error codes, optional native error details, and per-index load error codes. Client and session code updates error handling, and API documentation describes model loading and polling behavior.

Changes

Swift SDK error reporting

Layer / File(s) Summary
Error contracts and runtime bridge
sdks/swift/Sources/Moss/MossError.swift, sdks/swift/Sources/Moss/MossTypes.swift, sdks/swift/Sources/MossRuntimeBridge/*, Package.swift
MossError adds named error codes and optional diagnostic details. LoadIndexesResult adds per-index error codes. The runtime bridge exposes native error details and failed-index codes, and the MossC target uses the v0.8.0 archive.
Client error handling and load results
sdks/swift/Sources/Moss/MossClient.swift
MossClient uses named error codes, reports missing results with an internal error, includes available native error details, validates document IDs for embedded NULs, and returns nonzero per-index failure codes.
Session errors and API guidance
sdks/swift/Sources/Moss/MossSession.swift, sdks/swift/Sources/Moss/MossTypes.swift
MossSession uses named error codes and the missing-result helper. Documentation covers model adoption, polling intervals, telemetry, and ordering behavior.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to d3528

No actionable issue was established in the Swift SDK changes. Confirm the published archive and checksum as part of the release workflow.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to d3528

The inspected Swift changes preserve existing access and resource controls and improve input validation. However, the bundled native release could not be inspected, leaving diagnostic privacy, batch-failure recovery and cleanup guarantees incompletely verified. No introduced security vulnerability was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The visible changes affect applications consuming this SDK, their caller-visible diagnostics, and existing local and cloud index operations. The inspected Swift diff adds read-only diagnostic/result accessors rather than new privileged operations. Native enforcement across projects and stored assets was not independently verified.

Trust Boundaries and Controls

  • observed — Caller-controlled index names and document IDs retain embedded-NUL checks before native operations. The PR extends document-ID checks to JSON-based createIndex and addDocs, reducing identifier inconsistencies with C-string deletion. Session creation and mutation retain identity-bound runtime availability checks.

Resilience and Maintainability Implications

  • inferred — The visible wrapper preserves handle cleanup on ordinary returns and thrown failures. It does not expose batch progress or implement rollback when addDocs fails, and pushIndex can publish the resulting in-memory state. Whether the new batching preserves state after partial failure, interruption, repetition or concurrent mutation therefore remains a native-runtime verification gap, not an established regression.

Hardening Proposals

  • proposed — Keep diagnostic detail out of default user-facing responses and automatic telemetry. Where applications log it for support, apply explicit redaction and access controls rather than treating message/detail separation as a sanitization guarantee.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 34.21% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 38 functions across 7 files. 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 identifies the v0.8.0 SDK release, which matches the changes to the Swift SDK and its framework dependency.
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.
  • 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
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Codex review

The Swift error-code cleanup is mostly mechanical, but the new C bridge accessor can break compatibility with headers that expose error details without the multi-index structs.

Findings:

  • sdks/swift/Sources/MossRuntimeBridge/MossRuntimeBridge.c:260 BLOCKING The feature gate only checks MOSS_ERROR_DETAIL_API_VERSION, but the body also names MossLoadIndexesResult and reads failed_codes, which are part of the multi-index result shape. With a libmoss header that has error-detail support but not the multi-index API, this file will not compile. Gate on both APIs before touching the struct:
#if defined(MOSS_MULTI_INDEX_API_VERSION) && MOSS_MULTI_INDEX_API_VERSION >= 1 && \
    defined(MOSS_ERROR_DETAIL_API_VERSION) && MOSS_ERROR_DETAIL_API_VERSION >= 1

and keep the existing return 0 fallback in the #else branch.

@rafaelbeckel
rafaelbeckel requested a review from grygoryz October 5, 2026 18:33

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files

Reply to a comment to ask cubic a question or push back. It learns from your replies.

Re-trigger cubic

Comment thread sdks/swift/Sources/MossRuntimeBridge/MossRuntimeBridge.c
Comment thread sdks/swift/Sources/Moss/MossClient.swift
Comment thread sdks/swift/Sources/MossRuntimeBridge/include/MossRuntimeBridge.h
Comment thread sdks/swift/Sources/MossRuntimeBridge/include/MossRuntimeBridge.h
@rafaelbeckel
rafaelbeckel merged commit a3ae0c7 into main Oct 5, 2026
26 checks passed
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.

2 participants