feat(cv-import): add source-grounded review and explicit corrections

This commit is contained in:
cesnimda
2026-10-26 15:56:54 +01:00
parent 9e1726c61d
commit e941b3ccb7
24 changed files with 943 additions and 48 deletions
+13
View File
@@ -0,0 +1,13 @@
# Review, corrections and merge qualification
26 October 2026. The existing Career Profile page now routes PDF/DOCX through the document import pipeline. Legacy text/image upload and historical reviews remain available. Upload does not change the canonical profile.
Desktop presents an authenticated original PDF beside grouped fields; mobile offers source/review tabs. DOCX provides ordered extracted source and the original download rather than claiming a browser-rendered pagination preview. Source evidence shows the supporting text, converter method and page where known. Uncertain relationships and converter warnings remain visible. No field starts approved.
Users can keep the current value, accept/add the imported value, correct it, or skip it. A group approval is an explicit user decision. The final Apply action submits only selected decisions and the canonical revision loaded for comparison. A conflict refresh preserves corrections but resets confirmations against the new comparison. An all-skipped import must be discarded; it cannot display a misleading saved acknowledgement. Successful application links to Career Profile and the existing CV Editor.
Review matches records conservatively using complete identity/date keys; incomplete and multiple matches require a new record or manual correction. Existing nonmatching fields, list entries, links and CV-specific overrides remain intact. Nested list provenance follows the actual appended/deduplicated destination index. Each imported fact retains artifact/run/file-hash identity even after later imports or client saves. Grounding occurs after canonical normalization so duplicate source skills cannot shift evidence onto another value.
Independent code review identified stale-worker publication, nested merge provenance, duplicate targets, old pending-review visibility and benchmark record association defects. Regressions reproduced them before fixes. Additional tests cover DOCX DTD rejection, inert document hyperlinks, bounded errors, per-field source identity and canonical rather than legacy projection revision numbering. Failed attempts are retained under `.artifacts/cv-import/`; focused suites overlap and are not added to final totals.
The dedicated real import browser lane uses the actual isolated FastAPI/Docling child, durable API worker, reviewed transactional save, unchanged pre-existing CV variant, redesigned editor and actual PDF export. It exercises English/light/desktop PDF and Bokmål/dark/mobile DOCX, source ownership, refresh, no implicit save, corrections and automated accessibility. Browser automation does not qualify physical devices, human assistive technology, translation quality or printing.
+3 -1
View File
@@ -4,7 +4,7 @@
- [x] CV-IMPORT-01: secure upload and real Docling extraction (native PDF layout/OCR limitations explicit).
- [x] CV-IMPORT-02: grounded structured interpretation and disabled local AI qualification seam.
- [x] CV-IMPORT-03: genuine progress, lease/cancellation recovery and bounded retention; full final freeze remains separate.
- [ ] CV-IMPORT-04: review/corrections/conflicts/source UI.
- [x] CV-IMPORT-04: review/corrections/conflicts/source UI; final integrated regression tracked separately.
- [ ] CV-IMPORT-05: revisioned transactional Career Profile persistence.
- [ ] CV-IMPORT-06: accuracy/security/resilience qualification.
- [ ] CV-IMPORT-07: full regression, acceptance and CV-QA-01 handoff.
@@ -16,3 +16,5 @@ Known open acceptance gates inherited from CV-UX: live model BLOCKED; human acce
Extraction subcheckpoint pushed `3ea8ff9`. Backend reviewed integration focused 51 PASS and actual provider 69 PASS; qualification remains conditional until the final frozen-source lanes. Root continued implementation after delegated workers exhausted their service usage; unfinished worker edits were inspected and tested, not assumed complete.
CV-IMPORT-03 evidence: `lifecycle-green-01` 52 focused backend PASS; `backend-full-01` 1,250 PASS, zero skips. Expired-operation cancellation regression failed before the shared status guards. Linux real sidecar API attempt 03 passed PDF/DOCX and refused the scan in network-disabled/read-only isolation. Earlier attempts remain failed: Linux platform metadata subprocess and missing private HOME were fixed at the child boundary. Source retention includes orphan generated upload files and preserves unrelated files. Original source inspection is unavailable after expiry; approved canonical history is retained.
CV-IMPORT-04: full frontend attempt 03 passed 990 tests / 108 suites, zero skips; TypeScript/lint passed. Current offline sidecar partitions passed 76 + 14 disjoint tests; focused review/source/lease regressions passed. Real import browser attempt 04 passed 2/2 before final review corrections; fresh current-source integrated rerun remains required. See REVIEW.md and BACKEND.md for retained failure corrections.