Repository navigation
fix(javascript): bound cyclic mutation captures by their paths - #6986
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
[Medium impact] This PR appears safe to merge; no actionable issue was found in the changed code. SummaryThis PR moves capture identity into individual property-path edges so escaped prefixes can cover longer cyclic paths without losing distinct receiver captures.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Pending mutation] --> B[Normalize path and captures]
B --> C[Look up coverage for binding and effect]
C --> D{Matching prefix already retained?}
D -->|Yes| E[Skip repeated work]
D -->|No| F[Retain path with capture context on each edge]
F --> G[Expand cycle and setter escapes]
G --> H[Record effect and follow sources]
Reviews (1) · Last reviewed commit: "fix(javascript): bound cyclic mutation c..." · Reviewed by Greptile |
This was referenced Oct 24, 2026
15 of 22 tasks
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.
Problem and outcome
Main Source tests repeatedly exit in
javascriptSemanticAnalysis.reference_lifetimes.test.ts(3ce311757 run, e3a6ce40f run). A cyclic parameter alias grows member-read capture history. The mutation collector puts that entire history outside its property-path prefix index, so a previously escaped receiver cannot cover a longer path with an additional capture suffix. Recursive widening restarts this work and exhausts the worker.Index capture identity at each property-path edge, retaining distinct receiver captures, copied-slot fences, selectors and equal-depth write identity. Register the normalized prefix before recursive effect expansion so it owns its closure. Reuse the existing shared domain index; remove the superseded whole-capture-vector key from effect coverage. No timeout, heap limit, retry or correctness/performance assertion is relaxed. CLI, MCP and providers share the same analysis implementation; public schemas are unchanged. No separate issue was opened for this direct main-CI repair.
Executed correctness and resource checks
Linux x64, pinned Node 24.22.1 / npm 11.16.0, two CPUs. Tests below used merged base
48c203f35plus this diff:dot-prop5.3.0 source: passed named output schemas, CLI/MCP parent Evidence identity, retained summary/page/item lookups, source SHA-256 and unchanged-input checks. CLI summary delivery published complete Evidence bundles; unknowns remained explicit (38 and 109 respectively). This reads self-authored and real library source without executing targets. 18.88 s wall / 23.61 s CPU / 903.1 MiB for the completed two-target workflow; fresh CLI processes and one fresh MCP session with a warm second call.npm run checkandgit diff --checkpassed (37.41 s wall / 66.38 s CPU / 2669.5 MiB). Required runtime build passed (38.91 s wall / 49.05 s CPU / 1100.0 MiB).RSS sums descendants sampled every 100 ms; shared pages may double-count and short-lived/reparented children may be missed. Source probes and public verification had a 1.5 GiB sampled stop; build/static checks had an 8 GiB sampled stop and all commands had elapsed guards. No OOM occurred. Warm build artifacts were reused where stated. The failing baseline did not complete, so no equivalent-task speedup percentage is claimed. Agent token costs were not measured. Raw diagnostics remain outside the repository.
The branch is rebased onto latest main before publication. CI will verify that integrated head, including unrelated concurrent changes. Main CI must still finish successfully after merge; this PR does not claim to repair the earlier one-off Chrome startup timeout or parent-capacity observation that did not recur in #6978's eight successful built shards.
Completed CI and remaining main repair
CI 40083831021 completed on exact head
cdbe1d5d6: static checks, build, all eight built shards, selected real checks and the complete 113-case reference-lifetime file passed (614 ms for that file). Source execution now completes all 970 files instead of losing its worker: 17585 passed / 1 failed / 13 skipped. Its sole failure isagentEvaluationReport.test.tsreportingRunner failure gate missing; a clean pre-change worktreed3044a2dfreproduces that same failure (1 failed / 5 passed). The predicate test still assumes a top-level try block after verifier cleanup moved the body into an async callback. Portable/CI required propagate this independent failure, so this PR's overall CI is not green; the next isolated main-health change repairs that test.Codex code review completed on
cdbe1d5d6with no findings or unresolved threads. PR title and readiness passed. Main has advanced with unrelated native/release changes; final post-merge main qualification remains required for the maintenance task.Author readiness
Human owner: @gensokyo-dev
The owner explicitly delegated readiness declarations and agent-managed review. Inspection and execution were performed by Codex; no separate human inspection is claimed.