docs(cv): record durable processing evidence
CI and Deploy / test (pull_request) Failing after 1m38s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-09 15:14:39 +02:00
parent c3c5af8329
commit 83ddc0718e
9 changed files with 98 additions and 24 deletions
+10
View File
@@ -299,3 +299,13 @@
- **Consequences:** existing cached `FocusPlanDto` remains readable, while generation now returns 202 and the UI resumes by operation ID/context. Retry can overwrite only the same unique result row. Worker activation and real-model tuning remain rollout gates; operation records provide deduplication/provenance, not full monthly billing accounting.
- **User approval required:** No; both programmes explicitly require durable Strategy work and consolidation with AI-001/002.
- **Reversible:** Yes. Keep the worker off and revert `a621226`; no schema/dependency changed. Cancel or drain queued `strategy.snapshot` rows before removing the handler.
## DEC-031 — CV extraction runs own review data; UserOperations own execution
- **Date:** 2026-08-09
- **Decision:** Keep `CvExtractionRun` as the artifact/result/review record and make one typed `cv.process` operation reference its numeric ID. Replace the unbounded channel and separate hosted service with AI-001 admission/leases/retries/cancellation/notifications. Upload returns 202 after persistence; no raw CV payload is duplicated into operation state.
- **Reason/evidence:** the complete trace showed useful persistent review state but two competing execution mechanisms: synchronous upload and a process-local channel. Reusing both existing models gives restart-safe orchestration without a new queue/schema and preserves the mandatory accept/discard gate.
- **Alternatives considered:** raise proxy timeouts; keep synchronous upload; add a second CV queue/table; store raw CVs/prompts in operation payloads; replace extraction runs with generic operations. These retain the 504/lost-wakeup path, duplicate infrastructure/private data, or discard domain review/version history.
- **Consequences:** all four long CV actions share one default-off worker and operation UI. Parser-version/process isolation remains SEC-006/007; browser/model/MariaDB/production gates remain before rollout. Existing clients must accept the upload endpoint's 202 operation response.
- **User approval required:** No; both programmes explicitly require one durable operation foundation and preservation of human review.
- **Reversible:** Yes. Keep the worker off, revert `c3c5af8`, and retain operation/extraction rows. Cancel or drain `cv.process` rows before removing the handler.
+7 -6
View File
@@ -2,17 +2,17 @@
Updated: 2026-08-09
- **Overall programme status:** Active. Six packages are locally verified; thirteen packages through AI-003 are implemented with automated/runtime evidence but blocked from applicable browser/model/provider/production gates; AI-004 is in progress.
- **Current work package:** `AI-004`CV-processing 504 durable-operation migration (`IN PROGRESS`), reusing the shared operation/notification/routing foundation and preserving the review gate.
- **Overall programme status:** Active. Six packages are locally verified; fourteen packages through AI-004 are implemented with automated/runtime evidence but blocked from applicable parser/browser/model/provider/production gates; UX-001 is in progress.
- **Current work package:** `UX-001`unified authentication page (`IN PROGRESS`); source requirement re-read and existing tab/provider-card structure traced.
- **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 and PROD-002 (`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 (`IMPLEMENTED — NOT VERIFIED`). AI-003 now has a real typed producer/handler and explicit durable UI states, but its worker remains default-off pending rollout gates.
- **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 (`IMPLEMENTED — NOT VERIFIED`). AI-004 now returns 202 for upload and uses the shared typed worker/status/notification/UI contract; the worker remains default-off and parser hardening remains blocked.
- **Production-verified work:** None.
- **Blocked work:** SEC-006 requires explicit internet/package-index permission; PROD-001/003/004 and REL-001 require documented production access and unfinished dependencies. Browser access is denied by browser administrator policy; SMTP/MariaDB environments are unavailable.
- **Deferred work:** None. Conditional multi-replica coordination, model deletion, realtime operation delivery and unrelated production changes remain outside current packages.
- **Next five work packages:** AI-004 CV processing; UX-001 authentication/theme corrections; QA-001 job-analysis/keyword quality; UX-002 Career Workspace/CV Builder redesign; MAIL-001 consolidated email experience. SEC-006/007 resume after package-index permission.
- **Status counts:** 6 `VERIFIED LOCALLY`; 13 `IMPLEMENTED — NOT VERIFIED`; 1 `IN PROGRESS`; 14 `NOT STARTED`; 5 `BLOCKED`; 0 `DONE`; 0 `DEFERRED`.
- **Test status:** backend 592/592; AI-003 focused backend 34/34; frontend 47/47 suites and 160/160 tests, AI-003 focused 6/6, production build pass; prior sidecar 22/22. Patch check passes. Browser/model/MariaDB/production checks were not run.
- **Next five work packages:** UX-001 unified authentication; QA-001 job-analysis/keyword quality; UX-002 deterministic theme state; CAREER-001 Career Workspace redesign; CAREER-002 CV Builder redesign. SEC-006/007 resume after package-index permission.
- **Status counts:** 6 `VERIFIED LOCALLY`; 14 `IMPLEMENTED — NOT VERIFIED`; 1 `IN PROGRESS`; 13 `NOT STARTED`; 5 `BLOCKED`; 0 `DONE`; 0 `DEFERRED`.
- **Test status:** backend 594/594; AI-004 focused backend 40/40; frontend 47/47 suites and 161/161 tests, AI-004 focused UI 10/10, production build pass; prior sidecar 22/22. Patch check passes. Browser/model/MariaDB/production checks were not run.
- **Deployment status:** No deployment performed. No production migrations were run. 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 suites. Jest still needs `--forceExit` and reports its existing open-handle notice. 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.
@@ -40,5 +40,6 @@ Updated: 2026-08-09
- `docs/verification/ai-001-durable-ai-queue.md`
- `docs/verification/ai-002-provider-routing.md`
- `docs/verification/ai-003-strategy-snapshot-queue.md`
- `docs/verification/ai-004-cv-processing-queue.md`
- `docs/verification/prod-002-ai-evaluation.md`
- `docs/work-programmes/master-work-plan.md`
+8 -8
View File
@@ -16,7 +16,7 @@ Allowed statuses are `NOT STARTED`, `IN PROGRESS`, `IMPLEMENTED — NOT VERIFIED
`DONE` requires every applicable acceptance criterion, focused and regression tests, browser/accessibility/theme/mobile checks, tenant and entitlement checks, documentation, migration/rollback evidence, and production verification. Repository-only work that still requires production is at most `VERIFIED LOCALLY`.
Exactly one implementation item may be `IN PROGRESS`. As of this revision it is **AI-004**.
Exactly one implementation item may be `IN PROGRESS`. As of this revision it is **UX-001**.
## Consolidated dependency order
@@ -541,11 +541,11 @@ Ordering differences from the suggested list:
- **Required tests:** safe synthetic PDFs/DOCX/images, proxy/backend/parser/provider failure, duplicate/refresh/restart, E2E.
- **Required browser verification:** synthetic CV first; authorized private file via temporary local copy only, never logged/committed/external.
- **Required production verification:** synthetic/local-only canary, no external payload, restart recovery.
- **Status:** `IN PROGRESS`.
- **Status:** `IMPLEMENTED — NOT VERIFIED`.
- **Blocker:** SEC-006 dependency upgrades need internet permission; browser/private-file/MariaDB/production reproduction remains unavailable. Synthetic repository work can continue.
- **Evidence:** initial V-104 trace: upload still performs extraction/normalization/model work synchronously; reprocess/rebuild/improve return 202 into an unbounded in-memory channel backed by persistent `CvExtractionRun` rows and startup scanning, but do not use AI-001 operation admission/status/notification/provenance/cancellation.
- **Commit:** none.
- **Remaining work:** define one `cv.process` operation referencing the extraction-run ID; make upload artifact/run creation return 202; replace channel wakeups with the typed handler; preserve pending-review acceptance; align cancellation/failure/provenance/deduplication; add safe synthetic parser/provider/restart/UI tests. Do not duplicate raw CV data into `UserOperations` or inflate timeouts.
- **Evidence:** `docs/verification/ai-004-cv-processing-queue.md`; V-104V-107; real SQLite synthetic integration proves 202/active deduplication/owner-scoped handler/retry provenance/notification/review gate; backend 594/594; frontend 161/161 and build.
- **Commit:** `c3c5af8` (`feat(cv)!: queue durable processing`).
- **Remaining work:** SEC-006/007 parser dependency/isolation and complete parser cancellation; browser synthetic upload/refresh/retry/cancel/review at required widths/themes/keyboard; selected-model and worker-restart canary; MariaDB/production rollout. Reconcile dormant extraction-row status immediately when an operation is cancelled before claim. Do not use the private CV before safeguards.
### UX-001 — Unified authentication page
@@ -559,9 +559,9 @@ Ordering differences from the suggested list:
- **Required tests:** invalid credentials/provider failure/cancel/return, focus/order/labels.
- **Required browser verification:** 375/768/1440, light/dark, keyboard/focus, logged-out/provider mocks.
- **Required production verification:** real provider smoke only with authorized accounts.
- **Status:** `NOT STARTED`.
- **Blocker:** security dependencies; provider production checks external.
- **Evidence:** source requirement.
- **Status:** `IN PROGRESS`.
- **Blocker:** browser localhost policy and real-provider/production checks; component/source work can continue safely.
- **Evidence:** source requirement re-read; initial trace confirms `LoginPage` still renders separate local/Google/Microsoft tabs and provider-card components.
- **Commit:** none.
- **Remaining work:** keep visual change separate from identity migration.
+10 -10
View File
@@ -2,17 +2,17 @@
Updated: 2026-08-09
- **Exact current task:** AI-004design the smallest `cv.process` bridge from persistent `CvExtractionRun` domain state into AI-001 operations, then migrate synchronous upload without weakening parser limits or the human review gate.
- **Last completed step:** complete initial AI-004 execution trace (V-104). Upload saves an artifact/run and performs extraction, reconstruction, classification/normalization and structured parsing synchronously before returning. Reprocess/rebuild/improve already return 202 with persistent run IDs, but wake an unbounded process-local channel; startup scans queued/running runs. They lack centralized operation admission, cancellation/deadline/retry/provenance and generic persistent notifications.
- **Files currently modified:** none after the AI-004 trace tracking commit. Preserve any new user edits discovered on resume.
- **Commands already run:** AI-003 source tracing/build/focused/full tests/frontend build/diff/commits (V-101V-103); AI-004 bounded controller/partial/queue/model/UI/proxy/registration trace (V-104).
- **Test results:** backend 592/592; AI-003 focused backend 34/34; frontend 47/47 suites and 160/160 tests; AI-003 UI 6/6; production frontend build and diff check pass. Fake model/synthetic data only.
- **Exact current task:** UX-001replace `LoginPage` local/Google/Microsoft tabs with one accessible sign-in card while preserving the hardened provider callbacks and separate registration behavior.
- **Last completed step:** AI-004 implementation `c3c5af8` was committed and pushed. Upload/reprocess/rebuild/improve now use one durable `cv.process` operation; duplicate active work is reused; provider failure state, persistent notifications, review gate and operation UI are covered. UX-001 source requirements were re-read and the current separate-tab/provider-card path was located.
- **Files currently modified:** tracking/evidence documents for AI-004 and the UX-001 status transition. No UX application code is modified yet.
- **Commands already run:** initial clean-tree review and push through `39e9804`; AI-004 source trace; local-cache-only restore; backend builds/focused/full tests; focused/full frontend tests/build; diff review; implementation commit/push; UX-001 source/route trace. See V-104V-107.
- **Test results:** backend 594/594; AI-004 focused backend 40/40; frontend 47/47 suites and 161/161 tests; profile UI 10/10; production frontend build and diff check pass. Synthetic CV/fake model only.
- **Services currently running:** none started by this session. Node/Jest/build processes exited. Pre-existing Docker services were not changed.
- **Temporary files or processes:** none created for AI-004. No dependency declaration, database or artifact was changed.
- **Production changes currently active:** none. No deployment, provider/model call, private CV access, model pull, paid service, production migration or external payload occurred.
- **Rollback status:** AI-003 rollback is documented in `docs/verification/ai-003-strategy-snapshot-queue.md`; AI-004 has no code to roll back yet. Worker switches remain default-off.
- **Uncommitted changes:** none expected after the AI-004 trace tracking commit. Confirm with `git status --short --branch`.
- **Known failures:** browser localhost denied; MariaDB/SMTP/production unavailable; SEC-006 upgrades require explicit internet/package-index permission; historical clean EF-only SQLite chain needs startup reconciliation; Jest reports its existing force-exit/open-handle notice. AI-004 live 504 and restart behavior are not claimed.
- **Exact next action:** specify the typed `cv.process` subject/idempotency contract and change `ProcessQueuedRunAsync` to return/throw a classified result suitable for `IAiOperationHandler`; then make upload persist a queued run and return 202. Keep `CvExtractionRun` as review/result domain state and `UserOperation` as orchestration state—no raw CV payload or second CV queue.
- **Work that can continue independently:** repository-only AI-004 producer/handler work with synthetic files/fake parser/provider; frontend durable-state tests; existing parser-limit tests. SEC-006/007 await package-index permission; PROD-001/003/004 await production access.
- **Rollback status:** AI-004 rollback is documented in `docs/verification/ai-004-cv-processing-queue.md`; worker switches remain default-off. Production is unchanged.
- **Uncommitted changes:** AI-004 evidence/master tracking status updates only; commit and push them before UX code.
- **Known failures:** browser localhost denied; MariaDB/SMTP/production unavailable; SEC-006 upgrades require explicit internet/package-index permission; complete parser cancellation/isolation remains SEC-007; historical clean EF-only SQLite chain needs startup reconciliation; Jest reports its existing force-exit/open-handle notice. Live CV 504/restart/private-file behavior is not claimed.
- **Exact next action:** read `LoginPage.tsx`, `GoogleAuthCard.tsx`, `MicrosoftAuthCard.tsx` and `login-page.test.tsx` completely; isolate sign-in-only button rendering from profile linking controls; replace tabs with one form/separator/two alternative buttons and add invalid/provider cancel/return/accessibility component tests.
- **Work that can continue independently:** UX-001 repository UI/tests; then UX-002/QA-001 source work. SEC-006/007 await package-index permission; PROD-001/003/004 await production access.
- **Decisions still required from the user:** none for synthetic repository work. Internet/package upgrades, private CV access, external/paid providers and production actions retain their explicit approval/safety gates; SEC-009 retention/legal policy remains unresolved.