Sourced allocation quotes

Reading sourced allocation quotes

stado cost prices --json
stado cost quote --json -- JOB_ID OTHER_JOB_ID

Both commands are read-only. They neither enable autonomy nor fetch a new provider book. prices reads the book the producer recorded; observation time and each source's state are part of the result. A book is not an invoice or a capacity reservation, and an absent quote is not a zero price.

quote reads canonical job state, recorded worker identity, inventory and that price book. It does not use the requested provider, machine name or purchase preference as proof of placement, and it does not use the legacy estimate heuristic. local@HOST is an agent transport reference: cloud agents use it too. An allocation whose worker states it is owned hardware is answered with <reference> is owned hardware, which no provider quotes: its hours are priced from the energy its boards measured at the host's power_tariff, read with stado cost host andstado cost report``; the worker's record does not certify a physically local host.

Before claiming work, AWS agents record their metadata account, region and instance ID; GCP agents record project, zone, name and numeric instance generation. The report retains the worker's observation time or its actual identity-read error. AWS inventory also resolves the credential's actual account through STS rather than accepting an account label from configuration. Azure native worker identity is unavailable in this revision and remains an explicit missing-identity refusal, not a requested-provider or local fallback.

A cloud allocation needs one inventory resource matching that worker's scope and generation, its actual machine and purchase model, and one complete matching USD hourly quote. Source state, resource identity and timestamps remain in the response. An inventory or quote observation older than the claimed execution is refused; a resource created after the claim is not silently treated as the original resource. A same-name replacement with a different generation cannot supply the old worker's quote.

AWS Spot collection retains the current effective rate for each machine and availability zone, including the price change before the requested instant. It does not take a median across historical or regional prices. AWS on-demand collection retains flat hourly price dimensions rather than choosing the minimum; conflicting eligible dimensions make the allocation quote ambiguous. Old books without that provenance are not accepted as those observations. For an identified Azure resource, matching uses its observed VM size, OS and documented purchase priority. GCP component-only SKU books cannot establish a complete machine quote; this interface refuses them rather than copying a machine-shape conversion table.

The report carries complete, price-book and inventory source metadata, and one quotes entry per requested job. Each entry retains allocation, a quote or an error. A missing job has no invented allocation. Missing, ambiguous, incomplete, unsupported and stale observations retain their actual refusal. Exit zero means the report was read, not that every job was priced; a consumer must inspect complete and each entry before charging anything. Consumers with a narrower amount representation must also refuse values they cannot represent exactly, not round them or silently use zero.

In Stado Desktop, open Earning → Provider prices. Read prices shows the book and source failures. Enter the exact job IDs and choose Read allocation quotes to see the same per-job observations and refusals, including worker origin, account/project/subscription, resource generation and identity errors. For a cancelled execution, a scoped provider-removal observation distinguishes the recorded generation from any replacement and retains the current resource state. See Machine interface for why a stopped VM or a terminal job is not removal. Both actions use the selected native API source through /api/operator/run, retain the full stdout/stderr receipt and exit status, and discard results from a previously selected source. They do not invoke a local CLI fallback.

The real CLI/native-API qualification source is tests/cost/journey.rs in the Stado repository (kompilator test --manifest-path stado-rs/Cargo.toml --test service-journeys -- cost::). Its live cases require STADO_COST_QUALIFICATION_CONFIG, an authorized profile; STADO_COST_QUOTED_JOB_ID, a running local-policy allocation whose request named a cloud provider; and STADO_COST_QUOTED_CLOUD_JOB_ID, a running cloud agent with a complete sourced quote. The normal producer must have recorded the required inventory and prices, including the explicit local policy. The cloud case checks scoped worker identity and generation despite local@ transport. Missing prerequisites are recorded as blocked, not replaced with seeded provider responses. Reports under .build/desktop-api/ retain revision, binary, command, API and configuration evidence.

Source: this website