Skip to content

Run and meter effect programs under the v2 shared-read schedule - #1029

Draft
flyingrobots wants to merge 33 commits into
mainfrom
feat/effect-programs-v2
Draft

flyingrobots wants to merge 33 commits into
mainfrom
feat/effect-programs-v2

Conversation

@flyingrobots

Copy link
Copy Markdown
Owner

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

  • 1. Checked integers, min/max (with the Option consumers isSome/unwrap/default needed to observe them) — a4c7f5c
  • 2. v2 effect executor: effect steps and graph reads (shared values between instructions, conversion only at effect boundaries)
  • 3. Identity intrinsics (contentAddress, contentEdgeId, slotEdgeId, attachmentValueDigest)
  • 4. Option constructors, ordered records, fail/attempt
  • 5. Bytes (after amblicit#339 corrects the v2 result-allocation rule)
  • Corpus pin moved to Amblicit main (feat(core): add grant intent obstruction receipt shape #336 reachable list bounds, docs(core): define obstruction receipt boundary #338), then feat(core): add obstruction receipt skeleton #339; Echo's static passes mirror the reachable-bound rule
  • Merge main once, promote components, docs, CHANGELOG
  • ReplaceRange (jedit#410) measured through EffectPackageHost: static bound, runtime charge, elapsed time and peak memory reported separately

Evidence (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.

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
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

#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
@flyingrobots

Copy link
Copy Markdown
Owner Author

Checkpoint at 18e8633.

Done:

Remaining, in order:

  1. Family 2 follow-ups:
    • a closure-read effect witness showing the declared-selector charge stays at or above the runtime charge;
    • Echo's edict.target-profile.intrinsics/v3 catalog: effectCostRule per effect intrinsic, plus a parameters map with maxEdgeScans at graphReads.maxEdgeScans (uint) and selector at graphReads.closureSelector (helper);
    • a conformance test: template evaluation equals the lowerer's per-effect charge on every intrinsic and fixture, and Echo's helper cost never exceeds Amblicit's;
    • exact admission at the compiler minimum (needs amblicit#341).
  2. Family 3: identity intrinsics (contentAddress, contentEdgeId, slotEdgeId, attachmentValueDigest).
  3. Family 4: Option constructors, ordered records, fail/attempt.
  4. Family 5: bytes, under docs(process): record direct-main docs exception #340's result-allocation rule.
  5. Merge main once, promote the components, then docs and the CHANGELOG.
  6. Measure ReplaceRange (jedit#410) through EffectPackageHost, reporting static bound, runtime charge, elapsed time and peak memory separately.

Interim CI: the component-digest checks fail until promotion.

@flyingrobots

flyingrobots commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner Author

Checkpoint at 42d216e (supersedes earlier checkpoints).

Done:

  • Family 1: checked integers, min/max and the Option readers (a4c7f5c).
  • Corpus pinned to Amblicit 26a201e7 (016adbf).
  • Family 2: the warp-core v2 effect executor (34f6e73); lowerer and verifier judge v2 effect programs with the declared selector (18e8633); a compiler-produced closure-read witness (f578a7d).
  • Family 3 (c27198d): the four echo.dpo@2 identity intrinsics under v2, in all three judges.
  • /v3 intrinsics catalog and its conformance tests (44098b1). Closure witness widened to 8 nodes at depth 4 (bb28661) and given a costlier unselected helper (32bb6b9).
  • Family 4 (5828e56): Option constructors, ordered records, fail under attempt, in all three judges, by Amblicit 26a201e7's rules (ordered record = record shell; fail = one step, no value; some/none = copying call charge plus the value built, amblicit#340). Lowerer and verifier minimums agree independently. Pinned (copying, shared): ordered-record-{z,a}-first (57, 2793), (110, 1489); ordered-record-guarded-{z,a}-first (71, 3177), (250, 1745); public option witness (88, 2936), (828, 942). warp-core at exactly those shared minimums returns the copying result (option witness both branches; ordered records at = 0..=4) and charges within the bound.
  • Family 5 (3596e81): the six byte operations, kept at their copying call charge plus the value built (amblicit#340). New compiler-produced corpus program edict-core-cost-v2/bytes (Amblicit 26a201e7, minimums 2336 steps / 3267 bytes / 79 output). Lowerer and verifier admit exactly 2336/3267 and refuse one less on each axis; warp-core runs within it on three inputs. Effect programs slice-proven (195, 3383)/(870, 971) and typed-failure-control (74, 3312)/(373, 1295) pinned in both judges and run at exactly the shared minimum in warp-core.
  • Item 3 (cbdaff6): clippy -D warnings (1.96.0) on everything changed since 18e8633: one cast fixed, rustfmt applied to cost_templates.rs and source_functions.rs. A plain clippy run stops earlier on lints pre-existing on main (chunks_exact_to_as_chunks in echo-cas and lowerer lib.rs, branches_sharing_code in provenance_store.rs/tick_patch.rs, assert_is_empty in several test files); those were allowed on the command line to reach the branch's files. Not fixed here.

Skipped (preconditions not met when checked at cbdaff6):

Gaps found:

  • The /v3 catalog is not in the provider package. The upstream provider contracts (Amblicit) have no /v3 schema rule to validate it against, and Echo's generator validates every resource against them. The amblicit#345 agent is assessing it.
  • "Echo's helper cost never exceeds Amblicit's" is tested against the lowerer's own one-call helper cost, not against Amblicit's number.
  • Whether Echo's cost for an effect's input expression equals Amblicit's is unsettled (feat(core): publish capability grant validation obstruction facts #345 leaves it open).
  • New: Echo's ordinary output bound for the bytes corpus program is 142 bytes; the compiler's is 79. The output bound is schedule-neutral (copying judgment), so v2 cannot fix it; the corpus tests pin Echo's bound. Not investigated.
  • New: the family 4 and 5 effect minimums are Echo's own goldens (lowerer = verifier), not compiler minimums; those need feat(core): publish capability grant validation obstruction facts #345.
  • contentAddress edge list under v2: sound as an upper bound by the earlier argument; not re-derived against 26a201e7's fold_work.

Interim CI: the component-digest checks fail until promotion.

Exact admission at the compiler minimum (42d216e): does NOT hold

Compiler: Amblicit 9f10fb917e55030b75ef3af74afb9fb4b77b02d0 (contains #345). I checked the binary's cargo-install record. It is at ~/git/echo/target/amblicit-9f10fb91…/bin/amblicit. Tool: xtask --example effect_v2_admission (header has usage). Not wired into CI. No existing pin changed.

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.

program (intrinsics) compiler (steps, bytes) Echo lowerer (steps, bytes)
closure-read witness (10813, 194487) (8666, 504387)
edict-effect-step (node-atom-read) (99, 1631) (100, 1631)
edict-effect-graph-read (outgoing-edge-read, ensure-edge) (235, 8240) (244, 8240)
edict-effect-mutations (create-node, ensure-node, ensure-edge, replace-atom, replace-edge) (171, 6796) (176, 6796)

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:

  1. Closure selector price. Echo charges the declared selector at its copying fact. completed comes from the copying Judgment::function under both schedules: select (448, 27925). Amblicit's helper measure charges the shared-read call: (610, 2100). Echo's own shared_function gives exactly (610, 2100), and costly minus select agrees on both sides, (732, 1429). This is a factor of 12 (edges max) and accounts for all of the closure bytes gap (309900).
  2. Effect intent input/output conversion under v2. Echo's effect_intent charges copy plus validations: 29+16 in, 415+224 out, total 684. Amblicit, and Echo's own pure shared-read intents (shared_intent_cost), charge 2 × cells: 888. Amblicit is +204 steps on the closure program.
  3. Effect node step. Echo charges 1 step per body node ("every node ... is one runtime step", effect_block.rs). Amblicit's template branch (CoreNode::Effect → early return self.replaced_effect) skips the node step. Amblicit is −1 step per effect node: step −1, mutations −5, closure −1.
  4. Validations on let in an effect body. Echo adds validations(binding type) per let (effect_block.rs, the let arm). Amblicit's shared Let does not. On graph-read this is −7 (Bytes<32> 1, EdgeWrite 6), confirmed by dropping the lets.
  • Open question 1 (input expression): equal. effect_value(input.read) = 2 = Amblicit's expression (Field + Local). The if/listAt let in graph-read also agrees: removing it changes neither the difference nor the bytes.
  • Bytes are exact on all four programs once term 1 is aligned.

Runtime check (decisive for term 1). warp-core given exactly the compiler's budget (10813, 194487) on the closure witness refuses during evaluation: BoundedRead(Evaluation(AllocationBudgetExceeded)) after charging (3481, 194466). The runtime needs more bytes than the compiler's minimum. So Amblicit's shared-read selector price is below what warp-core's v2 runtime actually charges, and Echo's copying price for the selector is the sound one for the current runtime. Pricing the selector at its shared cost on Echo's side would make the static bound unsound. I tried it, measured, and reverted it.

Open question 2: the closure-read rule evaluates on real echo.dpo@2 types. The template steps by hand (9919 = validations(input) 14 + graph_charge 9905) match Echo's lowerer. Bytes match once term 1 is aligned.

Open question 3 (blocker): the compiler takes effect templates only from the catalog that the selected profile's intrinsics reference pins (target.pureIntrinsics.catalog, digest-checked in load_effect_costs). The checked echo.dpo@2 profile pins the /v2 catalog. A private profile pinning /v3 gets through the compiler, but the packaged Echo lowerer component refuses it: UnsupportedTargetProfile, "accepts only the exact checked Echo target profiles". Echo's lowerer also accepts only /v1 or /v2 in configuration.intrinsicCatalog, and the packaged component refuses a shared-read Core (UnsupportedSemantics). Smallest unblocking change, Echo side: publish an echo.dpo@2 profile revision (or a new profile) that pins the /v3 catalog, ship the resource in the package, and accept /v3 in effect_resources. This needs an Amblicit provider-contract schema rule for a /v3 intrinsics resource (Amblicit side) before Echo's generator can package it. Promotion of v2-aware components is also needed. Not changed here.

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 helper at the copying call. (b) Terms 2 to 4 are rule differences. Each side needs a runtime-grounded decision: Echo's effect-intent conversion vs its pure-intent rule, and Amblicit's omitted node step and let validations. Amblicit omitting runtime-charged steps (3, 4) is below Echo's static rule.

Terms 1 and 2 aligned (84739ce, 0fca4d6, 02f5fcf): supersedes the "does NOT hold" section above where they differ

Term 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):

program compiler Echo lowerer Echo − compiler
closure-read witness (10813, 194487) (10814, 194487) 1 step (1 effect node)
node-atom-read (99, 1631) (100, 1631) 1 step (1 node)
outgoing-edge-read + ensure-edge (235, 8240) (244, 8240) 9 steps (2 nodes + 7 let validations)
five mutation intrinsics (171, 6796) (176, 6796) 5 steps (5 nodes)

That is exactly the expected residual from Amblicit's terms 3 and 4. Bytes are equal on all four.

Exact-admission test (02f5fcf). the_closure_witness_minimum_is_the_compiler_minimum_plus_its_residual (lowerer) pins COMPILER_SHARED_MINIMUM = (10813, 194487) and COMPILER_RESIDUAL = (1, 0). It passes today.

  • TODO(echo#1016): once the Amblicit commit that adds the effect-node step and the let validations lands, rebuild the compiler from it, re-run effect_v2_admission, set COMPILER_SHARED_MINIMUM to its report and COMPILER_RESIDUAL to (0, 0), and pin that commit here. Compiler commit: not yet known.
  • The step, graph-read and mutations packages from 9f10fb91 are not byte-identical to the retained fixtures. Exact admission on those three needs retained 9f10fb91-or-later packages; only the closure witness is covered.

Exact admission holds on four programs with Amblicit 65dc5362 (a4e85e1): supersedes the TODO above

Compiler: Amblicit 65dc53624856f58d21404d65d5256779ce403d49 (amblicit#347 merged), installed at ~/git/echo/target/amblicit-65dc5362…/bin/amblicit; install record names that rev. Same tool (effect_v2_admission), Echo's /v3 templates.

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)

The compiler refuses one unit below on each axis (InvalidBound) on all four. Echo's lowerer admits each at the compiler minimum and refuses one step or one byte below.

Pinned (a4e85e1).

  • the_closure_witness_minimum_is_the_compiler_minimum_plus_its_residual: COMPILER_SHARED_MINIMUM (10814, 194487), COMPILER_RESIDUAL (0, 0), Amblicit 65dc5362. RED first: the old residual (1, 0) failed against the new number. The closure package from 65dc5362 is byte-identical to the retained fixture.
  • effect_programs_are_admitted_at_exactly_the_compiler_minimum (new): node-atom-read, outgoing-edge-read and mutations, admit at the compiler minimum, refuse at one step below and one byte below, and the measured minimum equals the compiler's. RED by mutation: mutations pinned at (175, 6796) failed with UnsupportedProgram. New packages from 65dc5362 in crates/warp-core/tests/fixtures/edict-effect-v2-admission/ (README gives provenance); they use the configurations retained beside each source. No existing fixture changed.
  • warp-core: the_closure_witness_runs_within_the_lowerer_minimum already runs at (10814, 194487), now also the compiler minimum, and passes (charge at or below it on both axes).

Not compared yet: two more terms

  • attempt in an effect body: does NOT agree. edict-effect-typed-failure (one let … = distance(..) else fx.RangeInverted, one ensureNode): compiler (137, 1967), Echo lowerer (141, 2095), Echo is +4 steps, +128 bytes above. The same program with the attempt replaced by let span: U64 = input.end; agrees exactly at (57, 1903), so the whole residual is in the attempt node. Rules: Echo effect_block.rs "attempt" arm charges effect_value(call) + max(worst arm, validations(binding)), and each arm through obstruction() costs (1, 64) plus shape(record {}) plus payload fields even with an empty payload. Amblicit crates/amblicit-syntax/src/target_ir/fold_work.rs CoreNode::Attempt (about line 620) charges expression(value) + max over arms(sum of payload expressions) + 1: an empty arm is 0 and there are no binding validations. From the code, (2, 128) of the residual is Echo's empty-arm payload and scratch against Amblicit's 0. The other 2 steps were not separated (probably valuing the call or the validations); not measured further. No constant changed on either side. warp-core was not run on this program.
  • let in an effect body under COPYING: facts from code only, not measured. Echo's "let" arm in effect_block.rs adds shape(ty).1 (validations) with no schedule check. Amblicit's let_node (fold_work.rs about line 719) returns the bare expression cost when !self.shared, so the copying schedule omits those validations. The tool's copying compile uses the checked /v2 provider with no effect templates, so its copying minimum cannot be compared with Echo's copying minimum. Whether this changes a copying admission is unverified. v1 change, if any, is the owner's call.

Remaining

  • warp-core runs at exactly the compiler minimum for node-atom-read, outgoing-edge-read and mutations. Their graph setups live in executable_operation_pipeline/public_*_effect.rs, which have no shared-schedule or budget-repinning helpers. Not done.
  • The attempt disagreement above needs an owner decision on which rule is grounded in the runtime.
  • Promotion / main merge after fix(provider): refuse the footprint laws runtime admission refuses #1024 (not in this step).

attempt term aligned (Echo 5c3502f; amblicit#348 head 66f6ca4d, not merged)

Measured (temporary meter prints in warp-core's shared executor, edict_effects/execution/shared.rs, removed): on the typed-failure program, after the attempt's node step, success charges the call (83, 64) and binds the result without validating it; failure charges the call up to fail (78, 0), builds the {} payload (2, 64) (one expression step + one-cell shell, edict_pure/shared_reads/expression.rs), encodes it (1, 64). Program totals: success (132, 1909), failure (122, 1565).

Decomposition of the (4, 128) gap (node step and call (83, 64) equal on both sides):

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 now shell.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 packages payload-{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 (the attempt helper). 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/require charge.
    • 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 /v3 provider stops at TargetProfileMismatch: 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: /v3 in 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):

  1. Vendored Amblicit effect-cost-catalog-v1 (a21de8c2, feat(core): add basis resolution v0 boundary #351) into both pack locations; typed-failures-v1 is now a rejection fixture. Pins: CDDL 66f28b74…, manifest 7eadeaba…, ceiling 98,574 B.
  2. The catalog generator emits /v3 as echo.dpo@2's only catalog. The templates are authored once, in crates/echo-wesley-gen/src/provider_effect_costs.rs. The resource is renamed resource.target-intrinsics-3, domain echo.dpo.intrinsics/v3; no /v2 file remains. The generated catalog is byte-identical (cmp) to the old hand-kept lowerer/catalogs/resource.target-intrinsics-3.cbor, which is deleted. cost_templates.rs now evaluates the packaged catalog. So the catalog content has not changed.
  3. Regenerated the package: provider 44269f1c…, manifest raw ed35e3c5…, echo.dpo@2 profile sha256:4e60b1297d4d5e38bb9029d225a7074c9e0a7932792cb8644276cdf7ceeb173c (was 7cadb97e…). Copied into both judges' resources/. echo.dpo@1 and its /v1 catalog are untouched.
  4. 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 /v3 in place of /v2.
      This adds no warp-core cfg gates.

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_contract and 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:

  1. 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.
  2. Then recompile every echo.dpo@2 fixture. The compiler calls the packaged lowerer component, so the old components refuse the new profile. In every */source*/ lawpack and application JSON:
    • replace 7cadb97e… with 4e60b129…;
    • replace the intrinsicCatalog $edictBytes (old /v2 catalog hex) with the hex of schemas/edict-provider/package/v1/generated/resources/resource.target-intrinsics-3.cbor;
    • replace resource.target-intrinsics-2.cbor with -3.cbor.
      Then recompile with the xtask publication examples. About 47 output hex files embed the old catalog: warp-core edict-* fixtures, lowerer effect-programs/source-module-*, source-module-effect/05-target-configuration.hex, and replace-range-flat/04-source.cbor and artifact_binding.rs, which pin 7cadb97e.
  3. Retire xtask/examples/effect_v2_admission.rs's private /v3 route: compile through schemas/edict-provider/package/v1 directly, with coreCostSchedule edict.core-cost/v2.
  4. End check: the 16 exact-admission programs, which should keep the pinned numbers since the catalog bytes are unchanged.
  5. Docs/CHANGELOG and scripts/verify-edict-provider-host-v1.sh. The docs still mention lowerer/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:

  1. scripts/check-trusted-runtime-gate.sh on d8ab48c under the build lock: exit 0.
  2. Promoted (f6b0b56) from det-gates 45448729473 build-repro-candidate-1, SHA-256s equal to what CI 45448729312's build jobs printed: lowerer 9f0b9e953c6b17eea67ecd4f865211f5b531476961edbc811f96a3f6f2236562 (844,846 B), verifier 17cbe60a578e20d3acd7fc3c47f694dfd2fe948b21da47d98801dfb947b80112 (883,552 B). Package regenerated: provider 7892d501…, manifest raw dd9d81e9…. echo-wesley-gen and xtask provider tests green after forced rebuild.
  3. (partial, 7e23f8f, wip) Authored inputs moved to /v3: 30 source lawpacks (profile digest, embedded catalog), 4 applications (catalog path), 4 .edict use target pins. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run and meter effect programs under the v2 shared-read schedule

1 participant