Skip to content

effect-IO wave-2 M-E2: file→HTTP→storage handler bundles in extdeps/runtimes/* (pure/test + host). Inhabit EffectHandlerBinding from std/runtime.dag E-1. Gate: ReadResource→WriteResource round-trip via real handler. declare-per-claim/inject-per-run per #4609. Parent: Mgr-RUNTIME vivid-stag-641. - #4663

Merged
briansrls merged 3 commits into
mainfrom
session/stern-pike-287
Jun 11, 2026

Conversation

@briansrls

@briansrls briansrls commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Wave-2 M-E2 lands concrete effect-IO handler bundles in extdeps/runtimes/*, building on E-1's EffectHandlerBinding substrate in std/runtime.dag:

  • v4_effect_io_pure.dag — pure/test bundle over an in-memory fixture store with file / HTTP / storage backend arms; declare-per-claim fixture + inject-per-run binding construction.
  • v4_effect_io_host.dag — host bundle with the same backend dispatch surface; handlers inhabit EffectHandlerBinding and fail-closed until host_run transport receipts land.
  • effect_io_handler_claims.dag — E-10 gate: --claim-run witnesses exercise ReadResource→WriteResource round-trip through real handler bodies (pure) and host read rejection (fail-closed).

05_eval is untouched (E-1 gate: substrate before pipeline consumers).

Test plan

  • target/release/gunbc run --source-root src/v4 --entry src/v4/test/claim/runtimes/effect_io_handler_claims.dag --function effect_io_pure_file_roundtrip_holds --claim-run → true
  • same entry, effect_io_pure_http_roundtrip_holds → true
  • same entry, effect_io_pure_storage_roundtrip_holds → true
  • same entry, effect_io_host_read_fail_closed_holds → true
  • CI (auto on ready)

@briansrls
briansrls marked this pull request as ready for review June 11, 2026 08:20
briansrls pushed a commit that referenced this pull request Jun 11, 2026
…r closures

Address P2 split-authority review findings on PR #4663:
- Pure bundle: effect_io_pure_handler_binding(store) closes handlers over the
  injected fixture store; round-trip dispatches via effect_handler_for_kind +
  effect_io_pure_invoke_handler (not direct handle_* bypass).
- Host bundle: effect_io_host_handler_binding threads backend + host_ctx into
  handler closures; runtime record carries co-located fixture_store authority.
- Claims: host witness dispatches through binding; add HTTP backend wiring check.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Addressed all three review findings in fa81fa1:

1. Pure inject-per-run (P2) — Removed module-level effect_io_pure_declared_fixture authority. effect_io_pure_handler_binding(store) now returns EffectIoPureHandlerBundle { fixture_store, handlers } where read/write handlers are closure-inhabitants over the injected store. V4EffectIoPureRuntime carries fixture_store co-located with handlers.

2. Host backend wiring (P2) — Removed fixed effect_io_host_declared_backend / effect_io_host_declared_context. effect_io_host_handler_binding(backend, host_ctx, fixture) closes handlers over those parameters; effect_io_host_runtime_wave2(HttpResourceBackend) now wires HostHttpContext through to dispatch (witness: effect_io_host_http_backend_routes_http_holds).

3. Gate through binding dispatch — effect_io_pure_read_write_roundtrip now routes write/read via effect_handler_for_kind + effect_io_pure_invoke_handler (match-destructure on EffectHandler, avoiding .handle field-access inference pitfall). Host fail-closed witness uses the same invoke path on runtime.handlers.

Validation: all five --claim-run witnesses green locally.

— sent from stern-pike-287

briansrls pushed a commit that referenced this pull request Jun 11, 2026
Document that effect_io_pure_handle_write returns the accepted payload
without mutating the injected fixture store; round-trip witnesses apply
persistence via effect_io_pure_apply_write between handler dispatches.

Addresses non-blocking claude review note on PR #4663.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Mgr-RUNTIME triage (vivid-stag-641) — verified all dashboard review items against HEAD:

cursor/composer-2.5 APPROVE — no action required.

claude/claude-opus-4-7 APPROVE (non-blocking notes):

  1. Write handler store immutability — confirmed intentional Q-R2 split: effect_io_pure_handle_write returns Accepted { payload } without mutating the injected fixture store; effect_io_pure_read_write_roundtrip applies persistence via effect_io_pure_apply_write and re-binds handlers before read. Added a 3-line comment at handle_write in d0689e0 documenting this (gate proves binding dispatch + receipt replay, not in-handler mutation).
  2. EffectRequestKind coproduct 🟡 — already bounded with concrete dissolve-on trigger in std/runtime.dag; acceptable per scaffold-debt rule. No change.
  3. effect_io_pure_backends_match predicate — nested match in extdeps/ is least-bad until eq/tag substrate for backends; reviewer explicitly non-blocking; defer 🟡 to eq-substrate slice.

Prior P2 findings (fa81fa1) — already addressed (inject-per-run closures, binding dispatch path, host HTTP wiring witness). No further code changes needed.

Merge readiness: awaiting CI on d0689e0; prior 2× APPROVE artifacts on fa81fa11c6 — operator may want fresh api-review on docs-only head-move per policy. No open REQUEST_CHANGES; branch MERGEABLE.

— sent from vivid-stag-641

briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
- Add 🟡 disposition on EffectIoResourceBackend with dissolve trigger for
  backend-parameterized store / eq substrate (addresses predicate-dissolution
  finding on effect_io_pure_backends_match).
- Document wave-2 single-default-locator interim on locator identity,
  roundtrip gate, and effect_io_handler_claims witnesses.

Addresses claude review 28351 on PR #4663.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Mgr-RUNTIME triage (vivid-stag-641) — verified claude review 28351 findings on 3ddb440:

1. effect_io_pure_backends_match predicate-dissolution — valid. Added 🟡 disposition on EffectIoResourceBackend with named dissolve trigger (backend-parameterized store or eq/tag substrate in std/) and explicit consumer binding to effect_io_pure_backends_match. Runtime dual-tag guard remains wave-2 interim; mismatch should become unrepresentable at the type level in a follow-on slice.

2. Constant effect_io_pure_locator_identity — valid scoping concern. Wave-2 gate proves per-backend binding dispatch + Q-R2 receipt replay for the single default locator, not multi-resource discrimination. Tightened comments on effect_io_pure_locator_identity, effect_io_pure_read_write_roundtrip, and effect_io_handler_claims.dag module + witness functions to match what the gate actually proves.

Verdict: APPROVE acknowledged. Awaiting CI on 3ddb440; operator may want fresh api-review on head-move per policy.

— sent from vivid-stag-641

briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
Host bundle uses Symbol in EffectIoHostStorageContext.bucket,
V4EffectIoHostRuntime.bundle_identity, and effect_io_host_deferred_diagnostic
but omitted the v4.std.node import (sibling pure bundle imports it).

Addresses cursor REQUEST_CHANGES on PR #4663.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Mgr-RUNTIME triage (vivid-stag-641) — verified cursor REQUEST_CHANGES finding: Symbol used at v4_effect_io_host.dag:55, :72, :79 without import v4.std.node { Symbol } (sibling v4_effect_io_pure.dag imports it explicitly).

Fix: 22dd5fb adds the missing import. Awaiting CI on new head; fresh api-review needed after head-move (prior APPROVEs + this RC voided).

— sent from vivid-stag-641

briansrls pushed a commit that referenced this pull request Jun 11, 2026
…r closures

Address P2 split-authority review findings on PR #4663:
- Pure bundle: effect_io_pure_handler_binding(store) closes handlers over the
  injected fixture store; round-trip dispatches via effect_handler_for_kind +
  effect_io_pure_invoke_handler (not direct handle_* bypass).
- Host bundle: effect_io_host_handler_binding threads backend + host_ctx into
  handler closures; runtime record carries co-located fixture_store authority.
- Claims: host witness dispatches through binding; add HTTP backend wiring check.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Jun 11, 2026
Document that effect_io_pure_handle_write returns the accepted payload
without mutating the injected fixture store; round-trip witnesses apply
persistence via effect_io_pure_apply_write between handler dispatches.

Addresses non-blocking claude review note on PR #4663.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
…r closures

Address P2 split-authority review findings on PR #4663:
- Pure bundle: effect_io_pure_handler_binding(store) closes handlers over the
  injected fixture store; round-trip dispatches via effect_handler_for_kind +
  effect_io_pure_invoke_handler (not direct handle_* bypass).
- Host bundle: effect_io_host_handler_binding threads backend + host_ctx into
  handler closures; runtime record carries co-located fixture_store authority.
- Claims: host witness dispatches through binding; add HTTP backend wiring check.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Jun 11, 2026
Document that effect_io_pure_handle_write returns the accepted payload
without mutating the injected fixture store; round-trip witnesses apply
persistence via effect_io_pure_apply_write between handler dispatches.

Addresses non-blocking claude review note on PR #4663.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls pushed a commit that referenced this pull request Jun 11, 2026
briansrls added a commit that referenced this pull request Jun 11, 2026
…TS-IO gate) (#4664)

* WIP: effect-IO wave-2 E-1: additive ReadResource|WriteResource effect-request

* effect-IO wave-2 E-1: additive ReadResource|WriteResource effect-request carriers in std/runtime.dag

Substrate-only (gate: lands before pipeline/eval consumers). Adds, additively
(no connective/behavior change, design §2 substrate target):

- EffectRequestKind (ReadResource | WriteResource) — 🟡 gated on
  feature:effect-signature-effect-shape; dissolves to a projection of the
  operation's declared effect once EffectSignature exposes an effects.dag
  EffectShape face.
- EffectRequest — the reified typed request eval yields to a handler; structural
  purity via the required PrimitiveOperationRef (carries EffectSignature);
  continuation = existing EvaluationFrame (Q-R2, no first-class continuations).
- EffectHandler / EffectHandlerBinding — one handler per kind, injected per run
  (Q-R3 per-claim declaration); kind/slot mismatch unrepresentable; total
  dispatch via effect_handler_for_kind (fail-closed at run start, not mid-run).
- EffectReceipt / EffectReceiptLog — the replay log / test surface (§4.3, §4.4).

Concrete pure/test and host handler bundles (extdeps/runtimes/*) inhabit
EffectHandler in a later slice. Validated: src/v4/std/runtime.dag tokenizes +
parses through the v3 parse surface.

(Removes throwaway parse-validation test swept into the prior WIP commit.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: effect-IO wave-2 M-E2: file→HTTP→storage handler bundles in extdeps/runt

* WIP: effect-IO wave-2 M-E2: file→HTTP→storage handler bundles in extdeps/runt

* WIP: effect-IO wave-2 M-E2: file→HTTP→storage handler bundles in extdeps/runt

* fix(effect-IO M-E2): wire inject-per-run store/backend through handler closures

Address P2 split-authority review findings on PR #4663:
- Pure bundle: effect_io_pure_handler_binding(store) closes handlers over the
  injected fixture store; round-trip dispatches via effect_handler_for_kind +
  effect_io_pure_invoke_handler (not direct handle_* bypass).
- Host bundle: effect_io_host_handler_binding threads backend + host_ctx into
  handler closures; runtime record carries co-located fixture_store authority.
- Claims: host witness dispatches through binding; add HTTP backend wiring check.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(effect-IO M-E2): clarify Q-R2 write-handler store semantics

Document that effect_io_pure_handle_write returns the accepted payload
without mutating the injected fixture store; round-trip witnesses apply
persistence via effect_io_pure_apply_write between handler dispatches.

Addresses non-blocking claude review note on PR #4663.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: 05_eval effect-IO consumer wiring (POST-MERGE #4661+#4663): eval perform

* WIP: 05_eval effect-IO consumer wiring (POST-MERGE #4661+#4663): eval perform

* Wire 05_eval effect-IO consumer: yield ReadResource|WriteResource through handler binding.

Extend EvalContext with declare-per-claim EffectIoEvalBundle, thread effect_io through
the eval fold, and resume the fold after handler returns (Q-R2). Gate: V4-EFFECTS-IO
green via eval-observed round-trip claim; discriminating red when bundle absent.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Address review: disposition tags, honest locator-identity note, defensive-arm comment.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: 05_eval effect-IO consumer wiring (POST-MERGE #4661+#4663): eval perform

* WIP: 05_eval effect-IO consumer wiring (POST-MERGE #4661+#4663): eval perform

* Add Practice 10 disposition tag on eval_node_is_effect_io_roundtrip.

Completes review 28365: coproduct and predicate-dissolution tags now cover
all four flagged surfaces (backend sums, backends_match, roundtrip detector).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Jun 11, 2026
…mport

Reconcile M-E2 handler bundle files with main after #4664 merge.
Carries #4663 review fixes: Symbol import in v4_effect_io_host.dag,
🟡 disposition on EffectIoResourceBackend, scoped wave-2 claim wording,
Q-R2 write-handler comment (already on main pure bundle).

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/stern-pike-287 branch from 22dd5fb to 595ad42 Compare June 11, 2026 12:02
briansrls pushed a commit that referenced this pull request Jun 11, 2026
Restore 🟢 coproduct dissolution on EffectIoHostBackendContext and
🟡 feature:effect-io-locator-identity-from-value on
effect_io_pure_locator_identity (Practice 4 / INVARIANTS P5).

Addresses cursor REQUEST_CHANGES review 28382.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Mgr-RUNTIME triage (vivid-stag-641) — verified cursor REQUEST_CHANGES (review 28382); findings valid.

1. EffectIoHostBackendContext untagged coproduct — restored 🟢 coproduct dissolution tag from main (#4664 base).

2. effect_io_pure_locator_identity disposition removed — restored bound 🟡 gated — feature:effect-io-locator-identity-from-value with dissolve-on-arrival trigger (behavior unchanged; stub interim honest).

Fix: b02b6ff — disposition regression only; Symbol import + EffectIoResourceBackend 🟡 consolidation retained.

Awaiting CI + fresh api-review on new head.

— sent from vivid-stag-641

@briansrls

Copy link
Copy Markdown
Contributor Author

Mgr-RUNTIME triage (vivid-stag-641) — verified both dashboard APPROVEs against b02b6ff460:

cursor APPROVE — confirmed: Symbol import present; EffectIoResourceBackend carries bounded 🟡 with named feature/consumer/dissolve-on; wave-2 gate scope comments honest; effect_io_handler_claims.dag unchanged wiring. No action.

claude APPROVE — confirmed: disposition tightened (🟢→🟡 on backend with named triggers); EffectIoHostBackendContext 🟢 restored; effect_io_pure_locator_identity 🟡 restored; one-default-locator scope disclosed. No action.

Merge readiness (b02b6ff): 2× APPROVE, no REQUEST_CHANGES, MERGEABLE, CI 11/11 green.

Operator FREEZE in effect (still-raven-546 msg_557ef1d0) — no further pushes/commits from this lane until UNFREEZE. Merge-ready for operator when freeze lifts.

— sent from vivid-stag-641

Brian Searls and others added 2 commits June 11, 2026 13:48
…mport

Reconcile M-E2 handler bundle files with main after #4664 merge.
Carries #4663 review fixes: Symbol import in v4_effect_io_host.dag,
🟡 disposition on EffectIoResourceBackend, scoped wave-2 claim wording,
Q-R2 write-handler comment (already on main pure bundle).

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore 🟢 coproduct dissolution on EffectIoHostBackendContext and
🟡 feature:effect-io-locator-identity-from-value on
effect_io_pure_locator_identity (Practice 4 / INVARIANTS P5).

Addresses cursor REQUEST_CHANGES review 28382.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/stern-pike-287 branch from b02b6ff to bb3fb2f Compare June 11, 2026 13:48
@briansrls

Copy link
Copy Markdown
Contributor Author

Mgr-RUNTIME UNFREEZE wind-down (vivid-stag-641) — rebased onto latest main → bb3fb2fbc4. mergeState=CLEAN, CI 11/11 green, MERGEABLE. Stopped for operator manual-merge.

— sent from vivid-stag-641

Reclassify EffectIoResourceBackend as 🟢 terminal coproduct (Practice 4).
Move illegal-states 🟡 to EffectIoFixtureStore/EffectIoResourceLocator
(Practice 2 dual-tag debt). Restore function-level 🟡 on
effect_io_pure_backends_match per cursor RC review 28403.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls

Copy link
Copy Markdown
Contributor Author

Triage (vivid-stag-641) — reviews 28407 (cursor) and 28408 (claude) on 4e9273f6 are APPROVE with no actionable findings. Prior RC 28403 was addressed in that commit:

  • EffectIoResourceBackend → 🟢 coproduct dissolution (Practice 4 terminal)
  • EffectIoResourceLocator / EffectIoFixtureStore → 🟡 illegal-states interim (Practice 2 dual-backend debt)
  • effect_io_pure_backends_match → 🟡 predicate-dissolution interim (Practice 10)

Merge readiness @ 4e9273f6: 2× dashboard APPROVE (claude + cursor), no REQUEST_CHANGES on HEAD, mergeStateStatus=CLEAN, CI 11/11 green. Ready for operator merge.

— sent from vivid-stag-641

@briansrls
briansrls merged commit 1268f9a into main Jun 11, 2026
11 checks passed
@briansrls
briansrls deleted the session/stern-pike-287 branch June 11, 2026 16:07
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.

1 participant