Skip to content

chore(quest): matches TypeScript has already narrowed - #109

Merged
kixelated merged 2 commits into
mainfrom
quest/ts-narrow-test
Oct 27, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/ts-narrow-test

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

A follow-up quest the maintainer chose from #100's report: an inner match on a value an enclosing match already decided fails tsc (TS2367), which #100's construction-time widening doesn't cover.

Consumer: moq, whose translated output must type-check.

Public API: none.

(written by Opus 5.5)

🤖 Generated with Claude Code

https://claude.ai/code/session_0115AT2ue6x9cT5e5J9SZtCn

From #100's report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0115AT2ue6x9cT5e5J9SZtCn
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T04:26:09.702265Z 2b9a41c New commits
🔒 Security Review ✅ Completed 2026-10-27T04:27:24.088934Z 2b9a41c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: a482da4

No actionable bugs found in this documentation-only quest. It accurately separates test-induced narrowing from #100's construction-time widening, and requiring both native-Rust differential tests and TypeScript checking is the right direction.

Implementation guidance for quest/m2/ts-narrow-test.md:16–19: keep folding conditional on the variant fact still being valid (including intervening reassignment, writes through aliases, and loop paths). Targeted widening is the simpler fallback when proving that would require broader dataflow machinery; include a changed-variant-between-matches regression alongside the unchanged/copy cases.

Verification: inspected the quest, related tsc-shapes plan, and #100's proposed lowering changes. No implementation changes are included here; I did not run tests or independently reproduce TS2367.

@kixelated
kixelated merged commit 6a61eea into main Oct 27, 2026
1 check passed
@kixelated
kixelated deleted the quest/ts-narrow-test branch October 27, 2026 20:32
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