fix(project): persist project to database during creation #591

Merged
hurui200320 merged 1 commits from feature/m3-fix-project-create-persist into master 2026-03-09 06:59:16 +00:00

1 Commits

Author SHA1 Message Date
brent.edwards e1e0652af3 fix(project): persist project to database during creation
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 19s
CI / security (pull_request) Successful in 36s
CI / typecheck (pull_request) Successful in 42s
CI / unit_tests (pull_request) Successful in 2m16s
CI / docker (pull_request) Successful in 42s
CI / integration_tests (pull_request) Successful in 3m7s
CI / coverage (pull_request) Successful in 4m33s
CI / benchmark-regression (pull_request) Successful in 30m6s
NamespacedProjectRepository.create() called session.flush() but never
session.commit(), so projects created via "agents project create" were
invisible to subsequent "agents project list" invocations that open a
separate session.

Changes:
- Replace flush() with commit() in NamespacedProjectRepository.create()
- Add finally: session.close() guard for proper session lifecycle
- Update flush-error mock helpers to also set commit.side_effect so
  error-handling tests work regardless of flush vs commit
- Add 4 Behave BDD regression scenarios (tagged @tdd @bug589)
- Add Robot Framework integration smoke tests
- Add ASV benchmarks for create-then-list round-trip

Closes: #589
2026-03-09 06:53:45 +00:00