Fix actor/task flow fixed-point convergence#8
Draft
BoSuY0 wants to merge 1 commit into
Draft
Conversation
Prune id-keyed resource flow facts when a scoped local resource path is removed and no remaining resource path references that id. Root-cause: loop-local task handles left orphan finalizedResources entries after scope cleanup, so fixed-point digests grew by one stale resource id per iteration. Constraint: no Actor Core v2, no distributed actors, no actor runtime behavior change, no Memory Core/optimizer/.t4i/.tobj/release changes. Rejected: increasing fixed-point iteration limits or weakening actor/task diagnostics. Confidence: high Scope-risk: semantic flow cleanup for scoped resource facts. Tested: go test -buildvcs=false ./compiler/tests/ownership/actor_task/... -run 'TestActorTaskBoundedStressExamples|FlowFixedPointActorTask' -count=20 -v Tested: go test -buildvcs=false ./compiler/internal/semantics/flow -run 'FixedPoint|Join|Digest|Actor|Task|Await|Callable' -count=20 Tested: go test -buildvcs=false ./compiler/internal/semantics/... -run 'FixedPoint|Actor|Task|Transfer|Await|Callable' -count=10 Tested: actor core guard, safety guards, verify-docs, diff check. Not-tested: external CI pending.
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.
Summary
Fixes the inherited actor/task semantic flow fixed-point blocker:
This is semantic flow fixed-point convergence cleanup, not actor feature work.
Root cause
The loop-local
taskhandle intask_bounded_stress.tetrawas assigned a fresh resource id on each loop fixed-point iteration.core.task_join_i32(task)marked that id as finalized, then scope cleanup removed the scopedresourceVars["task"]path but left the id-keyedfinalizedResources[id]fact behind. The fixed-point state therefore grew by one orphan finalization id per iteration and never converged within the existing limit.The fix prunes id-keyed resource flow facts when a scoped local resource path is removed and no remaining resource path references that id.
Scope / nonclaims
.t4ior.tobjchange;Validation
Focused:
Result: pass.
Result: pass.
Result: pass.
Guards:
go test -buildvcs=false \ ./compiler/internal/actorsafety/... \ ./compiler/internal/actorsrt/... \ ./compiler/internal/parallelrt/... \ ./compiler/actorwire/... \ ./cli/internal/actornet/... \ -count=5Result: pass.
go test -buildvcs=false \ ./compiler/internal/t4iface \ ./compiler/internal/format/tobj \ ./compiler/internal/buildlink/... \ -count=3Result: pass.
Result: pass.
Broad delta:
go test -buildvcs=false ./compiler/... -count=1: red from inherited baseline failures only;compiler/tests/ownership/actor_taskis now green.go test -buildvcs=false ./cli/... ./tools/... -count=1: red from workspace wrapper around the same inherited compiler failures.Inherited remaining classes include ownership diagnostic mismatch, selective-import actor payload diagnostics, secret/capsule effects diagnostics, and surface frame diagnostic wording.