From 6a1eeabea882da2a862a40fd617751cb0a1cc4ae Mon Sep 17 00:00:00 2001 From: YokiiroBW Date: Sat, 18 Jul 2026 22:21:04 +0800 Subject: [PATCH] docs(p01): record foundation progress and profile boundary --- CHANGELOG.md | 4 ++ docs/decisions/pending-decisions.md | 12 +++++ docs/implementation-plan.md | 27 ++++++++++- docs/progress.md | 29 ++++++++---- docs/reports/p01-foundation-progress.md | 61 +++++++++++++++++++++++++ 5 files changed, 123 insertions(+), 10 deletions(-) create mode 100644 docs/reports/p01-foundation-progress.md diff --git a/CHANGELOG.md b/CHANGELOG.md index a089a03..f7b1308 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and - Provisional desktop-v1alpha1 Rust types, TypeScript exports, ten JSON Schemas, drift checks, and two loopback-only Mock Gateway instances. - Frontend, browser, Rust, integration, Windows provider, soak, and Forgejo CI test entry points. - P00 dependency review and durable Spike result records. +- Persistent SQLite application-data initialization with transactional `user_version` migration and future-version rejection. +- Strict Zod validation for the Rust bootstrap IPC payload, including the active database schema version. +- Redacting tracing output writer with structured-field, bearer-token, URL-credential, private-key, and known-secret coverage. +- P01 migration, logging, IPC validation, real Tauri startup, and production-build verification. ### Security diff --git a/docs/decisions/pending-decisions.md b/docs/decisions/pending-decisions.md index 5783ed4..dc60a73 100644 --- a/docs/decisions/pending-decisions.md +++ b/docs/decisions/pending-decisions.md @@ -50,3 +50,15 @@ - Implementation: the identity is configured only in this repository. - Result: two Conventional Commit baseline commits were created on `main`, pushed normally, and followed by scoped feature-branch commits. - Safety impact: no global Git identity was changed. + +## PD-0008: Profile CRUD stage ownership + +- Status: unresolved; blocks Profile CRUD implementation only +- Conflict: `docs/01_Architecture_Design.md` lists Profile CRUD in stage 1, while `docs/02_Codex_Implementation_Tasks.md` lists ConnectionProfile CRUD in Batch 2. +- Impact: resolving this changes the database schema, Tauri IPC surface, frontend state model, and the acceptance boundary between `feat/p01-foundation` and `feat/p02-dual-connections`. +- Safe current action: complete only the unambiguous P01 foundation work��persistent migrations, validated bootstrap IPC, redacted logging, tray, single-instance, exit flow, and tests. +- Paused work: profile tables, Profile CRUD commands, profile forms, and profile-to-slot assignment. +- Required decision: + - Option A: architecture document wins; implement basic Profile CRUD in P01 and leave slot assignment/connection behavior for P02. + - Option B: implementation task batching wins; keep all ConnectionProfile CRUD in P02. +- Recommendation: Option A is the literal higher-priority document, but the implementation remains paused because AGENTS.md requires explicit reporting for conflicts affecting database structure or public interfaces. diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index c7e78c5..1ee495c 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -1,4 +1,6 @@ -# P00 Bootstrap Implementation Plan +# Implementation Plan + +## P00 Bootstrap (completed) ## Objective @@ -30,7 +32,28 @@ Establish a reproducible Tauri 2 + React + TypeScript + Rust baseline and comple - Rust/MSVC/Tauri are verified and no longer block local work. - Git Credential Manager reauthentication succeeded and the non-forced HTTP push created the remote `main` baseline at `0d12b94`. -- Development is active on `feat/p00-bootstrap`; the remaining repository handoff step is a normal push of this feature branch. +- Forgejo PR #1 merged P00 into `main` at `b3420e4`; development now continues on `feat/p01-foundation`. - The configured SSH fetch endpoint still refuses connections and the LAN SSH endpoint rejects the available key, but the approved HTTP push URL is operational. - Forgejo runner labels/jobs remain unverified, so the committed workflow is not claimed successful. - Real UNC execution still requires a user-authorized disposable fixture. + +## P01 Foundation (active) + +### Objective + +Turn the P00 Spike skeleton into a durable application foundation without pulling Batch 2 connection-profile behavior forward across an unresolved document boundary. + +### Ordered work + +1. Initialize a persistent SQLite database in the Tauri application-data directory. +2. Apply versioned, transactional, idempotent migrations and refuse unknown future schema versions. +3. Validate Rust-to-TypeScript bootstrap payloads at runtime. +4. Ensure tracing output passes through the shared redaction rules before it reaches a writer. +5. Re-verify tray, single-instance, explicit exit, frontend, Rust, E2E, development startup, and production build behavior. +6. Record the Profile CRUD stage conflict before changing its schema or IPC. + +### Paused boundary + +- `docs/01_Architecture_Design.md` places Profile CRUD in stage 1. +- `docs/02_Codex_Implementation_Tasks.md` places ConnectionProfile CRUD in Batch 2. +- Because this changes database structure and public IPC, Profile CRUD remains paused under PD-0008 until the stage boundary is explicitly resolved. diff --git a/docs/progress.md b/docs/progress.md index 98321be..ac108f7 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -2,7 +2,7 @@ ## Current phase -P00 bootstrap implementation and high-risk Spike verification is complete; the feature branch is published and awaiting user PR review. +P01 foundation is active on `feat/p01-foundation`; unambiguous foundation work is implemented, while Profile CRUD is paused on a documented stage-boundary conflict. ## Completed @@ -21,15 +21,23 @@ P00 bootstrap implementation and high-risk Spike verification is complete; the f - Added frontend, Playwright, Rust, integration, Windows-provider, soak, and Forgejo CI entry points. - Built the Windows release executable and SHA-256-recorded NSIS installer. - Added dependency, Spike, progress, changelog, and pending-decision records. +- Verified Forgejo PR #1 merged into `main` as `b3420e4`. +- Fast-forwarded local `main` and created `feat/p01-foundation` from the merged baseline. +- Added persistent SQLite startup initialization with WAL, busy timeout, transactional `user_version` migration, idempotent reopen, and future-version rejection. +- Added strict Zod validation for the Rust bootstrap IPC payload and exposed the active database schema version. +- Added a redacting tracing writer that sanitizes structured fields and rendered message content before output. +- Verified a real Tauri development start created the application database in the Windows app-data directory. +- Built the P01 Windows release executable and NSIS installer. - Committed the implementation, test, and CI increments with Conventional Commit subjects. ## In progress -- Preparing the final PR draft and handoff report without merging `main`. +- Recording the Profile CRUD stage conflict and preparing the verified P01 foundation increment for remote review. ## Remaining -- Open and review the Forgejo PR from `feat/p00-bootstrap` to `main`; do not merge automatically. +- Resolve whether Profile CRUD belongs in P01 (architecture document) or P02/Batch 2 (implementation task document) before changing its database schema or public IPC. +- After resolution, complete the selected stage scope and open a PR without automatically merging `main`. - Run the Forgejo workflow 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. @@ -39,24 +47,26 @@ P00 bootstrap implementation and high-risk Spike verification is complete; the f - Configured Forgejo SSH `localhost:18086` refuses connections. - LAN SSH `192.168.31.210:18086` responds but rejects the available public key. - HTTP Git push is operational after Git Credential Manager reauthentication and is no longer a blocker. +- Profile CRUD stage ownership conflicts between the architecture and implementation task documents; implementation is paused because it affects database structure and public IPC. - Forgejo runner labels/jobs could not be verified; the jobs API endpoint returned 404. ## Test status -- `pnpm check:frontend`: passed; 1 Vitest test and production Vite build. +- `npm run check:frontend`: passed; 2 Vitest tests and production Vite build. - `pnpm test:e2e`: passed; 1 Chromium smoke test. - Rust fmt/check/Clippy with warnings denied: passed. -- `cargo test --workspace`: 40 passed, 2 explicit manual tests ignored. +- `cargo test --workspace`: 44 passed, 2 explicit manual tests ignored. - Controlled Windows UIA/PrintWindow smoke: 1 passed. - Corrected dual-SSE soak: 1800.02 seconds, 1800 companion events, 1801 operations events, passed. - Protocol Schema drift check: passed. -- Tauri development smoke, release executable, and NSIS installer build: passed. +- P01 Tauri development startup and application-data SQLite creation: passed. +- P01 release executable and NSIS installer: passed after repairing the missing official `libsqlite3-sys` binding cache; installer SHA-256 `B8858CBE2F4673FAF40799C1243BCAB0748D194FA3AD67FBD33DDCF26CF27189`. - pnpm 11.9.0 frozen lockfile-only validation: passed using a local temporary store to avoid the pnpm UNC project-registry limitation. - Forgejo CI and a real UNC transaction were not executed and are not claimed successful. ## Current branch -`feat/p00-bootstrap` +`feat/p01-foundation` ## Recent commits @@ -65,8 +75,11 @@ P00 bootstrap implementation and high-risk Spike verification is complete; the f - `01607c6 feat(p00): add Tauri desktop spike foundation` - `69b432b test(p00): add frontend browser rust and windows checks` - `d4af979 ci(forgejo): add portable and windows quality workflows` +- `72a16cb docs(p00): record Forgejo branch publication` +- `b3420e4 Merge pull request 'feat(p00): bootstrap Tauri desktop and validate high-risk spikes' (#1)` +- `ed74342 feat(foundation): add persistent bootstrap safeguards` - `353a439 docs(p00): record spike results and unresolved boundaries` ## Next step -Provide the verified test report and PR draft. The user can then review the Forgejo diff and decide whether to merge; `main` remains unchanged by this workflow. +Obtain an explicit decision for PD-0008 before implementing Profile CRUD. Continue other P01 work only if it does not change the disputed profile database or public IPC boundary. diff --git a/docs/reports/p01-foundation-progress.md b/docs/reports/p01-foundation-progress.md new file mode 100644 index 0000000..3815029 --- /dev/null +++ b/docs/reports/p01-foundation-progress.md @@ -0,0 +1,61 @@ +# P01 Foundation Progress Report + +Date: 2026-07-18 + +## Status + +P01 foundation work is partially complete on `feat/p01-foundation`. The unambiguous Batch 1 foundation items are implemented and verified. Profile CRUD is intentionally paused under PD-0008 because the architecture and implementation task documents assign it to different stages. + +## Completed + +- Verified P00 PR #1 merged into `main` at `b3420e4`. +- Fast-forwarded local `main` and created `feat/p01-foundation`. +- Added a persistent SQLite database under the Tauri application-data directory. +- Added WAL mode, a bounded busy timeout, foreign-key enforcement, and transactional `user_version` migration. +- Added idempotent reopen/persistence tests and rejection of databases newer than the supported schema. +- Added the database schema version to the bootstrap IPC response. +- Added strict frontend Zod validation for the IPC payload and a malformed-payload test. +- Added a tracing writer that redacts output before writing. +- Retained the existing tray menu, close-to-tray, explicit quit, and single-instance focus behavior. + +## Verification + +| Check | Result | +| ------------------------------------------------------- | ------------------------------------------------------------------ | +| Frontend format, ESLint, TypeScript, Vitest, Vite build | Passed; 2 Vitest tests | +| Playwright Chromium | Passed; 1 test | +| Rust fmt, Clippy with warnings denied, check | Passed | +| Rust tests | Passed; 44 normal tests, 2 explicit manual tests ignored | +| Persistent SQLite reopen and migration tests | Passed | +| Logging redaction writer test | Passed | +| Tauri development startup | Passed | +| Windows application-data SQLite creation | Passed; database created at startup | +| Tauri release executable | Passed | +| NSIS installer | Passed; 3,793,884 bytes | +| NSIS SHA-256 | `B8858CBE2F4673FAF40799C1243BCAB0748D194FA3AD67FBD33DDCF26CF27189` | + +## Build environment note + +The first release attempts failed because the `libsqlite3-sys` release output directory did not contain `bindgen.rs`, although the crate build script had produced the SQLite static library. Cleaning only that package did not restore the file. + +The official pre-generated `bindgen_bundled_version.rs` from the installed `libsqlite3-sys 0.38.1` crate source was copied to the exact `OUT_DIR/bindgen.rs` location expected by the crate's own `build.rs`. Source and destination SHA-256 values matched: + +`5B5A37A74DC728FB0BCD041867EB577C03C95E2FE46285262C589A3B1CD4BBAC` + +The production build and NSIS bundle then completed. This is recorded as an environment cache repair, not a repository or dependency change. + +## Paused boundary + +Profile CRUD is not implemented in this increment. + +- Architecture stage 1 includes Profile CRUD. +- Implementation Batch 2 includes ConnectionProfile CRUD. +- The conflict affects database structure and public IPC. +- PD-0008 requires an explicit stage-boundary decision before work resumes. + +## Not claimed + +- P01 is not declared complete while PD-0008 is unresolved. +- Forgejo CI has not run. +- No Profile CRUD, profile UI, or slot assignment was added. +- No real credential or destructive file operation was used.