Repository navigation
[codex] preflight local AI prerequisites first - #114
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
davidiach
left a comment
There was a problem hiding this comment.
Self-review pass complete.
Current patch review:
make_anthropic_client()still runs inmain()beforeLlmosSessionstarts, so missing API key/import errors are reported before launching QEMU when local preflight passes.- Image and QEMU preflights now run first, so AI mode reports actionable local setup errors before API-key errors.
- Tests patch
make_anthropic_clientandLlmosSessionto prove those later phases are not reached during local preflight failures.
Local validation is green: python -m unittest demo.test_bridge.BridgePreflightTests, python -m unittest demo.test_bridge, git diff --check -- demo/bridge.py demo/test_bridge.py, and wsl.exe -d Ubuntu make ci-check.
cc0caf4 to
536d328
Compare
davidiach
left a comment
There was a problem hiding this comment.
Self-review update after PR feedback.
Resolved finding:
- The missing-image ordering test now uses an uncreated child path inside a fresh temporary directory instead of a fixed temp path.
Current patch review:
make_anthropic_client()still runs inmain()beforeLlmosSessionstarts.- Image and QEMU preflights run first, so AI mode reports local setup errors before API-key errors.
- Tests patch
make_anthropic_clientandLlmosSessionto prove later phases are not reached during local preflight failures.
Validation rerun is green: python -m unittest demo.test_bridge.BridgePreflightTests, python -m unittest demo.test_bridge, git diff --check -- demo/bridge.py demo/test_bridge.py, and wsl.exe -d Ubuntu make ci-check.
536d328 to
39dc3ac
Compare
davidiach
left a comment
There was a problem hiding this comment.
Self-review update after hosted CI feedback.
Resolved finding:
- The workflow inline AI preflight check now matches the new contract: missing local image is reported before missing
ANTHROPIC_API_KEY, and the assertion fails if API-key preflight runs first.
Validation rerun is green locally: python -m unittest demo.test_bridge.BridgePreflightTests, python -m unittest demo.test_bridge, git diff --check -- demo/bridge.py demo/test_bridge.py .github/workflows/build.yml, and wsl.exe -d Ubuntu make ci-check.
Summary
ANTHROPIC_API_KEYWhy
bridge.py ai ...previously constructed the Anthropic client before validating the local image path and QEMU executable. That could surface an API-key/import error even when the user first needed to fix a missing image or QEMU install.Review notes
LlmosSession.main()before launching QEMU, avoiding lazy setup insidemode_ai()after the session starts.ANTHROPIC_API_KEYand no later phase is reached.Validation
python -m unittest demo.test_bridge.BridgePreflightTestspython -m unittest demo.test_bridgegit diff --check -- demo/bridge.py demo/test_bridge.py .github/workflows/build.ymlwsl.exe -d Ubuntu make ci-check