Capture process stdout/stderr goes to interactive stdio; mitmdump diagnostics invisible #187
Labels
No labels
bug
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/hackmode#187
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reviewed at commit
3b4e2da(filed against capture wiring from40389ab, mitmdump lifecycle #147; interacts with replay from6f40a44).Problem
default-capture-process-runner(source/hackmode-core/capture-provider.lisp~lines 80-92) spawnsmitmdumpwith:output :interactiveand:error-output :interactive. In a long-lived operation this leaves the capture subprocess writing to the Lisp image's stdio, and mitmdump's stderr diagnostics (TLS errors, addon RuntimeError for missing IPX options, proxy bind failures) are not captured anywhere structured.Impact
note-capture-process-exitsees only exit codes; a mitmdump that dies at startup because of a bad option or addon load failure is indistinguishable from a clean stop.Suggested fix
Redirect subprocess output to operation-scoped log files (e.g. under the same directory as the spool path,
capture-<session-id>.log) and surface the tail of that log in capture-service error state (capture-service-last-error), or expose it through the typed capture service state. Add a test asserting a mitmdump startup failure is observable through the typed service state.Also note the addon raises
RuntimeErrorinrunning()when required IPX options are missing (tools/ipx/mitmproxy-addon.py); with:error-output :interactivethe operator will never see why capture silently produced no spool.