Repository navigation
feat(prebuilt): record the serving rung so decision 6 can histogram fallbacks - #2215
Merged
Merged
Conversation
…gram fallbacks `Artifact`/`Obtained` now carry the URL whose body produced the file (`None` when the bytes were already verified in a local cache), and the served `Outcome` records it in `prebuilt_libs.source` instead of `asset.urls[0]`. `ci/artifact_serving_bench.py` bins each COLD trial by that value (`fallback_rung_histogram`), read before the warm build overwrites the record. Refs #1882, #2196.
… object `document["arms"]` is `object`, so indexing it directly is reportIndexIssue; the drift job's tracked-python-types pass caught it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#1882decision 6's last in-repo metric:fallback_rung_histogram. It cannot be ahistogram of rung numbers because the ladder materialises decision 5's rungs as an
ordered URL list — so the record now names the URL that actually answered, and the
bench bins each cold trial by it.
prebuilt::Artifactgainsurl: Option<String>: the URL whose body produced the file,or
Nonewhen the bytes were already verified in the local cache (rung 1 — no requestat all).
prebuilt::Obtainedcarries that value through extraction.prebuilt_core::served_outcomerecords it inprebuilt_libs.sourceinstead ofasset.urls[0]. A mirror list's first entry is the one an ailing provider sits at, sonaming it after a build that never reached it is exactly what makes the histogram blind
to the outage it exists to catch. A reuse records
"cache"(newprebuilt_record::CACHE_SOURCE), never a mirror.ci/artifact_serving_bench.pyreads each trial's record immediately after the coldbuild, before the warm build overwrites it (a warm build always answers
cache), binsby
served_bin(source)— host for a URL,cache/sourcefor the two terminal rungs,unknownrather than silently dropping an unreadable value — and writesarms.<arm>.served_byplus a top-levelfallback_rung_histogram. The document staysadditive: a document without
served_bystill loads.Tests (real output)
soldr cargo test -p fbuild-packages-fetch --lib prebuilt→ 89 passed; 0 failed(new:
artifact.urlnames the answered url, and the second fetch of a verified filereports
None; the corrupt-first-mirror test asserts the second url answered;obtain_testsasserts a transfer names the rung and a reuse names none).soldr cargo test -p fbuild-build-esp --lib prebuilt→ 13 passed; 0 failed(
served_outcome_reports_a_transfer_and_a_reuse_apartnow asserts the record namesmirror-two.example, which is deliberately notasset.urls[0], and that a reuserecords
cache).soldr cargo test -p fbuild-build-engine --lib prebuilt_record→ 6 passed; 0 failed.uv run --no-project python -m unittest ci.test_artifact_serving_bench(TMPDIR=/tmp) →Ran 41 tests, OK (6 new, incl. "the accounting comes from the cold build not the
warm one" and the bin/Gate/report round-trips).
soldr cargo fmt --all -- --check→ exit 0.uv run --no-project python ci/enforce_platform_boundary.py --print-totals→rows=0; dylint_rows=0.RED proven: restoring
served_from: Some(asset.urls.first()…)makesserved_outcome_reports_a_transfer_and_a_reuse_apartfail withleft: "https://example.invalid/v1/core.tar.zst" / right: "https://mirror-two.example/prebuilt/core.tar.zst"(exit 101); restoring the fix and touching the file → 1 passed. The Python side is covered
by the cold-record test: reading the record after the warm build reports
cache/downloaded: falsefor a trial that transferred the archive.Additive:
prebuilt_libskeeps schema 1 and every existing field; documents withoutserved_byload with an empty histogram.Refs #1882, #2196 (both stay open — the remaining cells are a published-tree measurement
and the owner bucket).