(cherry picked from commit 68f33253a8)
8.7 KiB
CV library action lifetime
11 November 2026. Source commit de2fb452, based on cef45404, branch codex/a3-ui-10.
The library allowed a create response to navigate after unmount and a PDF response to trigger a download after leaving or session invalidation. Confirmed delete and a rename read could also continue into a write after session loss. Duplicate completion could start another read and announce success in the stale context.
Reused the existing session-boundary cookie/context/invalidation functions and the BackupCard mount-generation pattern. Guarded profile-outline completion, create navigation, duplicate reload/feedback, deletion confirmation/completion, rename prompt/read/write completion, PDF download and asynchronous error decoding. Existing action locking, focus, drafts, current-language feedback, revision payloads and confirmations remain. No JSX, route, schema, canonical profile, renderer or PDF style changes.
Verification
- RED: seven new deferred-response cases failed on the original source; 24 other library cases were filtered out. The first wrapper had environment-assignment errors before Jest; Jest still executed and produced the seven expected assertion failures. Its raw receipt is retained, not presented as a clean command execution.
- GREEN: 85 distinct cases across five suites passed, no skips: CV library 35, CV API helpers 15, session boundary 15, job-export lifetime 16, backup lifetime four. This includes 11 added library cases. The earlier 31-case library pass overlaps this result.
- TypeScript
tsc --noEmit --incremental false: exit 0. Scoped ESLint on the two changed files: exit 0.git diff --check: passed. - Tests use real React/MUI dialogs with mocked API responses and controlled boundary signals. Existing session-boundary suite checks the actual boundary implementation separately. Active PDF test uses synthetic bytes and observes filename and URL revocation.
Limits and preservation
No fresh export build/native browser journey, real API/session/cookie-switch integration, physical PDF or accessibility acceptance is claimed. The previous export is stale for this frontend change. No cancellation or rollback of an already accepted server write is promised; stale completions are discarded. Initial library reads remain owned by the existing useViewResource/API path, which is outside this fix. All final A3, security, Phase 10 and release gates remain open. AttachmentStorage destination-ownership race remains source-backed and unproven; it was not changed.
Evidence is under cv-library-lifetime. Normalised source hashes and raw receipt hashes bind this bounded result.
AST graph refresh PASSED on an exact 1,003-file tracked-code snapshot on E: (E:/Storage/Projects/Active/temp docs/jobjakt-local-build/a3-cv-library-source). SOURCE_MANIFEST.json binds files to source commit de2fb452; 10,345 nodes and 36,111 edges. 51 no-symbol warnings retained. Code-only snapshot excludes documentation. Stale generated integration graph: all 2,721 files (97,063,540 bytes) preserved and SHA256-verified on E before replacing its C directory with a junction; no tracked source or evidence removed.
Concurrent rename in the library · 20 November 2026
On application source 7a2b8a95c146d67bc4584740e4a72740cfc25cbf, the rename dialog opened with the listed name. After confirmation the library fetched the current CV and used its latest revision and settings to write the requested name. A second editor could rename the same CV while that dialog was open. The subsequent write adopted the second editor’s revision and silently replaced their name. If both editors chose the same name the redundant write also created a revision.
The library now compares the name shown in the dialog with the name returned by the existing detail read. When they differ it shows the latest persisted name and skips the write. If the requested name differs as well, the existing localised conflict message appears. A user can reopen Rename on the current name and explicitly retry. A concurrent change confined to settings still allows a rename, using the latest settings and expected revision. A change after the detail read remains subject to server revision checks.
Reproduction and verification. Both added component cases failed on the original source because a PUT was issued. The corrected combined run passed 77 distinct cases in three suites (47 CV library, 15 CV helpers, 15 session boundary), zero failed or skipped. The conflict case verifies an explicit retry sends exactly one PUT with the current revision and settings. The equal-name case verifies zero PUTs and no conflict alert. TypeScript, scoped ESLint and Git whitespace checks passed. Raw Jest results are in the local cv-library-rename-verification evidence directory. SHA-256 values are 1841f3d9e7199d6f8e6deb886d2581a93f36b66273e3083075e5fd2dd2a46ba5 (red) and 8db570ffa120e80dc047db98ad2f3368a586cd35791a164343ee150742312495 (final). An intermediate invocation included a misspelled suite path and exited 1. Its two successful suites and the separate corrected session-suite run overlap the final 77.
Evidence scope. The tests render the real library and prompt with mocked transport. A native two-tab/browser run, real database writes, PDF rendering and full integrated acceptance were outside this execution. The earlier 85-case verification above is historical. The changed library source blob is 4b5018c6e549a4c5711dcc84a00082629af0ef80 and test blob is 448f46e977f4c733b3d99265e500fed8ee7779bf.
The AST-only Graphify refresh completed with 20,198 nodes and 50,033 edges. SQL extraction was unavailable and 146 source files yielded no symbols.
Native two-tab rename and SQLite readback · 20 November 2026
Application source 89128e1c33378bf2c65f2f28b048a63957772eb7. Two Chromium tabs shared a signed-in synthetic owner and the same CV. Tab one opened Rename on revision 1. Tab two renamed the CV through its library and committed revision 2. Tab one submitted its still-open draft, saw the conflict and the persisted name, and issued zero PUTs. After the owner reopened Rename and reviewed that name, tab one issued exactly one PUT with expected revision 2. A reload in tab two displayed the reviewed name. The variant and history APIs returned revisions 1, 2, 3. A separate read-only SQLite query against the disposable database verified exactly those three rows and identical stored settings at each revision.
Passed. Two native cases ran with one worker, zero retries, zero skips and zero flaky results. The new pre-read conflict case took 7.7 s. The existing post-read race took 4.7 s and received the real server 409 before an explicit retry. Both used a freshly built .NET 9.0.317 Release API, a unique local SQLite data root and a fresh static export. The .NET build had zero warnings or errors. The exact-lock Next 16.4.6 build completed compilation, TypeScript and static generation. The three component suites passed all 77 cases on the same dependencies; these overlap the 77 earlier cases. Scoped ESLint, whitespace and the AST refresh passed (20,199 nodes and 50,038 edges).
Build recovery. The initial webpack attempt used a cross-drive dependency junction which resolved Next 16.4.1 and failed module resolution. An independent offline npm ci installed 806 packages from the lockfile. The successful runs used Next 16.4.6, Jest 30.4.2 and Playwright 1.62.1. The npm log retained dependency deprecation notices and a pending install script for the resolver. No dependency versions changed. The local API emitted its existing SQLite migration and development key-storage warnings. This run did not qualify production migrations, backup/restore or key storage.
| Evidence | Identity |
|---|---|
| New browser test, Git blob | a57a77d87a377ae26ac0869469ab04732d93249b |
| Dependency lock, Git blob | 4c277d454e1164b1e24f21f463b5251052e53eaa |
| Playwright JSON, SHA-256 | 861352d6c00beb09d6e7fee5f0e596992d4eb2658fe07a65c0599f81e344ad10 |
| Pinned Jest JSON, SHA-256 | b6b5fd043f750e5a979f5ba70f81c86e314303eaaf707339b3fbc490a06d980b |
| Static export index / Release API DLL, SHA-256 | 78a5db16a0e85d8f3ead4cb6431d7fd021148b6d02d38007a4701769fb9f7e39 / 769e32f5c4f8bac61743dce67748dd5198cbbc472c8c6c1630ccefe81a1c91d2 |
Raw receipts are under E:/Storage/Projects/Active/temp docs/jobjakt-local-build/cv-library-rename-verification/. Reproduce with the existing isolated static-export Playwright configuration and phase7-cv-library.spec.ts --grep 'two library tabs|concurrent rename receives ordinary409' --workers=1 --retries=0. Both loopback servers stopped at completion. Browser coverage was desktop Chromium in English, on synthetic local SQLite records. MariaDB, human/device checks, PDF rendering, full A3, integrated security and release acceptance remain open.