storkit: accept 454_story_deduplicate_work_item_display_in_web_ui_story_panel
This commit is contained in:
-48
@@ -1,48 +0,0 @@
|
||||
---
|
||||
name: "Zombie process accumulation from unrereaped child processes"
|
||||
---
|
||||
|
||||
# Bug 452: Zombie process accumulation from unrereaped child processes
|
||||
|
||||
## Description
|
||||
|
||||
Storkit accumulates zombie processes over time from unrereaped child and grandchild processes. Observed 101 zombies in Docker container, 27 on macOS host. Breakdown: 51 esbuild, 36 echo, 5 claude, 5 sh, 2 bash, 1 cargo.
|
||||
|
||||
Root cause: storkit does not reap orphaned grandchild processes. The zombies are mostly grandchildren (`esbuild`, `echo`, `sh`, `cargo`) spawned by `npm run build`, `cargo test`, etc. during worktree setup and gate checks. This happens both natively (observed 27 zombies on macOS host) and in Docker containers. When the intermediate parent exits, these grandchildren get reparented to storkit (or PID 1 in Docker) and become zombies because nobody calls `waitpid` for them.
|
||||
|
||||
**Already fixed:**
|
||||
- `docker-compose.yml` now has `init: true` which uses tini as PID 1 in Docker — this handles zombie reaping inside containers
|
||||
- `llm/providers/claude_code.rs` now has `child.wait()` after `child.kill()` in all code paths, and the reader thread is joined before returning
|
||||
- `agents/pty.rs` reader thread is now joined before returning
|
||||
|
||||
**Remaining:** Storkit running natively (e.g. on macOS) still accumulates zombie grandchildren because there is no tini. The fix is to add a background reaper thread that periodically calls `waitpid(-1, WNOHANG)` in a loop to clean up any orphaned children. This should be spawned early in `main()` on Unix platforms. Example:
|
||||
|
||||
```rust
|
||||
#[cfg(unix)]
|
||||
std::thread::spawn(|| {
|
||||
loop {
|
||||
unsafe { while libc::waitpid(-1, std::ptr::null_mut(), libc::WNOHANG) > 0 {} }
|
||||
std::thread::sleep(std::time::Duration::from_secs(5));
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## How to Reproduce
|
||||
|
||||
Run several agent sessions. Check with `ps -eo stat,comm | grep Z | awk '{print $2}' | sort | uniq -c | sort -rn`.
|
||||
|
||||
## Actual Result
|
||||
|
||||
Zombie processes accumulate continuously. Never reaped.
|
||||
|
||||
## Expected Result
|
||||
|
||||
No zombie accumulation during normal operation.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [x] `child.wait()` is called after `child.kill()` in all code paths in `claude_code.rs`
|
||||
- [x] Reader threads are joined in both `pty.rs` and `claude_code.rs`
|
||||
- [x] `init: true` added to docker-compose.yml for Docker deployments
|
||||
- [ ] Background reaper thread added for native (non-Docker) deployments
|
||||
- [ ] Verified with `ps aux | grep '<defunct>'` after running multiple agent sessions natively on macOS
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: "Deduplicate work item display in web UI story panel"
|
||||
---
|
||||
|
||||
# Story 454: Deduplicate work item display in web UI story panel
|
||||
|
||||
## User Story
|
||||
|
||||
As a user, I want the work item detail panel to display cleanly without redundant information, so that I can read story details without noise.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] The story title is not shown twice (remove the duplicate heading)
|
||||
- [ ] The work item type label is not shown twice
|
||||
- [ ] The word 'name' is not shown as a prefix before the story title
|
||||
- [ ] The story ID/title line (e.g. 'Story 3: ...') is left-justified with no extra indentation
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- TBD
|
||||
Reference in New Issue
Block a user