Phoebe: launcher-floor check in phoebe doctor - #323
Merged
Conversation
A floor violation (launcher < engine's phoebe.minBootstrap) deadlocks the deployment — boot throws immediately, no work runs. The existing cli check compared both halves to the registry latest independently, so a floor violation and mere staleness looked identical in doctor output. This adds a seventh check that compares the two halves directly. Decisions: - Pure `launcherFloorCheck` function takes (minBootstrap, launcherVersion, launcherSource) so it is testable from two version strings with no I/O. - Reads the floor from the materialized engine checkout's package.json (same field and path boot.ts uses); absent checkout or field → "check does not apply", matching the local-mount engine check's pattern. - Reads the effective launcher version from container/Dockerfile's ARG PHOEBE_AGENT_VERSION for container deployments, npm-global otherwise. - Failure message explicitly says "not a staleness warning: the deployment does no work in this state" and names the one-line fix. - Local-mount source → "floor check does not apply"; config-failed → "unknown". Files changed: - src/doctor.ts — parseBareVersion, readMinBootstrap, launcherFloorCheck, runDoctor wiring, updated header comment and help text - src/doctor.test.ts — launcherFloorCheck coverage (8 cases) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 34 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Closes #297
What changed
phoebe doctorhad seven version numbers in view — cli installed, cli latest, engine pin, engine latest, materialized commit, engine floor (minBootstrap), launcher — but never compared the floor against the launcher. A deployment where the launcher is below the engine's declared floor is fully deadlocked:phoebe bootthrows on startup and no work runs. Doctor rendered this identically to "mildly stale", which is the opposite of alarming.New check:
launcher-floorA seventh check sits beside the existing six. It reads
phoebe.minBootstrapfrom the materialized engine checkout'spackage.json(the same fieldboot.tsenforces) and compares it against the effective launcher version — theARG PHOEBE_AGENT_VERSIONpin incontainer/Dockerfilefor container deployments, the npm-global version otherwise.Failure output names both versions, says explicitly that this is not a staleness warning (the deployment does no work in this state), and gives the one-line fix.
No floor declared (engine predates #293, or no checkout yet) → "check does not apply", matching the local-mount engine check's pattern rather than a silent pass. Local mount → not applicable. Config-failed → unknown.
Shape
launcherFloorCheck(fields)— testable from two version strings with no I/O.readMinBootstrap(engineDir)— private helper, mirrorscheckMinBootstrapinboot.ts.runDoctorwires the check for all three source cases (github, local, config-failed) so the JSON shape never varies.doctor.test.ts.All 1351 tests pass.