Skip to content

fix: startup checks for autobot#69

Merged
sqhell merged 1 commit into
mainfrom
fix/auto-prod-fixes
Apr 23, 2026
Merged

fix: startup checks for autobot#69
sqhell merged 1 commit into
mainfrom
fix/auto-prod-fixes

Conversation

@sqhell
Copy link
Copy Markdown
Contributor

@sqhell sqhell commented Apr 23, 2026

No description provided.

@sqhell sqhell merged commit 72149ca into main Apr 23, 2026
1 check passed
@sqhell sqhell deleted the fix/auto-prod-fixes branch April 23, 2026 17:08
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the startup configuration validation to ensure that a missing ChromaDB index does not prevent the server from booting, as it is now handled by a background warmup task. The review feedback correctly identifies that the log messages should be updated to reflect that this process occurs in the background at startup, rather than waiting for the first request.

Comment on lines +80 to +83
logger.warning(
f"CHROMA_PERSIST_DIR={chroma_dir} exists but contains no chroma.sqlite3 — "
f"warmup task will build the index on first request"
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The log message states that the index will be built 'on first request', but according to the lifespan implementation in server.py and the comments added in this PR (lines 67-68), the warmup task is triggered eagerly at startup in the background. This discrepancy can be confusing for operators monitoring the server's initialization.

Suggested change
logger.warning(
f"CHROMA_PERSIST_DIR={chroma_dir} exists but contains no chroma.sqlite3 — "
f"warmup task will build the index on first request"
)
logger.warning(
f"CHROMA_PERSIST_DIR={chroma_dir} exists but contains no chroma.sqlite3 — "
"warmup task will build the index in the background"
)

Comment on lines +86 to +89
logger.warning(
f"CHROMA_PERSIST_DIR={chroma_dir} does not exist — "
f"warmup task will create and populate it on first request"
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the previous warning, the index creation and population happen in the background at startup via the warmup task, not 'on first request'. Updating this message ensures consistency with the actual server behavior.

Suggested change
logger.warning(
f"CHROMA_PERSIST_DIR={chroma_dir} does not exist — "
f"warmup task will create and populate it on first request"
)
logger.warning(
f"CHROMA_PERSIST_DIR={chroma_dir} does not exist — "
"warmup task will create and populate it in the background"
)

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