docs(email): record draft API evidence
This commit is contained in:
@@ -549,3 +549,13 @@
|
||||
- **Consequences:** daily JSON exports now contain draft bodies under the same filesystem-at-rest protections and retention policy as correspondence. SEC-009 must explicitly delete live drafts and define backup/export retention; no export schema version was broken because the collection is additive.
|
||||
- **User approval required:** No; this is a repository-local privacy prerequisite using synthetic data and existing export authority.
|
||||
- **Reversible:** Revert `2fa4e38`; stored drafts remain unchanged, but draft UI/API must not ship without another readable export path.
|
||||
|
||||
## DEC-056 — Keep draft saves incomplete, bounded and provider-inert
|
||||
|
||||
- **Date:** 2026-08-10
|
||||
- **Decision:** Expose local-authenticated draft CRUD under `/api/email/drafts`. Require an owned job and registered provider at creation, allow incomplete recipient/subject/body for autosave, keep provider/thread/job immutable, and require a matching revision for updates/deletes.
|
||||
- **Reason/evidence:** refresh recovery must preserve work before send fields are complete, while provider/thread provenance must not silently change. Atomic revision predicates prevent last-write-wins loss; explicit owner clauses plus global filters deny foreign job and direct draft IDs in real SQLite tests.
|
||||
- **Alternatives considered:** require send-valid content on every save; contact the provider during save; allow provider/thread changes; use unconditional updates; hide foreign rows only in UI. These break autosave/offline recovery, add side effects, weaken provenance, lose concurrent edits or fail authorization.
|
||||
- **Consequences:** saving never sends or checks connection state. Send still uses the separate explicit-confirmed/idempotent boundary and revalidates all fields/provider consent. UI must surface revision conflicts and treat bodies as untrusted plain text.
|
||||
- **User approval required:** No; this is approved local MAIL-001 work with synthetic data and no provider/production action.
|
||||
- **Reversible:** Revert `a9bb22e`; the inert/exported schema remains for a later UI. Existing stored drafts are unaffected.
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
Updated: 2026-08-10
|
||||
|
||||
- **Overall programme status:** Active. Seven packages are locally verified; nineteen packages through CAREER-002 are implemented with automated/runtime evidence but blocked from applicable browser/provider/production gates; MAIL-001 is in progress with sixteen committed implementation/test increments. Gitea run 609 passes complete pull-request CI in 4m20s; DEP-001 now awaits approved merge-to-main and production verification only.
|
||||
- **Current work package:** `MAIL-001` — consolidated job-email hub and explicit sending (`IN PROGRESS`); routing/reads/detail, ledger, Gmail/Graph delivery/re-consent, safe send API/UI, recovery, legacy SMTP retirement, send/draft export and inert tenant-owned draft persistence are committed. Application context, confirmed Gmail unlink and honest disconnected/read-only/send/failure states are shared. Bounded draft API/UI and provider mailbox mutations remain; full account deletion stays SEC-009.
|
||||
- **Overall programme status:** Active. Seven packages are locally verified; nineteen packages through CAREER-002 are implemented with automated/runtime evidence but blocked from applicable browser/provider/production gates; MAIL-001 is in progress with seventeen committed implementation/test increments. Gitea run 609 passes complete pull-request CI in 4m20s; DEP-001 now awaits approved merge-to-main and production verification only.
|
||||
- **Current work package:** `MAIL-001` — consolidated job-email hub and explicit sending (`IN PROGRESS`); routing/reads/detail, ledger, Gmail/Graph delivery/re-consent, safe send API/UI, recovery, legacy SMTP retirement, send/draft export and tenant-owned revisioned draft API are committed. Application context, confirmed Gmail unlink and honest disconnected/read-only/send/failure states are shared. Draft recovery/new-message UI and provider mailbox mutations remain; full account deletion stays SEC-009.
|
||||
- **Completed work packages:** None are `DONE`; all repository security/AI packages still have applicable browser, provider and/or production gates.
|
||||
- **Locally verified work:** SEC-001, SEC-002, SEC-003, SEC-005A, CORE-001, PROD-002 and DEP-001 (`VERIFIED LOCALLY`).
|
||||
- **Implemented, verification incomplete:** SEC-004, SEC-005B, SEC-008, CORE-002, BG-001, OPS-001A/B/C, POL-001/002, AI-001/002/003/004, UX-001/002, QA-001, CAREER-001 and CAREER-002 (`IMPLEMENTED — NOT VERIFIED`). CAREER-002 now protects unsaved edits and provides tested structured custom-entry, profile-override and preview-error interactions; all automated/build gates pass.
|
||||
@@ -12,7 +12,7 @@ Updated: 2026-08-10
|
||||
- **Deferred work:** None. Conditional multi-replica coordination, model deletion, realtime operation delivery and unrelated production changes remain outside current packages.
|
||||
- **Next five work packages:** MAIL-001 consolidated email experience; JOBS-001 job-search/application redesign; HOME-001 homepage/Pro promotion; UX-003 authentication/profile polish; PRODUCT-001 homepage/Pro claims. SEC-006/007 resume after package-index permission.
|
||||
- **Status counts:** 7 `VERIFIED LOCALLY`; 19 `IMPLEMENTED — NOT VERIFIED`; 1 `IN PROGRESS`; 8 `NOT STARTED`; 5 `BLOCKED`; 0 `DONE`; 0 `DEFERRED`.
|
||||
- **Test status:** backend 625/625; frontend 50/50 suites and 194/194 tests; Playwright smoke 4/4; npm audit 0 vulnerabilities; DEP-001 focused router 24/24 and production build pass; MAIL-001 readable draft export 4/4, draft persistence 1/1, Free send 7/7, provider states 9/9, hub unlink 8/8 UI and 2/2 API, shared context 10/10, prior send export/cascade 16/16, recovery/send 10/10, legacy follow-up/backend worker 10/10, legacy UI 2/2, composer 7/7, delivery/capability 18/18, provider/correspondence 5/5 and hub detail 5/5. EF model-current and SQLite/MariaDB up/down draft scripts pass; a full blank-chain SQLite apply remains blocked by pre-existing JT-019 drift. Jest open-handle/slow-run behavior is recorded in V-127/V-128/V-130/V-131/V-135/V-142/V-143/V-144.
|
||||
- **Test status:** backend 629/629; frontend 50/50 suites and 194/194 tests; Playwright smoke 4/4; npm audit 0 vulnerabilities; DEP-001 focused router 24/24 and production build pass; MAIL-001 draft API 4/4, readable draft export 4/4, draft persistence 1/1, Free send 7/7, provider states 9/9, hub unlink 8/8 UI and 2/2 API, shared context 10/10, prior send export/cascade 16/16, recovery/send 10/10, legacy follow-up/backend worker 10/10, legacy UI 2/2, composer 7/7, delivery/capability 18/18, provider/correspondence 5/5 and hub detail 5/5. EF model-current and SQLite/MariaDB up/down draft scripts pass; a full blank-chain SQLite apply remains blocked by pre-existing JT-019 drift. Jest open-handle/slow-run behavior is recorded in V-127/V-128/V-130/V-131/V-135/V-142/V-143/V-144.
|
||||
- **Deployment status:** Gitea pull-request run 609 passed the complete CI job in 4m20s. Deploy was intentionally skipped because the workflow deploys only a `push` to `main`; live remains unchanged. No merge/deployment was performed directly, no production migrations were run and the AI operation worker remains disabled by default.
|
||||
- **Production status:** Unchanged and unverified. No provider/model call, model pull, external request or paid API occurred.
|
||||
- **Known regressions:** None found by automated/local browser checks. Jest still needs `--forceExit` and reports its existing open-handle notice. Email-provider/send tests are fake/local only; real delivery is not claimed. Current MAIL browser evidence is 1280×720 only because the browser surface could not resize or perform native Tab traversal. Interrupted attempts are aged after 15 minutes and notified without retry; the five-minute scan is unmeasured on a large ledger. Direct clean EF-only SQLite migration still hits the pre-existing historical blank-chain defect before later migrations; normal startup owns reconciliation. Cross-feature monthly AI usage accounting remains a rollout gap.
|
||||
|
||||
@@ -651,9 +651,9 @@ Ordering differences from the suggested list:
|
||||
- **Required production verification:** provider read/draft/send requires explicit authorized synthetic account; never real unsolicited email.
|
||||
- **Status:** `IN PROGRESS`.
|
||||
- **Blocker:** real provider verification is external; required 375/768/1440/theme/keyboard browser gates were unavailable in the current browser surface. Mocked/local repository implementation remains unblocked.
|
||||
- **Evidence:** `docs/verification/mail-001-job-email-hub.md`; V-126–V-147. Durable draft persistence 1/1 with dual-provider reversible SQL and readable export 4/4; Free send policy 7/7; provider states 9/9; hub unlink 8/8 UI and 2/2 API; shared application context focused 10/10; prior send export/cascade focused 16/16; recovery/send focused 10/10; legacy follow-up/worker 10/10; composer 7/7; delivery/capability 18/18; provider/correspondence 5/5; hub detail 5/5; backend 625/625; frontend 50/50 suites and 194/194 tests plus build/audit; local empty/disconnected and compatibility-route browser smoke at 1280×720.
|
||||
- **Commit:** `6008b4a` (hub), `536d403` (neutral reads), `a20775c` (safe detail), `653f011` (ledger), `e9937ac` (Gmail/Graph delivery adapters and consent), `123fc55` (explicit-confirmed send API), `449faeb` (confirmed reply composer), `ee5ef7e` (interrupted-send recovery), `8fe3903` (legacy SMTP retirement), `aff34cc` (content-free export and cascade evidence), `ff547df` (shared application context), `1dabbeb` (confirmed hub unlink), `f9e641c` (honest provider states), `7f41cb2` (Free email policy regression), `14b396a` (inert tenant draft persistence), `2fa4e38` (owner-isolated readable draft export).
|
||||
- **Remaining work:** full account deletion remains SEC-009; bounded draft API/new-message/refresh UI; mailbox category capabilities; browser/production verification. Existing connections need explicit re-consent; IMAP remains read-only. No real email; uncertain sends need manual reconciliation. JT-019 blocks a clean full-chain SQLite rehearsal before the new draft migration.
|
||||
- **Evidence:** `docs/verification/mail-001-job-email-hub.md`; V-126–V-148. Draft API 4/4, persistence 1/1 with dual-provider reversible SQL and readable export 4/4; Free send policy 7/7; provider states 9/9; hub unlink 8/8 UI and 2/2 API; shared application context focused 10/10; prior send export/cascade focused 16/16; recovery/send focused 10/10; legacy follow-up/worker 10/10; composer 7/7; delivery/capability 18/18; provider/correspondence 5/5; hub detail 5/5; backend 629/629; frontend 50/50 suites and 194/194 tests plus build/audit; local empty/disconnected and compatibility-route browser smoke at 1280×720.
|
||||
- **Commit:** `6008b4a` (hub), `536d403` (neutral reads), `a20775c` (safe detail), `653f011` (ledger), `e9937ac` (Gmail/Graph delivery adapters and consent), `123fc55` (explicit-confirmed send API), `449faeb` (confirmed reply composer), `ee5ef7e` (interrupted-send recovery), `8fe3903` (legacy SMTP retirement), `aff34cc` (content-free export and cascade evidence), `ff547df` (shared application context), `1dabbeb` (confirmed hub unlink), `f9e641c` (honest provider states), `7f41cb2` (Free email policy regression), `14b396a` (inert tenant draft persistence), `2fa4e38` (owner-isolated readable draft export), `a9bb22e` (tenant-safe revisioned draft API).
|
||||
- **Remaining work:** full account deletion remains SEC-009; new-message/refresh draft UI; mailbox category capabilities; browser/production verification. Existing connections need explicit re-consent; IMAP remains read-only. No real email; uncertain sends need manual reconciliation. JT-019 blocks a clean full-chain SQLite rehearsal before the new draft migration.
|
||||
|
||||
### JOBS-001 — Job-search source and assessment redesign
|
||||
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
Updated: 2026-08-10
|
||||
|
||||
- **Exact current task:** MAIL-001 — design and implement the bounded authenticated draft API over the now-exportable tenant-owned store; do not wire UI until API isolation/concurrency tests pass.
|
||||
- **Last completed step:** complete readable draft coverage for encrypted on-demand and hashed per-owner daily exports was committed/pushed as `2fa4e38`; focused 4/4 and backend 625/625 pass.
|
||||
- **Files currently modified:** authoritative MAIL-001 tracking/evidence only; persistence/export code is committed.
|
||||
- **Exact current task:** MAIL-001 — connect reply/new-message UI to revisioned server drafts with refresh recovery and explicit conflict handling; preserve the existing send confirmation boundary.
|
||||
- **Last completed step:** bounded authenticated draft CRUD was committed/pushed as `a9bb22e`; focused real-SQLite 4/4, backend 629/629 and build pass with no provider/send side effects.
|
||||
- **Files currently modified:** authoritative MAIL-001 tracking/evidence only; persistence/export/API code is committed.
|
||||
- **Commands already run:** dependency/audit/router/full frontend/build; legacy follow-up/export/recovery/provider suites; full backend; Gitea run inspection; Playwright; MAIL context/unlink/provider-state/Free-policy/draft-persistence focused and full suites/build; EF model-current and dual-provider up/down scripts. See V-126–V-146.
|
||||
- **Test results:** npm audit 0 vulnerabilities; Gitea pull-request CI PASS in 4m20s at run 609; backend 625/625; frontend 50/50 suites and 194/194 tests; Playwright 4/4; production build passes. Draft isolation/cascade 1/1; EF model current; SQLite/MariaDB draft up/down scripts pass. Full blank-chain SQLite apply fails earlier in `AddJobEntityAndProspectStages` on missing `LastReminderEmailSentAt` (JT-019).
|
||||
- **Services currently running:** none on task-owned ports 3000/5202. Playwright stopped its disposable API/Next servers. Pre-existing Docker services were not changed.
|
||||
- **Temporary files or processes:** no task-owned process is running and the failed disposable migration database was removed. Existing synthetic browser evidence/account and startup-created local backup remain documented. No provider account, real email, private content, paid service or production service was accessed.
|
||||
- **Production changes currently active:** none. No deployment, migration, provider connection/sync/send or production payload occurred.
|
||||
- **Rollback status:** downgrade `20260810075206_AddEmailDrafts` before reverting `14b396a`; then follow the existing MAIL rollback order (`ee5ef7e`, `449faeb`, `123fc55`/`e9937ac`, ledger downgrade before `653f011`). No production migration/deploy/provider grant occurred.
|
||||
- **Uncommitted changes:** tracking/evidence for `2fa4e38` and V-147 only; commit and push before the draft API increment.
|
||||
- **Uncommitted changes:** tracking/evidence for `a9bb22e` and V-148 only; commit and push before the draft UI increment.
|
||||
- **Known failures:** live deployment is not verified because PR deploy is intentionally skipped and the active branch is not approved for merge. Draft export/API/UI, full thread/category actions and non-Gmail review remain; existing accounts need re-consent and IMAP stays read-only. A clean full-chain SQLite apply fails in the pre-existing JT-019 migration before the new draft migration. Browser/provider/MariaDB/production unavailable or unverified; recovery scan performance is unmeasured at large ledger scale; Jest open handles; SEC-006 parser dependency work is still separately gated; parser isolation remains SEC-007.
|
||||
- **Exact next action:** add authenticated list/get/create/update/delete draft endpoints with owned-job validation, bounded plain-text fields, revision conflict handling and two-user direct-ID tests. Keep content out of logs, notifications and browser storage; no provider call or send occurs on save.
|
||||
- **Exact next action:** inventory the correspondence composer state and API client, then add explicit Save draft/resume/delete/new-message UI with visible revision conflict/reload. Do not autosave silently until race/navigation behavior is covered; sending must still require the existing confirmation and idempotency UUID.
|
||||
- **Work that can continue independently:** remaining MAIL-001 repository work and later UX packages. SEC-006/007 await package-index permission; PROD-001/003/004 await production access.
|
||||
- **Decisions still required from the user:** none for synthetic/code-inspected repository work. Any provider connection or send test, internet/package upgrades, private data, external/paid providers and production actions retain explicit approval/safety gates; SEC-009 retention/legal policy remains unresolved.
|
||||
|
||||
Reference in New Issue
Block a user