Repository navigation
Fix CI: the budget timer never throws after its database is closed; Docker builds without git - #76
Merged
Merged
Conversation
The debounced check after a budget change ran outside its try/catch: in a test that closed its database (or while shutting down) it threw "database not opened" and failed whatever test was running then (on Linux CI: the three `godmode binary` runner tests). It is caught now, and the timer no longer keeps the process alive.
Bun.spawnSync throws when git isn't installed (the image's build stage), so the stamp's own fallback to "unknown" was never reached and the binary build failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main's "Typecheck, test, build" job has failed since #58 (spend and budgets). The failures are the three
the godmode binaryrunner tests, each withdatabase not openedthrown frombudgets.ts→amountsNow→getSettings.Cause:
budgetsMayHaveChanged()debounces with a 250 mssetTimeoutwhose body was outside the try/catch. When an earlier test file changed an agent and closed its database within those 250 ms, the timer fired afterwards and threw. Bun then failed whatever test was running. It only shows up in CI's file order on Linux; locally the suite passes in both orders.Fix: the whole timer body is now in the try/catch (it logs a warning), and the timer is
unref'd so it never keeps a process alive.Checks:
remote-clitests pass (32).gitmissing in the build stage (older than this), and the Cloud relay test is a timing flake in another package.