Skip to content

feat(id-benchmarks): cloud (D1/R2) preflight gate + strict result validator (#10187 fixture slice) - #17061

Merged
developing-today-fleet[bot] merged 3 commits into
mainfrom
lane/2122n-10187-cloud-preflight
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 3 commits into
mainfrom
lane/2122n-10187-cloud-preflight

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Lands the fixture-only slice of #10187 (C9133-CLOUD), the part the issue authorizes now: "this task itself runs fixture-only tests and makes no cloud call." The live cloud run stays contingent on approved credentials, a finite spend cap, a named region, and a corpus snapshot/digest; no measurements are fabricated and no cloud-run.v1.json is published by this PR.

pkgs/id/benchmarks/validate_results.py        (new)
└── strict validator for id-atlas-cloud-result/v1, modelled on validate_local_results.py
pkgs/id/benchmarks/run_cloud.py               (new)
└── contingent-trigger preflight gate; makes no cloud call
pkgs/id/benchmarks/tests/test_cloud_preflight.py (new)
└── fixture-only tests for both

What each piece does

  • validate_results.py — created first, per the issue. Recomputes the embedded corpus and fixture digests; requires exactly one D1 and one R2 run in the result-v1.schema.json shape; requires raw per-operation samples (>=5/op, flattened raw_samples parity), raw D1/R2 storage samples, provider-native billed units, dated pricing metadata (source URL + retrieval date + currency), and per-engine durability/RPO + replica semantics. Rejects local evidence (comparison_scope must be cloud-only; redb/turso engines are refused) and cloud results with zero provider calls.
  • run_cloud.py — strict argv validation before any file read. Preflight refuses (exit 3, naming the item) when credentials are absent or missing keys (values never printed), the spend cap is missing/non-finite/non-positive, the region is blank, or the corpus digest does not recompute. --fixture PATH validates a recorded cloud result through the validator and only then writes it to --result. Without --fixture, a passing preflight prints the approved envelope and exits 4 — live provider execution is a separate approved step, never implied.
  • test_cloud_preflight.py — oracle-named fixture tests: valid fixture accepted; rejections for local-only scope, local engine, undated pricing, missing native units, <5 samples, missing storage samples, digest mismatch, zero provider calls; preflight rejections for zero/NaN cap, blank region, digest mismatch, missing credentials file/key; CLI fixture mode writes only validated results; validator CLI exit codes 0/2.

Evidence

  • Local quick check (author-side, stdlib only): python3 pkgs/id/benchmarks/tests/test_cloud_preflight.py → "cloud preflight + validator fixture tests passed" (all five test groups). This is a fixture-only Python check, not a repo build.
  • The existing local pair (run_local.py / validate_local_results.py) and local-run.v1.json are untouched; the cloud document format is a sibling (id-atlas-cloud-result/v1), not a modification of the local one.

Remaining on #10187

The live D1/R2 run and its cloud-run.v1.json / cloud-run.v1.md results remain contingent on the trigger in the issue body. When credentials + cap + region + corpus snapshot are approved, run_cloud.py's preflight is the gate the run starts from.

Merge Danger

Door: two-way

Blast Radius: new files only, under pkgs/id/benchmarks/; no existing file changed, no runtime behavior changes.

Refs #10187

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-30T03:38:20Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 716de5d4-6126-420b-a9eb-1a7afaa7dca6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet
developing-today-fleet Bot merged commit 43a7c8f into main Nov 30, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the lane/2122n-10187-cloud-preflight branch November 30, 2026 03:39
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.

0 participants