Project account custody onto the shared host contracts - #264
Merged
Merged
Conversation
Pin the frozen algal host-contract revision and add Store::host_lifecycle, a read-only algal.host-lifecycle.v1 projection of one account's custody slot: the exclusive lease, sessions still marked working that do not hold it, held authority labels, the newest terminal receipt, and subscription-quota usage (never API dollars). A lease whose owner can no longer be proven alive projects as uncertain with pendingIntent bound to the exact run digest xcb recover requires — never settled or failed — and the projection runs on open_read_only, so building it cannot mutate state, retry a provider call, or change admission. Also ship the committed algal.host-profile.v1 fixture for the context-recipe host: the managed-program executor profile under the pinned evaluator, the real recipe and managed-call limits, reconcile-required uncertain-effect policy, and honest probes — only the committed offline replay carries passed evidence. The quota window vocabulary now has one shared definition so a window that can block a lease is the same window the projection reports. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
Pin the frozen ALGAL host-contract revision (
9922202a) and add two data-only records on top of it — neither grants authority, changes admission, retries a provider call, or writes state:Store::host_lifecycle(account, now)— a read-onlyalgal.host-lifecycle.v1projection of one account's custody slot, implemented as astorechild module so it reuses the same connection, decoders, and quota-window binding as the existing store code. A lease whose owning process can no longer be proven alive projects asuncertainwithpendingIntentbound to the exact stored run digestxcb recoverrequires — neversettledorfailed— and the record self-verifies throughalgal::host_contract::parse_host_lifecyclebefore returning. The projection runs onopen_read_only(query-only connection), which itself proves non-mutation.context_recipe_host_profile()plus the committed fixturecrates/xcb-runtime/tests/fixtures/context-recipe-host-profile.json— an offlinealgal.host-profile.v1for the context-recipe host: the managed-program executor profile under the pinned evaluator, real recipe/managed-call limits,reconcile-requireduncertain-effect policy, and honest probes (only the committed coordination replay carriespassedevidence; live dispatch and custody recovery arenot-run).The provider quota-window vocabulary is now one shared definition (
xcb_core::usage::account_windows): a window that can block a lease is the same window the projection reports, insubscription-quotaunits — never API dollars or token counters.Test plan
cargo test --workspace --locked— 34 binaries, all passcargo clippy --workspace --all-targets --locked -- -D warnings— cleancargo fmt --all -- --check— cleanbun run check— versions, typecheck, convex, 1094 bun tests, dist build, package smoke all passcrates/xcb-runtime/src/host_contract_tests.rs: ready/running/uncertain/stopped states,pendingIntentretention and digest binding, tampered/unsorted/missing-intent rejection, snapshot before/after plus an identical projection throughopen_read_only, live subscription-window share, fixture byte-parity with the builder, replay-evidence and evaluator-rev pinning