feat(api): add full checkpoint persistence, capability flag, admission, and restore routing #3107
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 227 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.325
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3107"
general
weight: 0.35
DefeatMan
TL;DR
Adds
apps/apipersistence,MEMORY_CHECKPOINTS_ENABLEDgating and deployment forwarding, source-state/capability admission, archivekindvalidation, and runner capability routing forfullcheckpoints, remaining disabled by default.Design doc: https://github.com/boxlite-ai/boxlite/issues/3109
Documentation: [docs/contributing/architecture/platform/api.md](docs/contributing/architecture/platform/api.md), [docs/contributing/architecture/platform/schema.md](docs/contributing/architecture/platform/schema.md), [apps/api/README.md](apps/api/README.md), [apps/infra/docs/configuration.md](apps/infra/docs/configuration.md)
How it works
A pre-deploy migration adds
kind(default'disk') and nullablememorySizeBytestocheckpoint.apps/infra(mstage.env.jsonandmdeploy/stack/index.ts) forwards optionalMEMORY_CHECKPOINTS_ENABLED(default'false') to the API, andGET /v1/configexposesmemory_checkpoints_enabled. When enabled,CheckpointServicerequiresSTARTEDboxes (409 invalid_stateotherwise) and a source runner withmemory_checkpoint(400 unsupportedotherwise), emitskindon export/import jobs, normalizes omitted callbackkindto'disk'when validating export/upload archives, and persists/returnsmemory_size_bytes.Verification
cd apps/infra && npm run --silent typecheck:mdeploy && npm exec -- tsx --conditions=development --test mdeploy/test/api-environment.test.ts mdeploy/test/stack.test.ts→ passed (121/121).cd apps && yarn nx run api:build:production --skipTypeChecking=false&yarn nx run api:lint→ passed.make test:apps:api TEST_FILES="checkpoint|box-state-waiter"→ 4 unit suites, 81 passed.DB_HOST/REDIS_HOST(covered by CI).