Skip to content

Maintenance: deep audit #2 — deterministic workflowz, 8 fixes, tracked residuals - #25

Open
Coriou wants to merge 4 commits into
mainfrom
maintenance/deep-audit-2026-09-06
Open

Coriou wants to merge 4 commits into
mainfrom
maintenance/deep-audit-2026-09-06

Conversation

@Coriou

@Coriou Coriou commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Second deep-audit pass, now executed from the packaged deterministic procedure (docs/workflows/deep-audit.md).

Pipeline. 5 mutually-blind finder agents (protocol, security, resource, parity, concurrency) → 17 raw findings → 17 default-refute skeptics → 12 survivors → orchestrator re-verification → 8 fixes landed, 3 issues filed, 5 refuted (all on record). Full record: docs/audits/2026-09-06-deep-audit.md.

Fixes (each with a regression test that fails pre-fix):

  1. FT.SEARCH projection (high) — queries now send a conditional RETURN clause; previously every KNN candidate shipped its full hash (_vec + metadata + data), ~1.2GB of RESP3 parsing per topK=1000 query.
  2. Foreign-index startup abortsyncIndexes no longer adopts non-idx:* indexes; a shared Redis with someone else's vector index no longer crashes our startup on metric mismatch.
  3. Entry-point budget parity/update and /upsert-data now enforce the same metadata/data byte budgets as /upsert.
  4. Loud scan caps — reset / delete-by-prefix / delete-by-filter / fetch-prefix / random / rename now throw instead of silently reporting success on truncated scans (6 sites, shared MAX_SCAN_ITERATIONS).
  5. Provider embedding Float32 bound — 1e39 from an OpenAI-compatible provider 502s instead of storing Infinity bytes with 200.
  6. Unbounded explicit-id fetch/delete — lifted the undocumented 1000-ids cap (Upstash documents none for explicit ids).
  7. Prefix glob parity — glob metacharacters in prefixes are escaped into SCAN patterns instead of rejected; ids like doc[1] are now reachable by prefix.
  8. Read-path projection — fetch/range/random use HMGET/EXISTS instead of HGETALL; raw vector blobs and unrequested fields no longer transfer.

Refuted on the record (5): metrics-miss-error-responses (hono compose catches at the throwing frame — verified against installed source), timer-leak shutdown impact, re-init null window (unconstructible), range O(N) (committed deferred redesign), empty-filter 400 (deliberate, now documented in README).

Open, tracked (deep-audit label): #22 chunked slow-drip buffering, #23 /info dimension 0 cold state, #24 reset dropIndex race (needs a sticky-dimension product decision).

Also: docs/workflows/deep-audit.md is the single-source audit procedure — re-runnable by any agent harness or a future CI agent job. Doc truth reconciled (465 tests: 331/60/74; bun audit clean).

Gate: ./scripts/test-all.sh green — 331 unit / 60 integration / 74 SDK compatibility.

- F1: syncIndexes only adopts idx:* indexes; foreign vector indexes on a
  shared Redis no longer abort startup on metric mismatch
- F2: embedding provider output enforces the Float32 bound (502) — 1e39 no
  longer silently encodes to Infinity bytes via /upsert-data, /query-data,
  or embedded /update
- F3: SCAN iteration cap now fails loudly on reset, delete (prefix/filter),
  fetch prefix, random, and namespace enumeration — matching range.ts;
  silent truncation reported success while keys survived
- F4: /update and /upsert-data enforce the /upsert metadata/data budgets
- F6: FT.SEARCH projects only needed fields via RETURN (NOCONTENT unsafe:
  parser reads _score from attributes) — ~1GB transfers at topK=1000 gone
- F8: fetch/range/random project fields via HMGET/EXISTS instead of HGETALL
- F10: lift the 1000-ids cap on /fetch and /delete (Upstash documents no cap
  for explicit ids)
- F11: prefix globs are escaped into SCAN patterns instead of rejected
  (Upstash parity; ids may contain glob metacharacters)

New tests: sync-indexes, query-projection, entry-point-limits, plus
extensions to route-validation, keys, embedding suites. 465 tests green
(331/60/74).
- docs/audits/2026-09-06-deep-audit.md: full finder/refuter/synthesis record
- README: 465-test counts, batch-query cap, unbounded explicit-id fetch,
  empty-filter deviation row
- RUNBOOK: baseline 465, deep-audit section now points at the packaged
  procedure (docs/workflows/deep-audit.md) instead of duplicating it
- CLAUDE.md: counts 444 -> 465, audit pointer
The 50ms wall-clock assertion on the 100k-char pathological glob passed
locally but blew up on CI runners. The property under test is absence of
catastrophic backtracking — which manifests in seconds-to-minutes, not
milliseconds — so the bound moves to 2s: still fails hard on any
backtracking regression, tolerates noisy shared runners.
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