Project

General

Profile

Actions

Feature #376

open
NP NP

nuvita-admin: internal audit-events endpoint bound the wrong DTO (found testing D35)

Feature #376: nuvita-admin: internal audit-events endpoint bound the wrong DTO (found testing D35)

Added by Navya P. about 1 month ago. Updated 30 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/13/2026
Due date:
% Done:

0%

Estimated time:
Resolved By:

Description

Found while testing D35's IPD<->Canteen dietary-order flow end to end: nuvita-admin failed to build against current kernel dev (needed for the real IDietaryOrderReadContract) with a CS1503 on InternalAuditEventsController -- record.Action used as string against the kernel's now-typed AuditRecord.Action (AuditAction struct).

Real bug, not just a build nuisance: every real caller (HttpAuditPublisher, HttpAuditBatchTransport) sends AuditRecordWire JSON over the wire to POST /api/internal/audit-events -- a flat string action field, deliberately kept string-shaped so a module on an older kernel stays compatible. The controller's [FromBody] parameter was typed as the kernel's internal AuditRecord (struct Action), not AuditRecordWire -- a JSON shape mismatch that would silently mis-bind record.Action on every real audit write. Latent until now because nothing had rebuilt admin against a kernel new enough to even compile it.

Fixed: controller now binds AuditRecordWire. 15/15 InternalAuditEventsController tests pass unchanged (they already exercised the real wire shape), full admin suite 2733/2733 green. Fixed on its own branch (fix/internal-audit-events-typed-action), not dev.

NP Updated by Navya P. about 1 month ago Actions #1

  • Status changed from New to Resolved
  • Resolved By set to Navya P.

Done. Commit 5cbcdedc on nuvita-admin branch fix/internal-audit-events-typed-action (not dev). Full admin suite 2733/2733.

NP Updated by Navya P. 30 days ago Actions #2

  • Assignee set to Navya P.
Actions

Also available in: PDF Atom