Skip to content

docs: describe create_savepoint session instead of removed CustomAsyncSession - #47

Merged
lesnik512 merged 1 commit into
mainfrom
docs/agents-md-session-savepoint
Sep 27, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
docs/agents-md-session-savepoint

Conversation

@lesnik512

Copy link
Copy Markdown
Member

AGENTS.md was out of date with the code in two places:

  • Persistence referred to a CustomAsyncSession that overrides close(). That class is gone. create_session in app/resources/db.py now builds a plain AsyncSession with join_transaction_mode="create_savepoint", which does nothing in production and, in tests, gives the session its own savepoint so the outer transaction survives commits.
  • Test isolation said the db_session fixture "starts a SAVEPOINT". It doesn't: tests/conftest.py only begins the outer transaction. The savepoint comes from each session's join_transaction_mode.

The new wording follows fastapi-sqlalchemy-template/AGENTS.md.

@lesnik512
lesnik512 merged commit 58be397 into main Sep 27, 2026
2 checks passed
@lesnik512
lesnik512 deleted the docs/agents-md-session-savepoint branch September 27, 2026 20:28
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