Repository navigation
fix(provider): refuse the footprint laws runtime admission refuses - #1024
Conversation
warp-core admission refused jedit#296's basis-read witness (package 8e99859a) with a generic "InvalidStructure: invalid authored-effect program" while Echo's provider lowerer and verifier accepted it. The package's footprint law declares max_writes = 1024; the effect profile caps it at 256 (docs/architecture/authored-operation-effects.md), and admission enforces that. Both provider judges deferred the graph schema's and footprint law's contents to the runtime, so the provider was wrong. The lowerer and verifier now judge both with the runtime's exact shape and ceilings (effect_contract.rs, byte-identical in each crate), and refuse with a Contract variant naming the check. warp-core admission refusals now carry stable reason codes in the #1018 scheme: EchoOperationAdmissionError::reason_code returns an effect-program.* code for authored-effect program refusals (for example effect-program.footprint-law.max-writes), an artifact.* code for other artifact refusals and an admission.* code for policy refusals. EffectLawError names each ceiling. The shared effect corpus gains footprint-writes-at-ceiling and footprint-writes-over-ceiling. A new verifier test admits every corpus package through EffectPackageHost and requires the provider and runtime to agree, in the same reason class; the corpus's executed entries, which only running refuses, are the named exception. Component bytes change; they are promoted from G4 in a follow-up commit. Refs #1023. Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2 Agent-Tool: Claude Code
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Which judge was wrong, and whyEvidence. I instrumented The spec. The provider. It never looked inside the law. The verifier's Decision. The runtime is right, so I fixed the provider. Raising the runtime ceiling would change the effect profile's arena law, and nothing asks for that. The provider now applies the runtime's exact law and schema judgment. The graph schema had the same gap, so the provider now judges it too. warp-core keeps its behaviour but names the check. jedit#296 needs its configuration to declare Rejected alternative. Making the provider depend on warp-core's parser is not possible: the lowerer and verifier ship as dependency-free wasm components. The shared judgment is therefore one small module, byte-identical in both crates, as #1021 does with |
…sion agreement Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2 Agent-Tool: Claude Code
Promote the lowerer and verifier components from the two byte-equal G4 designated candidates built at 1f68a8d (CI run 44454007264), approving lowerer a21744de... and verifier 394b4431..., and update the provider package manifests, assets, identity goldens and component READMEs. Refs #1023. Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2 Agent-Tool: Claude Code
Resolves conflicts with main's refusal reasons (UnsupportedProgram now carries a ProgramRefusal): the provider keeps both the Contract refusal and the named program refusal, and the corpus reasons list names the footprint-writes-over-ceiling entry. The runtime agreement test matches the new UnsupportedProgram(_) shape. Agent-Session: 2DF514AD-94C9-4689-89DC-C6B7F7FE50DD Agent-Tool: claude-code
Cross-tests the provider's judge_footprint_law against warp-core's EffectFootprintLaw at each ceiling (4,096 reads, 256 writes, 65,536 range edges) and one past it, requiring the same verdict and code, and requires the lowerer's and verifier's effect_contract.rs to stay byte-identical. Raising the verifier's MAX_READS to 4,097 fails both. Agent-Session: 2DF514AD-94C9-4689-89DC-C6B7F7FE50DD Agent-Tool: claude-code
Review at af6abf6 (stage A; merges after #1028, #1012, #1007)Merge of Claim checked: the provider refuses exactly the footprint laws that warp-core admission refuses.
Local runs (shared Echo target, under lock): every test in Verdict: sound. Approve once the dependency PRs land and the provider components are re-promoted. Component-digest checks may stay red until then. |
Agent-Session: 2DF514AD-94C9-4689-89DC-C6B7F7FE50DD Agent-Tool: claude-code
Candidates from det-gates run 45404360103 match the digests CI printed: lowerer 165b41a8, verifier 6872448b. Regenerated per the echo-wesley-gen README; package goldens, READMEs and CHANGELOG follow. Agent-Session: 2DF514AD-94C9-4689-89DC-C6B7F7FE50DD Agent-Tool: claude-code
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Closes #1023.
Change kind: bug fix. The provider lowerer and verifier now refuse what warp-core admission refuses. Admission refusals now carry reason codes.
Root cause
jedit#296's basis-read witness (package
8e99859a…, Amblicit738d3da7) declares a footprint law withmax_writes = 1024. warp-core'sEffectFootprintLawrefuses any law withmax_writesabove 256. Admission reported onlyInvalidStructure: invalid authored-effect program, becauseEchoOperationProgram::from_canonical_bytesdiscarded the cause. The provider verifier'senvelopechecked only that the graph schema and footprint law were canonical ("their contents are the runtime's to admit"). The lowerer'spolicy_byteschecked only that they decode. So both provider judges accepted a law that no runtime admits.The provider was wrong.
docs/architecture/authored-operation-effects.md(Footprint law; Required tests, "Footprint law ceilings") states thatmax_writesis at most 256 and that admission refuses anything above it. The runtime enforces exactly that. The reasoning is in the PR comment below.What changes
Provider:
effect_contract.rs, byte-identical in the lowerer and the verifier, judges the graph schema and footprint law with the runtime's exact shape, canonical form and ceilings (4,096 reads, 256 writes, 65,536 range edges).EffectPublicationError::Contract(ContractRefusal). Its wire message is the code.EffectPackageRefusal::Contract(ContractRefusal). The verification report staysrejectedwith the existing refused code.warp-core reason codes:
EchoOperationAdmissionError::reason_code()andEchoOperationArtifactErrorV1::{reason, reason_code}. They return:effect-program.*code, in the Name the failing check in provider lowerer and verifier refusals #1018 scheme, for authored-effect program refusals:program-envelope,graph-schema,footprint-law,footprint-law.max-{reads,writes,range-edges},resource-limits,compiled-program,graph-read-declaration,compiled-binding;artifact.*code for other artifact refusals;admission.*code for policy refusals.The graph-schema and footprint-law codes are the provider's codes for the same check.
EffectLawErrorgainsMaxReads,MaxWritesandMaxRangeEdges. The detail text now names the code.Corpus: adds
footprint-writes-at-ceiling(accepted) andfootprint-writes-over-ceiling(refused by all three judges), regenerated by warp-core's builder. No existing entry's bytes changed.Tests
public_basis_read_effect::admission_refuses_the_basis_read_law_above_the_write_ceiling(warp-core,public_effect_host_tests): admits the retained witness bytes throughEffectPackageHostunder exact policies at 1,048,576 and 2^53−1 steps. It expectsArtifactInvalidwitheffect-program.footprint-law.max-writes.runtime_admission_agreement.rs(verifier):the_provider_and_runtime_admission_agree_on_the_whole_corpuscovers all 76 corpus packages. Each package is admitted throughEffectPackageHostunder an exact policy built from its own pins and ceiling. Provider-accepted packages must be admitted. Refusals on both sides must fall in the same reason class. The 11 entries that warp-core's corpus marksRuntime::Executesare refused only at run time; they are the named exception, and a separate test checks that exception.both_judges_refuse_the_basis_read_law_above_the_write_ceiling.publication_refuses_a_law_above_the_write_ceiling(lowerer): 256 publishes and 257 is refused, naming the check.typed_effect_law_refuses_noncanonical_sets_shapes_and_oversized_countsnow expects each ceiling's own variant and admits each count at its ceiling.both_judges_refuse…andpublication_refuses_a_law_above_the_write_ceilingfail. Beforecompiled-bindinghad a code, 37 corpus refusals fell into the wrong class.cargo test -p echo-edict-provider-lowerer -p echo-edict-provider-verifier(all suites).cargo test -p warp-core --features trusted_runtime,native_rule_bootstrap --test public_effect_host_tests --test edict_effect_package_tests --test executable_operation_pipeline_tests.-D warningson the libraries and touched test targets.Components
The lowerer and verifier component bytes change. They will be promoted from this PR's G4 candidates in a follow-up commit, following 678e5d2 and 9a42d08.
Docs
authored-operation-effects.mdhas a new "Admission refusal reasons" subsection, and its law-ceiling text and row now say that the provider applies the same check.Follow-up for jedit#296
The witness must declare
max_writes ≤ 256in its lawpack's Echo operation configuration. After that, the lowerer, the verifier and admission all accept it. Echo cannot admit the current package as published.Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2
Agent-Tool: Claude Code