Skip to content

Modeling uncertain tool-call outcomes with variants - #1468

Draft
tridev-tej wants to merge 2 commits into
rescript-lang:v12from
tridev-tej:tejesh/rescript-tool-outcomes-blog
Draft

tridev-tej wants to merge 2 commits into
rescript-lang:v12from
tridev-tej:tejesh/rescript-tool-outcomes-blog

Conversation

@tridev-tej

@tridev-tej tridev-tej commented Oct 26, 2026 •

Copy link
Copy Markdown

Guest article for #1467

Models pending, completed, rejected and unresolved tool calls with ReScript variants. Includes a runnable mock covering stale replies and late results.

@tridev-tej
tridev-tej marked this pull request as ready for review October 26, 2026 20:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 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-26T20:06:12.950972Z 2844998 Draft marked ready
ℹ️ 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.

@tridev-tej

Copy link
Copy Markdown
Author

hi @fhammerschmidt, could you review the guest article when you get a chance?

@fhammerschmidt fhammerschmidt added the ok-to-deploy Trigger deployment if you are sure a PR is safe to deploy. label Oct 26, 2026
@fhammerschmidt

Copy link
Copy Markdown
Member

Thanks for the draft. I think it needs a more focused revision before it fits the blog:

  1. Tell the reader what led to this pattern and why it's cool without too many words.
  2. Don't put all the source code of the whole project in there. Just what's important, which should mostly be ReScript code on the ReScript site.
  3. You can use res example in a markdown code-block to get a codebox like this: image it has a "Open in playground" button which can also execute code. Maybe you can tweak the example to fully run in the playground. It can even render React elements.
  4. Please use the most current stable ReScript release 12.3.1, not because your code needs it, just a good habit.
  5. AI slop prose detected. May I suggest you write it in your own words or dictate it instead (I recommend handy for that, a model that runs locally and is free: https://github.com/cjpais/Handy). This alone usually makes it more focused and shorter.

May I also know why you do this? Used ReScript for a longer time or just started?

@github-actions github-actions Bot removed the ok-to-deploy Trigger deployment if you are sure a PR is safe to deploy. label Nov 3, 2026
@tridev-tej
tridev-tej marked this pull request as draft November 3, 2026 14:42
@tridev-tej

Copy link
Copy Markdown
Author

I'm new to ReScript and use it personally. I want to explore how its variants make uncertain API results explicit.

In the article's hypothetical product-title update, the title may already have changed when the UI times out before the tool's final reply. Variants let the caller keep that missing reply (Unresolved) separate from an actual tool refusal (Rejected). A timeout alone doesn't prove rejection or tell the caller whether retrying is safe.

The shorter draft has one ReScript 12.3.1 res example with an Output tab containing the recorded console output.

This branch was successfully deployed

1 active (outdated) deployment
fork-preview — 2844998b Deployed Oct 26, 2026 by github-actions[bot]
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