summaryrefslogtreecommitdiff
path: root/tests/pi
AgeCommit message (Collapse)Author
2026-10-22fix(pi): inject the bootstrap on every prompt, not just the first (#2083)fix/2083-pi-bootstrap-every-turnJesse Vincent
The pi extension cleared injectBootstrap on agent_end, assuming it marked the end of a session. pi emits agent_end at the end of every agent run, which is once per user prompt, so from the second prompt on no provider request carried the using-superpowers bootstrap. The messages a context handler returns are sent to the provider but are not written to session history, so the bootstrap is never in event.messages on a later call and the existing marker check cannot see an earlier injection. The bootstrap therefore has to be injected into every provider request. Removing the agent_end disarm does exactly that, one copy per request at a stable position at the start of the messages. Observed against pi 0.85.1 with a local stub OpenAI-compatible provider, one session of three prompts (the second makes a tool call): before, only request 1 of 4 carried the bootstrap; after, all 4 carry exactly one copy. The test that asserted the disarm as intended behaviour is replaced by one that drives pi's per-prompt lifecycle events across several prompts and provider requests. The porting guide described the agent_end reset as the pattern to copy and now describes the failure instead. Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
2026-10-22fix(pi): stop resources_discover from bypassing package skill filtersfix/2394-pi-skill-filtersJesse Vincent
The pi extension registered a resources_discover handler that returned the whole skills/ directory. pi applies a package's `skills` filter (the one `pi config` writes) only to manifest-declared resources; paths an extension contributes are merged afterwards, unfiltered. So with `"skills": []` or an allowlist on the superpowers package entry, pi 0.85.1 still loaded all 15 skills, every one attributed to extension:superpowers. package.json already declares `pi.skills: ["./skills"]`, and pi loads that with the user's filter applied, so the handler was redundant for package installs, including the README's `pi -e /path/to/superpowers`. Remove it. The bootstrap handlers are unchanged. The porting guide now names the manifest as pi's discovery mechanism. Verified against the real pi 0.85.1 CLI (RPC get_commands, no model call): skills [] loads 0 (was 15), an allowlist of using-superpowers loads 1 (was 15), no filter loads 15, `pi -e <checkout>` loads 15. Fixes #2394 Co-authored-by: m2dumpling <224757904+m2dumpling@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba
2026-07-15test(pi): scope mapping assertions to the table, not whole fileGaurav Dubey
The pi tokens (subagent, pi-subagents, Task, TODO.md) also appear in the surrounding prose, so matching the whole file passed even with the mapping table deleted — the exact regression this test exists to catch. Filter to table rows (lines starting with '|') so the assertion fails when the table is gone and passes on dev. Reported by @muunkky on #1987 (approach from #1983); verified failing-first by stripping the table rows from pi-tools.md.
2026-07-15test: realign antigravity + pi mapping assertions with pruned referencesGaurav Dubey
Commit e7ddc25 ('Prune per-harness tool-mapping boilerplate') deliberately removed the skill-loading explainers and generic action->tool tables from antigravity-tools.md and pi-tools.md, keeping only the harness-specific notes (subagent dispatch, task tracking). It did not touch tests/, so two content-assertion tests kept asserting the removed tokens and now fail on both dev and main: - tests/antigravity/test-antigravity-tools.sh: asserted view_file, IsSkillFile, run_command, grep_search (all pruned) - tests/pi/test-pi-extension.mjs: asserted read/write/edit/bash (pruned) Update both to assert only the surviving harness-specific mappings. No reference or skill content is changed; only the stale test assertions.
2026-06-16chore: keep pi extension under .piJesse Vincent
2026-06-16feat: add pi superpowers package extensionJesse Vincent