fix: bound the calls around a turn, and build packages in dependency order - #109
Merged
Conversation
…order Naming a session and compacting the conversation call a provider from outside the step loop, where the turn watchdog cannot see them: a provider that stops answering there holds the turn open with nothing on screen. The build task declared `dependsOn: []`, which disables topological ordering. The CLI build bundles the app, which imports sources the SDK build generates, so the two raced and the loser read a file that did not exist yet. It surfaced the moment CI started running enough tasks to lose that race. Claude-Session: https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
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.
Two gaps left over from the five tranches, both found by the CI work in #108.
The calls around a turn had no bound
The inactivity watchdog from #103 reads a step handle. Two model calls have none:
small model that stops answering holds up the work the user actually asked for;
Both now give up and say so — naming after two minutes, compacting after ten, since compacting
reads the whole conversation back. Neither failure is the turn's failure: a session keeps its
default name, and a compaction that did not happen is reported as itself.
experimental.aux_timeoutoverrides both,falseremoves the bound.Builds ran in arbitrary order
turbo.jsondeclared"build": { "dependsOn": [] }, which does not mean "no extra dependencies" —it replaces the topological default. The CLI build bundles the app, which imports sources the
SDK build generates, so with enough tasks in flight the two raced and the CLI build read
gen/types.gen.jsbefore it existed. That is the failure that killed the first attempt at #108.Verification
after: a provider that never answers the naming request no longer delays the answer, and the
session keeps its default name. Needed a new
hangTitlescontrol on the fake provider.turbo build --dryconfirms@reddb-io/redcode#buildnow waits for all eleven package builds itactually needs,
sdkamong them.bun typecheckacross all 31 packages;packages/redcodesession suite 444 pass, with threefailures reproduced on unmodified sources on this machine (3 s and 60 s test timeouts under local
load).
https://claude.ai/code/session_01U29Yk1UscZJ5ZVBXV1Sn8b
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.