docs: replan Bash cwd as local override
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
|
||||
## Status
|
||||
|
||||
- Status: active
|
||||
- Current phase: 5. Implement owned slices
|
||||
- Next safe action: write the focused regression test against Pi 0.84.4, confirm it fails, then upgrade the aligned Pi packages to 0.85.0.
|
||||
- Status: waiting
|
||||
- Current phase: 3. Design and obtain plan approval
|
||||
- Next safe action: present the revised local-override plan and obtain explicit approval before further product mutation.
|
||||
|
||||
## Request and scope
|
||||
|
||||
- Request: address the first repository TODO so Bash execution honors the current Pi tool context inside hidden Git worktrees.
|
||||
- In scope: reproduce the Pi 0.84.4 behavior, adopt the upstream Pi 0.85.0 cwd correction through the repository dependency set, test workspace-root and nested-package execution in a disposable hidden worktree, update affected documentation, and remove the resolved TODO.
|
||||
- Out of scope: adding a custom Bash override, changing Bash's public per-call arguments, publishing packages, deploying, pushing, or modifying live/production data.
|
||||
- In scope: reproduce the Pi 0.84.4 behavior; add a repository-owned, publishable `@jbcode/pi-bash-cwd` extension that delegates to Pi's built-in Bash implementation using each call's `ctx.cwd`; test workspace-root, nested-package, and missing-directory execution in a disposable hidden worktree; update package inventory and documentation; remove the resolved TODO.
|
||||
- Out of scope: upgrading Pi, changing Bash's public per-call arguments, installing or publishing the new package, deploying, pushing, or modifying live/production data.
|
||||
|
||||
## Git identity
|
||||
|
||||
@@ -22,26 +22,29 @@
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [ ] The repository resolves a Pi Coding Agent version whose built-in Bash tool uses the execution `ctx.cwd` instead of the tool factory's original process directory.
|
||||
- [ ] `@jbcode/pi-bash-cwd` overrides the built-in `bash` tool without changing its public arguments, output, truncation, cancellation, timeout, session-environment, or renderer contracts.
|
||||
- [ ] The override constructs the delegated built-in tool with the current execution `ctx.cwd`, rather than the extension factory's process directory.
|
||||
- [ ] A regression test executes `pwd` from both a disposable hidden worktree root and a nested workspace package directory and observes the requested directory.
|
||||
- [ ] A missing requested working directory fails before the shell command can create a sentinel side effect.
|
||||
- [ ] Package inventory, README guidance, and the upstream Pi 0.85.0 packaging blocker TODO are synchronized.
|
||||
- [ ] Existing repository typecheck and test suites pass.
|
||||
- [ ] The resolved TODO and temporary workaround language are removed or updated without changing unrelated historical evidence.
|
||||
- [ ] The resolved Bash cwd TODO and temporary workaround language are removed or updated without changing unrelated historical evidence.
|
||||
|
||||
## Approved implementation plan and gates
|
||||
|
||||
- Plan/specification source: user request, `docs/todos.md`, and upstream Pi 0.84.4/0.85.0 source under `/srv/data/opensrc/repos/github.com/earendil-works/pi/`.
|
||||
- Exact plan: (1) add a focused repository regression harness for dynamic Bash `ctx.cwd` with hidden-worktree root, nested package, and missing-directory cases; (2) update the aligned `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` catalog versions to 0.85.0 and regenerate `bun.lock`; (3) run focused tests, typecheck, and the full suite; (4) update README compatibility text and resolve the TODO/workaround references; (5) verify in a fresh Pi 0.85.0 process without changing the currently running global Pi installation.
|
||||
- Plan approval: approved by the user through `ask_user` on 04SEP2026 (`approve_085`).
|
||||
- Exact plan: pending revised approval. Proposed: (1) create `extensions/bash-cwd` as a publishable `@jbcode/pi-bash-cwd` package; (2) override `bash` by preserving the host's built-in schema, metadata, rendering, and execution behavior while constructing the delegated built-in tool from the live `ctx.cwd`; (3) move the red regression into the package and cover hidden-worktree root, nested package, and fail-before-sentinel cases; (4) add the package to workspace/package checks and root test execution; (5) document installation and compatibility, remove the resolved Bash cwd TODO, annotate historical workaround text, and add a separate TODO for removing the local override after a usable upstream release; (6) run focused package tests, packaging checks, typecheck, and the full repository suite.
|
||||
- Plan approval: pending after the Pi 0.85.0 blocker forced replanning. The user selected `local_override` and then `publishable_package` through `ask_user` on 04SEP2026.
|
||||
- UI classification and direction approval: non-UI; no prototype gate applies.
|
||||
- Risk decisions and scope: the user approved the aligned Pi 0.85.0 repository dependency upgrade. The user selected repository-only scope, so the active global Pi 0.84.4 installation remains unchanged.
|
||||
- Risk decisions and scope: the approved Pi dependency upgrade was abandoned and fully restored after Pi 0.85.0 failed to load. No new dependency will be added. The new package remains repository-only and will not be installed, published, or added to the active global Pi environment in this task.
|
||||
|
||||
## Ownership
|
||||
|
||||
| Assignment | Owner identity | Deadline | Exclusive paths | Before/after Git evidence | Outcome |
|
||||
| --- | --- | --- | --- | --- | --- |
|
||||
| Workflow setup and research | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | workflow record only | Before: clean `main` at `7e7cfdb`; after: clean feature worktree at `5f853dc` | Complete |
|
||||
| Dependency, test, and docs implementation | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | `package.json`, `bun.lock`, focused test, `README.md`, `docs/todos.md`, workflow record | Before: clean feature worktree at `5f853dc`; after: pending | In progress |
|
||||
| Initial dependency-plan implementation | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | `package.json`, `bun.lock`, focused test, workflow record | Before: clean feature worktree at `9d68d5f`; after: Pi 0.85.0 upgrade restored; focused red test retained unstaged | Paused and replanned after upstream packaging blocker |
|
||||
| Local override implementation | parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87` | 15 minutes | `extensions/bash-cwd/**`, `scripts/bash-cwd.test.mjs` removal, `package.json`, `scripts/package-workspaces.test.mjs`, `README.md`, `docs/todos.md`, `docs/workflow/skill-led-development-workflow-plan.md`, workflow record | Before: feature worktree at `9d68d5f` with inspected red-test changes | Pending approval |
|
||||
|
||||
## Verification matrix
|
||||
|
||||
@@ -64,7 +67,7 @@
|
||||
- Mutator identities: parent Pi session `01a06e08-8d07-76a7-a116-d7e3baf55b87`
|
||||
- Standards reviewer identity, digest confirmation, and verdict: pending
|
||||
- Specification reviewer identity, digest confirmation, and verdict: pending
|
||||
- Findings and remediation cycles: none yet
|
||||
- Findings and remediation cycles: Pi 0.85.0 includes the upstream `ctx.cwd` correction but its public package imports undeclared `@earendil-works/pi-server`, causing `ERR_MODULE_NOT_FOUND`. The user rejected adding that dependency and selected a repository-owned override. The attempted catalog/lock upgrade was restored; a focused red test remains as inspected uncommitted work pending replan approval.
|
||||
- Before/after reviewer Git evidence: pending
|
||||
|
||||
## Integration and rollback
|
||||
@@ -78,5 +81,5 @@
|
||||
## Checkpoints and blockers
|
||||
|
||||
- Last committed valid checkpoint: initial record commit `5f853dc`
|
||||
- Blockers: none.
|
||||
- Exact next safe action: commit the approved gate, then implement the focused regression test before updating dependencies.
|
||||
- Blockers: revised exact-plan approval.
|
||||
- Exact next safe action: present this revised record and ask the user to approve or reject the local-override implementation plan.
|
||||
|
||||
Reference in New Issue
Block a user