You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
crates/cli/src/meta/query/mod.rs — DeployerResponse::get_authoring_meta (AMT group g3-graphql-query-processing, adversarial pass).
Intent oracle
Doc comment: "get authoring meta bytes of this deployer meta". The constructor meta bytes are a cbor sequence that can contain several documents; the loop shape (for meta_map in &meta_maps) says the whole sequence is meant to be searched for the AuthoringMetaV1 document.
Violated property
Two escapes cut the search short and erase the reason:
All failure modes (corrupt cbor, unpack failure, abi decode failure, validation failure, simply no authoring-magic map) collapse into None; callers (Store::search_deployer, set_deployer_from_query_response) cache the deployer with authoring_meta: None, so "this deployer has no authoring meta" and "the authoring meta was malformed" become permanently indistinguishable in the cache.
Verified repro
On commit bba50a7, build meta_bytes as a cbor sequence of two documents: first an AuthoringMetaV1-magic map with an invalid payload, second a valid AuthoringMetaV1 document. get_authoring_meta returns None on the first map although a valid document follows; swapping the order returns Some.
Triage framing
Flagging for a maintainer decision: continue-on-failure (Err(_) => continue) would make the scan order-independent, and an error-carrying return type would let callers distinguish absence from corruption — but the current Option shape may be a deliberate best-effort contract. Not adjudicating.
Unit
crates/cli/src/meta/query/mod.rs—DeployerResponse::get_authoring_meta(AMT group g3-graphql-query-processing, adversarial pass).Intent oracle
Doc comment: "get authoring meta bytes of this deployer meta". The constructor meta bytes are a cbor sequence that can contain several documents; the loop shape (
for meta_map in &meta_maps) says the whole sequence is meant to be searched for the AuthoringMetaV1 document.Violated property
Two escapes cut the search short and erase the reason:
AuthoringMetaV1, a validation/decode failure doesreturn Noneinstead of continuing the scan — a later valid AuthoringMetaV1 document in the same sequence is unreachable (mirror of themetas[0]issue infetch_for_contract, fetch_for_contract only considers metas[0] and the first cbor document: a valid authoring meta later in the list is unreachable #157, but here the loop exists and is then short-circuited).None; callers (Store::search_deployer,set_deployer_from_query_response) cache the deployer withauthoring_meta: None, so "this deployer has no authoring meta" and "the authoring meta was malformed" become permanently indistinguishable in the cache.Verified repro
On commit bba50a7, build
meta_bytesas a cbor sequence of two documents: first anAuthoringMetaV1-magic map with an invalid payload, second a validAuthoringMetaV1document.get_authoring_metareturnsNoneon the first map although a valid document follows; swapping the order returnsSome.Triage framing
Flagging for a maintainer decision: continue-on-failure (
Err(_) => continue) would make the scan order-independent, and an error-carrying return type would let callers distinguish absence from corruption — but the current Option shape may be a deliberate best-effort contract. Not adjudicating.