M20: stabilize production acceptance
MobilityOps acceptance / backend (push) Canceled after 0s
MobilityOps acceptance / frontend (push) Canceled after 0s

This commit is contained in:
NuklearRabbit
2026-08-10 13:02:03 +02:00
parent 5d7a5e7359
commit f715085f65
4 changed files with 11 additions and 9 deletions
+3 -3
View File
@@ -53,15 +53,15 @@ def _deduplicate_sources(sources: list[SourceCard]) -> list[SourceCard]:
RAGcore document/version UUIDs change across uploads, so they are not useful RAGcore document/version UUIDs change across uploads, so they are not useful
deduplication keys. Human-visible citation identity is the normalized title, deduplication keys. Human-visible citation identity is the normalized title,
section and excerpt. section. Chunks from the same unsectioned document collapse into one card; distinct
named sections remain independently citable.
""" """
seen: set[tuple[str, str, str]] = set() seen: set[tuple[str, str]] = set()
unique: list[SourceCard] = [] unique: list[SourceCard] = []
for source in sources: for source in sources:
key = ( key = (
source.title.strip().casefold(), source.title.strip().casefold(),
source.section.strip().casefold(), source.section.strip().casefold(),
" ".join(source.excerpt.split()).casefold(),
) )
if key in seen: if key in seen:
continue continue
+1 -1
View File
@@ -297,7 +297,7 @@ def test_ragcore_sources_deduplicate_reuploaded_versions_and_cap_cards(monkeypat
"title": "Damage procedure" if index < 2 else f"Procedure {index}", "title": "Damage procedure" if index < 2 else f"Procedure {index}",
"section": "Return", "section": "Return",
"excerpt": ( "excerpt": (
"Record visible damage before release." f"Record visible damage before release, chunk {index}."
if index < 2 if index < 2
else f"Unique procedure evidence {index}." else f"Unique procedure evidence {index}."
), ),
+3 -3
View File
@@ -53,10 +53,10 @@ test("full guided demo walkthrough, start to finish, restoring the environment a
await test.step("step 4: handle the newly created data-quality issue", async () => { await test.step("step 4: handle the newly created data-quality issue", async () => {
await expect(page).toHaveURL(/\/data-quality$/); await expect(page).toHaveURL(/\/data-quality$/);
await expect(page.getByRole("heading", { name: "4. Bekijk en behandel" })).toBeVisible(); await expect(page.getByRole("heading", { name: "4. Bekijk en behandel" })).toBeVisible();
const firstIssueLink = page.locator(".data-table tbody tr").first().locator("a"); const odometerIssue = page.getByRole("row", { name: /Afwijkende kilometerstand/ });
await firstIssueLink.click(); await odometerIssue.locator("a").click();
await expect(page.getByText("Wat is er mis")).toBeVisible(); await expect(page.getByText("Wat is er mis")).toBeVisible();
// The newest issue is the odometer regression this return just created. // SLA ordering deliberately outranks recency, so select the issue by its rule.
await page.getByRole("radio", { name: /Laatst bevestigde stand behouden/ }).check(); await page.getByRole("radio", { name: /Laatst bevestigde stand behouden/ }).check();
await page.getByRole("button", { name: "Probleem oplossen" }).click(); await page.getByRole("button", { name: "Probleem oplossen" }).click();
await expect(page.getByText(/Probleem .* opgelost/)).toBeVisible(); await expect(page.getByText(/Probleem .* opgelost/)).toBeVisible();
+4 -2
View File
@@ -60,8 +60,10 @@ test("vehicles page: status filter and attention-only checkbox both work", async
await expect(page).toHaveURL(/attention_only=true/); await expect(page).toHaveURL(/attention_only=true/);
await expect(page.getByLabel("Attention only")).toBeChecked(); await expect(page.getByLabel("Attention only")).toBeChecked();
await expect(page.locator(".data-table tbody tr").first()).toBeVisible(); await expect(page.locator(".data-table tbody tr").first()).toBeVisible();
const attentionCells = await page.locator(".data-table tbody tr td:nth-child(6)").allTextContents(); const rows = page.locator(".data-table tbody tr");
expect(attentionCells.every((c) => c.includes("Needs attention"))).toBeTruthy(); await expect(rows.locator(".attention-flag")).toHaveCount(await rows.count());
const attentionReasons = await rows.locator(".attention-flag").allTextContents();
expect(attentionReasons.every((reason) => reason.trim().length > 0)).toBeTruthy();
}); });
test("vehicles page: free-text search actually filters the rendered rows", async ({ page }) => { test("vehicles page: free-text search actually filters the rendered rows", async ({ page }) => {