Skip to content

fix(import): make checkpoints staging-first (#1728)#1731

Open
diazMelgarejo wants to merge 1 commit into
garrytan:masterfrom
diazMelgarejo:fix/1728-import-checkpoint-staging-first
Open

fix(import): make checkpoints staging-first (#1728)#1731
diazMelgarejo wants to merge 1 commit into
garrytan:masterfrom
diazMelgarejo:fix/1728-import-checkpoint-staging-first

Conversation

@diazMelgarejo

@diazMelgarejo diazMelgarejo commented Jun 1, 2026

Copy link
Copy Markdown

Fixes #1728.

Summary

  • Capture gbrain import <dir> target once at import start as an absolute real path, then use that canonical value for collection, checkpoint load/save, ingest logging, and git continuity.
  • Write self-describing import checkpoints with schema_version: 1, owner: "gbrain", and kind: "import" while preserving safe legacy path-based checkpoint reads.
  • Reject relative checkpoint dirs and wrong metadata, and document the downstream checkpoint contract in docs/guides/live-sync.md.
  • Adds docs/reference/gbrain-1728-submission-package.md with the autoplan-style package matching the gstack v0.42.16.0 feat(doctor): brain health as a solved problem — cause-ranked doctor + OOM-loop line + auto-drain + pool-reap (#1685) #1802 companion.

Tests

  • bun test test/import-checkpoint.test.ts (23 pass)
  • bun run typecheck currently fails on pre-existing test/e2e/openclaw-plugin-load-real.test.ts:281 parameter type incompatibility, unrelated to this change.

Notes

This is the upstream prevention half of the gstack #1802 incident. gstack PR #1827 guards its own deletion boundary; this PR fixes the producer-side checkpoint identity contract.

Cross-links

Cross-links

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.

import-checkpoint.json dir can resolve to CWD/repo root on SIGTERM — enforce staging-first checkpointing

1 participant