Skip to content

Commit ff386f9

Browse files
committed
chore: update progress for US-197
1 parent 5382192 commit ff386f9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

progress.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,3 +2481,17 @@ PRD: ralph/kernel-hardening (46 stories)
24812481
- Changing execution.ts requires `pnpm run build` (or turbo build) before tests pick up the change — vitest resolves the compiled output, not TypeScript source
24822482
- The WARN "could not retrieve pid for child process" appears on stderr for all node -e invocations — tests must tolerate it
24832483
---
2484+
2485+
## 2026-03-19 - US-197
2486+
- What was implemented: Verified tree command works correctly in both kernel.exec() and interactive shell; no code fix needed (tree never hung — hypothesized stdin blocking does not occur because tree.rs never reads stdin, and the WASM polyfill only blocks on stdin when fd_read(0) is actually called). Added comprehensive test suite covering all acceptance criteria.
2487+
- Files changed:
2488+
- packages/secure-exec/tests/kernel/tree-test.test.ts — 6 new tests: kernel.exec tree / returns within 5s, tree /nonexistent returns non-zero, 3-level nested directory rendering, empty directory minimal output, interactive shell tree completes with prompt return, stdin-empty-PTY non-hang verification
2489+
- scripts/ralph/prd.json — marked US-197 as passes: true
2490+
- **Learnings for future iterations:**
2491+
- tree.rs only uses io::stdout() and fs::read_dir() — no stdin reads → PTY stdin blocking is not an issue for tree
2492+
- Interactive shell tests must use shell.onData = fn (property setter), not shell.onData(fn) — openShell returns a ShellHandle with getter/setter, not EventEmitter
2493+
- Shell prompt text is "sh-0.4$ " — use '$ ' substring match for prompt detection in tests
2494+
- Tree summary output uses singular/plural: "1 directory" vs "N directories", "1 file" vs "N files" — match with regex /\d+ director/ and /\d+ file/
2495+
- Interactive shell cleanup: send 'exit\n' and race shell.wait() with a timeout to avoid test hangs from dispose()
2496+
- kernel.exec('tree /') runs in under 1 second; interactive shell 'tree /' completes within 200ms after command is dispatched
2497+
---

0 commit comments

Comments
 (0)