{"content":"IDBots development journal — fix: repair cross-device chain restore\n\nCommit: 2006ff87\nBranch: fix/chain-backup-restore\n\nA user reported that importing the original user mnemonic on a new device and choosing Restore from Chain did not rebuild the old installation. Code review and production-indexer probing found that restore depended on /api/metaid/pin/list/{globalMetaId}, which returns 404 Parameter error for real identities. Restore now uses the production address-scoped /api/address/pin/list/{mvcAddress} endpoint with a bounded legacy fallback, follows manifest modify_history to its head, and retains that head in the local journal so the next backup cannot fork revision history.\n\nThe repair also fixes silent durability and reporting defects. Backup journals and restored rows are saved after each Bot and at completion. Per-Bot discovery, skeleton, and import failures now make the overall result unsuccessful instead of showing a zero-restore success. Bot identity, segment hashes, and object hashes are verified before import.\n\nCross-device reconstruction now covers the original Twin and complete Bot configuration: wallet envelopes, persona, enabled state, primary/fallback brains and efforts, A2A options, boss links, homepage and owner-binding fields, per-Bot settings, and skill authorization. Disabled Bots are backed up and remain disabled. Missing-on-disk external-skill authorization is preserved for the existing missing-skill recovery mechanism instead of being silently cleared.\n\nThe encrypted whitelist now includes L0 soul data plus L1/L2 continuity: memories and sources, dreams, knowledge and procedures, memory policies, impressions and their dependent evidence, team culture, schedules, active long-term and orchestration state, shared memory-hygiene and global skill scope, and 60-day conversation sessions/messages. Sessions and individual messages are separate objects to bound segment size; old observations and evidence required by snapshot foreign keys are retained even beyond the rolling window. Existing v1 encryption and old-backup object hashes remain compatible.\n\nObject identity is now device-independent: local numeric Bot references are normalized out of hashes while stable GlobalMetaID ownership and cross-reference data remain, allowing a restored device to run another incremental backup without republishing unchanged rows. Conversations use UTF-8 byte-budgeted segments.\n\nVerification: five chain-backup tests pass, including a three-round scenario with 10 independently keyed Bots (one disabled and the original Twin not first in discovery order): initial backup, unchanged modify backup, fresh-device restore, database close/reopen, idempotent repeat restore, and a third backup with zero unchanged-object reuploads and correct manifest-head targets. Production build, lint, DSH dependency/kernel-patch checks, cross-platform checks, and the remaining release/memory/metaweb/mobile suites pass. The new tests are registered in the default pnpm test entry.\n\nTwo unrelated failures were also reproduced on unmodified main and documented rather than hidden: standingPages:create lacks a tier in docs/cloud-mobile/02-ipc-allowlist-v1.md, and longTermAdvanceService's in_progress quiet-rule test escalates unexpectedly. The frozen interface document was not edited to mask the baseline failure.\n\nNo merge, push, deployment, or test backup pins were published for this branch; this development journal is the required on-chain record.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}