Skip to content

Commit 5a66b46

Browse files
committed
chore: update progress for US-085
1 parent 4cc1b94 commit 5a66b46

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

prd.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2020,7 +2020,7 @@
20202020
"Tests pass"
20212021
],
20222022
"priority": 120,
2023-
"passes": false,
2023+
"passes": true,
20242024
"notes": "Phase 3 of terminal-e2e-testing.md spec. Known risk: cross-runtime stdout routing through proc_spawn \u2192 kernel \u2192 PTY has known issues \u2014 if tests fail, fix is in spawn/stdio wiring, not test infrastructure. Adversarial review added: ^C during cross-runtime spawn \u2014 signal must reach correct process and shell must survive."
20252025
},
20262026
{

progress.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,3 +1721,22 @@ PRD: ralph/kernel-hardening (46 stories)
17211721
- PtyManager constructor takes optional onSignal callback — pass a throwing function in tests to verify resilience
17221722
- setForegroundPgid requires a non-zero pgid for signal delivery to trigger
17231723
---
1724+
1725+
## 2026-03-18 - US-085
1726+
- What was implemented: Cross-runtime terminal tests and kernel fix for cross-runtime child process output routing
1727+
- Fixed kernel spawnInternal: cross-runtime children now inherit parent's onStdout/onStderr callbacks when stdout is not piped, enabling child output to reach exec() collector
1728+
- Fixed kernel spawnInternal: parent driver's PID set now includes cross-runtime child PIDs, allowing parent to waitpid on children spawned via different runtime drivers
1729+
- Test 1: `node -e "console.log(42)"` from brush-shell → "42" appears on screen via TerminalHarness
1730+
- Test 2: `^C` during `node -e "setTimeout(...)"` → shell survives, prompt returns, can run more commands
1731+
- Test 3: `python3 -c "print(99)"` from brush-shell → "99" appears (gated on pyodide ESM import availability)
1732+
- Files changed:
1733+
- packages/kernel/src/kernel.ts — added cross-runtime PID ownership sharing + parent stdout/stderr callback inheritance
1734+
- packages/secure-exec/tests/kernel/cross-runtime-terminal.test.ts — NEW: 3 cross-runtime terminal tests
1735+
- prd.json — marked US-085 (P120) as passes: true
1736+
- **Learnings for future iterations:**
1737+
- Root cause of cross-runtime EPERM: kernel assertOwns(pid) check rejected parent driver accessing child PID owned by a different driver — fix: register child PID in parent's driver PID set too
1738+
- Root cause of empty stdout: child process got its own isolated stdoutBuf instead of inheriting parent's callback — fix: look up parent's ProcessEntry.driverProcess.onStdout
1739+
- kernel.exec() always routes through `sh -c` (brush-shell) — ALL cross-runtime commands go through WasmVM proc_spawn
1740+
- pyodide `require.resolve()` succeeds but `await import('pyodide')` fails — use dynamic import check for accurate gating
1741+
- Cross-runtime pipe tests (echo | node) still fail — separate issue from output routing (pipe EOF/close semantics)
1742+
---

0 commit comments

Comments
 (0)