Title: mcpx hooks (#2541 follow-up): bound descendant processes on timeout, cap retained output, count bus-level drops, real interpreter readiness — plus CI-only internal/hooks failure · Issue #2573 · developing-today/code · GitHub
Open Graph Title: mcpx hooks (#2541 follow-up): bound descendant processes on timeout, cap retained output, count bus-level drops, real interpreter readiness — plus CI-only internal/hooks failure · Issue #2573 · developing-today/code
X Title: mcpx hooks (#2541 follow-up): bound descendant processes on timeout, cap retained output, count bus-level drops, real interpreter readiness — plus CI-only internal/hooks failure · Issue #2573 · developing-today/code
Description: Follow-up to #1872 / PR #2541 (merged 2026-10-30, merge commit 1aef00e). The PR merged with 4 Codex review findings undispositioned (review 2026-10-30T03:27:58Z by chatgpt-codex-connector[bot]) and a red basic: test run. Filing per the C...
Open Graph Description: Follow-up to #1872 / PR #2541 (merged 2026-10-30, merge commit 1aef00e). The PR merged with 4 Codex review findings undispositioned (review 2026-10-30T03:27:58Z by chatgpt-codex-connector[bot]) and...
X Description: Follow-up to #1872 / PR #2541 (merged 2026-10-30, merge commit 1aef00e). The PR merged with 4 Codex review findings undispositioned (review 2026-10-30T03:27:58Z by chatgpt-codex-connector[bot]) and...
Opengraph URL: https://github.com/developing-today/code/issues/2573
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx hooks (#2541 follow-up): bound descendant processes on timeout, cap retained output, count bus-level drops, real interpreter readiness — plus CI-only internal/hooks failure","articleBody":"Follow-up to #1872 / PR #2541 (merged 2026-10-30, merge commit 1aef00ebaddd36e89508240a70bcd00dd4c6cfa7). The PR merged with 4 Codex review findings undispositioned (review 2026-10-30T03:27:58Z by chatgpt-codex-connector[bot]) and a red `basic: test` run. Filing per the Codex-findings gate so none of them evaporate.\n\n## Codex findings to fix (all in the merged hooks implementation)\n\n1. **P1 — `pkgs/mcpx/internal/hooks/runner.go:187` Bound descendant processes and output-pipe waits.** `CommandContext` kills only the direct child; descendants can hold stdout/stderr pipes open and keep `cmd.Run()` waiting for EOF indefinitely — so the hard timeout does not actually bound a hook that spawns children, contradicting #1872'\\''s acceptance \"a hanging hook cannot hang the daemon\" for that case. Fix direction: process-group kill and/or bounded pipe draining.\n2. **P2 — `runner.go:86` Account for event losses before per-hook fanout.** The shared bus subscription can overflow before events reach per-hook queues; `Subscription.Dropped` is never read, so `Stats.Dropped` under-reports and the gap contract (#6) is not honoured for bus-level drops.\n3. **P2 — `runner.go:185` Cap retained hook output.** Both output streams accumulate unbounded in daemon memory, including successful runs whose output is discarded (a `yes` hook can allocate heavily inside the 2s default timeout). Cap and truncate.\n4. **P2 — `pkgs/mcpx/internal/cli/hook.go:93` Check interpreter availability before marking a module ready.** A declared Python module with neither `python3` nor `uv` on PATH still reports ready in `mcpx hook ls` / doctor, then fails on every matching event. Readiness must check the interpreter, not just the file.\n\n## CI-only `internal/hooks` failure\n\nPR #2541'\\''s `basic: test` (run 40997046260, head eb4cabc6) failed `internal/hooks` in 0.159s (the `internal/defaults`/`internal/settings` failures in the same run are the pre-existing doc-drift reds tracked in #2552). Reproduction attempt 2026-10-30 (queue task 3097, Lane D): `go test ./internal/hooks/ -count=1` on the laptop at the exact merged commit eb4cabc6 passes 11/11 tests. The workflow log prints only package-level output (per-test JSON is filtered out), so the failing test is not identifiable from CI logs. Investigate: likely environment- or timing-sensitive (candidates: TestTimeoutCutsHangingHookAndPublishProceeds under runner load, or an executor-availability assumption). Consider surfacing per-test failures in the mcpx workflow log so this class is diagnosable.\n\n## Acceptance\n- All 4 findings fixed with tests (descendant-spawning hanging hook is cut at timeout; bus drops counted; output capped; hook ls/doctor report unready when the interpreter is missing).\n- `go test ./internal/hooks/...` green in CI on the fixing PR.\n- Findings dispositioned on PR #2541 threads pointing here.\n\n## Acceptance criteria\n\n- [ ] Timeout handling kills the hook's whole process group (or equivalently bounds pipe draining): a hook whose descendants hold stdout/stderr open cannot keep `cmd.Run()` waiting past the timeout\n- [ ] Bus-level subscription drops are accounted: `Subscription.Dropped` is read and reflected in `Stats.Dropped`\n- [ ] Retained hook output is capped per run with truncation, for both streams, including successful runs\n- [ ] `mcpx hook ls` / doctor readiness for a declared Python module checks interpreter availability (`python3` or `uv` on PATH), not just the file\n- [ ] The CI-only `internal/hooks` failure from PR #2541's run 40997046260 is identified (named test + mechanism) or per-test failure output is surfaced in the mcpx workflow so it becomes identifiable\n- [ ] Existing hooks tests pass; new regression tests pin the descendant-timeout and output-cap behaviour\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-30T05:22:31Z","url":"https://github.com/developing-today/code/issues/2573"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8c8c2f4e-1efc-c72d-8930-1de901cd037c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7D8:3422CF:8B744F:B410AA:6B062EE7 |
| html-safe-nonce | 459718078879cf18e55f592f1321380653177fff2342b039fa7be674e2634900 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0Q4OjM0MjJDRjo4Qjc0NEY6QjQxMEFBOjZCMDYyRUU3IiwidmlzaXRvcl9pZCI6IjQ1MzIwOTI3MjEzODA2MDE1NzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0c376853b02454d51f9b9d4f9b4becb83e7bd59463440d397d7696e8beef51c1 |
| hovercard-subject-tag | issue:6113727869 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/2573/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a71584590724d5ad9c30a560dba591bb2d7bdb49c165ade9ea21901259207065/developing-today/code/issues/2573 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a71584590724d5ad9c30a560dba591bb2d7bdb49c165ade9ea21901259207065/developing-today/code/issues/2573 |
| og:image:alt | Follow-up to #1872 / PR #2541 (merged 2026-10-30, merge commit 1aef00e). The PR merged with 4 Codex review findings undispositioned (review 2026-10-30T03:27:58Z by chatgpt-codex-connector[bot]) and... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width