wai: a ladder of timeliness fallbacks, and the reference sink scheduler #655

Merged
dcharlot merged 4 commits from wai/timeliness-ladder-scheduler into main 2026-11-05 18:13:50 -05:00
Owner

Timeliness gets a ladder of fallbacks, and a reference scheduler that runs a sink's plans.

The ladder (extensions/timeliness.md §4.1, §4.2, §4.3, §5.3, §6.3, §7.3)

  • fallback is null, one rung as an object, or 2 to 8 rungs as an array. Values strictly fall, and no object appears twice; a violation is timeliness_ladder_invalid (rule 3.4).
  • A single fallback object stays valid and reads, judges and plans as before. An array of one is refused, so one ladder has one written form.
  • At by_ms a sink presents the primary if it holds it, otherwise the first rung it holds. Holding neither, it states passed and presents no rung in the primary's place from then on. It presents the primary when it first holds it, while its value is at least 1, and at the end, having presented nothing, abandons any request and states ended.

The scheduler (§7.5, wai-rs/src/timeliness/scheduler.rs)

scheduler::run takes a sink's plans and the instants it first held each object, and returns fetch, abandon, present, passed and ended by ordered steps, as a function of those inputs alone. A later plan replaces the one in force wholly, and anything settled stays settled. plans_invalid and arrivals_invalid refuse bad input.

Verified

On a Linux build host, Rust 1.99.1, at this head:

  • The timeliness corpus: every case, group by group, 0 failures. timeliness_verify.py derives each outcome from the text; all mutated copies fail and all weakened verifiers are caught.
  • wai_timeliness_vectors verify regenerates the corpus byte for byte.
  • The cache-authority step, claim_verify.py on the claim corpus, and http_verify.py all pass.
  • wai breaking: no unacknowledged break. The API changes are acknowledged in the entry.
  • Clippy on the touched targets has no finding in the touched files; the public-text and spec-reference checks pass.
  • Falsification: every planted Rust fault is caught.

Limits

  • The step bodies ran with narrowed WAI_FEATURES, not the workflow's full union; CI runs the union.
  • No cache-authority vector carries a ladder yet. Both sides implement it; the case is added after the carousel change that regenerates that corpus lands.

The changelog entry is wai/changes/2026-11-05-rungs-fallback-ladder-sink-scheduler.md.

🤖 Generated with Claude Code

Timeliness gets a ladder of fallbacks, and a reference scheduler that runs a sink's plans. ## The ladder (`extensions/timeliness.md` §4.1, §4.2, §4.3, §5.3, §6.3, §7.3) - `fallback` is `null`, one rung as an object, or 2 to 8 rungs as an array. Values strictly fall, and no object appears twice; a violation is `timeliness_ladder_invalid` (rule 3.4). - A single fallback object stays valid and reads, judges and plans as before. An array of one is refused, so one ladder has one written form. - At `by_ms` a sink presents the primary if it holds it, otherwise the first rung it holds. Holding neither, it states `passed` and presents no rung in the primary's place from then on. It presents the primary when it first holds it, while its value is at least 1, and at the end, having presented nothing, abandons any request and states `ended`. ## The scheduler (§7.5, `wai-rs/src/timeliness/scheduler.rs`) `scheduler::run` takes a sink's plans and the instants it first held each object, and returns `fetch`, `abandon`, `present`, `passed` and `ended` by ordered steps, as a function of those inputs alone. A later plan replaces the one in force wholly, and anything settled stays settled. `plans_invalid` and `arrivals_invalid` refuse bad input. ## Verified On a Linux build host, Rust 1.99.1, at this head: - The timeliness corpus: every case, group by group, 0 failures. `timeliness_verify.py` derives each outcome from the text; all mutated copies fail and all weakened verifiers are caught. - `wai_timeliness_vectors verify` regenerates the corpus byte for byte. - The cache-authority step, `claim_verify.py` on the claim corpus, and `http_verify.py` all pass. - `wai breaking`: no unacknowledged break. The API changes are acknowledged in the entry. - Clippy on the touched targets has no finding in the touched files; the public-text and spec-reference checks pass. - Falsification: every planted Rust fault is caught. ## Limits - The step bodies ran with narrowed `WAI_FEATURES`, not the workflow's full union; CI runs the union. - No cache-authority vector carries a ladder yet. Both sides implement it; the case is added after the carousel change that regenerates that corpus lands. The changelog entry is `wai/changes/2026-11-05-rungs-fallback-ladder-sink-scheduler.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
An entry's fallback is an ordered ladder: null, one rung as an object, or two to eight rungs as an
array in strictly falling value, no object named twice (§4.2 rule 3.4, timeliness_ladder_invalid).
One rung has one form, the object, so an entry with one fallback object is a ladder of one rung and
reads, judges and plans as it did; the cache-authority corpus regenerates unchanged.

§5.3 states which rung applies: at by_ms the primary held, else the first rung held; holding
neither, the sink has passed every rung, states `passed`, presents the primary late at its value at
arrival, and at the end, having presented nothing, abandons and states `ended`. §6.3 and §7.3 take
the ladder, and a plan's choice names its rung.

§7.5 and timeliness::scheduler run a sink's plans against the instants it first held each object:
fetch, abandon, present, passed and ended by exact steps, a function of those inputs alone. A later
plan replaces the one in force wholly. plans_invalid and arrivals_invalid refuse a run's inputs.

The corpus gains the group E, ladder claims, verdicts and plans, and runs, each outcome declared in
the generator. timeliness_verify.py writes the ladder and the run from the text, with mutations and
weakenings for both, and claim_verify.py holds rule 3.4.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
timeliness §6.3's lines now read each rung, and cache_authority.rs asks for each. The second
implementation read one fallback object, which raises on a fallback written as an array. For one
rung the statements it gives are the same, so the cache-authority corpus reads as it did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
wai: a timeliness rung writes itself by value
All checks were successful
wai-ledger service / service · macos (pull_request) Successful in 1m24s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 15m59s
wai-pack / wai-pack · macos (pull_request) Successful in 4m32s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 11m25s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 6m0s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 10m18s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 20m45s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 23m21s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 13m25s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 19m51s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 2m10s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Successful in 2m16s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 3m45s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 17s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 21m21s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 24s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 48s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 11m50s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 2m51s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 28m42s
WAI HTTP delivery / HTTP corpus · verified both ways, and the differential (pull_request) Successful in 2m12s
WAI HTTP delivery / cache rules · controls and labelled caches (pull_request) Successful in 1m55s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m51s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 25s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 14s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 8m3s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 2m9s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 10m43s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 9m41s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 1h17m5s
73b68b245e
Fallback is Copy, so its to_value takes self, as clippy's wrong_self_convention asks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!655
No description provided.