Skip to content

Resolve the Pi extension roots from Pi's own registration - #834

Merged
clkao merged 2 commits into
mainfrom
spacedock-ensign/launcher-resolves-registered-pi-extensions
Oct 6, 2026
Merged

clkao merged 2 commits into
mainfrom
spacedock-ensign/launcher-resolves-registered-pi-extensions

Conversation

@clkao

@clkao clkao commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

A Pi launcher on a non-default home demanded a package path Pi itself already resolves, and told the operator to export a variable.

What changed

  • Resolve both extension roots from the registration Pi itself reads.
  • Keep the exported override as the first choice, and the default home last.
  • Print which root won, which was collected but never shown.

Evidence

  • Each criterion was falsified by mutation: removing the registration read, skipping the override, and pointing the default at a real directory each turned its test red.
  • internal/cli/pi.go and pi_frontdoor_test.go only: net +121, inside the +40..+140 tolerance.

launcher

The launch path now mirrors the host it launches: an exported
PI_SUBAGENTS_PACKAGE_ROOT/PI_INTERCOM_PACKAGE_ROOT wins, else the package
registered in the agent directory's settings.json (pi's own discovery),
else the default home layout. The winning source label is carried into the
doctor report and the ready line so an operator sees which root won.
Close two committed-test gaps from the validation round for PR #834:

- Override precedence: PI_SUBAGENTS_PACKAGE_ROOT must win over a competing
  settings.json registration for pi-subagents, while a package with no
  override (pi-intercom) still resolves from its registration.
- Manifest-name match: a decoy registration first in settings.json whose
  package.json name differs must not satisfy the pi-subagents lookup; the
  real manifest-named registration must still resolve.

Both tests are RED under the corresponding pi.go mutation and GREEN restored.
@clkao
clkao merged commit 9ea2a65 into main Oct 6, 2026
4 of 7 checks passed

This branch is waiting to be deployed

3 waiting deployments
CI-E2E — 9c5f6817 Waiting Oct 6, 2026 by clkao via claude-live (pull-request, claude-sonnet-5-5, max, CI-E2E) #1275
CI-E2E-PI — 9c5f6817 Waiting Oct 6, 2026 by clkao via pi-live #1275
CI-E2E-CODEX — 9c5f6817 Waiting Oct 6, 2026 by clkao via codex-live #1275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant