Skip to content

docs: make the encrypted session quick start self-contained - #4909

Merged
seratch merged 1 commit into
openai:mainfrom
rioyu123:docs/encrypted-session-quickstart
Sep 8, 2026
Merged

seratch merged 1 commit into
openai:mainfrom
rioyu123:docs/encrypted-session-quickstart

Conversation

@rioyu123

@rioyu123 rioyu123 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

The encrypted-session page currently installs only the encrypt extra, but its quick start immediately uses SQLAlchemySession with the aiosqlite driver, so following the page from a clean environment requires dependencies that were never installed.

This pull request makes the quick start self-contained by using the built-in SQLiteSession, which works with the documented encrypt installation. The example also closes the underlying session in a finally block so cleanup still happens if wrapper construction or the agent run fails.

The PostgreSQL example remains available for users who want SQLAlchemy-backed storage, with its required extras and engine cleanup made explicit. The cleanup instruction uses the public engine property, not private _engine state.

SDK APIs and encryption behavior are unchanged.

Test plan

  • Verified the quick-start imports and encrypted SQLite round trip in an isolated SDK 0.22.0 environment with only the documented encrypt extra.
  • Executed the quick-start body with Runner.run replaced by an offline storage operation. Verified real SQLite cleanup on normal completion, a simulated run failure, and an empty-key failure from the real EncryptedSession constructor. No model API calls were made.
  • Verified the PostgreSQL example's dependency and engine-lifecycle instructions against the current SQLAlchemy session API; no live PostgreSQL server was used.
  • Passed uv run docs/scripts/generate_ref_files.py and uv run mkdocs build, the two commands in make build-docs, on Windows where make is unavailable. Verified the revised English page in the generated output.
  • Passed git diff --check and completed independent review of the final documentation content.

Issue number

N/A

Checks

  • I've added new tests, if relevant (documentation-only change; validated with focused offline probes).
  • I've run .agents/skills/code-change-verification/scripts/run.sh (not required for this documentation-only content change).
  • I've confirmed the applicable documentation verification steps pass.
  • If using Codex, I've run /review before submitting this PR (independent review was completed; the /review command was not run).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 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-09-08T01:54:17.483141Z ba5e570 PR opened
🔒 Security Review ✅ Completed 2026-09-08T01:54:35.653391Z ba5e570 PR opened
ℹ️ 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.

@seratch seratch added the documentation Improvements or additions to documentation label Sep 8, 2026
@seratch
seratch merged commit 02c205f into openai:main Sep 8, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants