Repository navigation
Conversation
- hertasdk: Policy.TrackDispatch + Dispatch(ctx); Transient after dispatch becomes Uncertain, nonidempotent descendant dispatch blocks Uncertain retry - herta: call statements lower to a generated <Runtime>Plan; evidence dispatch clause, dispatch statement, tracking inferred over the plan - eval/synthesis: 5x5 matrix vs plain and typed Go SDK; Lean T6 - CI: pass case args to herta check Co-Authored-By: Abdur Raheem Imami <araheemimami@gmail.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
4 of 5 tasks
Co-Authored-By: Abdur Raheem Imami <araheemimami@gmail.com>
Contributor
There was a problem hiding this comment.
Devin Review found 1 finding. Devin automatically fixed it.
Fixed by Devin (1)
- Inline plan calls silently discard failures — Confirmed:
if c { call x(a) }dropped the error. Any call at a statement boundary ({, ;, line start/end) now returns the callee error; golden covers the inline case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Stacked on #15. Implements the step the Go, Bend/Bend2 and Lean studies converged on, and measures it against an equally typed Go SDK baseline (
herta/docs/SYNTHESIS.md).evidence.go):Policy.TrackDispatch+hertasdk.Dispatch(ctx). After an attempt (or a nested call inside it) dispatches,TransientbecomesUncertain; aNonIdempotentdescendant's dispatch forbids an enclosing attempt from retryingUncertain. Opt-in; untracked behavior unchanged (contract Amendment 7).call op(args)was a checker edge emitted verbatim (not valid Go). It now lowers top.<Op>.Do(ctx, <Input>{...})through a generated<Runtime>Plan, so the checked graph, closedCallsand executed calls are one list. Newevidence dispatchclause anddispatchstatement; tracking is inferred for every op that can reach a tracked one.herta/eval/synthesis): 5 scenarios × 5 arms (plain Go SDK, typed Go SDK, typed Go + caller annotation, Herta without/with evidence), provider-counted commits, expectations fixed in the test before the first run; all 25 cells match.T6_witnessevaluates the mislabeled-ack trace (2 → 1, and 2 when the adapter applies before dispatch).herta checkcases now receive{args};closed-policyfailed on the base branch without it.Why?
The boundary study showed checked Herta and plain Go both double-commit when an adapter reports a lost ack as "not sent". Results:
Pre-send refusals and honest lost acks behave identically on all arms. The only Herta advantage over the same Go API is inferring tracking through the plan; with the annotation, Go equals Herta. Cost: tracked uncontended call 222–279 ns / 184 B / 4 allocs vs 129–183 ns / 112 B / 2 allocs (Go 1.27.4, 3 × 200k). Not addressed: adapters that apply before
Dispatch, rollback, calls on unrelated contexts, opaque helpers.Scope check
go test -race -count=1 .passes with 100% coverage;cd lab && go test -race -count=1 ./...passesAlso run:
go test -race ./..., herta check (30/30) and codegen (5/5) goldens,herta/formal/check.sh(Lean 4.36.0, standard axioms only).Implemented in session Build the Go, Bend and Lean synthesis into Herta
Review with Devin · Open in Devin Desktop