Repository navigation
slot-filler: a gone parent's children keep their slots; clear its left-over starts - #1526
Merged
Merged
Conversation
…t-over starts - GET /api/fork/delegate on an archived or deleted parent still answers 404 parent_missing, now with the children T3 keeps for it. The filler counts them (slots, memory, a repeat's last run) until each ends. - A left-over start under a gone parent whose lookup finds no task is dropped; the item stays queued and the log says why. - A parentThreadId that is empty or has spaces around it is refused at the item check and never asked of T3 (its 400 stopped the whole run). - Recovery checks a marker's parent against the parents list again: one that left the list is only looked up. - Mutant for known_parents reading started/ (a gone parent known only from its started records). Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Follow-up to #1515 (merged): the four minors its lens left.
What changes
GET /api/fork/delegateon an archived or deleted parent still answers 404parent_missing, but now its body carries the children T3 keeps for that thread (the records outlive the archive; the 404 body already had achildren: []field). The filler takes them from theparent_missinganswer, so they count toward slots, memory and a repeat's last run until each ends. A thread with no shell at all still answerschildren: []. This is "T3's own task list", not the started/ records: the records alone could never show a child finished.not_found, orparent_missingfrom a server that answers that), the marker is dropped with a log line ("dropped the intent for<id>on<machine>: its parent thread X is gone or archived ...; the item stays queued"). The item then waits in its file, so giving it anotherparentThreadIdworks. Note: the real server answers alookupOnlywithnot_found, neverparent_missing(it checks the request id before it checks the parent), so the filler goes by its own gone flag from the GET. This also covers a handover whose old parent was archived: the item then starts under the current parent. The note for a marker that is still kept (settled parent) now names the file to delete.parentThreadIdorparentEnvironmentIdthat is empty or has spaces around it is refused and kept.parent_ofnever hands one to T3 (the config's parent stands in), soknown_parentscannot stop the run on T3's 400. The config'sparentslist gets the same check.parentslist again. A marker whose parent has left the list since is only looked up (held, as for a settled parent), never started.Mutant table: new entry
known_parents reads started/ and the markers(dropsstarted/fromknown_parents). It is killed by the extended table test, where a parent that is archived and off the list is known only from started/. Dropping only the markers read has no test that fails: recovery runs before the slot count and turns each found marker into a started/ record, so only a stopped, offline or unclear marker under a parent that nothing else names would be missed. Thesettled before recoveryentry now targets the new hold line.State question
parentThreadIdstill fall back to the config's parent. A T3 from before this change answers a gone parent withchildren: []: its children count as ended, as before this PR (no worse).known_parentsgives the config's parent and the list, as before.Tests
fork-kit/slot-filler/tests/filler.test.py: all 228 pass. Extended in place, no new test or file: the parents table test (a blank-id row, plus a third phase: an archived parent known only from started/ holds its writer slots until its children end),test_a_settled_parent_keeps_its_left_over_start_unasked(then archived: the marker is dropped and the item stays), andtest_an_unstarted_start_of_an_old_parent_is_never_started(now a two-row table: handover, or the parent left the list). Each new assertion fails on slot-filler: one queue, several parent threads #1515's head (checked against its binary).RedCheckruns the mutant table and passes.catch-up.test.pypasses.apps/server/src/fork/fillerDelegate.test.ts: the list test now also checks that an archived parent's 404 lists its children, and that a missing one lists none. All 29 pass.vp run check:changed(format, lint, knip, typecheck, tests) and the fork-checks scripts (schema, upstream-files, seam) pass.Part of the #1515 lens follow-up; nothing is left from its four minors.
🤖 Generated with Claude Code