Repository navigation
fix: canonicalize external calls in summary fixpoints - #265
Merged
SizzleUnrlsd merged 1 commit intoOct 20, 2026
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. |
This was referenced Oct 19, 2026
Contributor
|
Thank you for the analysis and the fix. Your commit #268 added three things on top of it:
|
Merged
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.
c## Summary
Fix the nonterminating interprocedural summary fixpoint described in #261. When a cycle of three or more functions propagates external calls after recursive calls, the same records can rotate through insertion order on successive rounds.
FunctionSummaryequality compares the external-call tuple in order, so the changed flag never clears even though the analysis content has converged. This causes--checkto hang indefinitely.Reproduction
The minimal three-function cycle from issue #261 reproduces the hang with the unmodified upstream source. The new stdlib regression test invokes
SummaryAnalysisin a bounded subprocess and also invokes the publicpython -m coretrace_python --checkCLI on the synthetic cycle. Before this fix, the summary test exceeded its five-second reproduction timeout; no external calls were missing, only their tuple order was unstable.Fix
summarizeconstructsFunctionSummary, sorting by source location, caller site, invocation site, and symbol identity. This preserves the full call records and their distinct sites while making equality and caches independent of discovery history.CACHE_FORMATfrom 16 to 17, preventing old order-dependent persistent summaries from being reused by a patched engine.Validation
--checkCLI complete successfully.git show --checkpassed; based on upstream8b4d8a2(0.23.0 release merge).pytest,mypy,ruff, and pinned external regression projects were not runnable in the restricted offline environment because the dev dependencies and large external corpora were not available. Maintainer CI and broader security finding snapshots are needed before merge. Sorting may change which same-line query is reported first in some findings, as the issue discussion notes; no claim is made that all project snapshots were independently checked.AI-assisted contribution, independently reviewed. No bounty or payment is claimed.