Repository navigation
Run and meter effect programs under the v2 shared-read schedule - #1029
flyingrobots wants to merge 33 commits into
Conversation
Kind: new feature (echo#1016, family 1 of 5).
Pure modules that require core.cost.shared-reads/v1 may now use the
checked integer calls (checkedAdd/Sub/Mul/Div/Rem), min and max, and the
Option consumers isSome, unwrap and default. All three judges meter them
at their copying charge, as Amblicit's schedule requires:
- warp-core's shared evaluator holds a checked result's presence inline
(new Shared::Absent/Present) and charges one step per operand cell;
- the lowerer and verifier charge one step per operand cell for the
integer calls, plus operand and result bytes for the Option consumers.
Option constructors, bytes, identity, ordered records, fail and the
effect route remain refused under v2.
The corpus gains `integers`, an Echo program compiled by the pinned
Amblicit at its minimum (5898 steps, 7691 bytes, 181 output bytes). The
producer now reports the compiler's refusal instead of a bare ceiling
miss. Existing minimums are unchanged.
RED (before the change):
cargo test -p warp-core --lib shared_reads_tests
refused at the compiler minimum: UnsupportedProgram (4 failed)
cargo test -p echo-edict-provider-{lowerer,verifier} --lib shared_reads_tests
checked_integers_and_min_max_are_judged_at_the_compiler_minimum
panicked: refused at the compiler minimum
GREEN: warp-core --lib 967 passed; lowerer and verifier all passed;
shared_reads tests 10/10 repeated runs green; corpus --check ok.
Calibration: dropping the Option result bytes from either static rule
fails with "admitted one step less"; overcharging the runtime integer
call fails with "refused at the compiler minimum: StepBudgetExceeded".
Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2
Agent-Tool: Claude Code
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
#340 Kind: deliberate behaviour change (echo#1016; the v2 static rules follow the compiler's corrected schedule). The shared edict.core-cost/v2 corpus is now produced by Amblicit 26a201e7, which adds two rules all three Echo judges now follow: - amblicit#336: a listAppend or listConcat shell is sized by the result's provable length when one exists. The lowerer (`reach`) and verifier (`bounds`) track list-length bounds through locals, record fields, branches, calls and folds, charging a fold round by round until its bounds stop changing, with call costs cached by argument bounds. - amblicit#340: a prelude call that builds a value is charged that value in full. The static judges add it for integer operations and the Option readers; the runtime now charges a word, a checked result with its presence cell and an isSome flag as they are built (cumulative logical allocation), and unwrap/default still share their item. New minimums: reads 22596/63551, fill 9420/87967, nested 24467/220065, integers 5962/11531, rope 1326335/11721939; matches and every output bound are unchanged. The v1 copying goldens are unchanged. RED (bumped corpus, unchanged judges): lowerer and verifier shared_reads_tests: 4 failed each: fill, nested: "refused at the compiler minimum" reads, integers: "admitted one step less" warp-core integer_results_are_charged_as_new_values: unsigned add left: 128 right: 192 GREEN: warp-core --lib 968 passed; lowerer 94 and verifier 96 passed; shared_reads 10/10 repeated runs; corpus --check ok; clippy clean. Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2 Agent-Tool: Claude Code
Kind: new feature (echo#1016, family 2 runtime side).
An effect program whose Core requires core.cost.shared-reads/v1 now
prepares and runs under edict.core-cost/v2 instead of being refused:
- edict_effects/execution/shared.rs runs the same instructions with
shared locals, metering every expression and predicate with the shared
evaluator. Each effect step (atom read, graph read, emission,
obstruction) and the intent's input and output keep their copying
charge exactly; a value crosses into an effect step in canonical form
and a step's result is shared from then on.
- Preparation refuses, before any work, a program with an operation the
schedule has no Echo rule for yet (bytes, identity, Option
constructors, ordered records, fail) in any helper, constraint,
instruction or result.
- The effect route's typing relation and helper decoding admit the
capability (typing is schedule-independent); the read route still
refuses it.
Tests (differential oracle: the same package without the capability):
- edict_effect_package_tests shared_schedule: a read whose require
fails, a node ensure, structured loops, branches and nesting give the
same result, obstruction and mutations; byte operations stay refused;
a repin control proves the refusal is the schedule's.
- public_effect_host_tests: the public graph-read link package, repinned
with the capability and admitted under its own exact policy through
EffectPackageHost, reads and links exactly as the copying package over
six graphs, including all three graph-read obstructions.
RED: before the change every shared package failed to prepare
("package prepares: InvalidPackage"); calibration with the executor
refusing every program fails all six differentials and the graph-read
one ("case 0: output").
GREEN: clippy (all warp-core features, all targets) clean; warp-core
default suite (TMPDIR=/tmp/e1016), the trusted_runtime edict lane and the
pipeline/admission lane all pass.
Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2
Agent-Tool: Claude Code
Kind: deliberate behaviour change (echo#1016, family 2 static side).
The lowerer and verifier no longer refuse an effect program whose Core
requires core.cost.shared-reads/v1; they judge it under edict.core-cost/v2,
as warp-core now runs it:
- every expression and predicate in an effect body (basis, constraints,
let, attempt, loop iterable, branch and require predicates, effect
inputs, the result) is charged its shared-read cost, with list-length
bounds kept for the body's lets (amblicit#336);
- an obstruction payload is charged as a shared record shell plus its
fields' shared work;
- each effect step, the input and the output keep their copying charge,
exactly as the runtime meters them;
- under v2 only, a closure read charges its declared selector, the only
helper the runtime calls, instead of the module's costliest helper
(owner decision); the copying schedule is unchanged.
Tests:
- lowerer and verifier: five shared programs are admitted, byte
operations are refused, and both judges' minimum budgets under each
schedule are pinned and equal (independent oracle: the other judge);
the copying minimums are unchanged.
- warp-core: each program given exactly the lowerer's shared minimum as
its Core budget runs its largest input to the copying result
(runtime never exceeds static).
RED (new tests against the previous sources):
lowerer: read-control left Err(UnsupportedProgram) right Ok(());
"read-control: refused even with an ample budget"
verifier: same two failures
Calibration: one extra allocated byte per runtime expression fails
"ensure-node-control: Err(...AllocationBudgetExceeded) vs Ok"; the
retained v1 corpus verdicts are unchanged.
GREEN: lowerer and verifier suites pass; warp-core effect suites pass;
clippy clean.
Not yet covered: a closure-read effect witness for the declared-selector
rule, and the compiler minimum (blocked on amblicit#341 templates).
Agent-Session: AFC0A5E0-B032-49DC-8B18-CB932831DCC2
Agent-Tool: Claude Code
|
Checkpoint at 18e8633. Done:
Remaining, in order:
Interim CI: the component-digest checks fail until promotion. |
|
Checkpoint at 42d216e (supersedes earlier checkpoints). Done:
Skipped (preconditions not met when checked at cbdaff6):
Gaps found:
Interim CI: the component-digest checks fail until promotion. Exact admission at the compiler minimum (42d216e): does NOT holdCompiler: Amblicit 9f10fb917e55030b75ef3af74afb9fb4b77b02d0 (contains #345). I checked the binary's cargo-install record. It is at The compiler's own admission is exact on every program: it accepts the minimum it reports and refuses one step or one byte below. Echo's lowerer minimum is from its judgment of the 9f10fb91 package plus the shared-read capability (copying compile through the checked provider). That package is byte-identical to the pinned closure witness.
The structured fixture is not covered: its 1/1 probe trips the compiler's loop-work check before the shared-read report. Differing terms, found by instrumenting the lowerer (kept as a scratch patch, not committed) and by compiling variants:
Runtime check (decisive for term 1). warp-core given exactly the compiler's budget (10813, 194487) on the closure witness refuses during evaluation: Open question 2: the closure-read rule evaluates on real Open question 3 (blocker): the compiler takes effect templates only from the catalog that the selected profile's Open question 4: did not affect admission. Output bounds were not compared. Owner decisions needed: (a) for term 1, either warp-core's v2 runtime evaluates the selector sharing values (then Echo can price it shared), or Amblicit prices Terms 1 and 2 aligned (84739ce, 0fca4d6, 02f5fcf): supersedes the "does NOT hold" section above where they differTerm 2 (84739ce). v2 effect intent input/output now charge 2 x cells plus the value's bytes in the lowerer, the verifier and warp-core, the rule pure v2 programs use. Before the change, warp-core charged the closure witness (43, 1993) in and (582, 26670) out: 625 steps, below the old static 684 and the new 888. Moved shared step goldens (bytes and all copying goldens unchanged): closure 8666→8870, slice-proven 870→873, typed-failure 373→376, read-control 2097257→2097262, ensure-node 29→34, loop 107→122, branch 177→192, nested 254→284, identity 1246→1262, attachment-digest 283→289, ordered-record 110→113, guarded 250→253, option witness 828→831. Term 1 (0fca4d6). The v2 runtime now evaluates the closure selector on the shared evaluator (candidate passed by reference). Both judges price the declared selector at its shared-read call cost. v1 is unchanged. Closure shared minimum (8870, 504387) → (10814, 194487). warp-core at exactly (10814, 194487) on the 8-node, depth-4 witness returns the copying result and charges (7289, 118244). The change is contained: about 45 lines in warp-core. Comparison now (same tool, compiler 9f10fb91; Echo minimum judged by the current lowerer):
That is exactly the expected residual from Amblicit's terms 3 and 4. Bytes are equal on all four. Exact-admission test (02f5fcf).
Exact admission holds on four programs with Amblicit 65dc5362 (a4e85e1): supersedes the TODO aboveCompiler: Amblicit
The compiler refuses one unit below on each axis ( Pinned (a4e85e1).
Not compared yet: two more terms
Remaining
|
| term | runtime | Echo before | Amblicit 65dc5362 | moved |
|---|---|---|---|---|
| arm payload build | (2, 64) | (3, 64): effect_payload added steps(1) on top of the shell evaluation that already holds the expression step |
0 | Echo drops the extra step (lowerer shared_reads.rs, verifier shared_charge.rs); Amblicit adds (2, 64) |
| arm payload encode | (1, 64) | (1, 64) shape(record {}) |
0 | Amblicit adds |
| binding validations on success | 0 | max(arm, validations) | none | Echo drops under shared only (lowerer and verifier effect_block.rs); moves no number here |
Echo (5c3502f, pushed). Shared minimums −1 step, bytes and all copying minimums unchanged: typed-failure-control 376→375, read-control 2,097,262→2,097,261 (require payload, same helper), ordered-record a/z 113→112, guarded 253→252. warp-core runs each at its new minimum (byte_effects_run_within_the_lowerer_minimum, effect_runs_never_exceed_the_lowerer_minimum, family four). New: an_attempt_is_charged_what_the_shared_runtime_charges (lowerer) and an_attempt_minimum_equals_the_lowerer_minimum (verifier) pin (140, 2095); RED at (141, 2095) in both. Fixture edict-effect-v2-admission/typed-executable-operation-package.hex (65dc5362 checked output; byte-identical from 66f6ca4d). Component digests change: promotion still pending, not done here.
Amblicit (#348, head 66f6ca4d). CoreNode::Attempt under shared + effect body adds per arm the payload record's expression step and shell plus its type's copying size (empty arm (3, 128)). Pure intents and copying pinned unchanged.
Five programs (compiler 66f6ca4d installed at ~/git/echo/target/amblicit-66f6ca4d…/bin/amblicit, install record names that rev):
| program | compiler | Echo lowerer | Echo − compiler |
|---|---|---|---|
| closure-read witness | (10814, 194487) | (10814, 194487) | (0, 0) |
| node-atom-read | (100, 1631) | (100, 1631) | (0, 0) |
| outgoing-edge-read + ensure-edge | (244, 8240) | (244, 8240) | (0, 0) |
| five mutation intrinsics | (176, 6796) | (176, 6796) | (0, 0) |
typed-failure (attempt) |
(140, 2095) | (140, 2095) | (0, 0) |
The four did not move; all five checked packages are byte-identical to the retained fixtures. The compiler refuses one unit below on each axis on all five.
Not committed: adding typed-failure to effect_programs_are_admitted_at_exactly_the_compiler_minimum (passes locally) waits for amblicit#348 to merge; patch held by the coordinator.
Open, not changed: Amblicit's v2 require still charges only its payload fields' expressions, while Echo (and the runtime) charge the payload record and its encoding; under shared, neither runtime let nor attempt validates its binding, so the let validations both sides charge are above the runtime (sound, not tight).
Failure payload fields and require aligned (Echo 10f7cf9; amblicit#348 head f01dd594, not merged)
Measured (temporary meter prints in warp-core's shared executor, shared.rs, shared_reads/expression.rs, execution.rs output_bytes; removed): typed-failure variants with payload { at: input.start }, { at, until }, and a require input.start <= input.end in place of the attempt.
| path | payload build (record step + field exprs + shell) | encode (meter.charge of the map) |
|---|---|---|
attempt {at} |
1 + 2 + (2, 64+66) = (5, 130) | (3, 194) |
attempt {at, until} |
1 + 4 + (3, 64+66+69) = (8, 199) | (5, 327) |
failing require {} |
(2, 64) | (1, 64) |
failing require {at} |
(5, 130) | (3, 194) |
passing require |
predicate only (69, 0) | none |
Per field: shell (1, 64 + key length) (Size::field); encode (2, 128 + key length) for a scalar field.
Terms moved
- Echo lowerer (
effect_payload,shell.plus(CELL.field(name))) and verifier (shell.with(CELL.keyed(name))) charged two cells per field, (1, 64) above the runtime. Both nowshell.field(name)/shell.keyed(name). Encoding term already matched. RED: (146, 2355) and (132, 2291) in both judges. Goldens moved by (-1, -64), copying unchanged, warp-core runs each at the new minimum: typed-failure-control (374, 1231), ordered-record a/z (111, 1425), guarded (251, 1681). New retained packagespayload-{attempt,require}-executable-operation-package.hex(+ sources), pinned at (145, 2291) and (131, 2227). - Amblicit
require(v2, effect body) charged predicate + field expressions only; it now adds the payload record and encoding (theattempthelper). Failing path >= passing path.
Compiler f01dd594 vs Echo lowerer (tool effect_v2_admission; compiler refuses one unit below on each axis on all nine; Echo admits at the compiler minimum, refuses one below, and measures the same minimum, checked locally with the exact-admission test extended to all nine, not committed):
| program | compiler | Echo lowerer | Echo − compiler |
|---|---|---|---|
| closure-read witness | (10814, 194487) | (10814, 194487) | (0, 0) |
| node-atom-read | (100, 1631) | (100, 1631) | (0, 0) |
| outgoing-edge-read + ensure-edge | (244, 8240) | (244, 8240) | (0, 0) |
| five mutation intrinsics | (176, 6796) | (176, 6796) | (0, 0) |
typed-failure (attempt, {}) |
(140, 2095) | (140, 2095) | (0, 0) |
attempt, {at} |
(145, 2291) | (145, 2291) | (0, 0) |
attempt, {at, until} |
(150, 2493) | (150, 2493) | (0, 0) |
require, {} |
(126, 2031) | (126, 2031) | (0, 0) |
require, {at} |
(131, 2227) | (131, 2227) | (0, 0) |
Checked packages from f01dd594 are byte-identical to the retained fixtures. Runtime max path stays below each static (e.g. {at} attempt 132/1909, {at} require 118/1845).
Not committed: adding typed-failure and the two payload programs to effect_programs_are_admitted_at_exactly_the_compiler_minimum waits for amblicit#348 to merge (patch held by the coordinator). Component digests change; promotion not done.
Exact admission and runtime at the merged compiler (Echo 29e72d7, dfbcd5f; Amblicit main 80b52f95)
Compiler. Built from a clean worktree at 80b52f956197fb94aeb2776abb844e482d3591e1 (cargo install --path crates/amblicit-cli --force, real rebuild of all four crates, not a reused install). effect_v2_admission on all nine programs gives the table of the section above exactly (require {} (126, 2031)), the compiler refuses one unit below on every axis (18/18 InvalidBound), and the checked packages for the seven retained programs are byte-identical to the fixtures.
Pinned (29e72d7). effect_programs_are_admitted_at_exactly_the_compiler_minimum now covers eight programs (read, link, write, typed-failure, attempt {at}, require {at}, attempt {at, until}, require {}). New retained packages from 80b52f95: payload-attempt-two-* and payload-require-empty-* (+ sources). Verifier: two_field_and_empty_failure_payload_minimums_equal_the_compiler_minimum measures (150, 2493) and (126, 2031). RED: typed-failure pinned at the pre-#348 (137, 1967) refused (UnsupportedProgram); verifier pinned (151, 2493) measured (150, 2493).
Runtime at the compiler minimum (dfbcd5f). warp-core runs node-atom read (100, 1631), outgoing-edge read (244, 8240, five graph shapes, two of which obstruct identically on both schedules) and mutations (176, 6796) under shared reads at exactly that Core budget: same result and mutations as copying, frame charge at or below the bound on both axes. RED by mutation: (60, 1631) step-exhausted; (176, 3000) and (244, 900) allocation-exhausted. Tests: provider_corpus::v2_admission::*, public_graph_read_effect::the_shared_schedule_runs_within_the_compiler_minimum.
Open (carried): /v3 catalog not in the provider package (owner); COPYING let validations charged by Echo not Amblicit (unmeasured, v1 frozen); under v2 the runtime validates neither let nor attempt bindings (static safe, not tight); non-scalar failure payload fields never measured on the runtime (structural-payload Amblicit question with another agent); clippy not clean on main (pre-existing).
Next: merge main, promote components, docs/CHANGELOG, ReplaceRange measurement.
Merge, docs, Amblicit 615d2e59 re-pin, record payloads (Echo bd78d76, d97d9d5, aa3eab0)
Merged origin/main 5fb12e2 once (bd78d76). The effect-body judge conflicts were resolved by putting this branch's shared-read terms inside main's refusal-trail calls; CHANGELOG keeps both sides. After a forced rebuild the lowerer and verifier suites pass, as do warp-core edict_effect_package_tests and public_effect_host_tests; scripts/check-trusted-runtime-gate.sh exits 0. This branch adds no warp-core cfg gates.
Docs/CHANGELOG (d97d9d5): one section, "Shared-read effect programs", in docs/architecture/application-contract-hosting.md covers the charge formulas, the pins and the gaps.
Re-pinned to Amblicit 615d2e59 (#349), built from a clean worktree. Checked by behaviour: the { at: { value: n } } attempt compiles, and 80b52f95 refuses it. The nine minimums are unchanged and the eight checked packages are byte-identical.
Record-valued payloads (aa3eab0): compiler, lowerer and verifier agree on both programs.
- attempt
{at:{value}}(151, 2621), require (137, 2557). Each is (6, 330) above the scalar version. - Loop bounded 3 does NOT agree: compiler (306, 3584) scalar / (324, 4574) record; Echo lowerer = verifier (300, 3200) / (318, 4190).
- Echo is (6, 384) BELOW the compiler, (2, 128) per iteration.
- The gap is the same with and without the record, so the record term agrees and the gap is in the loop/
requirecharge. - I have not identified the term. Amblicit's literal-loop charge is outside
fold_work.rs::effect_template_work(the type-check "cumulative loop work"). - Not pinned, no constant changed. warp-core has not been run on the loop programs, so whether the runtime stays within Echo's lower figure is UNKNOWN.
Promotion: not done. det-gates run 45420220923 (head d97d9d5) finished. Its candidates are still valid for aa3eab0, since only tests and xtask changed. Next: download build-repro-candidate-1, check the digests against the CI build jobs, promote, regenerate the package, and update the goldens. Then recompile any witness that fails.
ReplaceRange: blocked, not measured.
- Echo's runtime ceilings are fixed in code: effect frame steps <= 1,048,576 and
max_allocated_bytes<= 16 MiB (EFFECT_READ_STORAGE_CEILING_V1,edict_effects/frame.rs,package.rs). - jedit#410's lawpack pins 16 MiB. Its own v2 figure for the flat app is 261,758,241 steps / 190,274,254 bytes (jedit commit 06846ca message; I did not reproduce it).
- So no package at a budget Echo admits can carry that bound.
- A v2 compile with a private
/v3provider stops atTargetProfileMismatch: the vendored lawpack pins Echo 1e0228f's profile. Getting past it means re-pinning the lawpack, the profile and every module digest in jedit. - Decisions this needs:
/v3in the provider (owner), and the runtime ceilings (owner).
Loops at Amblicit e306ecc9 (Echo 582f1f7, c79d7e0)
Compiler. Built from a clean worktree at e306ecc9ed22c0eb166351bb9d766150dca617f2 (main after amblicit#350). Behaviour check: scalar loop-require gives (300, 3200) (615d2e59: (306, 3584)). effect_v2_admission on all thirteen earlier programs: the eleven unchanged, both loops now equal Echo; one unit below refused on each axis; all twelve checked packages byte-identical.
Pinned. effect_programs_are_admitted_at_exactly_the_compiler_minimum covers sixteen programs at e306ecc9 (RED: scalar loop at (306, 3584) fails). New loop fixtures, compiler = lowerer = verifier: nested 3x3 (783, 5144), two-field record item (336, 3998), bytes item (1134, 3608), let + require + ensureNode body (339, 4232). Verifier: loop_minimums_equal_the_compiler_minimum (six loops).
Runtime. provider_corpus::v2_admission::the_loop_programs_run_within_the_compiler_minimum_on_every_path: all six loops at exactly the compiler minimum, all-pass and fail at item 1, 2, 3; same result and mutations as copying, charge within the bound. RED by mutation (nested at 700 steps).
Finding: attempt in a loop is refused by Echo. The compiler gives (342, 3392), but Echo's failure-set judge (failure_sets.rs, identical copies in warp-core, lowerer, verifier) accepts attempt only as a top-level intent node, so the checked lowerer refuses with effect-program.failure-sets. Not a cost term; a profile gap. Source retained (payload-loop-attempt-source/), nothing pinned. Owner: accept attempt inside loops, or leave it outside the profile.
Next: merge main, promote components, review threads, docs.
Merge, docs, promotion (Echo e08d8e3, abf9470, 2ca3548)
Merged origin/main 323b7b8 (#932, #936, #973) at e08d8e3. CHANGELOG keeps both sides. This branch adds no warp-core cfg gates; check-trusted-runtime-gate.sh exits 0. Forced rebuild: lowerer 210, verifier 364, warp-core edict_effect_package_tests 158, public_effect_host_tests 41 pass.
Docs (abf9470): the shared-read section and CHANGELOG name Amblicit e306ecc9, the sixteen exact-admission programs, the per-iteration loop charge and the attempt-in-loop refusal.
G4 on d97d9d5 was only the unpromoted state: build-repro-candidate-1 and -2 are byte-identical (lowerer 97047fc5…, verifier c88611f4…); the compare step stopped at candidate-digest-mismatch against the old approvals, and "Evidence artifact presence" then lacked the promoted file. No reproducibility difference.
Promoted (2ca3548) from det-gates 45429921707 candidate 1 (= candidate 2), matching the digests CI 45429921710 printed: lowerer 97047fc505d55f30e6f55b6163a0b959d5a7b6fb16cf7d62c0d4e38a48ebce5b (844,027 B), verifier c88611f4090b97d77fcc9bed4589ecf555d36961f347ef00671e782df1f5b562 (882,946 B). Provider 9bddebc1…, manifest raw 2181dc39…. Fixes on the way: the /v3 catalog moved from the lowerer's resources/ (owned exactly by provider generation, which refused it) to catalogs/; its test no longer uses std::env/std::fs (ban-nondeterminism); a doc comment tripped ban-globals; a clippy needless borrow. No locally run witness needed recompiling; CI on 2ca3548 is the check.
Review threads: none on #1029.
Open: attempt inside a loop (profile decision); /v3 in the provider package and the runtime ceilings (owner; ReplaceRange blocked on them); record payload on an attempt arm not measured on the runtime.
/v3 in the packaged echo.dpo@2 (Echo d8ab48c), steps 1-4 of 8
Done (d8ab48c, pushed):
- Vendored Amblicit
effect-cost-catalog-v1(a21de8c2, feat(core): add basis resolution v0 boundary #351) into both pack locations;typed-failures-v1is now a rejection fixture. Pins: CDDL 66f28b74…, manifest 7eadeaba…, ceiling 98,574 B. - The catalog generator emits
/v3asecho.dpo@2's only catalog. The templates are authored once, incrates/echo-wesley-gen/src/provider_effect_costs.rs. The resource is renamedresource.target-intrinsics-3, domainecho.dpo.intrinsics/v3; no/v2file remains. The generated catalog is byte-identical (cmp) to the old hand-keptlowerer/catalogs/resource.target-intrinsics-3.cbor, which is deleted.cost_templates.rsnow evaluates the packaged catalog. So the catalog content has not changed. - Regenerated the package: provider 44269f1c…, manifest raw ed35e3c5…,
echo.dpo@2profilesha256:4e60b1297d4d5e38bb9029d225a7074c9e0a7932792cb8644276cdf7ceeb173c(was 7cadb97e…). Copied into both judges'resources/.echo.dpo@1and its/v1catalog are untouched. - The lowerer, the verifier and warp-core (
intrinsic_names,lowering_relation,intrinsic_contract; warp-core also pinned/v2) now pin/v3:- the catalog must carry
parameters; - each effect intrinsic must carry
effectCostRule; - lowerer publication accepts
/v3in place of/v2.
This adds no warp-corecfggates.
- the catalog must carry
Verified locally:
- echo-wesley-gen suite green.
- New
echo_dpo_2_catalog_carries_a_cost_template_for_every_effect: RED with the generator's template line removed, then GREEN. lowerer_contractand lowerer lib green (provider schema pin 6fc69f6a…).
Expected red until rounds 2-3: the lowerer and verifier corpus tests on the old /v2 fixtures, which are now refused (e.g. InvalidConfiguration). Before the judges moved, source_module_effect refused the new profile with UnsupportedTargetProfile: that is the RED for the packaged route.
Compiler: Amblicit a21de8c2, installed from a clean worktree at ~/git/echo/target/amblicit-a21de8c2de59249bc4e79174b967af67ab012d4d/bin/amblicit. It is byte-identical (sha256 f5b79be7…) to the e306ecc9 install, as expected: compiler src diff e306ecc9..a21de8c2 is empty.
Next agent, in order:
- Round 1: promote components from det-gates for d8ab48c. CI run 45448729312 and det-gates run 45448729473 were in progress when this was written. Follow the contract's promotion section, and mirror 2ca3548.
- Then recompile every
echo.dpo@2fixture. The compiler calls the packaged lowerer component, so the old components refuse the new profile. In every*/source*/lawpack and application JSON:- replace
7cadb97e…with4e60b129…; - replace the
intrinsicCatalog$edictBytes(old/v2catalog hex) with the hex ofschemas/edict-provider/package/v1/generated/resources/resource.target-intrinsics-3.cbor; - replace
resource.target-intrinsics-2.cborwith-3.cbor.
Then recompile with the xtask publication examples. About 47 output hex files embed the old catalog: warp-coreedict-*fixtures, lowerereffect-programs/source-module-*,source-module-effect/05-target-configuration.hex, andreplace-range-flat/04-source.cborandartifact_binding.rs, which pin 7cadb97e.
- replace
- Retire
xtask/examples/effect_v2_admission.rs's private/v3route: compile throughschemas/edict-provider/package/v1directly, withcoreCostScheduleedict.core-cost/v2. - End check: the 16 exact-admission programs, which should keep the pinned numbers since the catalog bytes are unchanged.
- Docs/CHANGELOG and
scripts/verify-edict-provider-host-v1.sh. The docs still mentionlowerer/catalogs/(lowerer README ~329, architecture doc ~727).
Unchanged: attempt inside a loop is still refused by failure_sets.rs. This is an owner question and stays in the known gaps.
Promotion round 1 done; recompile BLOCKED on Amblicit (Echo f6b0b56, 7e23f8f)
Done:
scripts/check-trusted-runtime-gate.shon d8ab48c under the build lock: exit 0.- Promoted (f6b0b56) from det-gates 45448729473
build-repro-candidate-1, SHA-256s equal to what CI 45448729312's build jobs printed: lowerer9f0b9e953c6b17eea67ecd4f865211f5b531476961edbc811f96a3f6f2236562(844,846 B), verifier17cbe60a578e20d3acd7fc3c47f694dfd2fe948b21da47d98801dfb947b80112(883,552 B). Package regenerated: provider7892d501…, manifest rawdd9d81e9…. echo-wesley-gen and xtask provider tests green after forced rebuild. - (partial, 7e23f8f, wip) Authored inputs moved to
/v3: 30 source lawpacks (profile digest, embedded catalog), 4 applications (catalog path), 4.edictuse targetpins. No output recompiled.
Blocker (finding): Amblicit a21de8c2 refuses the packaged provider for every echo.dpo@2 fixture: InvalidProviderPackage: provider artifact-schema registry failed: SchemaCompileFailed: domain echo.dpo.intrinsics/v3: schema role schema.echo-provider-artifacts. Bisected on a scratch copy of the package (CDDL digest re-pinned in the copy's manifest): removing only the recursive alternatives effect-cost-expr sum/product and effect-cost-type record from the vendored effect-cost-catalog-v1 CDDL makes the same compile succeed (read and identity fixtures). Removing only the 0*64 bound does not. Amblicit's published_target_ir_binding_constructs_the_production_registry_and_validates_v3 test binds only edict.target-ir.artifact/v1, never intrinsics-document, so the recursion refusal (recursive_dispatch::root_dispatch_requirement / schema_safety::root_supports_total_validation in amblicit-provider-schema/src/lib.rs) was never exercised. The private /v3 route never hit it because it bound the catalog under the old v2 domain and the old non-recursive CDDL.
Owner decision needed (Amblicit): either the registry accepts this recursion, or the contract pack expresses cost expressions without schema recursion (e.g. bounded unrolled depth). Then a new pack is vendored into Echo, the package regenerated, and components promoted again.
Next agent, after the Amblicit fix lands: install that compiler from a clean worktree; re-vendor the pack if it changed (then regenerate and promote again); run the 13 effect_step_publication witnesses without --check and copy evidence/*.hex and evidence/source/* back (script: scratchpad agents/echo-v3-profile-b/recompile.sh); then lowerer effect-programs/source-module-effect/replace-range-flat, edict-effect-basis-read, v2-admission; then steps 4-8 of the assignment. Compiler pins to move then: scripts/verify-edict-provider-host-v1.sh AMBLICIT_REVISION 7dbcbc23 (its echo.dpo@1 witnesses must stay byte-identical under the new compiler, or keep two pins), fixture READMEs naming 7dbcbc23 / e306ecc9. The core-cost corpus (26a201e7) embeds no echo.dpo@2 profile or catalog.
Add a public-compiler witness, built with Amblicit 7dbcbc23 through the checked provider package. It is an echo.dpo@2 effect program that reads one guided closure with a declared selector. The lowerer pins its minimums under both schedules: copying (9139, 537742), shared (8666, 504387). Given exactly the shared minimum, warp-core reads a three-node tree to the copying schedule's result, and the runtime charge stays within the static bound. CI rebuilds the bytes with effect_step_publication --check. Refs #1016 Agent-Session: 4B8EA655-FA7F-40EF-B4F9-0EE2633FBAD6 Agent-Tool: claude-code
Kind: new feature (echo#1016, family 3 of 5).
Modules that require core.cost.shared-reads/v1 may now call the four
echo.dpo@2 identity intrinsics (contentAddress, contentEdgeId,
slotEdgeId, attachmentValueDigest). All three judges charge them as
Amblicit's shared-read schedule charges a target intrinsic
(fold_work.rs `call` and `shared_foreign_copies` at 26a201e7):
- lowerer and verifier: the catalog rule (base + coefficient x operand
sequence maximum, read as Amblicit's `sequence_max` reads it: a list
literal by its items, a branch by its longer arm, otherwise the
declared bound), plus a full copy of every operand in and of the
result out;
- warp-core: each operand is evaluated shared, charged its full size as
a copy in and converted, then the copying identity work runs
unchanged (split out as identity::apply). Under v2 the canonical-order
edge list is not charged separately, because the edge operand's copy
in already charges at least one 64-byte cell per edge. The copying
path is byte-identical.
Tests:
- lowerer: the public identity and attachment-digest witnesses (both
compiled by Amblicit 7dbcbc23, repinned to require the capability)
are admitted under v2. Their minimums are pinned: identity copying
(1898, 71061), shared (1246, 11580); attachment digest copying
(371, 11334), shared (283, 3209).
- verifier: the same packages, and its minimums equal the lowerer's
(independent oracle: the other judge).
- warp-core: each witness, given exactly the lowerer's shared minimum,
returns the copying executor's output (a differential), and its
runtime charge stays within the static bound on both axes.
RED (observed before the change):
lowerer identity_witness_minimums_under_each_schedule:
"identity-witness: shared" left Err(UnsupportedProgram)
warp-core the_identity_witnesses_run_within_the_lowerer_minimum:
"identity: result" left Err(BoundedRead(Evaluation(UnsupportedProgram)))
(the verifier test was written alongside the lowerer change and was
first run green; its RED state was not observed)
GREEN: lowerer and verifier suites pass; warp-core --lib 1018 passed;
edict_effect_package_tests 151 passed; public_effect_host_tests 35
passed; clippy -D warnings clean on the changed targets.
These witnesses were compiled under the copying schedule. A
compiler-produced v2 minimum for an effect program is item 3 (it needs
amblicit#345). Until then the shared minimums are Echo's own goldens.
Agent-Session: 675A5905-AD3D-4CA7-B5C9-85EE412CE073
Agent-Tool: claude-code
Kind: new feature (echo#1016, items 1-2).
Adds Echo's `edict.target-profile.intrinsics/v3` catalog in the grammar
of amblicit#345 (6e217bb9): the echo.dpo /v2 catalog with an
`effectCostRule` on each of the eight effect intrinsics, and a top-level
`parameters` map (`maxEdgeScans` at graphReads.maxEdgeScans, uint;
`selector` at graphReads.closureSelector, helper). The closure-read rule
uses per-item paths (`item: 1, then: [atomBytes]`) times listMax(nodes)
and prices the declared selector with `{helper: {parameter: selector}}`.
Each template is exactly the lowerer's per-step charge beyond the input
expression: validations(input) plus `abi` or the graph-read work. The
graph-read work is split out of `graph_read` as `graph_charge` (no
behaviour change; the lowerer lib suite passes). The empty obstruction
payload (1, 64) stays outside every template, matching #345's
`replaced_effect`.
Tests (cost_templates): template evaluation equals the lowerer charge for
every mutation, node-atom-read, outgoing-edge-read and closure-read over
fixture types (closure up to 4096 nodes / 65536 edges, two selector
costs); a costlier unselected helper changes the copying charge by
16 x its excess and not the template; the obstruction payload is (1, 64)
and no template carries it; the committed catalog equals the generated
one.
RED: the catalog test failed before the catalog was blessed (file
absent). The conformance tests passed on first run, so a mutation run
(448->447, 344->343, ranges x384->383, closure base 256->255) was made:
6 of 7 failed; restored, 7 of 7 pass. Lowerer --lib: 101 passed.
Not verified: Amblicit's own admission of this file (no Amblicit build
was run); the catalog is not in the provider package, because the
upstream provider contracts have no /v3 schema rule.
Agent-Session: 42B226AB-51E7-4F1D-8C6F-E144F5E6C822
Agent-Tool: claude-code
Kind: test (echo#1016, item 3a). Finding: raising the witness's footprint-law `max_reads` above 16 made preparation fail with bare `InvalidPackage` because the law's bytes are bound twice, inside the program and as the package's `footprint_contract_identity` (blake3 over "echo:operation-footprint-law:v1\0" + law bytes), and only the first was changed. It is the package's pin-consistency rule, not a reads ceiling (the law admits up to 4096 reads) and not a defect. The test `a_wider_footprint_law_prepares_once_its_identity_is_repinned` pins it: 17, 64 and 4096 reads are refused with the stale identity and prepare once it is repinned. The witness now reads an eight-node graph to depth four, the read's node and depth bounds, with the law widened to 64 reads and 64 range edges, asserts all eight nodes are returned, and still runs at exactly the lowerer's shared minimum (8666, 504387) with the runtime charge within it. RED: with the compiled law (16 reads, 8 range edges) the eight-node read fails (AuthoredObstruction fx.ScanBoundExceeded). GREEN: widened law, 2/2 closure_witness tests pass (warp-core edict_effect_package_tests). Agent-Session: 42B226AB-51E7-4F1D-8C6F-E144F5E6C822 Agent-Tool: claude-code
Kind: test (echo#1016, item 3b). ClosureLink.edict gains `costly`, a helper of the selector's type that does more work and is never selected (`graphReads.closureSelector` stays `select`). The package and verification report are fresh output of the public compiler, Amblicit 7dbcbc23d72705c5e224fc994a6c767881958912 (binary verified from its cargo-install record), through the checked provider package; the lawpack, adapter and configuration are unchanged. Lowerer minimums: copying (which charges the costliest helper on every closure edge) rose from (9139, 537742) to (15367, 932374); the shared schedule (declared selector only) stays (8666, 504387). The test now asserts the shared minimum is below the copying one on both axes. RED: closure_read_witness_minimums_under_each_schedule failed on the old pin, left ((15367, 932374), (8666, 504387)). GREEN: lowerer effect_program_judgment 7/7; verifier suite all pass; warp-core closure_witness 2/2 (the witness still runs at the shared minimum). Agent-Session: 42B226AB-51E7-4F1D-8C6F-E144F5E6C822 Agent-Tool: claude-code
…r v2
Kind: new feature (echo#1016, family 4 of 5).
Modules that require core.cost.shared-reads/v1 may now build Options
(`some`, `none`), ordered records, and `fail` (caught by an `attempt`).
All three judges follow Amblicit's shared-read schedule at 26a201e7
(fold_work/shared_reads.rs `shared_own`, fold_work.rs `expression`,
`call` and the `Attempt` node):
- an ordered record charges the shell of the record it builds, plus its
fields' shared work, as a record does;
- `fail` costs its one step and has no value (size zero);
- an Option constructor keeps its copying call charge (operand cells
plus operand and result bytes) and is charged the value it builds in
full (amblicit#340), as the Option readers already were;
- `attempt` was already judged: its value plus the costlier of its
result check or failure payload.
Lowerer and verifier compute these independently. warp-core evaluates
ordered records in authored order and returns the canonical record, as
the copying executor does; `fail` raises the same UnmappedFailure the
v2 effect executor already maps through `attempt`; `some`/`none` build
a new Option charged its full size. The copying schedule is unchanged.
Tests:
- lowerer `family_four_minimums_under_each_schedule`: the four retained
ordered-record programs and the public option witness
(fixtures/edict-option-value, Amblicit compiler output) are admitted
under v2; minimums pinned (copying, shared):
ordered-record-{z,a}-first (57, 2793), (110, 1489);
ordered-record-guarded-{z,a}-first (71, 3177), (250, 1745);
option-value-witness (88, 2936), (828, 942).
- verifier `family_four_minimums_equal_the_lowerer_minimums`: the same
minimums from the verifier's own rules (oracle: the other judge).
- warp-core `family_four` (edict_effect_package_tests): each program,
given exactly the lowerer's shared minimum, returns the copying
executor's output (option witness on both branches; ordered records
for at = 0..=4, covering obstruction and return), and the option
witness's runtime charge stays within the bound on both axes.
The shared step minimums exceed the copying ones here because the v2
rule charges an Option call's bytes as steps, as Amblicit's does; the
byte minimums are lower.
typed-failure-control is not in this set: it also uses
core.bytes.length (family 5).
RED (observed before each change):
lowerer: "typed-failure-control: shared" left Err(UnsupportedProgram)
(the first program in the set; the ordered records and the option
witness were not observed failing separately in the lowerer, but
the verifier and warp-core refusals below are the same rules)
verifier: "ordered-record-z-first: shared" left Err(UnsupportedProgram)
warp-core: "ordered-record-z-first at 0" left
Err(BoundedRead(Evaluation(UnsupportedProgram))); "option: some:
result" the same
GREEN: lowerer effect_program_judgment 8 passed and the full lowerer
suite passed; verifier suite passed; warp-core edict_effect_package_tests
154 passed (1 ignored, unchanged); warp-core --lib edict_pure 113 passed.
Agent-Session: 2ECACBD5-99E1-4F76-A9C0-31830AA2412E
Agent-Tool: claude-code
Kind: new feature (echo#1016, family 5 of 5). Modules that require core.cost.shared-reads/v1 may now call the six byte operations (core.bytes.length, slice, at, count, isUtf8, concat). Amblicit at 26a201e7 has no shared-read rule for them, so they keep their copying call charge (one step per operand cell plus operand and result bytes) and, under amblicit#340, are also charged the value they build in full. All three judges follow that: - lowerer and verifier: the six names join the Option operations' copying-call rule and the value-building set. A count's needle is a byte literal the ordinary judgment checks without recording a type; both judges size it from its bytes. - warp-core: the shared evaluator runs each operation on shared operands, checks their declared length bounds, charges one step per operand cell and per byte scanned, and charges the result as a new value. The copying path is unchanged. Corpus: `bytes.amblicit`, Echo's own program calling each operation once, joins edict-core-cost-v2 and is compiled by the producer (tests/edict-core-cost-v2-corpus, Amblicit 26a201e7 from Cargo.lock) at its minimums 2336 steps, 3267 bytes, 79 output bytes. The other corpus files were regenerated byte-identical. Tests: - lowerer and verifier `byte_operations_are_judged_at_the_compiler_ minimum`: each admits the compiler's step and allocation minimums and refuses one less on either axis (oracle: the compiler). The output bound is the ordinary judgment's, the same under both schedules, and Echo's is 142 bytes where the compiler's is 79; the tests pin Echo's bound and assert the compiler's is still refused. - warp-core `byte_operations_run_within_the_compiler_minimum`: at the compiler minimum the runtime returns the expected record (computed in the test) for a full 32-byte text, an empty one and a slice that cuts a UTF-8 sequence, within the minimum on both axes; and the meter refuses one step or byte below its own work. - effect programs: lowerer `byte_operation_minimums_under_each_schedule` pins slice-proven copying (195, 3383) shared (870, 971) and typed-failure-control (74, 3312) (373, 1295); the verifier reaches the same; warp-core `byte_effects_run_within_the_lowerer_minimum` runs each at exactly those shared minimums to the copying result (typed-failure-control at = 0, 2, 9). The old refusal tests are replaced. RED (observed): lowerer and verifier corpus tests "refused at the compiler minimum"; warp-core corpus tests UnsupportedProgram. The effect tests and the second warp-core test were written after the change; a mutation run (all four source files reverted) failed every new test. GREEN: lowerer and verifier full suites; warp-core --lib edict_pure 115 passed; edict_effect_package_tests 154 passed (1 ignored, unchanged). clippy -D warnings shows nothing in changed files (see the next commit for the pre-existing lints that block a plain run). Agent-Session: 2ECACBD5-99E1-4F76-A9C0-31830AA2412E Agent-Tool: claude-code
Kind: maintenance (echo#1016, item 3: clippy -D warnings on everything changed since 18e8633). Run: cargo clippy (1.96.0, clippy 0.1.96) -p echo-edict-provider-lowerer -p echo-edict-provider-verifier -p warp-core --features warp-core/trusted_runtime --all-targets -- -D warnings, filtered to the files this branch changed since 18e8633. Fixed (branch-introduced): - closure_witness.rs: `index as u8` (cast_possible_truncation) becomes u8::try_from(..).expect(..). - rustfmt: cost_templates.rs and the module order in source_functions.rs (44098b1) were not formatted. - The family 4 and 5 commits already fold the match_same_arms and naive_bytecount findings in their own code. Not fixed, pre-existing on main and outside this branch: the plain run stops before reaching the branch's code on chunks_exact_to_as_chunks (echo-cas disk.rs, lowerer lib.rs), branches_sharing_code (provenance_store.rs, tick_patch.rs), assert_is_empty (several lowerer and verifier test files), and further lints in variant_tests.rs, parallel/exec.rs and trusted_runtime_host_loop_tests.rs. To reach the branch's files those three lint names were allowed on the command line for this run only; no lint configuration changed. RED: clippy reported the cast at closure_witness.rs:80 and rustfmt --check the two files. GREEN: both now report nothing in changed files; edict_effect_package_tests 154 passed. Agent-Session: 2ECACBD5-99E1-4F76-A9C0-31830AA2412E Agent-Tool: claude-code
Kind: test tooling (echo#1016, exact admission item). New xtask example effect_v2_admission. It compiles an echo.dpo@2 effect fixture with a compiler that contains amblicit#345 under edict.core-cost/v2 and Echo's /v3 catalog, and prints the static minimum the compiler reports. The checked package pins the /v2 catalog, so the example builds a private evaluation provider whose echo.dpo@2 profile pins the /v3 catalog. It then compiles the same program through the checked provider (copying schedule) and writes that package for Echo's judges. No existing fixture, pin or CI step changes. v1 stays byte-identical. Findings (Amblicit 9f10fb91, Echo cbdaff6 judges, shared schedule): - closure-read: compiler (10813, 194487); Echo lowerer (8666, 504387). - The 9f10fb91 copying package is byte-identical to the pinned closure witness, so both numbers judge the same program. - warp-core given the compiler's exact budget refuses during evaluation with AllocationBudgetExceeded after charging 194466 bytes. - Exact admission does not hold. The PR checkpoint comment has the term-by-term breakdown. Refs #1016 Agent-Session: 6C828456-FEC9-4197-8E41-223010E4C391 Agent-Tool: claude-code
Kind: bug fix (echo#1016, term 2 of the Amblicit 9f10fb91 comparison).
Under the shared-read schedule an effect program's intent boundary now
follows the rule Echo's pure shared-read programs and Amblicit already use:
the input and the output each cost two steps per cell and the value's
bytes. Before, effect programs charged a copy plus its validations.
- Lowerer (effect_intent::boundary): shared = copy + copy.steps; copying
unchanged (copy + validations).
- Verifier (effect_intent::boundary): shared = 2 x Footprint cells and the
footprint's bytes; copying unchanged. Computed independently of the
lowerer; both reach the same minimums.
- warp-core (edict_effects/execution/shared.rs): the v2 executor converts
the input with from_canonical and charges Evaluator::boundary(full_size),
then converts the output and charges the same boundary, as the pure
shared-read run does; the copying executor is untouched.
Runtime check before the change (instrumented, not committed): warp-core
v2 charged the closure witness's input (43, 1993) and output (582, 26670),
625 steps, below the old static 684 and the new 888. On every other v2
effect test the runtime io charge was validations + copy cells, which is at
or below copy + copy cells, so twice the cells bounds it.
Moved goldens (shared minimum steps only; every byte value and every
copying minimum is unchanged). Each delta is the sum over input and output
of (copy steps - validations), the cells the old rule did not double:
- closure-read witness 8666 -> 8870 (+204, matches the 684 -> 888 measured)
- slice-proven 870 -> 873, typed-failure-control 373 -> 376
- read-control 2097257 -> 2097262, ensure-node-control 29 -> 34
- structured-loop 107 -> 122, structured-branch 177 -> 192,
structured-nested 254 -> 284
- identity-witness 1246 -> 1262, attachment-digest-witness 283 -> 289
- ordered-record-{z,a}-first 110 -> 113, guarded 250 -> 253,
option-value-witness 828 -> 831
RED: closure_read_witness_minimums_under_each_schedule pinned 8870 and
failed at 8666. GREEN: lowerer effect_program_judgment 8/8, verifier
14/14, warp-core edict_effect_package_tests 154 passed (every v2 effect
run within the new static bound), warp-core lib `shared` 40 passed.
Agent-Session: 58961512-206B-4358-87DD-B05AAAADD891
Agent-Tool: claude-code
Kind: bug fix (echo#1016, term 1 of the Amblicit 9f10fb91 comparison). Under the shared-read schedule a closure read's declared selector is now evaluated on the shared evaluator and priced at its shared-read call cost in both judges. The copying schedule (v1) is unchanged: there the selector is still called with a copied argument and the costliest helper is charged at its copying cost. - warp-core (edict_read/graph.rs): Session carries `shared`; the v2 effect executor sets it. Walk::select_shared converts the candidate (built from charged canonical copies, as before) with from_canonical, calls the selector by reference on the shared Evaluator, and reads the decision back with to_canonical. The bounded-read route and the copying effect executor pass `shared: false`. - Lowerer (graph_read): the declared selector's fact carries shared_selector(name) = shared_function(name, [no proven bounds]). - Verifier (graph_read_charge): the declared selector's summary carries shared_helper(name, [no bounds]). Computed independently; both reach the same minimum. Moved golden: closure-read witness shared minimum (8870, 504387) -> (10814, 194487). Per edge (12 edges max) the selector goes from its copying fact (448, 27925) to its shared fact (610, 2100): +162 steps and -25825 bytes each, so +1944 steps and -309900 bytes. The copying minimum (15367, 932374) and every other golden are unchanged. RED: lowerer closure_read_witness_minimums_under_each_schedule pinned (10814, 194487) and got (8870, 504387); warp-core the_closure_witness_runs_within_the_lowerer_minimum given exactly (10814, 194487) refused during evaluation. GREEN: warp-core runs the widest witness (8 nodes, depth 4) at exactly (10814, 194487) to the copying schedule's result and charges (7289, 118244), within the bound on both axes; the judges' minimum search refuses one unit below on each axis. New verifier test closure_read_witness_minimums_equal_the_lowerer_minimums pins the same numbers from the verifier (written after the fix; not observed red). Lowerer effect_program_judgment 8/8 and lib 102, verifier effect_program_judgment 15/15 and lib 97, warp-core edict_effect_package_tests 154 and lib 1020 pass; scoped clippy clean. Also applies rustfmt to shared.rs from the previous commit. Agent-Session: 58961512-206B-4358-87DD-B05AAAADD891 Agent-Tool: claude-code
…imum Kind: test (echo#1016). With terms 1 and 2 aligned, Echo's lowerer shared-read minimum for the closure-read witness is Amblicit 9f10fb91's own minimum (10813, 194487) plus exactly (1, 0): the effect node's step, which that compiler omits and is adding (term 3). The new test pins that residual; once the compiler that adds the node step is pinned, COMPILER_SHARED_MINIMUM moves to its report and COMPILER_RESIDUAL to (0, 0), making it the exact admission check. Passes today (lowerer effect_program_judgment 9/9). Agent-Session: 58961512-206B-4358-87DD-B05AAAADD891 Agent-Tool: claude-code
With Amblicit 65dc5362 (amblicit#347) and Echo's /v3 effect templates, the compiler's shared-read minimum equals the provider lowerer's on the closure-read witness (10814, 194487), a node-atom read (100, 1631), an outgoing-edge read with ensure-edge (244, 8240) and the five mutation intrinsics (176, 6796). The closure test now pins that compiler with a residual of (0, 0). Three new compiler-produced packages under edict-effect-v2-admission/ cover the other programs; Echo admits each at the compiler minimum and refuses it one step or byte below. Existing fixtures are unchanged. Refs echo#1016 Agent-Session: 95A50D41-6F86-402B-AA63-40EF3E7B1EB5 Agent-Tool: claude-code
warp-core's shared executor, measured on the compiler's typed-failure program, charges an attempt its node step, the call's shared work, and on the failure path the payload record (one expression step plus its shell, (2, 64)) and its encoding ((1, 64)); success binds the result without validating it. Both providers counted the payload record's expression step twice (once alone, once in the shell's evaluation) and added the binding's validations to the success path. Drop both, in the lowerer and the verifier, under the shared schedule only. Shared step minimums fall by one for typed-failure-control, read-control and the four ordered-record programs; bytes and every copying minimum are unchanged, and warp-core runs each at its new minimum. Retain Amblicit 65dc5362's typed-failure package and pin Echo's minimum for it, (140, 2095). Refs #1016 Agent-Session: 43C8A141-C28B-4126-9CAD-CE8449F6BDFD Agent-Tool: claude-code
warp-core's shared evaluator builds an obstruction payload record as one expression step, each field's work, and a shell of one cell plus one keyed cell per field, (1, 64 + key length) each (Size::field); measured on a one-field and a two-field attempt arm and a one-field require: shells (2, 130) and (3, 199). The lowerer (shell.plus(CELL.field(name))) and the verifier (shell.with(CELL.keyed(name))) added two cells per field, (1, 64) more than the runtime. Both now add one keyed cell, under the shared schedule only. The encoding term (shape(Record) scratch) already equals the runtime's meter.charge of the payload, (1, 64) plus (2, 128 + key length) per scalar field, and does not move. Goldens that move, each by (-1, -64) because each holds exactly one one-field obstruction payload; copying minimums unchanged: - typed-failure-control shared (375, 1295) -> (374, 1231) - ordered-record-z-first / a-first shared (112, 1489) -> (111, 1425) - ordered-record-guarded-z-first / a-first (252, 1745) -> (251, 1681) Same numbers in the lowerer and verifier tests and in warp-core's byte_effects_run_within_the_lowerer_minimum and ordered_records_fail_and_return_within_the_lowerer_minimum, which run each program at its new minimum to the copying result. New: a_failure_payload_field_is_charged_what_the_shared_runtime_charges (lowerer) and a_failure_payload_field_minimum_equals_the_lowerer_minimum (verifier) pin (145, 2291) for a one-field attempt arm and (131, 2227) for a one-field require, over two retained Amblicit 66f6ca4d packages with their sources. RED before the fix: (146, 2355) and (132, 2291) in both judges. Component digests change; promotion is not part of this commit. Refs #1016 Agent-Session: 5C2CEC9A-F11E-48FF-B0F6-9AC00AAB598F Agent-Tool: claude-code
…t programs Amblicit #348 merged (main 80b52f95). With Echo's /v3 templates that compiler's shared-read minimums equal Echo's lowerer on all nine effect programs. effect_programs_are_admitted_at_exactly_the_compiler_minimum now covers the typed-failure attempt and the four failure-payload programs as well as the three earlier ones. New retained packages for the two-field attempt payload and the empty require payload, written by 80b52f95; the verifier's minimums for them equal the compiler's. RED: typed-failure pinned at the pre-#348 minimum (137, 1967) was refused (UnsupportedProgram); the verifier pinned at (151, 2493) measured (150, 2493). Refs #1016 Agent-Session: 9CAF605C-84C0-4223-95FD-289057B2D111 Agent-Tool: claude-code
…nimum The node-atom read, the outgoing-edge read with ensure-edge, and the five mutation intrinsics, each the retained exact-admission package, now run under the shared-read schedule with a Core budget of exactly Amblicit 80b52f95's minimum: (100, 1631), (244, 8240) and (176, 6796). Each run reaches the copying schedule's result and mutations, and the frame's charge stays at or below the static bound on both axes. The graph read covers the five graph shapes of the existing shared-schedule differential. RED by mutation: read at (60, 1631) exhausted steps, mutations at (176, 3000) and the graph read at (244, 900) exhausted allocation. Refs #1016 Agent-Session: 9CAF605C-84C0-4223-95FD-289057B2D111 Agent-Tool: claude-code
Conflicts in the effect-body judges resolved by keeping this branch's shared-read terms (effect_value, effect_condition, effect_bound, boundary) inside main's refusal-trail diagnostics (walk/audit.within and trail marks). The shared-read refusal on the effect route stays removed, since this branch admits the capability there. CHANGELOG keeps both sides. No component bytes on this branch; main's promoted components are kept and are re-promoted separately. Checked after a forced rebuild: lowerer and verifier test suites, warp-core edict_effect_package_tests and public_effect_host_tests (trusted_runtime), scripts/check-trusted-runtime-gate.sh exit 0. Agent-Session: 9CAF605C-84C0-4223-95FD-289057B2D111 Agent-Tool: claude-code
One section in application-contract-hosting.md states what v2 effect execution is, the effect-body charge formulas as they ended up (matching Amblicit 80b52f95's core-cost-schedules README), what is pinned against the compiler and the runtime, and the known gaps. The stale statement that the effect route refuses the shared-read capability is corrected, here and in the #1001 CHANGELOG entry; the branch's CHANGELOG entry covers the whole branch. Refs #1016 Agent-Session: 9CAF605C-84C0-4223-95FD-289057B2D111 Agent-Tool: claude-code
… record payloads Amblicit #349 merged (main 615d2e59): a record-valued failure payload field is sized from its value's shape. Built from a clean worktree at that commit; a `{ at: { value: n } }` attempt payload compiles with it and is refused by 80b52f95 ("shared-read Core work is unestablished"). The nine agreeing programs' minimums are unchanged and their checked packages byte-identical. New Echo programs (typed-failure variants): record payload on an attempt arm (151, 2621) and on a require (137, 2557), (6, 330) above the scalar payload; the compiler, Echo's lowerer and Echo's verifier agree on both, pinned in the exact-admission test and a verifier test. The same require in a loop bounded 3 does NOT agree: compiler (306, 3584) scalar and (324, 4574) record, Echo (300, 3200) and (318, 4190) in both judges, (2, 128) per iteration below the compiler with or without the record field. Not pinned, no constant changed; recorded in the fixtures README. effect_v2_admission now probes again with a 2^20-step budget when the 1-step probe is refused by the loop-count check before costing. The record pins passed on their first run; no RED was observed for them. Refs #1016 Agent-Session: 9CAF605C-84C0-4223-95FD-289057B2D111 Agent-Tool: claude-code
Amblicit e306ecc9 (main after amblicit#350) no longer charges a v2 loop
iteration the binder copy bytes or the body's Null result, so its
shared-read minimums for a require inside a loop bounded 3 equal Echo's:
scalar (300, 3200), record payload (318, 4190). The other eleven
programs and their checked packages are unchanged under it (tool
effect_v2_admission, all thirteen; one unit below refused on each axis).
effect_programs_are_admitted_at_exactly_the_compiler_minimum now pins
twelve programs to e306ecc9.
Kind: new test coverage.
RED: with the scalar loop pinned at 615d2e59's (306, 3584) the test fails
("payload-loop-scalar-v2-admission: one steps unit below the compiler
minimum"); GREEN: 15 passed.
Agent-Session: 963BA8DA-6026-46F9-864F-94752A47109F
Agent-Tool: claude-code
Four more loop programs compiled by Amblicit e306ecc9 from authored
sources: a 3x3 nested require loop (783, 5144), a two-field record item
(336, 3998), a bytes item (1134, 3608), and a body of let + require +
ensureNode (339, 4232). The compiler minimum, Echo's lowerer and Echo's
verifier agree on each; the lowerer admits at that budget and refuses one
unit below.
warp-core now runs all six loop programs (with scalar and record payload
loops) at exactly the compiler minimum under shared reads, with all items
passing and with item 1, 2 or 3 failing: same result and mutations as the
copying run, charge within the bound on both axes. assert_runs_within
accepts an authored obstruction from the copying run.
An attempt inside a loop compiles at (342, 3392) but Echo's failure-set
judge refuses it (attempt is accepted only as a top-level intent node);
its source is retained with no package and nothing pinned.
Kind: new test coverage.
RED by mutation: warp-core with the nested loop at 700 steps fails
("loop-nested, failing item None: result"); verifier with it at
(782, 5144) fails. GREEN: lowerer 15, verifier 22, warp-core v2_admission 3.
Agent-Session: 963BA8DA-6026-46F9-864F-94752A47109F
Agent-Tool: claude-code
Brings in #932, #936 and #973. CHANGELOG keeps both sides. This branch adds no warp-core cfg gates; scripts/check-trusted-runtime-gate.sh exits 0. After a forced rebuild: lowerer 210 and verifier 364 tests pass, warp-core edict_effect_package_tests 158 and public_effect_host_tests 41. Agent-Session: 963BA8DA-6026-46F9-864F-94752A47109F Agent-Tool: claude-code
The shared-read section and the CHANGELOG entry now name e306ecc9, list the sixteen exact-admission programs and the six runtime-checked loops, state the per-iteration loop charge, and record that an attempt inside a loop is refused by the failure-set check. Kind: documentation. Agent-Session: 963BA8DA-6026-46F9-864F-94752A47109F Agent-Tool: claude-code
Promote the lowerer and verifier built for this branch's shared-read
judges. The checked bytes equal det-gates run 45429921707's
build-repro-candidate-1 (candidate 2 is byte-identical), and CI run
45429921710's build jobs reported them as the candidate digests against
the old approvals: lowerer 97047fc5... (844,027 bytes), verifier
c88611f4... (882,946 bytes). Approve both, regenerate the provider package
per crates/echo-wesley-gen/README.md (provider 9bddebc1..., manifest raw
2181dc39...), and update the goldens and docs.
Fixes found on the way:
- Regeneration refused at `assets --write --sync-component-resources`
("unexpected corpus entry resource.target-intrinsics-3.cbor"): provider
generation owns the lowerer's resources/ exactly. The /v3 catalog moves
to catalogs/ (test-only reference; component bytes unaffected).
- ban-nondeterminism failed on the catalog test's std::env/std::fs bless
path; it now compares include_bytes! with the generated catalog.
- ban-globals matched a doc comment ("static bound:"); reworded.
- clippy needless_borrow in public_graph_read_effect.rs.
RED: the regeneration refusal above; scripts/ban-nondeterminism.sh and
ban-globals.sh exited 1; echo-wesley-gen goldens failed after
regeneration (9bddebc1... vs 96b0c415...). GREEN: both guards exit 0;
echo-wesley-gen 208, lowerer 210, verifier 364, xtask 147, warp-core
edict_effect_package_tests 158 and public_effect_host_tests 41 pass after
a forced rebuild; clippy clean on the two warp-core effect test targets.
Agent-Session: 963BA8DA-6026-46F9-864F-94752A47109F
Agent-Tool: claude-code
CI Format and the provider host contract job failed on rustfmt drift in cost_templates.rs; spdx-only-check failed on effect_v2_admission.rs, whose header named the dual licence that scripts/ensure_spdx.sh reserves for non-code files. cargo fmt --all -- --check now passes. Kind: formatting. Agent-Session: 963BA8DA-6026-46F9-864F-94752A47109F Agent-Tool: claude-code
…talog Adopt Amblicit's effect-cost-catalog-v1 provider contract pack (merge a21de8c2, PR #351), whose intrinsics-document root admits edict.target-profile.intrinsics/v3. typed-failures-v1 becomes a rejection fixture. The echo.dpo@2 catalog is now generated as /v3: provider_effect_costs (echo-wesley-gen) authors every effect intrinsic's effectCostRule and the parameters map, and the resource becomes resource.target-intrinsics-3 / echo.dpo.intrinsics/v3. No /v2 catalog is published. The generated catalog is byte-identical to the hand-kept crates/echo-edict-provider-lowerer/catalogs copy (cmp), which is removed; the lowerer's template conformance tests now evaluate the packaged catalog. Provider package regenerated (44269f1c, manifest raw ed35e3c5); echo.dpo@2 profile c0955185 copied to both judges. echo.dpo@1, its profile and its frozen /v1 catalog are unchanged. The lowerer, verifier and warp-core pin /v3 for echo.dpo@2: the catalog carries parameters (and optional types), each effect intrinsic carries effectCostRule, and lowerer publication admission accepts /v3 in place of /v2. RED: echo_dpo_2_catalog_carries_a_cost_template_for_every_effect fails with the template line removed from the generator; before the judges moved, source_module_effect refused the regenerated profile (UnsupportedTargetProfile); package goldens and schema pin moved. GREEN: echo-wesley-gen suite passes; lowerer_contract and lowerer lib pass. Known red until components are promoted and echo.dpo@2 fixtures are recompiled: lowerer/verifier corpus tests on the old /v2 fixtures. Refs #1016, flyingrobots/amblicit#341 Agent-Session: 49302649-3379-45F2-8C63-1FAB902F848A Agent-Tool: claude-code
Promote the lowerer and verifier that pin /v3 for echo.dpo@2. The checked bytes equal det-gates run 45448729473's build-repro-candidate-1, and CI run 45448729312's build jobs reported them as the candidate digests against the old approvals: lowerer 9f0b9e95... (844,846 bytes), verifier 17cbe60a... (883,552 bytes). Approve both, regenerate the provider package per crates/echo-wesley-gen/README.md (provider 7892d501..., manifest raw dd9d81e9...), and update the goldens and docs. Before this, scripts/check-trusted-runtime-gate.sh exited 0 on d8ab48c. GREEN after a forced rebuild: echo-wesley-gen suite and xtask provider tests pass; the package checks (artifacts/package/assets --check) pass. Agent-Session: 205311E6-60C1-4524-A56C-31E95B76E451 Agent-Tool: claude-code
Authored inputs only; no compiler output changed. In 17 source lawpacks
and 13 v2-admission payload lawpacks: profile digest 7cadb97e... ->
4e60b129..., the embedded intrinsicCatalog bytes -> the packaged
resource.target-intrinsics-3.cbor; in 4 applications the catalog path
-> resource.target-intrinsics-3.cbor; in 4 programs the `use target`
pin -> 4e60b129....
The outputs are not recompiled: Amblicit a21de8c2 refuses the packaged
provider ("provider artifact-schema registry failed: SchemaCompileFailed:
domain echo.dpo.intrinsics/v3"). Bisected on a scratch copy of the
package: removing only the recursive alternatives of effect-cost-expr
(sum, product) and effect-cost-type (record) from the vendored
effect-cost-catalog-v1 CDDL makes the same compile succeed. Amblicit's
registry test covers only the target-ir binding of that pack.
Agent-Session: 205311E6-60C1-4524-A56C-31E95B76E451
Agent-Tool: claude-code
Closes #1016.
Draft, built family by family (owner-set order). Each family goes RED→GREEN across warp-core, the lowerer and the verifier against a compiler-produced corpus program.
Families
isSome/unwrap/defaultneeded to observe them) — a4c7f5ccontentAddress,contentEdgeId,slotEdgeId,attachmentValueDigest)fail/attemptEffectPackageHost: static bound, runtime charge, elapsed time and peak memory reported separatelyEvidence (family 1)
RED, GREEN and calibration are in the commit message. Existing corpus minimums and the v1 copying goldens are unchanged.
Known interim CI state
The lowerer and verifier sources changed, so the provider-component digest checks will fail until the final promotion.
Documentation
The corpus README and the module docs are updated. Canonical docs and the CHANGELOG come with the promotion.