3.8 KiB
3.8 KiB
P02 dual-slot checkpoint and handoff
Date: 2026-07-19
Source state
- Branch:
feat/p02-dual-connections - Base merge:
885abd1553ed8f1428de7118a6f4b59f7e22a45c - Planning commit:
73693b9 docs(p02): start dual connection phase - Feature commit:
bcc08cf feat(connection): add persistent dual slot assignment - Remote transport: approved ordinary Forgejo HTTP push
- Force push, rebase, and automatic main merge: not used
Completed scope
- SQLite schema v3 creates exactly two fixed rows:
companionandoperations. - A foreign key clears slot assignment when a Profile is deleted.
- A unique Profile constraint prevents one Profile from occupying both slots.
- Rust exposes bounded list, assign, and clear commands.
- Slot requests reject unknown fields, malformed Profile IDs, missing Profiles, and duplicate cross-slot assignment.
- The frontend validates Rust payloads with strict Zod Schemas.
- The settings UI assigns or clears Profiles without activating REST/SSE or reading credentials.
- Stored
server_instance_idis displayed as metadata only; the increment does not enroll or silently replace server identity.
Security boundary
- No Token, password, API Key, Cookie, Authorization header, or NAS credential field was added to slot IPC.
- Slot assignment alone grants no local-tool permission.
- React does not receive stored credentials.
- Real Gateway compatibility, token refresh, identity enrollment, and certificate pinning remain explicitly unresolved in PD-0009 through PD-0012.
Verification
npm.cmd --prefix H:\AstrBot-Desktop run check:frontend: passed.- Prettier: passed.
- ESLint: passed.
- TypeScript: passed.
- Vitest: 4 passed.
- Vite production build: passed.
npm.cmd --prefix H:\AstrBot-Desktop run test:e2e: passed, Chromium 1/1.cargo fmt --all --manifest-path H:\AstrBot-Desktop\Cargo.toml -- --check: passed.cargo clippy --workspace --all-targets --manifest-path H:\AstrBot-Desktop\Cargo.toml -- -D warnings: passed.cargo check --workspace --all-targets --manifest-path H:\AstrBot-Desktop\Cargo.toml: passed.cargo test --workspace --manifest-path H:\AstrBot-Desktop\Cargo.toml: passed, 56 normal tests and 2 explicit manual tests ignored.- Changed-file high-risk secret pattern scan: passed with no matches.
Not rerun at this incremental checkpoint:
- real Tauri development startup;
- Windows release or NSIS build;
- Forgejo Actions;
- real AstrBot Gateway compatibility;
- real UNC file transaction.
No success is claimed for the items above.
Remaining P02 work
- Add auto-connect validation for at most two Profiles and one Profile per slot.
- Block Operations Profile switching while an operations task is active.
- Add duplicate
server_instance_idwarnings without silent identity merging. - Resolve the credential enrollment and rotation lifecycle.
- Resolve first-contact server identity confirmation.
- Implement validated certificate fingerprint binding without disabling TLS verification.
- Only then enable two independent configured REST/SSE runtimes and Mock-backed failure tests.
Handoff status
The first controller status call failed before project lookup because the global dev-handoff config references missing files:
- identity file:
C:\Users\Administrator\Documents\Codex\2026-07-14\ke\work\ssh\astrbot_vm_ed25519 - known-hosts file:
C:\Users\Administrator\Documents\Codex\2026-07-14\ke\work\ssh\known_hosts
The controller also reported host-key verification failure. No handoff ID, VM workspace, branch, or HAPI session has been created or claimed.
Next concrete step
Restore or reconfigure the authorized VM SSH identity and known-hosts paths, rerun dev-handoff status, then send this exact pushed checkpoint to vm-codex. If the controller stops at ready_to_accept, report that state honestly and wait for the VM worker.