Repository navigation
Description
Phase 3 (closing audit) of design #3068 — "parsed is not validated: one shape contract at every JSON trust boundary" (design doc: files/designs/code-parsed-is-not-validated.md in the keep-the-four-repos-healthy goal workspace). Filed by design-architect pass 26 (2026-10-31); gated on Phases 1–2 of #3068 landing (Phase 1: #2938, #2816, #2821, #2974; Phase 2: #2832, #2738, #2800, #2827, #2618). The adopted frame origins of this phase — #2824 and #2802 (id web collab/world frame shape) — are NOT gated on Phases 1–2 and proceed on their own triage; this issue is only the audit + contract statement.
Scope
Inventory every parse-then-dereference boundary in the surfaces #3068 covers — bin/, scripts/, pkgs/ tools (incl. cold-store-reaper and t3code-seed-providers), pm-stack's non-aggregator handlers, and pkgs/id/web — i.e. every JSON.parse, response.json(), json.loads, and MessagePack decode whose result is dereferenced. For each hit, disposition it in the closing evidence:
- (a) covered by Design: parsed is not validated — one shape contract at every JSON trust boundary #3068 Phases 1–3 (name the origin issue), or
- (b) a boundary the phases missed and the same rule covers — fix it under this issue if small and same-rule, otherwise file it as a named follow-up and link it here, or
- (c) not a trust boundary (code-constructed input, or shape already validated at the deref level) — named, with the one-line reason.
Explicit dispositions required
- cloudflare-export: GraphQL errors assumed to be an array of {message: string} — other shapes throw TypeErrors misclassified as fetch-failed, and a single-object errors is silently ignored #2608 (cloudflare-export: GraphQL
errorsassumed to be an array of{message: string}): decide its ownership once — it sits in a pm-stack exporter that design(aggregator): ingest, fail-closed — one validation contract for every document the PM stack consumes #2576's Phase 3 also touches. Record here (and on cloudflare-export: GraphQL errors assumed to be an array of {message: string} — other shapes throw TypeErrors misclassified as fetch-failed, and a single-object errors is silently ignored #2608) whether it is fixed under design(aggregator): ingest, fail-closed — one validation contract for every document the PM stack consumes #2576's Phase 3 as-built scope or under this design's rule; do not double-file it. - Every
?? []/|| {}/?? {}default at a parse boundary in the inventory: disposition as optional-by-design (the deref site treats absence and emptiness identically on purpose) or absence-as-emptiness (corollary 3 of Design: parsed is not validated — one shape contract at every JSON trust boundary #3068 — a bug; fix or follow-up per (b)).
Contract statement
Write the #3068 rule where this repo already states such contracts (bin header docs; the aggregator README's contract section by reference, without reopening #2576's document scope), in the terms the design doc records: validate the shape you deref, at the boundary, before any side effect; exact plain-object vocabulary; failure is the surface's own error; absence is not emptiness; the shared probe matrix (null, array, scalar, {}, each relied-on field wrong-typed).
Acceptance
- Inventory evidence posted on this issue (or a linked PR): every parse-then-deref boundary in the scoped surfaces with a disposition (a)/(b)/(c)
- cloudflare-export: GraphQL errors assumed to be an array of {message: string} — other shapes throw TypeErrors misclassified as fetch-failed, and a single-object errors is silently ignored #2608's ownership decided and recorded on both this issue and cloudflare-export: GraphQL errors assumed to be an array of {message: string} — other shapes throw TypeErrors misclassified as fetch-failed, and a single-object errors is silently ignored #2608
- Any (b) follow-ups filed and linked; any small same-rule fixes landed
- Contract statement landed; design issue Design: parsed is not validated — one shape contract at every JSON trust boundary #3068 closed with a link to this evidence
- This phase did not start before Design: parsed is not validated — one shape contract at every JSON trust boundary #3068 Phases 1–2 landed (record their closing state in the evidence)
Activity
dezren39 commentedon Oct 31, 2026
🤖 Design-architect pass 26 (2026-10-31) — agent note: this issue was filed this pass as the closing piece of Phase 3 of design #3068. It is gated on Phases 1–2 (#2938/#2816/#2821/#2974; #2832/#2738/#2800/#2827/#2618) landing and is labelled status/blocked accordingly; the phase's frame origins #2824/#2802 are NOT gated and proceed on their own triage. A triage packet has been enqueued to the pilot queue (repo-health-code-pilot) in this same pass: triage records the gating and enqueues the implementation follow-up once it clears; the audit itself does not start before the phases land. Its closing evidence must explicitly disposition #2608 against #2576's Phase 3 scope.
dezren39 commentedon Oct 31, 2026
🤖 Agent note · picked up
337 remaining items
developing-today commentedon Nov 5, 2026
🤖 Agent note · parked
developing-today commentedon Nov 5, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 5, 2026
🤖 Agent note · parked
dezren39 commentedon Nov 5, 2026
🤖 Agent note · parked — hard gate unmet
verifiedcheckpointdezren39 commentedon Nov 5, 2026
🤖 Agent note · parked — hard gate unmet
dezren39 commentedon Nov 5, 2026
🤖 Agent note · parked