Repository navigation
Conversation
The service now prices a program itself: GET /run/quote?program_ref= for a saved program and POST /run/quote with the POST /run body. The run submit plan posts its exact submission body; run quote FILE posts the program and run quote --from names it (resolved and checked as run submit does); the job create plan names its pinned program_ref. Explicit options still override the program's own settings, and the CLI still never inspects program text. run quote reports the service's basis (each input with its source), and program_not_found maps to SERVICE_RESOURCE_NOT_FOUND. sync_service_interactions.py accepts the service's public interaction projection (interactions/2, no principals table); the catalog is re-vendored from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The service reports basis.model.source job_default when a job's type picks the model; run quote passes it through. The job create plan's quote keeps job_type next to program_ref. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rawwerks
force-pushed
the
feat/program-aware-quote
branch
from
October 7, 2026 16:16
a975b17 to
89143d0
Compare
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.
Stacked on #51. It targets #51's branch and should be retargeted to
mainonce #51 merges.Why
#51 made quotes send the options the user gave, but a quote still could not include a program's own
run:settings or its declared tools, because the CLI never parses program text. The hosted service now prices a program itself, in two ways:GET /run/quote?program_ref=OWNER/SLUG[@REV]:model,reasoning_effort,environmentandrepositoriesoverride the program's values.POST /run/quote: it takes the same body and query asPOST /run.basis, which gives each input (model,reasoning_effort,environment,tools,repositories) as{value, source}, withsourceone ofrequest,program,job_default(the default for a job's type) ordefault.What changes
Requests.
run submit/run createplan: sends its exact submission body toPOST /run/quote, with thePOST /runquery minusliveandsession, using the key. The quote now covers that run exactly:contentor the pinnedprogram_ref, the model, effort and repositories. It stays advisory.run quote FILE|-: sendsPOST /run/quotewith the program, built asrun submitbuilds it but without inputs. It sends the key when one is configured, or goes anonymous otherwise. It appliesrun submit's option checks, including the offered environment and runtime from the/healthit already reads.run quote --from REF: sendsGET /run/quote?program_ref=.OWNER/SLUGandOWNER/SLUG@REVare sent as given.SLUG, an@N, or one of your own pinned revisions is resolved and checked first, exactly asrun submit --fromdoes. That includes the commit-id correction.job createplan: adds the pinnedprogram_refto Quote holds with the run's options and accept webhook binding keys #51's spec-derived query (which includesjob_type), using the key.--from,run quotebehaves exactly as in Quote holds with the run's options and accept webhook binding keys #51, and a flagless quote is still anonymous and parameter-free.program draftis unchanged.Output.
basis: therun quoteresult gainsbasiswhen the service sends one.basisisSERVICE_PROTOCOL_INVALID.basisis present,result.environmentis its environment.Basis:line, e.g.Basis: model model-sol (request); reasoning effort medium (program); ....holdBasis: now reads...; quoted for the program and options given (basis names where each came from); ....program_not_foundmaps toSERVICE_RESOURCE_NOT_FOUND.Service catalog.
cli/ci/sync_service_interactions.pynow also accepts the service's public interaction projection (openprose.*-interactions/2), which publishes only allowlisted interactions and noprincipalstable./run/quoteroutes this client now calls.Files.
run.quoterequests 2–4, therun.submitandjob.createquote requests, the text, andprogram_not_found.runs.schema.json(basisand theholdBasisconst),common.schema.json(quoteBasis), andrunner-error.schema.json(theserviceCodeenum).runs/*andjobs/*cases. Every quote exchange pins its method, query,Authorizationpresence and body; the submit plan's quote pinsexpectedSha256equal to the plan'sbodySha256.service/{runs,jobs,program_ref,mod,programs}.rs.service/{runs,jobs,program-ref,index,programs,http}.ts.docs/service/*andCHANGELOG.md.Evidence
Against the hosted service, anonymously, before wiring the CLI:
GET ?program_ref=returnsbasiswithsource: "program".modeloverrides it (source: "request", a different hold).POSTwithcontentreads the program's model.POSTbodyprogram_refmust be pinned.POSTquery'srepositoriesmust equal the body's array, which the submit body already guarantees.program_not_found.Local, on macOS with Python 3.10.21, Rust from
rust-toolchain.tomland Bun 1.4.2. These gates pass:shared-contracts,service-help,public-surface-filesandservice-operations-corpusdifferential-conformanceandservice-coverage(0 routes unaccounted)rust-formatandrust-clippyservice-operations-rust-buildandservice-operations-rust: 1114 cases, 0 failuresbun-typecheck,service-operations-bun-buildandservice-operations-bun: 1114 cases, 0 failuresRust (
prose-runner-corelib plus theservice_*targets) and Bun service tests also pass.Not run here: the full
rust-testsgate. It is load-flaky on this machine in process-timing tests that this change doesn't touch, as noted on #51, whose GitHub CI passed. GitHub CI is authoritative.How it was built and reviewed:
The two ports were implemented independently from a written contract. Every new or refreshed case was accepted only where Rust and Bun produced identical bytes.
An independent review agent read the diff before this was opened. It found two port differences in
run quote:--from SLUG@REVagainst your own revisions;--environment/--runtimewith FILE.Both are fixed and pinned by new cases, along with doc corrections.
🤖 Generated with Claude Code