Skip to content

fix(api): enforce the public task-list wire projection (#1075) - #1076

Merged
athvin merged 2 commits into
mainfrom
issue/1075-public-task-wire
Nov 9, 2026
Merged

athvin merged 2 commits into
mainfrom
issue/1075-public-task-wire

Conversation

@athvin

@athvin athvin commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Closes #1075

🚧 Claimed by an agent session — 2026-11-09T23:24:24Z, session Codex:01a1be1b-0c92-7703-a4c2-25cb2c999baa on Mac-46.
The claim is this open draft PR: closing it releases the ticket.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Project public task-list rows through generated TaskInstanceWire, omitting the internal token_hash field. Every other response byte is preserved.

Why

The handler serialized storage rows while the catalog marks token_hash internal. A real Viewer API key could read that hash. This fixes the visibility boundary before the byte-preserving response refactor in #864.

Proof

  • The real-Postgres Viewer regression failed at the omission assertion before the fix; an independent fresh-context verifier reproduced it. The same test passes after the fix, including exact public-response bytes, cross-org404 and the existing fallback-token lifecycle.
  • make check and make check-e2e passed. Both OpenAPI snapshots, TypeScript schema, envelope ledger and MCP manifest remain unchanged.

Risk & rollback

Only the undocumented internal field is removed; stored credentials and internal attempt responses are unchanged. Reverting the merge restores the disclosure, so prefer fixing compatibility issues forward.

Post-merge ledger

Closed by: unclosed

  • main is green with this change on it — merged as 7cad4ad9bb2262623deac0f83388ae9a442a1980 at2026-11-09T23:55:55Z. Exact landed file bytes verified; the post-merge watch runs until2026-11-10T00:25:55Z.
  • images — 42724372294 succeeded for merge7cad4ad9.
  • deploy — blocked — 42724740181 successfully deployed exact7cad4ad9 in dev/prod; /readyz returned200 in both. A process-emitted startup log for this image remains unverified. AWS MCP exposes documentation only, and guarded CLI access was rejected; workflow readiness is not substituted for process proof.
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change:
  • the board card — Verify and enforce the public task-list wire projection #1075 closed at2026-11-09T23:55:57Z and its project item reads Done through automation.
  • follow-ups are open for everything deferred here — numbers:
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned:

Specific to this change

Context — plan, discoveries, measurements, files

Plan

  1. Completed — extend the security harness map to name the task-ledger HTTP regression. In pg_task_instances.rs, use the existing active fallback-token fixture and mint a viewer key through the real API; assert the public list omits token_hash, retains its other fields/bytes, and still refuses a cross-org read. Observe the omission assertion fail against the current handler.
  2. Completed — have an independent fresh-context verifier reproduce/check the failing regression and inspect the source-to-response path before calling the candidate confirmed. Use only the owned local Postgres fixture and synthetic credentials.
  3. Completed — confirmed; convert the public list's rows through generated TaskInstanceWire, keeping the envelope and public values unchanged. Preserve internal attempt-channel behavior and the credential stored in Postgres; never edit generated files.
  4. Local validation and manual review complete; CI/landing in progress — run the real Postgres task-ledger regression before/after, make check, and make check-e2e; verify the committed contract artifacts remain unchanged. Review the diff, refresh from main and land on exact-head checks.
  5. Complete the post-merge ledger; prior docs(api): reconcile the completed JSON-wire schema backlog (#862) #1070/feat(api): classify local typed response envelopes (#863) #1073 watches continue independently. Parent Typed response structs across er-server handlers, by resource family (10 batches) #864 remains open for the typed-response batches.

Discoveries

Post-merge main: Rust42724372257, infra42724372246, devcontainer42724372384 and images42724372294 succeeded. Frontend42724372420 failed in the unchanged marketing Chromium shard: paused audit controls remained enabled at marketing-interactions.spec.ts:359, and the slider at line48 was flaky. Both signatures predate this PR and are documented in peer-owned #1074. No unrelated fix or additional retry was made here. The watch continues until00:25:55Z.

  • Confirmed by an independent fresh-context verifier: the real-Postgres regression fails before the fix at the internal-field omission assertion, after Viewer key creation and HTTP200. The source-inspected BFF forwards the task response to Viewers. No live environment was probed. Hash disclosure is established; credential replay or privilege escalation is not claimed.
  • After the fix the same regression passes, including exact bytes compared to the storage payload with only token_hash removed, cross-org404, and the existing fallback attempt authentication/start/heartbeat/finish lifecycle. Stored credentials and internal attempt responses are unchanged.
  • Full make check and make check-e2e passed on the final diff. No generated artifacts changed. Manual review confirmed reuse of the generated visibility projection and no added SQL, authorization change or new failure path.

Measurements

Files

  • rust/crates/er-server/src/lib.rs::list_job_tasks
  • rust/crates/er-server/tests/pg_task_instances.rs
  • .claude/skills/security/references/harness-map.md

@athvin
athvin marked this pull request as ready for review November 9, 2026 23:50
@athvin
athvin merged commit 7cad4ad into main Nov 9, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify and enforce the public task-list wire projection

2 participants