Repository navigation
A serving turn's Work is what the caller asked for, not what a supplier loaded - #11410
Merged
Merged
Conversation
…er loaded
product.fabric.work WorkContract gains an execution coproduct:
MaterializedProgram { program, source, runtime_closure } | OfferedService { interface }.
gunbc.serving.turn_demand builds a turn as an OfferedService from the request
alone, so Work no longer waits on observing the selected engine's loaded
weights, tokenizer and runtime (a boundary obligation nothing can discharge,
which refused every turn). Those facts are offer provenance and admission policy.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dj2o6GdkmLj52khY9XJCMW
briansrls
added this pull request to the merge queue
Sep 15, 2026
…es its schema; the key-space transition is declared A U+001F-joined preimage was not injective (a separator moved across a field boundary derived one key for two contracts), and the new execution union added a second such layer. Every field is now framed label:length:bytes, steps included, under a leading schema tag. Schema 2 keys differ from schema 1 keys for every contract; work_identity_schema declares that and carries the census that makes it safe: no production site rehydrates a WorkKey from text, so no persisted key re-enters a comparison, and every in-process foreign-key join refuses with a typed cause. The either-unit witness is renamed to the proposition it proves (the model screen), and a separator RED is enrolled. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Coordinating from session/bright-gull-790 (#11440, dashboard adhoc-cdb42732-d95). Declared-unit digest durable store is at
Do not merge #11440 from this comment. |
briansrls
added this pull request to the merge queue
Sep 16, 2026
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Sep 16, 2026
…rn runtime component deleted by #11410; the host join moved to first_party_serving)
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
product.fabric.workWorkContractcould only describe a materialized program (program + source manifest + runtime closure). A serving turn was forced through that shape, sogunbc.serving.turn_demandbuilt the turn's source manifest from the selected engine's loaded weights, tokenizer and runtime. That reversed the dependency: the requester's identity waited on the supplier's realization. And since nothing can observe loaded weight/tokenizer bytes (a declared boundary obligation, DESIGN 4b), every serving turn refused before admission, which is the first hard wall between the harness and a live Spark turn.This PR fixes the boundary (DESIGN 3: interface, realization and policy are three facts):
product.fabric.work:WorkContract.execution: WorkExecution = MaterializedProgram { program, source, runtime_closure } | OfferedService { interface: ServiceInterfaceRef }. The arm is tagged into identity material, so a program and a service never share a key.work_contract_sourcehad no consumer and is removed.gunbc.serving.turn_demand:ServingTurnRequest { interface, inputs, effect_contract, output_contract }.serving_turn_contractis total, andserving_turn_workreturnsWork<P>. The model requirement (AnyAdmittedModel/ExactServingUnit) reaches identity throughExecutionRequirements.capabilities, as the harness already supplies it. The weights/tokenizer/runtime component standings, the manifest and theTurnWorkUnestablishedarm are deleted, not kept beside the new shape (a replacement migration cut at the root).gunbc.spark.serving_offer:spark_serving_turn_runtime(its only consumer was the deleted witness) is removed.WorkContractconstructions move toMaterializedProgramwith no change in meaning -- but a change in KEY: see the identity schema note below.harness_bind_seatreceives no normalized turn request, so one Work and one Demand cannot yet be built at the request boundary forspark_first_party_admission→bind_candidate. That is the next PR.Launch, unit, image and environment evidence is not discarded as a concept. It is offer provenance and admission policy (#11362's incarnation observation, a declared-unit digest, the usage-stats reader), and a demand that genuinely requires such a fact states it when one exists. No caller does today, so no such arm is declared (3c).
Evidence (executed)
Gunbc built from this head (
dd82e963b4) on srv1 (aarch64), run withgunbc run:test.claim.serving.turn_demand_witness, all 7 true:OfferedServicewith no engine observationwork_execution_materialturnsa_program_and_a_service_sharing_every_other_field_are_different_worksred, and only that witness.git grepforWorkContract/runtime_closure/product.fabric.workon gunbc-private origin/main returned nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_01Dj2o6GdkmLj52khY9XJCMW
Identity schema (side-chat hold, addressed)
The key preimage is now length-framed (
label:length:bytesper field, steps included) under a leading schema tag, so a separator byte moved across a field boundary can no longer fold two contracts onto one key (a_separator_moved_across_a_field_boundary_is_different_work). This is a new key space: every materialized-program contract derives a different key than under the joined preimage.product.fabric.workwork_identity_schemadeclares the transition and its census:derive_work_keyis the only mint,work_forthe only constructor, no production site rehydrates aWorkKeyfrom stored text (git grep 'as WorkKey'has no production hit), so no persisted key re-enters a comparison; every in-process foreign-key join (completion, attempt graph, grant issue) refuses with a typed cause.The either-unit witness is renamed to what it proves (the model screen over two unit values); the real one-Work-binds-on-either-offer control is owed by #11411 beside stable SupplierOffers.