Skip to content

host: launch watchdog sampling without shell parsing - #829

Open
thehobbit85 wants to merge 4 commits into
seedds:mainfrom
thehobbit85:codex/watchdog-sample-argv
Open

thehobbit85 wants to merge 4 commits into
seedds:mainfrom
thehobbit85:codex/watchdog-sample-argv

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Launch watchdog sampling with posix_spawn and literal arguments instead of interpolating DM_WATCH_SAMPLE into a shell command. Apostrophes and shell characters remain literal, long paths are preserved, interrupted waits resume, and sampling duration, redirection, diagnostics and final exit remain unchanged.

Addresses the watchdog-path finding in issue #313, not the whole roadmap. Main still uses the vulnerable shell interpolation. The fixture executes the real watchdog with a recorder, never samples user applications, rejects shell calls at compile time and covers an absent optional fault variable. The only lint-baseline removal is the stale production command-processor finding.

Revision 3a1e10efb6635675650cade26aca3426bff2bae4 includes main e5620b1a05a5b7374e0135d6312d3e90994eab81. Main’s sample command still uses shell interpolation. Literal argument spawning and its path tests remain distinct.

Validation on 3a1e10efb663. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_usage. All 17 tests passed.

The native watchdog sampling fixture also passed all 150 assertions.

GitHub checks for this revision

Earlier local validation on 69a66e168048. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_usage. All 17 tests passed. make -C dm/host/tests GAME=010015100B514000 watch-sample passed all 150 assertions using a recorder. Earlier ASan/UBSan and analyzer checks were successful. An earlier full local host run failed an audio callback-restart assertion. This revision’s local tests covered the watchdog and documentation.

Game impact is confined to watchdog diagnostics, independent of title content. The synthetic fixture covers actual production spawning/waiting without attaching to a game. Prior regression availability checks lacked the required game builds/routes; no fresh game, gameplay, shader-chain, device or performance claim is made. General behavior remains in the threads reference; validation evidence is here. No agent plans, progress records or game data are included.

Shared geometry fixture CI fix

This branch retains the #959 prerequisite as commit 3a1e10efb663. The patch and fixture contents match the shared fix exactly.

Prior published commit de8c422213e2 applied #959 as a separate prerequisite. On ea53dc5494fe, LLVM 23.1.4 reproduced both C lint findings in the geometry hazard fixture inherited from main. At that earlier head, the focused lint check passed and the Mac GPU fixture passed all 65 assertions in each of three cut configurations with Metal API validation. The prerequisite changes only the synthetic test. The feature validation and its limitations above still apply to the feature revision they name.

@thehobbit85
thehobbit85 force-pushed the codex/watchdog-sample-argv branch from a00be71 to 1ee28cf Compare November 1, 2026 03:29
@thehobbit85
thehobbit85 force-pushed the codex/watchdog-sample-argv branch 4 times, most recently from 4820ba5 to 568ae94 Compare November 1, 2026 12:33
@thehobbit85
thehobbit85 force-pushed the codex/watchdog-sample-argv branch 4 times, most recently from 69a66e1 to ea53dc5 Compare November 2, 2026 11:37
@thehobbit85
thehobbit85 force-pushed the codex/watchdog-sample-argv branch from de8c422 to 3a1e10e Compare November 2, 2026 13:34
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.

2 participants