fix(career): preserve edits during polling
CI and Deploy / test (pull_request) Failing after 2m59s
CI and Deploy / deploy (pull_request) Has been skipped

Refresh extraction runs without reloading controlled profile fields. Keep stored-profile AI actions gated until pending edits are saved.
This commit is contained in:
cesnimda
2026-08-15 13:49:58 +02:00
parent 998ee07a9a
commit d424633f95
8 changed files with 136 additions and 45 deletions
+10
View File
@@ -679,3 +679,13 @@
- **Consequences:** rows/cards and contextual shortcuts open one responsive workspace; internal row controls remain independent; list state survives return; old application links still resolve. The former quick dialog remains in source for rollback until broader regression proves it can be safely deleted.
- **User approval required:** No; explicitly requested.
- **Reversible:** Restore DEC-065 routing/list presentation; no schema or stored data changed.
## DEC-069 — Keep CV ingestion hybrid and isolate status polling
- **Date:** 2026-08-15
- **Decision:** Keep deterministic Python/library text extraction and OCR, pass extracted text through the existing Ollama-first normalization/classification routes, then validate/diff/review in C#. Poll extraction-run status independently from profile content and never replace unsaved editor state during background refresh.
- **Reason/evidence:** the repository already implements the user-proposed Python → Ollama → structured-data flow. Python libraries are the correct boundary for PDF/DOCX/image decoding; Ollama adds value in semantic section recognition, but cannot safely or deterministically replace binary parsing. The observed reset was caused by full-profile polling, not controlled-input behavior.
- **Alternatives considered:** send binary files directly to Ollama; remove deterministic repair/fallback logic; continue full-profile polling; auto-save on every poll. These reduce format coverage, factuality, review safety or user control.
- **Consequences:** all career fields retain unsaved edits while processing status changes. AI reconstruction remains explicit, local-first and review-gated; accuracy work can be benchmarked per model without changing the ingestion boundary.
- **User approval required:** No; this implements the requested behavior within the existing approved local-AI architecture.
- **Reversible:** Rejoin run/profile loads, though that would restore the confirmed data-loss UX defect; no schema/config/data migration changed.
+2 -2
View File
@@ -3,7 +3,7 @@
Updated: 2026-08-15
- **Overall programme status:** Active. Seven packages are locally verified; twenty-two packages through UX-003 are implemented with automated/runtime evidence but blocked from applicable live/provider/production gates; JOBS-002 is now in progress. Gitea run 609 passes the prior complete pull-request CI; DEP-001 awaits approved merge-to-main and production verification.
- **Current work package:** `JOBS-002`dedicated application workspace and scan-friendly applications table (`IN PROGRESS`). Canonical `/jobs/:id`, compact whole-row navigation, sidebar cleanup, richer details and anchored notification popover are locally verified; browser regression is next.
- **Current work package:** `CAREER-002`professional CV Builder and robust rendering (`IN PROGRESS`). JOBS-002 repository scope and the Career edit-persistence correction are locally verified; CV editor/rendering rework is next.
- **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/003, QA-001, CAREER-001/002, MAIL-001 and JOBS-001 (`IMPLEMENTED — NOT VERIFIED`). UX-003 safe local/browser scope is implemented; production/native-device gates remain.
@@ -12,7 +12,7 @@ Updated: 2026-08-15
- **Deferred work:** None. Conditional multi-replica coordination, model deletion, realtime operation delivery and unrelated production changes remain outside current packages.
- **Next five work packages:** JOBS-002 applications/workspace; PRODUCT-001 homepage/Pro claims; VER-001 action matrix; production-blocked SEC-006/007 when package-index permission is available; REL-001 after prerequisites.
- **Status counts:** 7 `VERIFIED LOCALLY`; 22 `IMPLEMENTED — NOT VERIFIED`; 1 `IN PROGRESS`; 5 `NOT STARTED`; 5 `BLOCKED`; 0 `DONE`; 0 `DEFERRED`.
- **Test status:** backend baseline 631/631 plus admin safety 4/4 and workspace 9/9; frontend baseline 51/51 suites and 207/207 plus theme/confirm/admin focused 11/11, JOBS-002 focused 8/8 and notification focused 6/6; Playwright 6/6; npm audit 0 vulnerabilities; production build passes. Historical JT-019 and Jest force-exit/open-handle behavior remain recorded.
- **Test status:** backend baseline 631/631 plus admin safety 4/4, workspace 9/9 and CV extraction/diff 8/8; frontend baseline 51/51 suites and 207/207 plus theme/confirm/admin 11/11, JOBS-002 8/8, notifications 6/6 and Career 17/17; AI sidecar 22/22; Playwright 6/6; npm audit 0 vulnerabilities; production build passes. Historical JT-019 and Jest force-exit/open-handle behavior remain recorded.
- **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.
+3 -3
View File
@@ -615,9 +615,9 @@ Ordering differences from the suggested list:
- **Required production verification:** synthetic account smoke.
- **Status:** `IMPLEMENTED — NOT VERIFIED`.
- **Blocker:** browser session was already finalized; three-width/theme/keyboard/Norwegian checks and production synthetic-account smoke remain.
- **Evidence:** `docs/verification/career-001-career-workspace.md`; V-117V-119; focused 16/16, full frontend 49/49 suites and 178/178 tests, production build. State-aware actions/recent CVs are implemented and the Apply/Discard gate is unchanged.
- **Commit:** `268b3a0` (`feat(career): clarify workspace actions`).
- **Remaining work:** browser and production gates only; deeper builder/job-specific interaction belongs to CAREER-002/JOBS-001.
- **Evidence:** `docs/verification/career-001-career-workspace.md`; V-117V-119 and V-164; focused Career/Profile 17/17, extraction backend 8/8, sidecar 22/22 and production build. State-aware actions/recent CVs are implemented, extraction polling no longer overwrites unsaved form state, and the Apply/Discard gate is unchanged.
- **Commit:** `268b3a0` (`feat(career): clarify workspace actions`) plus the CAREER-002 polling checkpoint recorded in V-164.
- **Remaining work:** browser and production gates only; live model-quality benchmarking and deeper builder interaction belong to CAREER-002.
### CAREER-002 — CV Builder interaction redesign and external research
+7 -7
View File
@@ -2,17 +2,17 @@
Updated: 2026-08-15
- **Exact current task:** continue JOBS-002 with real-browser workspace/table/theme/keyboard/history/error/long-content regression.
- **Last completed step:** the header bell now opens a reusable anchored notification panel with read/dismiss/link/empty/error behavior; it no longer routes directly to Operations.
- **Files currently modified:** notification model/popover/AppShell/App integration/tests/translations, Operations reuse and JOBS tracking.
- **Commands already run:** notification/AppShell/Operations Jest 6/6 and production frontend build.
- **Test results:** focused notification 6/6; focused JOBS frontend 8/8 and backend 9/9; production build passes. Repository-wide standalone TypeScript still reports pre-existing React Router test `future` props, one Testing Library option and ES target errors; application source added no error.
- **Exact current task:** continue CAREER-002 with CV Builder editing and multi-page rendering rework, then run combined browser regression.
- **Last completed step:** separated extraction-run polling from profile loading, added unsaved-state safety, and verified the existing Python/Ollama/C# hybrid ingestion contract.
- **Files currently modified:** CareerProfilePage, its focused test and Career/tracking evidence.
- **Commands already run:** Career Jest 17/17; CV extraction/diff backend 8/8; AI sidecar 22/22; production frontend build.
- **Test results:** Career 17/17, extraction/diff 8/8, sidecar 22/22 and build pass. The first `.venv` pytest attempt failed environmentally because pytest is absent; `py -m pytest` passed. Repository-wide standalone TypeScript baseline remains as previously recorded.
- **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 `20260810080858_AddEmailDraftClientRequestId`, then `20260810075206_AddEmailDrafts`, before reverting draft commits; then follow the existing MAIL rollback order (`ee5ef7e`, `449faeb`, `123fc55`/`e9937ac`, ledger downgrade before `653f011`). No production migration/deploy/provider grant occurred.
- **Uncommitted changes:** V-163 notification popover and tracking; no dependency/schema/config change.
- **Uncommitted changes:** V-164 Career polling/edit safety and tracking; no dependency/schema/config change.
- **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:** commit/push V-163; run the JOBS-002 browser matrix and address evidence-backed defects.
- **Exact next action:** commit/push V-164; implement CAREER-002 renderer overflow/page-boundary and editor workflow corrections.
- **Work that can continue independently:** JOBS-002, PRODUCT-001 and VER-001. UX/JOBS production, MAIL provider mutations, SEC-006/007 and PROD packages retain their recorded external gates.
- **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.