Skip to content

fix(cfg): keep empty try flow out of catch - #130

Open
MikeeI wants to merge 1 commit into
codellm-devkit:mainfrom
MikeeI:fix/issue-012
Open

fix(cfg): keep empty try flow out of catch#130
MikeeI wants to merge 1 commit into
codellm-devkit:mainfrom
MikeeI:fix/issue-012

Conversation

@MikeeI

@MikeeI MikeeI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Prevent an empty try block from selecting its catch binding as the normal CFG entry.
Preserve finally execution and exception-only catch reachability.

Evidence

  • The current fallback chooses catchEntry when the try body has no node.
  • A minimal empty try/catch produces a normal fallthrough into catch.

Changes

  • Route empty normal flow to finally or the following continuation.
  • Keep catch entry reserved for exceptional flow.

Risks and boundaries

  • Abrupt completion semantics remain a separate correction.
  • Existing node identities and non-empty try behavior remain unchanged.

Verification

  • bun test test/dataflow.test.ts
  • bun test
  • bun run typecheck

I checked the relevant issues, comments, pull requests, and discussions; this pull request is not a duplicate.

Disclosure

Investigated thoroughly with GPT-5.6 at extra-high reasoning effort.
I used Oh My Pi as the agent framework.
This report is not generic or unreviewed AI-generated output.
Its claims were checked against the cited evidence.
It includes the relevant detail intended to help maintainers resolve the issue.
If reports like this are not useful to the project, please let me know.
I will refrain from submitting similar reports.
My intent is to help without wasting maintainer time or energy or discouraging their work.
Thank you for your work.

@rahlk rahlk self-assigned this Sep 2, 2026
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.

2 participants