Skip to content

Auditor packets and run summaries remain unscoped on a scoped deployment profile (#501 follow-up) #508

Description

@Taleef7

Found by review of #506. Three surfaces still ignore the deployment profile:

  1. Run packetbackend-ts/src/audit/audit-packet.ts (~102–113) loads every outcome, computes unfiltered totals, and maps rows with the unfiltered toRunOutcomeRow and the static directory, so on the Maui profile a foreign subject id can reach the downloadable, hash-stamped JSON/HTML.
  2. Case packetaudit-packet.ts (~137, ~217) and backend-ts/src/routes/auditor.ts (~56) accept a foreign case id and emit its external id and fallback name.
  3. Run summaries — the runs CSV (export-csv.ts ~51), /api/runs (routes/runs.ts ~441, ~1191) and MCP run summaries (mcp/tools.ts ~230) use raw countOutcomesByStatus, so totals can include foreign subjects while the outcome grid excludes them.

Fix shape: profileSubjectMatcher (backend-ts/src/config/deployment-profile.ts) with the request-local directory, applied before rows/totals are assembled and hashed, a no-op on the default profile; for the counts, a per-status histogram that respects the predicate on scoped profiles. Each gets a Maui RED test plus a default companion asserting an unresolvable (QRDA-imported) subject is retained.

Not reachable on a freshly provisioned Maui database (no foreign rows), same premise as #501.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions