Skip to content

test(runtime): wire bounded fault injection harness#953

Open
luoye520ww wants to merge 3 commits into
KunAgent:developfrom
luoye520ww:codex/fault-injection-runtime
Open

test(runtime): wire bounded fault injection harness#953
luoye520ww wants to merge 3 commits into
KunAgent:developfrom
luoye520ww:codex/fault-injection-runtime

Conversation

@luoye520ww

Copy link
Copy Markdown
Collaborator

Problem\nThe existing fault-injection contract was only validated as a schema and did not exercise the real HTTP/SSE runtime boundaries used by recovery tests.\n\n## Scope\nThis PR aggregates the runtime harness follow-up for #925. It keeps fault injection explicitly opt-in and test-only.\n\n## Changes\n- Add a bounded, abort-aware FaultInjectionController with one-shot/reconfigurable activation.\n- Wire optional injection into the Node HTTP server and Kun serve runtime.\n- Exercise HTTP 429, bounded timeout response, malformed JSON, and SSE disconnect at the actual response boundary.\n- Keep normal production startup unchanged when no controller is supplied.\n\n## Non-goals\nDisk/process/renderer/storage fault hooks and a production UI are intentionally out of scope for this small runtime harness PR.\n\n## Validation\n-

pm.cmd --prefix kun test -- tests/fault-injection.test.ts tests/node-http-server.test.ts — 2 files, 19 tests passed\n-
pm.cmd run typecheck — passed\n-
pm.cmd --prefix kun run typecheck — passed\n-
pm.cmd run lint — passed\n-
pm.cmd run build — passed\n- git diff --check — passed\n\n## Review\nReviewed lifecycle/abort cleanup, default-off behavior, response teardown, cross-platform Node APIs, secret/error handling, and PR scope.\n\nSupersedes #925.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant