Skip to content

Add an example for forking completed SQLite conversations - #6210

Open
markstuart-oai wants to merge 2 commits into
markstuart/sdk-controls-03-external-completionfrom
markstuart/sdk-controls-04-conversation-forks
Open

markstuart-oai wants to merge 2 commits into
markstuart/sdk-controls-03-external-completionfrom
markstuart/sdk-controls-04-conversation-forks

Conversation

@markstuart-oai

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

Copy link
Copy Markdown
Contributor

Why

A developer wants to ask two follow-up questions about the same release plan without the first answer influencing the second. Continuing both in one session mixes their histories.

Summary

This offline example uses existing session APIs to copy completed messages and paired SDK tool calls and results into an independent SQLiteSession without rerunning tools. The app must authorize all exported content and replace the demo's placeholder destination check with real validation. Pending approvals, workspace files and execution authority are not copied.

python -m examples.memory.completed_conversation_fork

The demo prints Independent histories: 4 4, showing separate continuations.

Parent #6209.

Test plan

Tests confirmed independent histories without repeated writes or workspace changes. Unauthorized exports, incompatible destinations and incomplete histories were rejected.

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:58
@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:28:14.019576Z f5230b5 New commits
🔒 Security Review ✅ Completed 2026-11-24T07:28:47.302451Z f5230b5 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 dba41fe over its stacked base, including independent static review. Complete text/tool-pair validation, export authorization and destination checks before import, independent session identity and copied history, and rejection of opaque/pending state 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 f5230b5 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: 5 passed, 14 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