Skip to content

Pin verified loader versions in piSpawnSkill comment - #774

Closed
clkao wants to merge 2 commits into
spacedock-ensign/gate-pi-frontdoor-bootstrap-on-resumefrom
spacedock-ensign/pi-spawn-skill-name-resolution
Closed

Pin verified loader versions in piSpawnSkill comment#774
clkao wants to merge 2 commits into
spacedock-ensign/gate-pi-frontdoor-bootstrap-on-resumefrom
spacedock-ensign/pi-spawn-skill-name-resolution

Conversation

@clkao

@clkao clkao commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

A field report claimed Pi-dispatched ensigns spawn contract-free because the dispatch artifact passes the bare skill name "ensign" while "newer Pi wants the exact name spacedock:ensign." The report's diagnosis is inverted: the bare basename is the only form that resolves; the qualified name would fail.

What changed

  • internal/dispatch/build.go: comment-only refinement of the piSpawnSkill block (lines 56-66) — replaced the stale unverified assumption ("pi-subagents resolves agents and skills by directory basename only") with pinned re-verification evidence. piSpawnSkill remains "ensign", piSpawnAgent remains "worker" — byte-identical to main (only line numbers shifted). No behavior change.

Evidence

  • Source spike: resolveSkillPath in pi-subagents/src/agents/skills.ts is byte-identical on installed 0.37.2 and latest npm 0.57.0 — both use skills.find((s) => s.name === skillName) (exact basename match, no namespace handling). normalizeSkillInput only trims whitespace; no colon-splitting that would turn spacedock:ensign into ensign. Passing spacedock:ensign would fail to resolve and land in missing → contract-free boot.
  • Live transcript: this session's dispatch (run 4c6e9c44) shows the ensign skill resident in <available_skills> — the bare name resolves end-to-end.
  • Existing test: TestBuildPiHostEmitsSpawnAgentAndSkill asserts the artifact emits skill = "ensign" and agent = "worker", locking the verified-correct values. PASS; go build ./... OK; gofmt clean.
  • git diff --numstat main shows only build.go (6/1), comment lines only.

The report likely confused the subagent_type field (host-neutral "spacedock:ensign") with the skill field (bare "ensign") — two different fields that coexist on the artifact.


ntn

@clkao
clkao changed the base branch from spacedock-ensign/embed-stage-report-protocol-in-dispatch to spacedock-ensign/gate-pi-frontdoor-bootstrap-on-resume August 27, 2026 06:35
@clkao
clkao force-pushed the spacedock-ensign/pi-spawn-skill-name-resolution branch from 18f404b to 1b921d3 Compare August 27, 2026 06:36
Drop the Pi-only stageReportFormatBlock() embed and its step-8a
conditional from the dispatch body. The body no longer carries the
stage-report protocol template; a stacked follow-up layer rewrites the
Pi firstActionBlock to invoke the ensign skill instead.

Remove the body-presence assertions that depended on the embed:
- TestBuildPiArtifactCarriesStageReportProtocol (internal/dispatch)
- TestPiNonSelfDescribingDispatchBuildBodyCarriesProtocol (internal/ensigncycle)

Keep TestBuildPiFirstActionNarrowedToStageReportFormat (overclaim
gone), the live lane (TestLivePiNonSelfDescribingDispatch), and the
CI wiring. The live lane will fail in pi-live until the follow-up
layer rewrites firstActionBlock to invoke the skill — that is the
point (the lane proves the fix).
@clkao
clkao force-pushed the spacedock-ensign/pi-spawn-skill-name-resolution branch 2 times, most recently from 8b8154d to a308052 Compare August 27, 2026 07:44
Rewrite the Pi firstActionBlock to direct the worker to load the ensign
discipline BEFORE reading the dispatch file, mirroring Claude's
Skill(skill="spacedock:ensign") and Codex's $spacedock:ensign bootstrap.
The worker is told to run /skill:ensign (Pi's skill-invoke slash command)
or fall back to reading skills/ensign/SKILL.md and its references/, then
read the dispatch file for the stage-specific assignment. This drops the
false claim that the dispatch file itself contains the ensign discipline
entry points (the skill is in available_skills but the worker must be
told to load it).

Also revert the comment-only piSpawnSkill loader-version pin from the
prior (wrong-scope) commit; piSpawnSkill="ensign" is unchanged.

Add offline guard TestPiFirstActionInvokesEnsignSkill asserting the
firstActionBlock contains a skill-load instruction (/skill:ensign or
skills/ensign/SKILL.md), does not carry the false claim, and loads the
skill before the read-dispatch-file instruction. Update two sibling
tests whose body assertions referenced the old firstActionBlock phrase.
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