Skip to content

fix: repo sanity sweep (5 gaps: pii contract, body cap, doc drift)#13

Merged
MANVENDRA-github merged 5 commits into
mainfrom
fix/repo-sanity
Jul 9, 2026
Merged

fix: repo sanity sweep (5 gaps: pii contract, body cap, doc drift)#13
MANVENDRA-github merged 5 commits into
mainfrom
fix/repo-sanity

Conversation

@MANVENDRA-github

Copy link
Copy Markdown
Owner

Full repo sanity sweep. All gates green before + after: app build, server tsc --noEmit, pick-check 21, cost-check 50, mat4-check 10, server e2e 13.

Fixes (one commit per file)

  • fix(ingest): pii diverged from both server mappers — file pipeline set pii = piiCategories.length>0, server ORs guardrailStatus==='block'. Same span, different contract value. Aligned.
  • docs(schema): t documented as "ms from first event" but OTLP/poller emit absolute epoch ms (no per-trace t0 in a ring buffer). Documented both paths.
  • fix(server): readBody had no size cap on the only network-facing write path — 8 MB cap → 413.
  • docs(readme): phantom npm run serveserve:spike.
  • docs(proof): pick math mirrors river-sim.wgsl (M4 moved motion authority from river.wgsl).

Verified clean, no action

MIRROR invariant exact · curl budget 0.080 < 0.09 gap holds · onError/adapter-null threading complete · ring buffer + dedup bounded · @shared alias sound. Skipped intentional pii/span lane overlap.

ingest.mjs set pii = piiCategories.length>0 while both server mappers
(otlp.ts, poller.ts) OR in guardrailStatus==='block'. Same source span
normalized to different pii values by path; poller comment claimed parity.
Single-value the contract.
Schema said t is 'ms from first event'; only ingest.mjs relativizes.
OTLP/poller emit absolute epoch ms (no per-trace t0 in a streaming ring
buffer). Documented both paths; live consumers use arrival time, not t.
readBody concatenated the whole request with no byte limit; the only
network-facing write path could grow memory unbounded on a hostile POST.
Cap at 8MB, destroy the socket, respond 413.
@MANVENDRA-github
MANVENDRA-github merged commit 7d416d9 into main Jul 9, 2026
1 check passed
@MANVENDRA-github
MANVENDRA-github deleted the fix/repo-sanity branch July 9, 2026 16:43
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.

1 participant