AstrBot-Desktop/docs/progress.md

99 行
7 KiB
Markdown

# Development Progress
## Current phase
P01 foundation was merged through Forgejo PR #2 at `885abd1`. P02 is active on `feat/p02-dual-connections`. The second increment is complete: auto-connect validation, operations switch protection, and duplicate server-instance warnings. Real Gateway activation remains blocked until PD-0009 through PD-0012 are resolved.
## Completed
- Read `AGENTS.md`, the architecture, implementation task, and Forgejo predevelopment workflow documents in full.
- Verified the Windows, Git, Node.js, package-manager, WebView2, Rust, Tauri, and MSVC environment.
- Initialized and normalized Git, established `main`, and pushed the baseline without force.
- Completed and merged P00 through Forgejo PR #1 at `b3420e4`.
- Created `feat/p01-foundation` from the merged `main`.
- Added persistent SQLite startup initialization with WAL, busy timeout, foreign-key enforcement, and transactional migrations.
- Added schema v2 with canonical non-sensitive `connection_profiles` metadata.
- Added fresh-database, v1-to-v2, future-version, idempotent reopen, five-Profile, CRUD, and persistent-reopen coverage.
- Added bounded Tauri Profile list/create/update/delete commands.
- Kept UUID and timestamp creation in Rust.
- Rejected credential-bearing URLs, URL query/fragment data, implicit HTTP, invalid certificate fingerprints, malformed IDs, unknown fields, and Token/password/API Key fields.
- Preserved credential references and runtime-managed fields outside the editable P01 input.
- Added strict Zod Schemas for bootstrap and ConnectionProfile IPC payloads.
- Added a basic React Profile management UI for non-sensitive metadata only.
- Added explicit deletion confirmation and browser-safe Tauri IPC fallback.
- Added a redacting tracing writer that sanitizes structured fields and rendered message content.
- Retained tray, close-to-tray, explicit quit, and single-instance behavior.
- Re-exported protocol Schemas without drift.
- Re-ran a real Tauri development startup and reached the Windows executable.
- Rebuilt the Windows release executable and NSIS installer.
- Recorded the Profile boundary in PD-0008 and ADR-0004.
2026-07-19 21:06:24 +08:00
- Verified Forgejo PR #2 was merged at `885abd1553ed8f1428de7118a6f4b59f7e22a45c`.
- Fast-forwarded local `main` to the same remote merge commit without rewriting history.
- Created `feat/p02-dual-connections` from the updated `main`.
- Re-read `AGENTS.md`, the Forgejo workflow, architecture design, and implementation task documents in full for P02.
- Kept the approved HTTP Forgejo URL repository-local and prevented the machine-wide HTTP-to-SSH rewrite from changing this repository's transport.
- Added SQLite schema v3 with exactly two fixed connection slot rows.
- Added foreign-key cleanup so deleting a Profile clears its assigned slot.
- Enforced that one Profile cannot occupy both companion and operations slots.
- Added bounded Rust list/assign/clear slot commands that reject unknown fields and malformed Profile IDs.
- Added strict frontend slot Schemas and a minimal settings UI that does not activate network connections or read credentials.
- Added v1-to-current and v2-to-v3 migration coverage, slot persistence tests, duplicate-assignment tests, and frontend slot interaction coverage.
- Completed the first P02 increment in `bcc08cf`.
- Added auto-connect configuration validation: at most two auto-connect Profiles, distinct slots, and slot required only when auto-connect is enabled.
- Added in-process operations switch guard that blocks operations slot assign/clear while a runtime operations task is active; companion remains free.
- Added duplicate `server_instance_id` warnings without silent Profile merge.
- Exposed `connection_policy_status` IPC for lock status and warnings.
- Extended Profile create/update input with non-secret `autoConnect` and `autoConnectSlot` fields.
- Updated Profile UI for auto-connect controls, operations lock messaging, and duplicate-instance banners.
- Added Rust unit coverage for policy, runtime guards, and locked operations slot switches; extended Vitest coverage for auto-connect save, warning display, and operations select disablement.
## In progress
- No product implementation is currently in progress after the second P02 increment.
## Remaining
2026-07-19 21:06:24 +08:00
- Implement the formal Rust-owned credential lifecycle without returning secret values to React.
- Resolve first-contact server identity confirmation and certificate fingerprint binding without disabling TLS validation.
2026-07-19 21:06:24 +08:00
- Implement two independent configured REST/SSE runtimes only against a reviewed contract; continue using the dual Mock Gateway for deterministic tests.
- Run Forgejo CI when a compatible runner is available.
- Execute a real UNC transaction only after an authorized disposable fixture is supplied.
- Add the combined end-to-end test that keeps configured streams active while the real Tauri window is hidden to tray.
## Blockers
- Configured Forgejo SSH `localhost:18086` refuses connections.
- LAN SSH `192.168.31.210:18086` responds but rejects the available public key.
- Approved HTTP Git push remains operational and is not blocked.
- Forgejo runner labels/jobs could not be verified; the jobs API endpoint returned 404.
2026-07-19 21:06:24 +08:00
- Real AstrBot Gateway endpoints, authentication semantics, token refresh behavior, and server identity guarantees remain unavailable for compatibility verification.
- Certificate fingerprint extraction/pinning behavior must be designed without disabling TLS validation.
- These protocol items do not block the local P02 policy/guard increment.
- Cross-machine handoff is blocked before controller lookup because the global dev-handoff config references a missing VM identity file and missing known-hosts file; host-key verification also fails. No handoff ID or destination workspace exists.
## Test status
- Frontend: Prettier, ESLint, TypeScript, 6 Vitest tests, and Vite production build passed.
- Playwright Chromium: passed 1/1.
- Rust fmt and Clippy with warnings denied: passed.
- `cargo test --workspace`: passed; 63 normal tests, 2 explicit manual tests ignored.
- `cargo check --workspace --all-targets`: passed.
- Changed-file secret scan: passed; no private-key header, long Bearer credential, AWS key, GitHub token, or OpenAI-style key pattern was found.
- Real Tauri development startup and Windows installer build were not rerun for this incremental checkpoint and are not claimed.
## Current branch
2026-07-19 21:06:24 +08:00
`feat/p02-dual-connections`
## Recent commits
- `bcc08cf feat(connection): add persistent dual slot assignment`
- `73693b9 docs(p02): start dual connection phase`
2026-07-19 21:06:24 +08:00
- `885abd1 Merge pull request 'feat(p01): add secure profile foundation and management UI' (#2) from feat/p01-foundation into main`
- `b3420e4 Merge pull request 'feat(p00): bootstrap Tauri desktop and validate high-risk spikes' (#1)`
- `ed74342 feat(foundation): add persistent bootstrap safeguards`
## Next step
Implement the formal credential enrollment/update/delete lifecycle entirely in Rust, with opaque references only in SQLite and React. Do not enable real Gateway connections until PD-0009 through PD-0012 are resolved.