test(documents): record canonical profile capture interleavings
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Canonical profile binding during submitted CV capture
|
||||
|
||||
Follow-up to PACKAGE_REVISION_CAPTURE.md. The CV variant guard alone did not bind the canonical profile metadata to the profile used by rendering. A deterministic test used the real CareerProfileService save and CvVariantService render to change the profile during capture; the resulting HTML contained the new name while capture could still publish the previously selected projection.
|
||||
|
||||
Capture now rechecks the owner's canonical profile revision/projection after rendering and rejects a changed, created or removed row through the existing revision_conflict path. A genuinely absent legacy profile remains capturable. Canonical save/render ownership, null-as-inherit selections, renderer code/styles and historical packages are unchanged. No new profile store, schema, API field or migration.
|
||||
|
||||
RED:one focused test failed with no conflict. GREEN:26 targeted cases passed/no skips across package/controller/export-revision/native SQLite suites;22 overlap the preceding run. Four added cases cover real profile save during render, creation, removal and unchanged absence. Logs and raw/gzip TRX/source receipts are in evidence/package-profile. Build/temp/results used E; no live DB/models/providers, physical PDF or production services were used.
|
||||
|
||||
This guards the canonical row/projection used by ordinary writers. It is not proof of a transactionally atomic snapshot across every source, arbitrary direct database mutations, legacy user-only fallback writes, or filesystem races. AttachmentStorage destination ownership remains a separate source-backed/unreproduced concern. Native/MariaDB/browser, full integrated security/recovery and final milestone gates remain open.
|
||||
|
||||
Rollback reverts only this follow-up source change and reruns affected package tests; no data repair required. Existing accepted PDF metrics remain historical and source-bound, not newly executed.
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"sourceCommit": "b9c0b6186871d31a494c05cabc5e6361dccb851f",
|
||||
"sourcesLfSha256": {
|
||||
"JobTrackerApi/Services/SubmittedApplicationPackageService.cs": "75a4aabb02d21cc860cfa05006defaddeb8ef5918eb973e624690b0d8da42e70",
|
||||
"JobTrackerApi.Tests/SubmittedApplicationPackageTests.cs": "9f737f14852a1bb93e36913407aaed9d2939207a4f0806d1086d8cc456350af3",
|
||||
"JobTrackerApi/Services/CareerProfileService.cs": "dc91aca78069feff24eecf796c1fac459af9f5564e61d7918822f45b81807fef",
|
||||
"JobTrackerApi/Services/CvVariantService.cs": "da85153ff2199a4410df91807c6073aa19736676332266a227149d6d089ea841"
|
||||
},
|
||||
"receipts": [
|
||||
{
|
||||
"name": "profile-red",
|
||||
"total": 1,
|
||||
"passed": 0,
|
||||
"failed": 1,
|
||||
"rawSha256": "b63f144ec7c99a3eb40841ac7e5cc59ae84d71017e388afccb4cf441e3a9fcba",
|
||||
"gzipSha256": "482b6a8b235ce988134cbaebe52de232b3c469dcd02f535156a05a3bf5a2fa82"
|
||||
},
|
||||
{
|
||||
"name": "profile-green",
|
||||
"total": 26,
|
||||
"passed": 26,
|
||||
"failed": 0,
|
||||
"rawSha256": "7eb74ef3e0aca92ae83dd673026cdb1bfc45da3b976732ad6f043ae83f9b6ea9",
|
||||
"gzipSha256": "eb5251eda46e66feb96d69711757c19aea2bef1da70c9e404321b8827910301a"
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
JobTrackerApi -> E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\JobTrackerApi\debug\JobTrackerApi.dll
|
||||
PdfBrowserStub -> E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\PdfBrowserStub\debug\PdfBrowserStub.dll
|
||||
JobTrackerApi.Tests -> E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\JobTrackerApi.Tests\debug\JobTrackerApi.Tests.dll
|
||||
Test run for E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\JobTrackerApi.Tests\debug\JobTrackerApi.Tests.dll (.NETCoreApp,Version=v9.0)
|
||||
VSTest version 17.14.1 (x64)
|
||||
|
||||
Starting test execution, please wait...
|
||||
A total of 1 test files matched the specified pattern.
|
||||
Results File: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\profile-green\profile-green.trx
|
||||
|
||||
Passed! - Failed: 0, Passed: 26, Skipped: 0, Total: 26, Duration: 4 s - JobTrackerApi.Tests.dll (net9.0)
|
||||
Binary file not shown.
@@ -0,0 +1,20 @@
|
||||
JobTrackerApi -> E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\JobTrackerApi\debug\JobTrackerApi.dll
|
||||
PdfBrowserStub -> E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\PdfBrowserStub\debug\PdfBrowserStub.dll
|
||||
JobTrackerApi.Tests -> E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\JobTrackerApi.Tests\debug\JobTrackerApi.Tests.dll
|
||||
Test run for E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\artifacts\bin\JobTrackerApi.Tests\debug\JobTrackerApi.Tests.dll (.NETCoreApp,Version=v9.0)
|
||||
VSTest version 17.14.1 (x64)
|
||||
|
||||
Starting test execution, please wait...
|
||||
A total of 1 test files matched the specified pattern.
|
||||
[xUnit.net 00:00:03.18] JobTrackerApi.Tests.SubmittedApplicationPackageTests.Profile_changed_during_render_cannot_publish_old_profile_metadata_with_new_html [FAIL]
|
||||
Failed JobTrackerApi.Tests.SubmittedApplicationPackageTests.Profile_changed_during_render_cannot_publish_old_profile_metadata_with_new_html [2 s]
|
||||
Error Message:
|
||||
Assert.Throws() Failure: No exception was thrown
|
||||
Expected: typeof(Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException)
|
||||
Stack Trace:
|
||||
at JobTrackerApi.Tests.SubmittedApplicationPackageTests.Profile_changed_during_render_cannot_publish_old_profile_metadata_with_new_html() in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SubmittedApplicationPackageTests.cs:line 152
|
||||
at JobTrackerApi.Tests.SubmittedApplicationPackageTests.Profile_changed_during_render_cannot_publish_old_profile_metadata_with_new_html() in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SubmittedApplicationPackageTests.cs:line 155
|
||||
--- End of stack trace from previous location ---
|
||||
Results File: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\profile-red\profile-red.trx
|
||||
|
||||
Failed! - Failed: 1, Passed: 0, Skipped: 0, Total: 1, Duration: 2 s - JobTrackerApi.Tests.dll (net9.0)
|
||||
Reference in New Issue
Block a user