Skip to content

mvp v6.1: fix typed-stage-split fire + backend image rebuild + freshness probe routing - #301

Merged
zzylol merged 3 commits into
mainfrom
mvp/v6-1-fix-and-rerun
May 7, 2026
Merged

zzylol merged 3 commits into
mainfrom
mvp/v6-1-fix-and-rerun

Conversation

@zzylol

@zzylol zzylol commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

v6 demo (PR #300) shipped honest measurements with three integration gaps. v6.1 diagnoses each and applies minimal fixes; full diagnosis lives in v6-1-diagnosis.md.

  • Gap 1 — typed-stage-split didn't fire (§8 STATUS=not-exercised). Root cause: the [USE_TYPED_STAGE_SPLIT] block lives in handle_plan (controller/src/main.rs:465+), which is reached only on POST /api/v1/plan. The startup workload-registry pre-pop loop calls planner.plan directly, bypassing the typed path. Fix: driver POSTs each canonical workload to /api/v1/plan after the OpAMP fabric settles. Also wires CONTROLLER_BACKEND_ENDPOINT=http://backend:9091/api/v1/streaming-config so the typed-backend JSON push has a real target.
  • Gap 2 — backend image cache (v5 features absent). v6 was running a stale asap/query-backend:dev (pre-SP-9: AST-aware hierarchical stage assignment (edge collector → leaf nodes, precompute engine → upper AST) #90 of ASAPQuery-backend); confirmed via grep -ao postings_filtered|gorilla_archive|s3_cost on the binary returning empty. Plus the v6 overlay didn't mount backend-storage-routing.yaml or set the ASAP_GORILLA_S3_* env block. v6.1 force-rebuilds with --no-cache (new sha 729c390454d9) and adds the backend env wiring + routing yaml mount + asap-gorilla MinIO bucket seed (mirroring baseline-b6-asap-single-sketch.yml).
  • Gap 3 — freshness probe routing (empty CSVs). Root cause was actually three layers: producer envs not propagating (YAML <<: doesn't deep-merge environment: under docker-compose), missing routing config (gap 2), and SimpleEngine has no pattern registered for http_freshness_probe_* so warm-tier queries return "No matching pattern". v6.1 fixes the first two layers (env inlined per producer; routing now mounted). The third layer needs streaming-config additions in the backend, beyond the compose-overlay scope.

v6 → v6.1 verdict diff

Item v6 v6.1
§8 STATUS not-exercised live
Crit ⑤ cold-fallback FAIL PASS (gorilla_archive marker)
Crit ⑥ freshness UNKNOWN UNKNOWN (deeper backend fix needed)
§4 postings v5-merge-pending v5-merge-pending (gorilla rejects count(...))
§6 S3 cost 0s 0s (no successful archive query in 60s)
§3 per-class rel-err empty empty (warm tier doesn't see http_requests_total — routing sends it to gorilla_s3_archive for crit ⑤; can't dual-route same metric)

Two of three gaps fully closed (§8 STATUS=live; criterion ⑤=PASS). Gap 3 partial — the routing wiring is correct now, but the backend's SimpleEngine doesn't auto-register patterns for new metrics, so freshness-probe queries return "No matching pattern". Honestly reported, not papered over.

Test plan

  • Force-rebuild backend image with --no-cache (sha 729c390454d9 — v5 features in binary)
  • Force-rebuild controller image (typed-stage-split strings present)
  • Run the demo synchronously (no nohup — wall ~7m total)
  • §8 STATUS=live (controller logs show 3× [USE_TYPED_STAGE_SPLIT] pushing typed … events; STATUS detector now greps both stdout + stderr per Rust tracing default)
  • Crit ⑤ PASS (cold_payments.json has data_source: gorilla_archive; verdict file = PASS)
  • Producer env propagation verified via docker compose config

zzylol and others added 3 commits May 6, 2026 20:09
Three integration gaps that the v6 demo (PR #300) surfaced as
`not-exercised`/`v5-merge-pending`/empty CSVs.

(1) Typed-stage-split path never fired. The block lives inside
`handle_plan` (`controller/src/main.rs:465+`); the workload-registry
pre-pop loop at startup uses a different code path. The driver now
POSTs each canonical workload to /api/v1/plan after stack settle so
the typed path is exercised end-to-end.

(2) v6 overlay omitted backend env + per-metric routing. Without
ASAP_GORILLA_S3_* and ASAP_BACKEND_STORAGE_ROUTING the cold-archive
engine isn't registered and every query lands on the warm tier.
Mirror the wiring already proven in baseline-b6-asap-single-sketch.yml,
plus the asap-gorilla MinIO bucket seed.

(3) YAML `<<:` merge does NOT deep-merge per-service environment
maps under docker-compose, so the producer-* services were missing
EXPORTER_FRESHNESS_PROBES + EXPORTER_RATE / FREQ_HZ from the anchor.
Inline the full env per producer.

CONTROLLER_BACKEND_ENDPOINT also wired so the typed-backend JSON
push has a real target instead of silently logging "no client
configured".

See v6-1-diagnosis.md for full diagnosis.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The first v6.1 run captured §8 STATUS=`not-exercised` even though the
controller's typed-stage-split path actually fired. Two small fixes:

1. The driver's STATUS detector greps `controller.stderr` only.
   Rust's `tracing_subscriber::fmt::init()` writes events to stdout,
   so docker logs splits them into our `controller.stdout` capture.
   Grep both files.

2. CONTROLLER_BACKEND_ENDPOINT must include the
   `/api/v1/streaming-config` path component — the BackendClient POSTs
   to the configured URL verbatim. Without the path, the typed
   backend JSON push hits the backend's root and gets a 404.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Captures the run-output artifacts referenced in the v6.1 PR comment.
Headline:

  §8 STATUS:  not-exercised → live
  Crit ⑤:    FAIL          → PASS (gorilla_archive marker present)
  Crit ⑥:    UNKNOWN       → UNKNOWN (deeper backend wiring required;
                                       routing yaml + producer env are
                                       fixed but SimpleEngine has no
                                       pattern registered for
                                       http_freshness_probe_*)
  §4 / §6:   v5-merge-pending / 0   (gorilla engine doesn't support
                                     `count(...)`, so the postings
                                     query returns 4xx; cost tracker
                                     stays at 0 because no successful
                                     archive query in the 60s window)

Two of three gaps closed. The third needs SimpleEngine pattern
registration for the freshness probe metric (or a streaming-config
overlay), which is a backend change beyond the scope of v6.1's
compose-overlay + driver fixes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit 6a58ce5 into main May 7, 2026
@zzylol
zzylol deleted the mvp/v6-1-fix-and-rerun branch May 7, 2026 00:31
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