Title: kill-collector drill: restore trap fires on precondition refusals — a refused drill still starts the collector (PR #1823) · Issue #2865 · developing-today/code · GitHub
Open Graph Title: kill-collector drill: restore trap fires on precondition refusals — a refused drill still starts the collector (PR #1823) · Issue #2865 · developing-today/code
X Title: kill-collector drill: restore trap fires on precondition refusals — a refused drill still starts the collector (PR #1823) · Issue #2865 · developing-today/code
Description: Finding The kill-collector chaos drill installs its restore trap before its precondition checks, so a drill that refuses to start still "restores" — starting the collector timer and immediately running the collector service. That contrad...
Open Graph Description: Finding The kill-collector chaos drill installs its restore trap before its precondition checks, so a drill that refuses to start still "restores" — starting the collector timer and immediately run...
X Description: Finding The kill-collector chaos drill installs its restore trap before its precondition checks, so a drill that refuses to start still "restores" — starting the collector timer and immed...
Opengraph URL: https://github.com/developing-today/code/issues/2865
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"kill-collector drill: restore trap fires on precondition refusals — a refused drill still starts the collector (PR #1823)","articleBody":"## Finding\n\nThe kill-collector chaos drill installs its restore trap **before** its precondition checks, so a drill that *refuses to start* still \"restores\" — starting the collector timer and immediately running the collector service. That contradicts the drill's own interlock contract and can mask exactly the real incidents the preconditions exist to protect.\n\n## Evidence\n\n- Source PR: #1823 (merged, merge commit `1720d64b308905f70b445029b993488dc142fd40`) — https://github.com/developing-today/code/pull/1823\n- Verified still present on current main `074485713b11745c5164a131aac6e80305abd228`, `pm-stack/aggregator/scripts/kill-collector-drill.sh`:\n - Line 9 (header contract): \"Interlocks (any failure = refuse to start, **nothing is touched**)\"\n - Lines 108–114: `restore()` runs `systemctl start \"$COLLECTOR_TIMER\"` **and** `systemctl start \"$COLLECTOR_SERVICE\"` (an immediate collection run).\n - Line 115: `trap restore EXIT INT TERM` — installed here.\n - Lines 118–122: the preconditions run *after* the trap is installed, and each failure path calls `die`, which `exit 1`s — firing the EXIT trap and therefore `restore()`:\n - line 118: collector timer not active — the script itself says \"a stopped collector outside a drill is itself a finding\", yet the trap silently restarts it and starts a collection, erasing that finding;\n - line 121: aggregator health unreadable — the drill \"refuses to drill blind\" but still starts the collector service blind;\n - line 122: feed already stale — explicitly \"a real incident, not a drill\", yet the trap starts an immediate collection run that can freshen the feed and interfere with / mask that incident.\n\n## Why it matters\n\nThe drill runs on a weekly timer against the live PM stack. Its safety story is that interlock failures are pure refusals. As written, the three most safety-relevant refusals all mutate the system they refused to touch — worst case during a real stale-feed incident, where an unrequested collection run changes the evidence and the state an incident responder would see.\n\n## Acceptance criteria\n\n- [ ] `restore()` only runs once the drill has actually stopped the collector (e.g. trap installed after the kill step, or restore gated on a `KILLED`/`STOPPED` flag set only after both `systemctl stop` calls succeed).\n- [ ] Every precondition/interlock refusal (timer inactive, health unreadable, feed already stale, incident flag, lock held) exits without any `systemctl start` of the timer or service — verifiable by a stubbed-`systemctl`/`sudo` test harness or shell test that records invocations per refusal path.\n- [ ] A drill that does kill the collector still restores exactly as today (trap on EXIT/INT/TERM plus the explicit restore + confirmation), and the result JSON / reporting behaviour is unchanged.\n- [ ] Header comment updated if the resulting contract differs from \"any failure = refuse to start, nothing is touched\".\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-30T23:27:40Z","url":"https://github.com/developing-today/code/issues/2865"}
| 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:af6bcbd7-7063-ef72-f1e2-7a58ae124bff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A124:39ABD:8053DE:ABDA52:6B063434 |
| html-safe-nonce | 2fec13cc3d72c6c2812e4980d7ee5eeb7ecfc52dc4768b109441899c5cedb6bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTI0OjM5QUJEOjgwNTNERTpBQkRBNTI6NkIwNjM0MzQiLCJ2aXNpdG9yX2lkIjoiMTc3NDYxNDA3NTQyMzQ3MDY0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9b06dd03d56469f82d404d145b050295175daf0e0105ecac1a4b01e9de3bda88 |
| hovercard-subject-tag | issue:6128553257 |
| 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/2865/issue_layout |
| twitter:image | https://opengraph.githubassets.com/221d298283f6924c3caac94fece2a4b96c66c43f988e54548c5e02d8ee0bb076/developing-today/code/issues/2865 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/221d298283f6924c3caac94fece2a4b96c66c43f988e54548c5e02d8ee0bb076/developing-today/code/issues/2865 |
| og:image:alt | Finding The kill-collector chaos drill installs its restore trap before its precondition checks, so a drill that refuses to start still "restores" — starting the collector timer and immediately run... |
| 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 | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| 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 | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | canary-2 |
| 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