Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ff80391f4 | |||
| b9c0b61868 | |||
| 444d5c89a2 | |||
| e161ea3346 |
@@ -4,6 +4,7 @@ using JobTrackerApi.Services;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System.Text.Json;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
@@ -90,16 +91,119 @@ public sealed class SubmittedApplicationPackageTests
|
||||
Assert.Empty(db.SubmittedApplicationPackages);
|
||||
}
|
||||
|
||||
private static (JobTrackerContext Db, SubmittedApplicationPackageService Service, Mock<IAttachmentStorage> Storage) New(string userId)
|
||||
[Theory]
|
||||
[InlineData(false, 4)]
|
||||
[InlineData(true, 4)]
|
||||
[InlineData(false, 0)]
|
||||
[InlineData(true, 0)]
|
||||
public async Task Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(bool deleted, int version)
|
||||
{
|
||||
var renderer = new Mock<ICvVariantService>();
|
||||
var (db, service, storage) = New("owner-1", renderer);
|
||||
await using var dispose = db;
|
||||
var job = await SeedAsync(db, "owner-1", null);
|
||||
(await db.CvVariants.SingleAsync()).Version = version;
|
||||
await db.SaveChangesAsync();
|
||||
var real = new CvVariantService(db, new CareerProfileService(db), new ThemedCvRenderer());
|
||||
async Task<ThemedCvRenderResult?> RenderAfterChange(string owner, int id, CvRenderPerson person, CancellationToken ct, int? expected)
|
||||
{
|
||||
var current = await db.CvVariants.SingleAsync(x => x.Id == id, ct);
|
||||
if (deleted) db.CvVariants.Remove(current);
|
||||
else
|
||||
{
|
||||
current.Version += 1;
|
||||
current.SettingsJson = CvVariantSettingsJson.Serialize(new CvVariantSettings { ThemeId = "nordic", Headline = "Newer CV content" });
|
||||
}
|
||||
await db.SaveChangesAsync(ct);
|
||||
return await real.RenderAsync(owner, id, person, ct, expected);
|
||||
}
|
||||
renderer.Setup(x => x.RenderAsync("owner-1", It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>()))
|
||||
.Returns((string owner, int id, CvRenderPerson person, CancellationToken ct) => RenderAfterChange(owner, id, person, ct, null));
|
||||
renderer.Setup(x => x.RenderAsync("owner-1", It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>(), It.IsAny<int?>()))
|
||||
.Returns((string owner, int id, CvRenderPerson person, CancellationToken ct, int? expected) => RenderAfterChange(owner, id, person, ct, expected));
|
||||
|
||||
await Assert.ThrowsAsync<DbUpdateConcurrencyException>(() => service.CaptureAsync("owner-1", job.Id, new CvRenderPerson("Ada", null), default));
|
||||
|
||||
Assert.Empty(db.SubmittedApplicationPackages);
|
||||
Assert.Empty(db.SubmittedPackageAttachments);
|
||||
renderer.Verify(x => x.RenderAsync("owner-1", It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>(), version > 0 ? version : null), Times.Once);
|
||||
storage.Verify(x => x.SnapshotAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<CancellationToken>()), Times.Never);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Profile_changed_during_render_cannot_publish_old_profile_metadata_with_new_html()
|
||||
{
|
||||
var renderer = new Mock<ICvVariantService>();
|
||||
var (db, service, _) = New("owner-1", renderer);
|
||||
await using var dispose = db;
|
||||
var job = await SeedAsync(db, "owner-1", null);
|
||||
var career = new CareerProfileService(db);
|
||||
var real = new CvVariantService(db, career, new ThemedCvRenderer());
|
||||
renderer.Setup(x => x.RenderAsync("owner-1", It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>(), It.IsAny<int?>()))
|
||||
.Returns(async (string owner, int id, CvRenderPerson person, CancellationToken ct, int? expected) =>
|
||||
{
|
||||
var changed = JsonSerializer.Deserialize<StructuredCvProfile>("{\"version\":\"1\",\"contact\":{\"fullName\":\"New during capture\",\"headline\":\"Updated canonical profile\"}}", new JsonSerializerOptions { PropertyNameCaseInsensitive = true })!;
|
||||
await career.SaveVersionAsync(owner, changed, "manual", 0, ct);
|
||||
var rendered = await real.RenderAsync(owner, id, person, ct, expected);
|
||||
Assert.Contains("New during capture", rendered!.Html);
|
||||
return rendered;
|
||||
});
|
||||
|
||||
await Assert.ThrowsAsync<DbUpdateConcurrencyException>(() => service.CaptureAsync("owner-1", job.Id, new CvRenderPerson("Ada", null), default));
|
||||
|
||||
Assert.Empty(db.SubmittedApplicationPackages);
|
||||
Assert.Equal(1, (await db.CareerProfiles.SingleAsync()).Version);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(true)]
|
||||
[InlineData(false)]
|
||||
public async Task Profile_created_or_removed_during_render_aborts_capture(bool created)
|
||||
{
|
||||
var renderer = new Mock<ICvVariantService>();
|
||||
var (db, service, _) = New("owner-1", renderer);
|
||||
await using var dispose = db;
|
||||
var job = await SeedAsync(db, "owner-1", null);
|
||||
if (created) { db.CareerProfiles.Remove(await db.CareerProfiles.SingleAsync()); await db.SaveChangesAsync(); }
|
||||
var real = new CvVariantService(db, new CareerProfileService(db), new ThemedCvRenderer());
|
||||
renderer.Setup(x => x.RenderAsync("owner-1", It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>(), It.IsAny<int?>()))
|
||||
.Returns(async (string owner, int id, CvRenderPerson person, CancellationToken ct, int? expected) =>
|
||||
{
|
||||
if (created) db.CareerProfiles.Add(new CareerProfile { OwnerUserId = owner, Version = 1, ProfileJson = "{}" });
|
||||
else db.CareerProfiles.Remove(await db.CareerProfiles.SingleAsync(ct));
|
||||
await db.SaveChangesAsync(ct);
|
||||
return await real.RenderAsync(owner, id, person, ct, expected);
|
||||
});
|
||||
await Assert.ThrowsAsync<DbUpdateConcurrencyException>(() => service.CaptureAsync("owner-1", job.Id, new CvRenderPerson("Ada", null), default));
|
||||
Assert.Empty(db.SubmittedApplicationPackages);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Unchanged_absent_legacy_profile_remains_capturable()
|
||||
{
|
||||
var (db, service, _) = New("owner-1");
|
||||
await using var dispose = db;
|
||||
var job = await SeedAsync(db, "owner-1", null);
|
||||
db.CareerProfiles.Remove(await db.CareerProfiles.SingleAsync()); await db.SaveChangesAsync();
|
||||
Assert.NotNull(await service.CaptureAsync("owner-1", job.Id, new CvRenderPerson("Ada", null), default));
|
||||
Assert.Null((await db.SubmittedApplicationPackages.SingleAsync()).CareerProfileJson);
|
||||
}
|
||||
|
||||
private static (JobTrackerContext Db, SubmittedApplicationPackageService Service, Mock<IAttachmentStorage> Storage) New(string userId, Mock<ICvVariantService>? renderOverride = null)
|
||||
{
|
||||
var currentUser = new Mock<ICurrentUserService>();
|
||||
currentUser.SetupGet(x => x.UserId).Returns(userId);
|
||||
var options = new DbContextOptionsBuilder<JobTrackerContext>().UseInMemoryDatabase(Guid.NewGuid().ToString()).Options;
|
||||
var db = new JobTrackerContext(options, currentUser.Object);
|
||||
|
||||
var variants = new Mock<ICvVariantService>();
|
||||
variants.Setup(x => x.RenderAsync(userId, It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>()))
|
||||
.ReturnsAsync(new ThemedCvRenderResult("nordic", "cv.pdf", "<html>Frozen CV</html>"));
|
||||
var variants = renderOverride ?? new Mock<ICvVariantService>();
|
||||
if (renderOverride is null)
|
||||
{
|
||||
variants.Setup(x => x.RenderAsync(userId, It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>()))
|
||||
.ReturnsAsync(new ThemedCvRenderResult("nordic", "cv.pdf", "<html>Frozen CV</html>"));
|
||||
variants.Setup(x => x.RenderAsync(userId, It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>(), It.IsAny<int?>()))
|
||||
.ReturnsAsync(new ThemedCvRenderResult("nordic", "cv.pdf", "<html>Frozen CV</html>"));
|
||||
}
|
||||
|
||||
var storage = new Mock<IAttachmentStorage>();
|
||||
storage.Setup(x => x.IsManagedPath(It.IsAny<string>())).Returns(true);
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using System.Security.Claims;
|
||||
using System.Text.Json;
|
||||
using JobTrackerApi.Controllers;
|
||||
using JobTrackerApi.Models;
|
||||
using JobTrackerApi.Services;
|
||||
using JobTrackerApi.Tests.TestSupport;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace JobTrackerApi.Tests;
|
||||
|
||||
public sealed class SubmittedPackageConflictTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(true)]
|
||||
[InlineData(false)]
|
||||
public async Task Capture_reports_revision_conflict_only_for_an_authenticated_caller(bool authenticated)
|
||||
{
|
||||
var user = new ApplicationUser { Id = "owner" };
|
||||
var users = TestHostFactory.CreateUserManager(user);
|
||||
users.Setup(x => x.GetUserAsync(It.IsAny<ClaimsPrincipal>())).ReturnsAsync(authenticated ? user : null);
|
||||
var packages = new Mock<ISubmittedApplicationPackageService>();
|
||||
packages.Setup(x => x.CaptureAsync("owner", 7, It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>()))
|
||||
.ThrowsAsync(new DbUpdateConcurrencyException("CV changed"));
|
||||
var controller = new ApplicationAssetsController(users.Object, Mock.Of<IApplicationAssetsService>(), packages.Object)
|
||||
{ ControllerContext = new() { HttpContext = new DefaultHttpContext() } };
|
||||
|
||||
var result = await controller.CaptureSubmittedPackage(7, default);
|
||||
|
||||
if (authenticated)
|
||||
{
|
||||
var conflict = Assert.IsType<ConflictObjectResult>(result.Result);
|
||||
Assert.Equal("revision_conflict", JsonSerializer.SerializeToElement(conflict.Value).GetProperty("code").GetString());
|
||||
}
|
||||
else
|
||||
{
|
||||
Assert.IsType<UnauthorizedResult>(result.Result);
|
||||
packages.Verify(x => x.CaptureAsync(It.IsAny<string>(), It.IsAny<int>(), It.IsAny<CvRenderPerson>(), It.IsAny<CancellationToken>()), Times.Never);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,8 +148,15 @@ public sealed class ApplicationAssetsController : ControllerBase
|
||||
{
|
||||
var user = await _users.GetUserAsync(User);
|
||||
if (user is null) return Unauthorized();
|
||||
var result = await _packages.CaptureAsync(user.Id, jobId, Person(user), ct);
|
||||
return result is null ? NotFound() : Ok(result);
|
||||
try
|
||||
{
|
||||
var result = await _packages.CaptureAsync(user.Id, jobId, Person(user), ct);
|
||||
return result is null ? NotFound() : Ok(result);
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
return Conflict(new { code = "revision_conflict", message = "The application documents changed. Reload and review them before capturing a submitted package." });
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("submitted-packages/{packageId:int}")]
|
||||
|
||||
@@ -72,7 +72,20 @@ public sealed class SubmittedApplicationPackageService : ISubmittedApplicationPa
|
||||
? (await variantQuery.ToListAsync(ct)).MaxBy(v => v.UpdatedAtUtc)
|
||||
: await variantQuery.OrderByDescending(v => v.UpdatedAtUtc).FirstOrDefaultAsync(ct);
|
||||
var profile = await _db.CareerProfiles.AsNoTracking().FirstOrDefaultAsync(p => p.OwnerUserId == ownerUserId, ct);
|
||||
var render = variant is null ? null : await _variants.RenderAsync(ownerUserId, variant.Id, person, ct);
|
||||
var render = variant is null ? null : await _variants.RenderAsync(ownerUserId, variant.Id, person, ct, variant.Version > 0 ? variant.Version : null);
|
||||
if (variant is not null)
|
||||
{
|
||||
// Legacy version-zero variants remain capturable; recheck the stored snapshot after rendering.
|
||||
var current = await _db.CvVariants.AsNoTracking()
|
||||
.Where(v => v.Id == variant.Id && v.OwnerUserId == ownerUserId)
|
||||
.Select(v => new { v.Version, v.SettingsJson }).SingleOrDefaultAsync(ct);
|
||||
if (render is null || current is null || current.Version != variant.Version || current.SettingsJson != variant.SettingsJson)
|
||||
throw new DbUpdateConcurrencyException("The selected CV changed before the submitted package could be captured.");
|
||||
var currentProfile = await _db.CareerProfiles.AsNoTracking().Where(p => p.OwnerUserId == ownerUserId)
|
||||
.Select(p => new { p.Version, p.ProfileJson }).FirstOrDefaultAsync(ct);
|
||||
if (currentProfile?.Version != profile?.Version || currentProfile?.ProfileJson != profile?.ProfileJson)
|
||||
throw new DbUpdateConcurrencyException("The Career Profile changed before the submitted package could be captured.");
|
||||
}
|
||||
var version = (await _db.SubmittedApplicationPackages.AsNoTracking()
|
||||
.Where(x => x.OwnerUserId == ownerUserId && x.JobApplicationId == jobApplicationId)
|
||||
.Select(x => (int?)x.Version)
|
||||
|
||||
@@ -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,15 @@
|
||||
# Submitted CV snapshot revision integrity
|
||||
|
||||
Baseline9f341750; sourcee161ea33 on codex/frozen-document-integrity. This is a bounded integrity fix, not Phase10/A3/security/release acceptance.
|
||||
|
||||
The package service selected CV metadata and then rendered through the unversioned overload. A deterministic interleaving with the real CvVariantService reproduced publishing newer render data with older selected metadata, or continuing after deletion. Capture now passes the selected positive revision and rechecks the stored revision/settings after render. A missing selected CV aborts. The controller returns the existing409 revision_conflict code for this condition, preserving unauthenticated rejection and owner filtering.
|
||||
|
||||
An initial positive-only guard broke the native SQLite legacy version-zero fixture. The final path preserves zero-version capture through the existing unversioned compatibility path plus the post-render snapshot check. The public renderer's positive-revision validation was not relaxed. No fixture was weakened or renderer/physical PDF style changed.
|
||||
|
||||
Verification:RED8 cases (three failed/five passed); intermediate broader20 cases (one legacy compatibility failure/19 passed); final22 cases across package, controller conflict/auth, CV export revision and native SQLite compatibility suites passed with no skips. Four changed/deleted interleavings cover revisions4 and0; controller cases cover authenticated conflict/unauthenticated refusal. Existing frozen bytes/hash, tenant rejection, missing-file cleanup, later source mutation, account-export and native SQLite workflows remain covered. Native TRX gzip/raw receipts and source hashes are in evidence/package-revision.
|
||||
|
||||
The first build could not execute tests because C: was full. Only this run's fresh ignored bin/obj directories were removed after absolute-path/Git checks; generated output/temp/results were redirected to E using command flags, with offline cached restore. No source/evidence/dependency/user work was deleted. Delegated workers hit usage limits; root continued sequentially. C: capacity remains constrained.
|
||||
|
||||
Remaining investigation:concurrent Career Profile changes during render may require their own snapshot binding. AttachmentStorage.SnapshotAsync has a separate source-backed destination-ownership cleanup concern; no deterministic race reproduction or fix is claimed here. MariaDB, actual HTTP/browser capture, real models/providers, native device/AT, physical PDF acceptance, integrated security and recovery were not rerun. Existing accepted PDF metrics/visuals remain source-bound.
|
||||
|
||||
Rollback:revert the source commit, rebuild on the isolated development branch and rerun the affected suite. No migration/data repair is involved. UI callers retain the existing revision-conflict/review flow; an aborted capture publishes no package. This does not establish atomic consistency across every package source entity or filesystem race.
|
||||
@@ -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)
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"baseline": "9f341750ece2a3d2ddb11c14482df1ecc485a5c1",
|
||||
"sourceCommit": "e161ea33461eaefbecf08c96d79984029131e990",
|
||||
"sourcesLfSha256": {
|
||||
"JobTrackerApi/Services/SubmittedApplicationPackageService.cs": "f6315d491ccd5ddffb098ef22f35b0d727485bfe866ea875fc19c33ab897867e",
|
||||
"JobTrackerApi/Controllers/ApplicationAssetsController.cs": "bbed71f315f0be0381e4d6a09a536880f40040ba808b83a9d058b9fb1089bcc2",
|
||||
"JobTrackerApi.Tests/SubmittedApplicationPackageTests.cs": "9073b2ddc1e92e84063e10c071042c408c9eb9ab7f8403b2801bf5bbd121463b",
|
||||
"JobTrackerApi.Tests/SubmittedPackageConflictTests.cs": "e24038cae68c0d034bbcc07605aff09be1e23d4659ce391cf3de16c98f6a2ddf",
|
||||
"JobTrackerApi.Tests/CvExportRevisionTests.cs": "ee19195cec7486dd71d30ce6daa064ad07d5995c1dd97e529761e43511d9235d",
|
||||
"JobTrackerApi.Tests/SqliteDateTimeOffsetCompatibilityTests.cs": "5fb244d50d2378b8d18b14ac260beafc4bfd58190447306244b2916ea808d572",
|
||||
"JobTrackerApi/Services/CvVariantService.cs": "da85153ff2199a4410df91807c6073aa19736676332266a227149d6d089ea841"
|
||||
},
|
||||
"nativeReceipts": [
|
||||
{
|
||||
"name": "red",
|
||||
"artifact": "red.trx.gz",
|
||||
"total": 8,
|
||||
"passed": 5,
|
||||
"failed": 3,
|
||||
"rawSha256": "1c970594d7f3c7e86bc7d15ea7b79967cfcfb2202333d9933d9b70180d680bac",
|
||||
"gzipSha256": "3b69eafa4bda144a132547ec54a8d20b54b14fe263eb5c23ea854afff7f69598"
|
||||
},
|
||||
{
|
||||
"name": "intermediate",
|
||||
"artifact": "intermediate.trx.gz",
|
||||
"total": 20,
|
||||
"passed": 19,
|
||||
"failed": 1,
|
||||
"rawSha256": "26968e1cf8b575ba37de5f57f2898e4542427cf03a5136e7df351b9c4096b99c",
|
||||
"gzipSha256": "8a6021ee11a9dcd77b29f43cc3a146dd75d2f514e74f8650301a6e1cbd4fa0d2"
|
||||
},
|
||||
{
|
||||
"name": "final",
|
||||
"artifact": "final.trx.gz",
|
||||
"total": 22,
|
||||
"passed": 22,
|
||||
"failed": 0,
|
||||
"rawSha256": "faaa712ee6919280cda1e4384746f04ba02c7d807b3d4808b4468815df208062",
|
||||
"gzipSha256": "36e214810c9c840b5335385d1c18786489f57dd6f4812249a7e7c7ecb652f76a"
|
||||
}
|
||||
],
|
||||
"environment": "Pinned .NET9.0.317; existing offline NuGet cache; build/temp/results on E after C-drive exhaustion. No physical PDF/provider/MariaDB/live services."
|
||||
}
|
||||
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\green-final\green-final.trx
|
||||
|
||||
Passed! - Failed: 0, Passed: 22, Skipped: 0, Total: 22, Duration: 4 s - JobTrackerApi.Tests.dll (net9.0)
|
||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
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.64] JobTrackerApi.Tests.SqliteDateTimeOffsetCompatibilityTests.Tailoring_and_submission_capture_work_on_native_sqlite [FAIL]
|
||||
Failed JobTrackerApi.Tests.SqliteDateTimeOffsetCompatibilityTests.Tailoring_and_submission_capture_work_on_native_sqlite [768 ms]
|
||||
Error Message:
|
||||
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException : The CV changed after it was loaded.
|
||||
Stack Trace:
|
||||
at JobTrackerApi.Services.CvVariantService.RenderAsync(String ownerUserId, Int32 id, CvRenderPerson person, CancellationToken ct, Nullable`1 expectedVersion) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi\Services\CvVariantService.cs:line 188
|
||||
at JobTrackerApi.Services.SubmittedApplicationPackageService.CaptureAsync(String ownerUserId, Int32 jobApplicationId, CvRenderPerson person, CancellationToken ct) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi\Services\SubmittedApplicationPackageService.cs:line 75
|
||||
at JobTrackerApi.Tests.SqliteDateTimeOffsetCompatibilityTests.Tailoring_and_submission_capture_work_on_native_sqlite() in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SqliteDateTimeOffsetCompatibilityTests.cs:line 50
|
||||
at JobTrackerApi.Tests.SqliteDateTimeOffsetCompatibilityTests.Tailoring_and_submission_capture_work_on_native_sqlite() in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SqliteDateTimeOffsetCompatibilityTests.cs:line 94
|
||||
--- End of stack trace from previous location ---
|
||||
Results File: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\green\green.trx
|
||||
|
||||
Failed! - Failed: 1, Passed: 19, Skipped: 0, Total: 20, Duration: 3 s - JobTrackerApi.Tests.dll (net9.0)
|
||||
Binary file not shown.
@@ -0,0 +1,37 @@
|
||||
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.04] JobTrackerApi.Tests.SubmittedPackageConflictTests.Capture_reports_revision_conflict_only_for_an_authenticated_caller(authenticated: True) [FAIL]
|
||||
Failed JobTrackerApi.Tests.SubmittedPackageConflictTests.Capture_reports_revision_conflict_only_for_an_authenticated_caller(authenticated: True) [723 ms]
|
||||
Error Message:
|
||||
Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException : CV changed
|
||||
Stack Trace:
|
||||
at JobTrackerApi.Controllers.ApplicationAssetsController.CaptureSubmittedPackage(Int32 jobId, CancellationToken ct) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi\Controllers\ApplicationAssetsController.cs:line 151
|
||||
at JobTrackerApi.Tests.SubmittedPackageConflictTests.Capture_reports_revision_conflict_only_for_an_authenticated_caller(Boolean authenticated) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SubmittedPackageConflictTests.cs:line 31
|
||||
--- End of stack trace from previous location ---
|
||||
[xUnit.net 00:00:05.56] JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(deleted: False) [FAIL]
|
||||
[xUnit.net 00:00:05.58] JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(deleted: True) [FAIL]
|
||||
Failed JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(deleted: False) [137 ms]
|
||||
Error Message:
|
||||
Assert.Throws() Failure: No exception was thrown
|
||||
Expected: typeof(Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException)
|
||||
Stack Trace:
|
||||
at JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(Boolean deleted) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SubmittedApplicationPackageTests.cs:line 120
|
||||
at JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(Boolean deleted) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SubmittedApplicationPackageTests.cs:line 124
|
||||
--- End of stack trace from previous location ---
|
||||
Failed JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(deleted: True) [20 ms]
|
||||
Error Message:
|
||||
Assert.Throws() Failure: No exception was thrown
|
||||
Expected: typeof(Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException)
|
||||
Stack Trace:
|
||||
at JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(Boolean deleted) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SubmittedApplicationPackageTests.cs:line 120
|
||||
at JobTrackerApi.Tests.SubmittedApplicationPackageTests.Cv_changed_between_metadata_and_render_aborts_without_a_partial_package(Boolean deleted) in C:\Users\Connor\.codex\worktrees\frozen-document-integrity\Job tracker\JobTrackerApi.Tests\SubmittedApplicationPackageTests.cs:line 124
|
||||
--- End of stack trace from previous location ---
|
||||
Results File: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\frozen-document-integrity\red\red.trx
|
||||
|
||||
Failed! - Failed: 3, Passed: 5, Skipped: 0, Total: 8, Duration: 3 s - JobTrackerApi.Tests.dll (net9.0)
|
||||
Reference in New Issue
Block a user