Skip to content

Phoebe: launcher-floor check in phoebe doctor - #323

Merged
mikeallisonJS merged 2 commits into
mainfrom
phoebe/issue-297
Aug 24, 2026
Merged

Phoebe: launcher-floor check in phoebe doctor#323
mikeallisonJS merged 2 commits into
mainfrom
phoebe/issue-297

Conversation

@mikeallisonJS

Copy link
Copy Markdown
Collaborator

Closes #297

What changed

phoebe doctor had 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 boot throws on startup and no work runs. Doctor rendered this identically to "mildly stale", which is the opposite of alarming.

New check: launcher-floor

A seventh check sits beside the existing six. It reads phoebe.minBootstrap from the materialized engine checkout's package.json (the same field boot.ts enforces) and compares it against the effective launcher version — the ARG PHOEBE_AGENT_VERSION pin in container/Dockerfile for 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

  • Pure launcherFloorCheck(fields) — testable from two version strings with no I/O.
  • readMinBootstrap(engineDir) — private helper, mirrors checkMinBootstrap in boot.ts.
  • runDoctor wires the check for all three source cases (github, local, config-failed) so the JSON shape never varies.
  • Eight new test cases in doctor.test.ts.

All 1351 tests pass.

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>
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 34 minutes.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 89fe36ed-3652-4c40-be2a-fde7a776bd9a

📥 Commits

Reviewing files that changed from the base of the PR and between bea02f7 and 3f46de7.

📒 Files selected for processing (3)
  • .changeset/launcher-floor-check.md
  • src/doctor.test.ts
  • src/doctor.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Aug 24, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mikeallisonJS
mikeallisonJS merged commit b2baac5 into main Aug 24, 2026
6 checks passed
@mikeallisonJS
mikeallisonJS deleted the phoebe/issue-297 branch August 24, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor reports a floor-violating launcher as merely BEHIND, hiding a deadlocked deployment

2 participants