Skip to content

test(gateway): cover profile startup on a fresh database - #8

Open
cnYui wants to merge 1 commit into
Justin0504:mainfrom
cnYui:codex/test-agent-profiles-startup
Open

test(gateway): cover profile startup on a fresh database#8
cnYui wants to merge 1 commit into
Justin0504:mainfrom
cnYui:codex/test-agent-profiles-startup

Conversation

@cnYui

@cnYui cnYui commented Jul 11, 2026

Copy link
Copy Markdown

Summary

  • add an API smoke regression test for initializing ProfileManager against a freshly initialized gateway database
  • assert the manager starts successfully and loads an empty profile set
  • shut the manager down in finally so the refresh interval cannot leak

Why

The missing agent_profiles table reported in #2 was fixed directly on main, but the existing store tests initialize their own schema and do not exercise the gateway's main database initializer. This test locks the runtime startup contract without coupling to the SQL DDL text.

Related to #2. The production fix is already on main, so this PR intentionally does not close the issue.

Testing

  • npm test -- --runInBand api-smoke - 1 suite, 5 tests passed
  • npm run build - passed
  • npm test -- --runInBand - 97 suites, 1242 tests passed
  • git diff --check - passed

All verification used Node.js 20.20.2, matching the repository's supported runtime line.

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