fix: repo sanity sweep (5 gaps: pii contract, body cap, doc drift)#13
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
piidiverged from both server mappers — file pipeline setpii = piiCategories.length>0, server ORsguardrailStatus==='block'. Same span, different contract value. Aligned.tdocumented as "ms from first event" but OTLP/poller emit absolute epoch ms (no per-trace t0 in a ring buffer). Documented both paths.readBodyhad no size cap on the only network-facing write path — 8 MB cap → 413.npm run serve→serve:spike.river-sim.wgsl(M4 moved motion authority fromriver.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 ·
@sharedalias sound. Skipped intentional pii/span lane overlap.