Repository navigation
Comparing changes
Open a pull request
base repository: patty-io/pi-patty-bg-tasks
base: main
head repository: Apothic-AI/bizzy
compare: main
- 12 commits
- 28 files changed
- 1 contributor
Commits on Oct 8, 2026
-
fix(input): steering backgrounds the command without aborting the turn
Port upstream #27 (drop ctx.abort, deliver as steer) and #21 (assert the turn is never aborted; correct the bash.ts comments). #27 keeps #21 abort fix and additionally switches delivery from followUp to steer: a follow-up is drained only once a turn produces NO tool calls, so steering otherwise waited for the entire tool-chaining run to settle. #21 tests asserted followUp delivery and were retargeted to steer.
Configuration menu - View commit details
-
Copy full SHA for 12401dd - Browse repository at this point
Copy the full SHA 12401ddView commit details -
fix(jobs): report a still-running job as running, not finished
Port upstream #26. attachAction fell through to "finished" even when the job was still running (wait:false, or a job outliving its awaited donePromise), telling both the agent and the user that a live job had ended.
Configuration menu - View commit details
-
Copy full SHA for 13ad151 - Browse repository at this point
Copy the full SHA 13ad151View commit details -
fix(bash): fire the bash timeout in non-interactive sessions
Port upstream #15. The timeout timer returned early when the session was non-interactive, so the bash timeout never fired under -p / RPC.
Configuration menu - View commit details
-
Copy full SHA for 403d74e - Browse repository at this point
Copy the full SHA 403d74eView commit details -
fix: report cleanup and resolution failures
Port upstream #28. Monitor-follow cleanup and log-path resolution failures were swallowed rather than surfaced.
Configuration menu - View commit details
-
Copy full SHA for 27c63aa - Browse repository at this point
Copy the full SHA 27c63aaView commit details -
fix(monitor): a stale extension ctx no longer crashes pi via the stre…
Configuration menu - View commit details
-
Copy full SHA for de5db4d - Browse repository at this point
Copy the full SHA de5db4dView commit details -
fix: reap detached background jobs when the parent pi exits
Port upstream #20. v2.0.0 kills jobs on session_shutdown, but spawn.ts unrefs the children, so a crashed or SIGKILLed pi left them running forever. Wires process exit plus SIGINT/SIGTERM/SIGHUP.
Configuration menu - View commit details
-
Copy full SHA for d4e376b - Browse repository at this point
Copy the full SHA d4e376bView commit details -
test(commands): fix the /bg-version assertion
The notice ends with the absolute install directory, so anchoring on a trailing "pi-patty-bg-tasks" could never match. This suite was already red at v2.0.0, before any of the ported fixes.
Configuration menu - View commit details
-
Copy full SHA for 246c788 - Browse repository at this point
Copy the full SHA 246c788View commit details -
chore(deps): retarget peer/dev deps to pi >=1.1.0
v2.0.0 was developed against pi 0.83 and pinned peers at >=0.79.0. Compiles and tests clean against 1.1.0; drop the old-version floor.
Configuration menu - View commit details
-
Copy full SHA for 6792435 - Browse repository at this point
Copy the full SHA 6792435View commit details -
chore(pkg)!: rename to pi-bizzy-bg-tasks and repoint at Apothic-AI/bizzy
Renamed from pi-patty-bg-tasks so the fork never shadows the upstream npm package, and republished from Apothic-AI/bizzy. Upstream is untouched and nothing is sent back. - package.json: name, version 2.0.0 -> 2.1.0, repository URL, and a fork note in the description. `author` stays "Patrick Rho" — MIT requires the original copyright and he wrote this code. - LICENSE: keeps (c) patty.io, adds (c) Apothic for the fork changes. - READMEs (en/ko/zh): title, npm badge, install and clone commands, and a fork banner; author sections credit both Patty (original) and Apothic (fork maintainer). English README gains a "Fork deltas" section. - src/index.ts + src/commands.ts: header and the /bg-version fallback name. - commands.test.ts now matches an npm name@semver shape instead of hardcoding the package name, so a future rename cannot break it. - docs/superpowers/* deliberately left alone: dated design and plan records that name the package as it was, with the original authors paths.
Configuration menu - View commit details
-
Copy full SHA for 03f8f33 - Browse repository at this point
Copy the full SHA 03f8f33View commit details -
fix(test): hold the event loop open while awaiting background spawns
spawnWithFileOutput calls proc.unref() so a background job never keeps pi alive. That is correct for production, but it means that once a spawn has returned nothing references the pending child, so a test awaiting that childs exit sees Node resolve the loop first and is cancelled with "Promise resolution is still pending but the event loop has already resolved". Because the unaffected tests still exit 0, this hid itself as a silently shrinking suite. Affected suites, measured before and after: spawn 0 pass / 6 cancelled -> 6 pass / 0 cancelled bash-results 1 pass / 5 cancelled -> 6 pass / 0 cancelled monitor 4 pass / 2 cancelled -> 6 pass / 0 cancelled Whole suite: 150 pass / 1 fail / 12 cancelled -> 171 pass / 0 fail / 0 cancelled. Holding the loop once per file rather than wrapping each await means a test added later cannot silently regress back into cancellation. Production code is untouched; removing proc.unref() would make pi hang until every background job finished. The test script also gains --test-timeout=30000. Previously a spawn whose exit never resolved surfaced as a fast cancellation; with the loop held it would hang forever, so the timeout turns that into a visible failure. Notably this now actually executes the non-interactive bash-timeout case from #15 and the timeout-kill path, neither of which had ever run.
Configuration menu - View commit details
-
Copy full SHA for 641a4bb - Browse repository at this point
Copy the full SHA 641a4bbView commit details -
docs(readme): correct the now-fixed test-gap note
The Fork deltas section described the spawn/bash-results/monitor cancellations as a known gap left open. That was true when written and is now false: the previous commit fixed them. Rewrite the bullet to record the fix, including that the non-interactive timeout case had never actually executed, and to state the new 171/0/0 result.
Configuration menu - View commit details
-
Copy full SHA for 9e0015b - Browse repository at this point
Copy the full SHA 9e0015bView commit details -
fix: private per-user log dir, resilient spawn, agent_bg child isolation
Three defects found by audit, each verified with a probe before and after. 1. Job logs were world-readable. LOG_DIR was a hardcoded /tmp/pi-bg, and mkdirSync gave 0755 with openSync giving 0664, so every background job log was readable by any local user. Logs carry whatever a command printed, including anything echoed out of its own environment, and a predictable path in a shared directory is also pre-creatable by another user, whose ownership we would then write into. Logs now live under $XDG_STATE_HOME/pi-bg (absolute check, else ~/.local/state/pi-bg) at 0700/0600, matching where pi-bg-bash keeps them. 2. A vanished log directory wedged the process permanently. A module-level logDirCreated flag meant that once anything removed the directory (tmp cleaner, reboot, an agent running rm -rf) every LATER spawn in that process threw ENOENT for the rest of its life, because the flag said the directory existed so it was never recreated. openLogFd now creates it on ENOENT and retries, paying one mkdir only on the failure path. Proven: a second spawn after removing the dir went ENOENT before, works now. 3. agent_bg children inherited this extension. The worker was spawned as a plain `pi -p`, so it loaded us too: it could nest further agent_bg calls, auto-background its own commands into a turn that had already ended (losing their completion notice), and install process signal handlers on a process it does not own. pi cannot exclude a single extension from a child (--no-extensions also strips the user own skills and MCP), so the child is marked via env and the extension stands down inside it. This is the concern behind upstream #7, which could not be ported because its file no longer exists upstream. Also: the model-facing tool descriptions hardcoded /tmp/pi-bg, so they now derive from LOG_DIR rather than going stale silently. 7 regression tests added. Each was verified to FAIL against the unfixed code. The first attempt at the /tmp guard asserted against os.tmpdir() and passed against the broken value, because this box sets TMPDIR=/tmp/user/1000; it now compares the literal /tmp and pins the resolved root. Suite: 178 pass / 0 fail / 0 cancelled. Version 2.2.0 (log location is user-visible).
Configuration menu - View commit details
-
Copy full SHA for 734332e - Browse repository at this point
Copy the full SHA 734332eView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...main