fix(babysitter): fail closed on metadata gaps and retry unplaced claims - #486
Merged
Conversation
Session-Id: 01a077c7-5a1f-7a50-9b0f-e5b918dcc472
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kjgbot
marked this pull request as ready for review
September 6, 2026 17:57
Contributor
|
@coderabbitai review Requested for exact head |
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
`FleetSpawnNotCreatedError` wrapped every pre-placement failure and stamped its own name over the cause's. The bit it adds — "no worker was created" — has one reader, and that reader uses `instanceof`; every other reader of a dispatch failure reads a class NAME off the OUTERMOST error. So the wrapper was erasing `FactoryAgentRegistrationError`, `ReadOnlyFleetIdentityError` and `RelaySpawnAckTimeoutError` from `perItemDispatchSkipReason`'s operator sentence, from the hosted orchestrator's `errorClass`, and from the head of the #355 class-name vocabulary — collapsing an enrolment refusal, a read-only identity and a bootstrap ack timeout into one indistinguishable bucket, on exactly the surfaces an operator has during an outage. The wrapper now adopts the cause's class name as its own (and exposes it as `causeClass`), guarded by `isTelemetryErrorClassName` so a dependency-controlled `name` still cannot choose what crosses a telemetry boundary. `instanceof`, and therefore `placement.status = 'not-created'`, is unchanged. Durable recovery of a factory-created babysitter also ran two roster-based admission passes back to back: an adoption pass that only no-ops when no live roster entry exists, then `#ensureBabysitter`'s real admission repeating the same `retryOnTimeout(roster(), { attempts: 3, delayMs: 2000 })`. The adoption pass now hands its read forward through `#admissionRoster`, keyed by PR identity because a reconciled agent exit can reach that admission first. The hand-off is single-use and age-bounded, so a slow gate chain re-reads rather than placing against a roster that has stopped describing the fleet; the durable `factory-created:<pr>` claim, not adoption, remains what keeps one PR to one worker. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Ld4S9gUGzTjhVhbtX9cTd Session-Id: fe8515ad-c2bc-4f9a-9b39-88b2ba12f73e
Contributor
|
@coderabbitai review Requested for exact head |
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.
Factory-created PR handoffs could spawn without readable PR metadata, and a failure before worker placement could permanently retain the PR generation claim. This follow-up to #484 addresses both review findings.
Validation:
f32d2af34fc2daf6489cd4f4fe47ae4c99a3350b.Routed activation remains disabled. No merge performed.
Review status: review threads were inspected after CI completed; none are present yet. Independent review is pending.