Skip to content

fix(effects): report writes through parameter aliases - #451

Merged
byronwall merged 1 commit into
mainfrom
codex/srcly-effects-receiver-ownership
Nov 22, 2026
Merged

byronwall merged 1 commit into
mainfrom
codex/srcly-effects-receiver-ownership

Conversation

@byronwall

Copy link
Copy Markdown
Owner

The Function Effects inspector claimed Closed for a mutating sort() through const same = items, even though items is caller-owned. A fresh items.slice() should still produce no outside write.

  • Follow bounded, checker-resolved local const chains for modeled intrinsic receiver mutations. Keep the original parameter index and exact mutating-call witness.
  • Treat unresolved ownership as a named frontier, rather than omitting the mutation; cover rebound parameters, mutable aliases and fields held in local wrappers. Keep ordinary array literals and built-in array slices fresh under the stated array assumption.
  • Only show Closed on complete-for-supported-scope reports; an empty partial report says that no effects were confirmed.

Verification

  • Corrected the regression assertion before implementing: the runtime oracle showed mutation and identity preservation on the input alias, but the effect report had no facts. The fresh slice stayed distinct and left its input unchanged. After the fix all 19 effects tests pass, plus seven focused stdio protocol tests and five effects view model tests. Engine typecheck/lint and client typecheck pass.
  • The full engine run had 840 passes and nine skips, with one stdio protocol timeout; that test passed in 5s in the focused rerun. The full client suite (492 tests) passed before the final UI wording guard, which has its own passing regression test. Local browser install blocked by a Chromium CDN HTTP 403; browser CI is required.
  • Survey moves: no moves across 633 sampled traces for the engine/fixture changes. The empty-partial UI headline guard was added after that local snapshot; CI will survey the final merge tree.

This is not general heap/escape analysis. Unresolved origins remain partial.

@byronwall
byronwall marked this pull request as ready for review November 22, 2026 20:22
@byronwall
byronwall enabled auto-merge (squash) November 22, 2026 20:22
@byronwall
byronwall merged commit f0a4c51 into main Nov 22, 2026
7 checks passed
@byronwall
byronwall deleted the codex/srcly-effects-receiver-ownership branch November 22, 2026 20:27
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