Skip to content

Maintenance: adversarial audit remediation wave - #18

Merged
Coriou merged 2 commits into
mainfrom
maintenance/audit-remediation
Aug 26, 2026
Merged

Coriou merged 2 commits into
mainfrom
maintenance/audit-remediation

Conversation

@Coriou

@Coriou Coriou commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Output of a full runbook deep-audit pass (6 mutually-blind finders → 29 one-skeptic-per-finding refutations → synthesis).

Adjudication: 5 refuted, 24 confirmed (several with corrected magnitudes). This PR lands 19 surgical fixes across filter correctness, input bounds, read-path consistency, runtime failure paths, and CI/image hygiene — each with unit coverage (444 tests now, was 383). Design-level survivors filed as #13#17 with full mechanism + fix direction.

Highlights

  • Bounded DP glob matcher replaces regex translation — kills a measured O(n²)/O(n³) event-loop freeze; 408-assertion parity suite vs legacy behavior
  • Eager glob validation: malformed patterns (e.g. [z-a]) now 400 instead of silently empty queries and silent no-op deletes behind 200 OK
  • /upsert data/metadata caps close a persistent GB-scale query amplification vector
  • Float32-range vector validation stops finite inputs re-emerging as JSON null
  • idleTimeout ≥ request timeout (10s-vs-30s contract break reproduced empirically)
  • Embedding batch chunking makes large legitimate batches succeed instead of deterministically failing
  • All bun installs frozen in CI; runtime image slimmed (devDeps were shipping despite full bundling)

Deliberately unchanged: compose expose posture is by design for Coolify-style platforms (1bb3880) — docs now state this plainly with an override snippet for direct host access.

Coriou added 2 commits August 26, 2026 22:52
…put bounds, failure-path fixes, infra truth

24 findings survived the refute pass; this lands the surgical fixes:
- filter: bounded DP glob matcher (ReDoS-proof, parity-tested 408 asserts), eager pattern validation ([z-a] now 400 not silent empty/no-op delete), reject [] and chained brackets, no ''→0 coercion
- bounds: vector elements rejected beyond Float32 range; /upsert data<=1M chars + metadata serialized-size cap (amplification fix)
- read paths: fetch/delete ids route through validateId(); /range throws instead of silently truncating past ~1M keys
- runtime: Bun.serve idleTimeout derived >= requestTimeout; watchdog preserves unhealthySince on failed reinit (next-tick retry per docstring); FT.INFO verification failures fail loud instead of caching unverified dimension; embedding deadline armed through body consumption; embedMany chunked (256 items / 250k chars) preserving order
- infra: --frozen-lockfile in test.yml(2)/compat.yml(1)/maintenance.yml(2); biome schema 2.5.10; runtime image drops dev-inclusive node_modules (~94MB)

Refuted during audit: default-namespace 'global wipe' and colon-ID aliasing (v:: prefix arithmetic), string relational operators (exact Upstash parity), health liveness/readiness split. Filed as issues: #13 zombie mutations, #14 query response budget, #15 watchdog slow-ping semantics, #16 rename race, #17 upsert allocation chunking.
@Coriou
Coriou merged commit 3162ccc into main Aug 26, 2026
2 checks passed
@Coriou
Coriou deleted the maintenance/audit-remediation branch August 26, 2026 20:59
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