Skip to content

refactor(persistence): inject scoped repositories and explicit database lifecycle - #7

Closed
ManhT005 wants to merge 1 commit into
refactor/config-bootstrapfrom
refactor/persistence-repositories
Closed

ManhT005 wants to merge 1 commit into
refactor/config-bootstrapfrom
refactor/persistence-repositories

Conversation

@ManhT005

Copy link
Copy Markdown
Owner

Replace import-time SQL engine creation with an explicitly owned Database and scoped repositories. Document reads/mutations require authenticated ownership and return detached data; authentication and progress use injected session factories.

Dependency and review order

Slice 3/8. Depends on #6 (#6). Current base: refactor/config-bootstrap, so this diff contains this slice only; final integration target is develop. Review in order. After the predecessor merges, rebase this branch onto develop if it was squash merged, then retarget this PR to develop before merging it. Keep the predecessor branch until retargeting is complete.

Validation

Local offline suite: 112 tests passed, including detached results, ownership and no import-time database construction. Final stack also passed fresh PostgreSQL upgrade/check and three integration tests. Remote quality checks are pending publication/runner completion.

Compatibility and rollback

Persistence and authorization. Preserve tables, Alembic p0_0001 and historical string QuizAttempt.user_id; no migration/reindex. Revert this slice if needed and retain SQL/vector volumes. Maintainer review is pending; auto-merge is not enabled.

@ManhT005 ManhT005 closed this Oct 14, 2026
@ManhT005
ManhT005 deleted the refactor/persistence-repositories branch October 14, 2026 02:44
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