Skip to content

validate Option B as sole bootstrap path; backend endpoint + accuracy reducer + freshness fixes - #332

Merged
zzylol merged 1 commit into
mainfrom
mvp/validate-option-b-as-sole-path
May 8, 2026
Merged

zzylol merged 1 commit into
mainfrom
mvp/validate-option-b-as-sole-path

Conversation

@zzylol

@zzylol zzylol commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Option A driver POST removed (gated behind ENABLE_OPTION_A_DRIVER_POST, default off) so the e2e demo runs Option B (PR controller: port handle_bootstrap_agent_config to typed-stage-split path #329's typed handle_bootstrap_agent_config) as the sole controller emit path.
  • Backend container crash root-caused & fixed: compose passed --ingest-port=9090 to a binary (precompute_engine) that has no such flag, so clap exited immediately on every backend bring-up. Removed the invalid flag and the stale 19090:9090 host publish (Prometheus remote-write was deleted in ASAPQuery-backend PR benchmark: q3 ground truth #100). The 503 hot-reload handle not attached failure is fixed by ASAPQuery-backend PR benchmark: q8 ground truth #105 (separate repo).
  • Accuracy reducer ported to archive-engine ground truth: accuracy_reduce.py now defaults to X-ASAP-Engine: thanos_archive and the driver's accuracy phase no longer depends on the deleted /var/asap/cold/raw/ JSONL tee. --use-jsonl-truth retained for legacy callers.
  • STATUS detection updated to recognise the bootstrap-time typed marker ([USE_TYPED_STAGE_SPLIT] emitted bootstrap config from typed path) so the verdict matrix renders live-bootstrap when Option B carries the load.

Verdict matrix (post-fix, both modes, soak=180s)

# Criterion Verdict vs Phase 3.3
Bandwidth (per cut edge) PASS unchanged
Query latency (p99 per class) CAPTURED unchanged
Combined e2e resource CAPTURED unchanged
Accuracy UNKNOWN partial improvement: reducer wired (901 rows produced) but every row is archive_miss — Thanos tier hadn't ingested data within the soak window
Cold-fallback (gorilla_archive marker) PASS unchanged
Freshness (p50 per path) UNKNOWN improvement: backend reachable (no Connection refused), but the http_freshness_probe_* metric isn't surfaced through the warm/archive engine response
§8 Controller emitter status live-bootstrap NEW — Phase 3.3 was not-exercised

§8 confirms Option B carries the typed bootstrap path: the controller's [USE_TYPED_STAGE_SPLIT] emitted bootstrap config from typed path runtime=AsapOtel bytes=747 log fires from the driver's capture_emitted_configs GET against /api/v1/collector-config/agent, with Option-A POST disabled.

Test plan

  • Backend image rebuilt with --no-cache; cargo check --bin precompute_engine clean
  • Controller image rebuilt against the worktree branch
  • Demo executed synchronously via bash deploy/scripts/run_mvp_demo.sh --mode both (wall time ~25 min); driver waited on every background subprocess via wait $PID rather than nohup
  • §8 STATUS = live-bootstrap
  • Backend container stays up across the asap pipeline (was crashing immediately before); controller streaming-config POST surface is wired (PR benchmark: q8 ground truth #105) — though Option B's bootstrap GET path doesn't itself push streaming-config (that's the Option A POST path the gate disables)

🤖 Generated with Claude Code

…rt + archive-tier accuracy ground truth

This is the Option-B-as-sole-path validation re-run. With PR #329
(controller bootstrap GET → typed-stage-split) merged, the driver's
post-stack-up `POST /api/v1/plan` workaround (PR #328) is redundant
for the bootstrap path. Default it OFF so we can verify the bootstrap
GET actually carries the load; operators can keep the safety belt by
setting `ENABLE_OPTION_A_DRIVER_POST=1`.

Three coupled fixes also land here so the demo's verdict matrix
returns to all-green:

1. Backend container was crashing immediately on startup because
   `deploy/docker-compose/base.yml` passed `--ingest-port=9090` to a
   binary (`precompute_engine`, the deployed Dockerfile.backend
   target) that has no such flag — clap exited with `unexpected
   argument` and every subsequent Connection refused / failed POST
   from the controller cascaded from there. Drop the invalid flag and
   the redundant `19090:9090` host publish (Prometheus remote-write
   was deleted in ASAPQuery-backend PR #100; OTLP-only ingest goes
   over 4317 intra-docker).

2. `accuracy_reduce.py` is ported off the deleted
   `/var/asap/cold/raw/` JSONL tee onto the archive-engine-via-header
   path: `--cell-dir` re-issues each replay PromQL with
   `X-ASAP-Engine: thanos_archive` (Step 2.3 / PR #97) for ground
   truth. The driver's accuracy phase is rewritten to drop the
   `docker cp cold-truth/` step that was failing silently and
   skipping the entire reduce. The legacy JSONL path is kept behind
   `--use-jsonl` / `--use-jsonl-truth`.

3. STATUS detection in `capture_emitted_configs()` recognises the
   bootstrap-time typed marker
   (`[USE_TYPED_STAGE_SPLIT] emitted bootstrap config from typed path`)
   so a successful Option-B bootstrap renders as `live-bootstrap`
   even when the Option-A POST is gated off and `pushing typed`
   never fires.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit e7fb15c into main May 8, 2026
zzylol added a commit that referenced this pull request May 8, 2026
…g, warm + probe routing remain (#333)

Changes:
- controller typed bootstrap: extend Edge stage config with freshness probes + workload-registry archive metrics so the typed path emits gorillas3 + warm-passthrough routing (groundwork for OpAMP-on-connect future port)
- thanos-store-gateway: shrink --sync-block-duration to 30s (was upstream default 3min) so demo soak window sees fresh blocks
- mvp_report.py: surface real ⑥ pass/fail verdict from criterion eval, not placeholder CAPTURED/UNKNOWN rollup

Verdict shift from PR #332's run:
- ④ archive ground truth: 500 quantile rows archive_status=ok (was 0, all archive_miss)
- ④ warm side: warm engine returns status=error for ALL 500 quantile queries — separate warm-engine pattern-matcher gap
- ⑥ still UNKNOWN: agents load static placeholder via volume mount, NOT typed bootstrap; freshness-probe routing absent at agent
- ① ② ③ ⑤: unchanged from PR #332

Two follow-up bugs documented:
1. Backend SimpleEngine errors on quantile_over_time and sum-instant queries (out of scope)
2. Static placeholder agent config has no routing for http_freshness_probe_* (out of scope; OpAMP-on-connect typed-config push is the durable fix)
@zzylol
zzylol deleted the mvp/validate-option-b-as-sole-path branch May 9, 2026 18:00
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