Skip to content

feat(pi): bundle codebase-analyzer persona with scoped runtime config - #102

Merged
danievanzyl merged 3 commits into
mainfrom
afk/101-pi-codebase-analyzer-runtime-config
Sep 2, 2026
Merged

feat(pi): bundle codebase-analyzer persona with scoped runtime config#102
danievanzyl merged 3 commits into
mainfrom
afk/101-pi-codebase-analyzer-runtime-config

Conversation

@danievanzyl

@danievanzyl danievanzyl commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Closes #101

Summary

  • bundle Pi-native codebase-analyzer for local read-only reconnaissance
  • validate/apply persona thinking and inheritSkills runtime defaults
  • isolate child Pi extension lifecycle; harden shutdown handling
  • document precedence; add discovery, dispatch, packaging, and lifecycle regression coverage

Validation

  • bun test tests/subagents/index.test.ts tests/subagents/personas.test.ts — 10 pass, 0 fail, 23 assertions
  • Pi extension typecheck — pass
  • full eval/hooks/sync-skills feedback loop — pass
  • npm pack --dry-run --json assertion — includes extensions/subagents/agents/codebase-analyzer.md
  • pi --approve --no-extensions -e . --list-models — pass
  • real delegated RPC smoke — gpt-5.6-luna, exit 0, exact file:line evidence, no inherited skills, unchanged git status --short

Dispatch verification

shepard-tests: DISCOVERED=1 RAN=1 PASS=1 FAIL=0 sha=1d25f61 ASSERTIONS=14 APASS=14 AFAIL=0

Ran scripts/run-tests.sh --ledger /tmp/code-skills-101-review-head.ledger at PR head 1d25f61 and compared it with the same runner's /tmp/code-skills-101-base.ledger from PR base 275c961161eead65e9175101cfdec6476625047d.

diff -u /tmp/code-skills-101-base.ledger /tmp/code-skills-101-review-head.ledger is empty: zero new FAIL records; TEST assertions 14 → 14 (no decrease).

- pin local recon to Luna/low/read-only tools\n- apply validated thinking and inheritSkills precedence\n- add discovery/dispatch tests and docs\n\nNo blockers.
@danievanzyl

Copy link
Copy Markdown
Owner Author

Review — CHANGES MADE

Findings resolved

  • [P1] Child extension leakage: delegated Pi processes still discovered unrelated extensions. With the package installed, the real analyzer smoke loaded package lifecycle hooks and exited 1 after producing its report. Children now use --no-extensions; the repeated RPC smoke exits 0 with accurate file:line evidence, gpt-5.6-luna, no inherited skills, and unchanged git status.
  • [P1] Shutdown race: background completion/rejection callbacks updated the status event bus after session_shutdown, causing a stale-context exception. Both callbacks now stop before touching extension context.
  • [P2] Acceptance coverage gaps: added exact bundled runtime-argument coverage, both directions of explicit inheritSkills precedence, invalid-value sibling retention, shutdown regression coverage, and an npm-pack assertion for the bundled persona.

No unresolved findings.

Validation

  • Subagent tests: 10 pass, 0 fail, 23 assertions
  • Pi extension typecheck: pass
  • Package contents + package load: pass
  • Eval suite: 152 pass, 0 fail; eval typecheck: pass
  • Hook + sync-skills feedback loop: all green
  • Required ledger diff vs 275c961161eead65e9175101cfdec6476625047d: empty; 0 new FAIL, assertions 14 → 14
  • CI validate: pass

Review commit: 1d25f6146bc00ecc52483314c0b2c19c63ca4a57

REGRESSION-FOUND
shepard-survey: SURFACES=8 PROBED=8 FINDINGS=1 sha=1d25f6146bc00ecc52483314c0b2c19c63ca4a57
@danievanzyl

Copy link
Copy Markdown
Owner Author

REGRESSION-FOUND

shepard-survey: SURFACES=8 PROBED=8 FINDINGS=1 sha=1d25f6146bc00ecc52483314c0b2c19c63ca4a57

  • Regression — existing personas lose extension-provided runtime support (extensions/subagents/index.ts:114): every child now receives --no-extensions. Before this diff, children discovered configured extensions, so existing personas could use extension-registered model providers, built-in tool overrides, and runtime hooks. A persona pinned to an extension-registered model now starts without that provider and cannot run. Failing coverage committed in fbe750a; no fix included.

Consumed PR evidence: shepard-tests: DISCOVERED=1 RAN=1 PASS=1 FAIL=0 sha=1d25f61 ASSERTIONS=14 APASS=14 AFAIL=0.

@danievanzyl
danievanzyl marked this pull request as ready for review September 2, 2026 14:10
@danievanzyl
danievanzyl merged commit d3c7ef9 into main Sep 2, 2026
1 check failed
@danievanzyl
danievanzyl deleted the afk/101-pi-codebase-analyzer-runtime-config branch September 2, 2026 14:11
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.

feat(pi): bundle codebase-analyzer persona with scoped runtime config

1 participant