Skip to content

Add an example for recovering external tool results - #6209

Open
markstuart-oai wants to merge 2 commits into
markstuart/sdk-controls-02-steeringfrom
markstuart/sdk-controls-03-external-completion
Open

markstuart-oai wants to merge 2 commits into
markstuart/sdk-controls-02-steeringfrom
markstuart/sdk-controls-03-external-completion

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

A tool successfully publishes a note, but its reply is lost. Retrying the write could duplicate the action or overwrite someone's later edits.

Summary

This offline example shows an app checking approved arguments and current permissions before publishing. The external service must save the result and operation ID in the same transaction as the write and check permissions again during recovery.

python -m examples.memory.reviewed_external_result

The demo prints Published: Hello twice. The write happens once, and a read-only lookup retrieves the same result.

Parent #6208.

Test plan

Separate lost-acknowledgment tests confirmed one write and preservation of later edits. Concurrent execution and authorization tests also passed.

Issue number

None.

Checks

  • I've added new tests, if relevant
  • I've run .agents/skills/code-change-verification/scripts/run.sh
  • I've confirmed all verification steps pass
  • If using Codex, I've run /review before submitting this PR

@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 24, 2026 06:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T07:27:58.701315Z 3011d6f New commits
🔒 Security Review ✅ Completed 2026-11-24T07:28:30.541449Z 3011d6f 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.

@jbeckwith-oai jbeckwith-oai left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the two-file example/test increment at 995ffe5 over its stacked base, including independent static review. Exact reviewed call/arguments, transaction-local authorization and expected-state checks, atomic operation/result recording, lost-ack reconciliation, and preservation of subsequent edits look correct. No additional actionable findings in this increment.

Hosted CI currently has 13 successful, 3 skipped, 2 running checks and the prospective-release-contract failure inherited from #6207 (missing ModelSelector policy entry: #6207 (review)). This approves the example increment, not the unresolved underlying stack. Static review only; no local code or tests executed.

Hosted CI follow-up: all currently reported checks have finished: 15 successful, 5 skipped, and the same inherited prospective-release-contract failure. The example approval remains scoped to this increment; underlying stack blockers remain.

Re-reviewed refreshed head 3011d6f with an independent second static review. The example and tests are unchanged; the refresh carries the underlying selected-model validation/release-policy and stream-cleanup fixes. No new findings. Existing approval retained without a duplicate review. Fresh hosted CI snapshot: 7 passed, 12 running; prior-head CI notes above are historical. No candidate code or local tests executed.

Hosted CI update (2026-11-24 07:37 UTC): 19 passed, 2 skipped; no checks remain pending in the current rollup. Approval is unchanged. No local tests were run.

This branch has not been deployed

No deployments
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