← Back to Pull requests

feat(sdks): expose ExportOptions include_memory across C, Go, Python, and Node SDKs #3105

Closed
unknown closed this pull request without merging on Nov 27, 2026 09:27 UTC
View on GitHub
unknown unknown commented on Nov 26, 2026 08:35 UTC
Author

TL;DR

Exposes ExportOptions { include_memory } across the C FFI, Go, Python, and Node.js SDKs so callers (including apps/runner) can request full checkpoints while preserving existing disk-only export defaults.

Design doc: https://github.com/boxlite-ai/boxlite/issues/3109

Documentation: [docs/reference/c/README.md](docs/reference/c/README.md), [sdks/go/README.md](sdks/go/README.md), [docs/reference/python/README.md](docs/reference/python/README.md), [docs/reference/nodejs/README.md](docs/reference/nodejs/README.md)

How it works

Every SDK keeps its existing disk-only default and forwards the opt-in memory flag into boxlite::ExportOptions { include_memory }:

  • C FFI (sdks/c): adds CExportOptions { int include_memory; } and boxlite_box_export_with_options (regenerated into boxlite.h via cbindgen); boxlite_box_export delegates with NULL. For example, calling boxlite_box_export_with_options(handle, dest, &opts, cb, user_data, &err) copies opts.include_memory != 0 synchronously before spawning the async export task, so mutating or popping opts after return cannot affect the task.

  • Go (sdks/go): adds ExportOptions { IncludeMemory bool } and Box.ExportWithOptions, reusing the existing export callback bridge (Box.Export delegates with ExportOptions{}).

  • Python (sdks/python): adds include_memory: bool = False (getter/setter + __repr__) to ExportOptions and forwards it in From<PyExportOptions> for ExportOptions.

  • Node.js (sdks/node): adds include_memory: Option<bool> (includeMemory?: boolean in JsExportOptions, re-exported from lib/index.ts) and maps None/false to disk-only.
  • Verification

  • make test:unit:ffi && make lint:c → 161 FFI unit tests passed (including loopback REST drain tests for include_memory=1, NULL, and 0); C lint passed.

  • make test:unit:python && make lint:python → Python unit tests and lint passed.

  • make test:unit:node && make lint:node → 125 Vitest + 48 Rust unit tests passed; Node lint/typecheck passed.

  • make lint:go → passed (make test:unit:go passed 219 top-level tests on e6f2940de; no Go source changes in e388bd874).

  • Pre-commit Quality autofix (fmt + lint checks) passed on e388bd874.

  • Gaps: runtime full capture currently returns Unsupported (or InvalidState when an embedded box is not running with live VM state).
  • Diff: 299 lines (+224 / -75) across 3 files Reviewer: DefeatMan Review duration: 1491m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 299 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.341
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3105"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40% (MEDIUM) · Higher = larger blast radius
    40%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.8% · Safe to merge
    15.8%