Skip to content

mvp v7 rerun: dual-routing demo + freshness verification - #302

Merged
zzylol merged 1 commit into
mainfrom
mvp/v7-rerun
May 7, 2026
Merged

zzylol merged 1 commit into
mainfrom
mvp/v7-rerun

Conversation

@zzylol

@zzylol zzylol commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

After backend PRs ProjectASAP/ASAPQuery-backend#91 + #92 + #93 admin-merged, this PR drives the v7 demo and captures the v6.1 → v7 verdict diff.

Three classes of change

  1. Routing yaml migrated to v7 dual-routing schema. http_requests_total fans out to TWO targets (warm-tier default + cold-archive [count, topk, rate_post_hoc]); freshness probes route to gorilla.

  2. asap-gorilla accepts agent-side index.json shape. IndexEntry + IndexFile now decode both backend-canonical (key/time_range/sample_count/schema_version) and agent-side (object/start_ts_nano+end_ts_nano/point_count/version) wire shapes. 3 new tests.

  3. Demo-side fixes. measure_freshness.py filters NaN responses (gorilla returns NaN for empty windows; the int-conversion blew up the script entirely pre-v7). base.yml makes backend RUST_LOG env-overridable.

Plus one staged ingest-side fix

gorillas3processor.encoder.go writes the seriesCount slot at byte offset 9 (post-magic, post-version) instead of the buggy offset 5. Pre-v7 every chunk landed with corrupted GORILLA1 magic bytes — invisible because no consumer decoded them; v7's last_over_time query path is the first that does. The fix lives in this branch as a code-level commit but takes effect only after rebuilding asap/sketchcol:dev from the patched go binary, which requires the local OCB build chain (sibling sketchlib-go repo + build_sketchcollector.sh + docker build -f Dockerfile.sketchcol). That rebuild is out of v7's two-change scope; staging it here lets the next agent rebuild close ⑥.

Verdict diff (v6.1 → v7)

# Criterion v6.1 v7 Delta
1 Bandwidth FAIL FAIL unchanged
2 Query latency PASS PASS unchanged
3 Combined resource CAPTURED CAPTURED unchanged
4 Accuracy UNKNOWN UNKNOWN routing fix landed; reducer prerequisite (cold-truth dump) is separate
5 Cold-fallback PASS PASS unchanged
6 Freshness UNKNOWN UNKNOWN routing fix landed; agent encoder bug blocks it (see report §6)
8 Controller emitter STATUS live live unchanged

MVP_REPORT_v7.md has the full diagnosis chain + v6.1 → v7 → next steps annotation.

Test plan

  • Backend image rebuilt with --no-cache (SHA 3553ceb8b0aa)
  • Demo run synchronously, no nohup daemonization
  • §8 STATUS = live
  • ⑤ cold-fallback marker PASS (gorilla_archive)
  • ② query-latency PASS across 3 query classes
  • Backend's v7 dual-routing yaml parses + routes correctly (verified via live curl and backend logs)
  • asap-gorilla accepts both wire shapes (3 new tests pass)

🤖 Generated with Claude Code

After backend PRs #91 / #92 / #93 land, this commit:

1. Migrates `deploy/configs/backend-storage-routing.yaml` to the v7
   dual-routing schema. http_requests_total fans out to TWO targets
   — warm-tier default + cold-archive `[count, topk, rate_post_hoc]`.
   Freshness probes route via gorilla.

2. Patches `asap-gorilla::IndexEntry` + `IndexFile` to accept BOTH
   the backend-canonical and agent-side JSON shapes (the agent's
   `gorillas3processor` writes `object`/`start_ts_nano`/`point_count`;
   backend writes `key`/`time_range`/`sample_count`). 3 new tests.

3. Patches `deploy/scripts/measure_freshness.py` to filter NaN
   responses from gorilla on empty windows. Pre-v7 the int
   conversion blew up the script entirely; now we keep polling.

4. Patches `deploy/docker-compose/base.yml` to make backend
   `RUST_LOG` env-overridable via `BACKEND_RUST_LOG`.

5. Patches `gorillas3processor.encoder.go` to write the seriesCount
   slot at byte offset 9 (post-magic, post-version) instead of the
   buggy offset 5. Pre-v7 every chunk landed with corrupted header
   bytes — invisible because no consumer decoded them; v7's
   `last_over_time` query path is the first that does.

6. Includes the v7 demo run artifacts under
   `deploy/eval-results/mvp-v7-2026-05-06/` plus an annotated
   `MVP_REPORT_v7.md` with v6.1 → v7 verdict diff and the diagnosis
   chain explaining why ④ and ⑥ remain UNKNOWN despite the routing
   side closing fully (agent encoder rebuild + SimpleEngine raw
   counter support are deferred next steps).

The agent encoder fix is staged as a code-level commit; it takes
effect only after rebuilding `asap/sketchcol:dev` from the patched
go binary, which requires the local OCB build chain. That rebuild
is out of v7's two-change scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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