GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pm-stack(drills): kill-collector chaos drill, first slice of #1283 by dezren39 · Pull Request #1823 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

First slice of #1283 (epic #1184), queue task 2667: the kill-collector chaos drill.

What

  • pm-stack/aggregator/scripts/kill-collector-drill.sh — stops the sandbox fleet-feed-collector (the fleet feed's sole writer, ~5 min cadence), polls the aggregator's /api/health until the feed age crosses FEED_STALE_MS (15 min — the impl(fleet): staleness watchdog - surface dead/stale stack inputs as NEEDS ORCHESTRATOR instead of silent decay #1148 watchdog threshold in src/health.ts / src/sources/live.ts), captures the health payload at the signal moment, then always restores: trap on EXIT/INT/TERM plus an explicit restore that restarts the timer and runs the collector immediately, with a post-drill health read confirming the feed is fresh again.
  • Interlocks: flock (no overlap, manual or scheduled), an incident-flag file that refuses the drill during a real incident, and a start precondition that the feed is currently fresh — an already-stale feed is a real incident, not a drill canvas. Health reads retry (the aggregator's first health assembly can be slow to prime; a drill never acts on one timed-out read — the first live attempt refused safely on exactly this before the retry was added).
  • Reporting: result JSON per run in ~/.local/state/pm-drills/; a passed drill comments its result on design(pm-stack): chaos/rotation drills — scheduled game-days (kill collector, age the feed, drop a service) verifying banners, watchdogs, and self-healing fire #1283; a drill whose signal does not fire files a finding issue under epic epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184 with the drill evidence.
  • pm-stack/aggregator/systemd/kill-collector-drill.{service,timer} — weekly (Sun 04:17 + randomized delay), in the same style as the collector's own units. Post-merge step: install the units on the sandbox and enable the timer once this script has landed in the feed clone the unit's ExecStart points at.

Live verification (2026-10-28, from this branch's script)

  • 20:55:14Z preconditions passed (feed age 53s); collector timer stopped.
  • 21:09:23Z signal fired: feed age 902,054 ms crossed the 900,000 ms threshold; health payload captured to ~/.local/state/pm-drills/kill-collector-health-at-signal.json.
  • 21:10:03Z restoration confirmed: timer restarted + immediate collection run; feed age back to 39s. Result passed posted on design(pm-stack): chaos/rotation drills — scheduled game-days (kill collector, age the feed, drop a service) verifying banners, watchdogs, and self-healing fire #1283 by the drill itself.

Refs #1283.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
pm-stack(drills): kill-collector chaos drill, first slice of #1283
b339aef
scripts/kill-collector-drill.sh stops the sandbox fleet-feed
collector, polls the aggregator /api/health until the feed age
crosses FEED_STALE_MS (15 min, the #1148 watchdog threshold), then
always restores (trap + explicit restore + immediate collection
run) and confirms the feed is fresh again. Interlocks: flock
against overlap, incident-flag refusal, and refusal to start on
an already-stale feed (a real incident is not a drill canvas).
A passed drill comments on #1283; a drill whose signal does not
fire files a finding issue under epic #1184 with its evidence.
systemd service/timer units ship in pm-stack/aggregator/systemd
in the collector units' style (weekly, flock prevents overlap).
@dezren39
dezren39 requested a review from a team as a code owner October 28, 2026 20:56
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2e4f1ba-f4cc-49e6-8e52-d1802880a83d
Commits

Reviewing files that changed from the base of the PR and between 528886e and f73e1eb.

Files selected for processing: 3
  • pm-stack/aggregator/scripts/kill-collector-drill.sh
  • pm-stack/aggregator/systemd/kill-collector-drill.service
  • pm-stack/aggregator/systemd/kill-collector-drill.timer
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T21:15:28.571405Z f73e1eb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 28, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b339aef3c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/scripts/kill-collector-drill.sh
sudo -n systemctl start "$COLLECTOR_TIMER" 2>/dev/null || log "WARN: could not start $COLLECTOR_TIMER"
sudo -n systemctl start "$COLLECTOR_SERVICE" 2>/dev/null || log "WARN: could not start $COLLECTOR_SERVICE"
}
trap restore EXIT INT TERM

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exit after restoring on termination signals

If SIGTERM or SIGINT arrives during the preconditions, the handler restores the collector and sets RESTORED=1, but then returns instead of terminating the script. Execution subsequently stops the timer and service, while both the explicit restore and EXIT handler skip restoration because that flag is already set. An isolated mock reproduction confirmed the sequence of starts followed by stops with no later restart, leaving the collector disabled. Use termination handlers that exit after cleanup rather than resuming the drill.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/scripts/kill-collector-drill.sh Outdated
Comment on lines +133 to +134
if [ "$AGE" -gt "$STALE_MS" ]; then
SIGNAL=1

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate the aggregator's stale signal before declaring success

When the feed timestamp becomes old but the aggregator incorrectly continues reporting healthy services and degraded=false, this condition still sets SIGNAL=1: it checks only the age calculated locally by feed_facts, not the aggregator's response to staleness. A mocked run with exactly that payload completed with outcome=passed. This means the drill passes for the silent-health regression it is intended to detect. Require the relevant feed-backed health states and degradation signal to reflect staleness in the captured response before declaring success.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/scripts/kill-collector-drill.sh
sudo -n systemctl start "$COLLECTOR_TIMER" 2>/dev/null || log "WARN: could not start $COLLECTOR_TIMER"
sudo -n systemctl start "$COLLECTOR_SERVICE" 2>/dev/null || log "WARN: could not start $COLLECTOR_SERVICE"
}
trap restore EXIT INT TERM

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Arm restoration only when the drill starts changing collector state

If the timer is inactive, the health endpoint is unreadable, or the feed is already stale, the precondition exits through die, but this already-installed EXIT trap starts both the timer and collector anyway. A mocked inactive-timer run confirmed both start commands despite reporting refusal. This violates the stated no-touch precondition behavior and can restart a deliberately stopped collector or alter a real incident before any drill action occurred. Gate cleanup on whether this run has begun stopping the collector, or arm it immediately before that operation after all preconditions pass.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
style(pm-stack): shfmt kill-collector drill script (#1283)
f73e1eb
@dezren39 dezren39 mentioned this pull request Oct 28, 2026
design(pm-stack): chaos/rotation drills — scheduled game-days (kill collector, age the feed, drop a service) verifying banners, watchdogs, and self-healing fire #1283
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 28, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f73e1eb951

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/scripts/kill-collector-drill.sh
Comment on lines +157 to +158
if [ "$AGE" -ge 0 ] && [ "$AGE" -le "$STALE_MS" ]; then
CONFIRMED=1

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Verify the collector timer before confirming restoration

If restarting the collector timer fails but the immediate service run succeeds, this freshness check declares restoration successful even though recurring collection remains stopped. An isolated mock reproduced the timer-start warning followed by outcome=passed and exit status 0. The one-off refresh only temporarily masks the outage because fleet-feed-collector.timer supplies the recurring collection cadence. Require successful timer restoration before setting CONFIRMED=1, and retry failed restoration; systemctl --help documents is-active as “Check whether units are active.”

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/scripts/kill-collector-drill.sh
Comment on lines +135 to +137
sleep 60
WAITED=$((WAITED + 60))
FACTS="$(health_json | feed_facts)"

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 28, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include health-request time in the drill's wait limit

If /api/health starts timing out after the collector is stopped, WAITED excludes the time spent fetching health. Each health_json call can consume 90 seconds across three 25-second transfers and retry sleeps (curl --help all describes --max-time as “Maximum time allowed for transfer”). Consequently, the default 25-minute limit permits roughly 62.5 minutes before restoration, exceeding the 45-minute TimeoutStartSec in systemd/kill-collector-drill.service and reaching service termination before the normal failure report. An accelerated mock confirmed that a one-minute limit waits 150 seconds before restoration. Use an elapsed-time deadline that includes requests and retries.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot assigned dezren39 Oct 28, 2026
@dezren39 dezren39 closed this Oct 30, 2026
@dezren39 dezren39 reopened this Oct 30, 2026
@dezren39
dezren39 added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 1720d64 Oct 30, 2026
5 of 6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/2667-1283-kill-collector-drill branch October 30, 2026 03:34
This was referenced Oct 30, 2026
kill-collector drill: restore trap fires on precondition refusals — a refused drill still starts the collector (PR #1823) #2865
Closed
feat(pm-stack): age-the-feed chaos drill, second slice of #1283 #4920
Merged
dezren39 added a commit that referenced this pull request Nov 7, 2026
@dezren39
Merge pull request #6889 from developing-today/rename/provider-unders…
4cd2927
…core-1823

Rename fleet-built providers to leading-underscore ids (#1823)
This was referenced Nov 7, 2026
aggregator(provider-display): underscore strip breaks one-shot iterables and collapses renamed+plain providers to one display name #6891
Closed
epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184
Open
@developing-today developing-today Bot mentioned this pull request Nov 8, 2026
queue: no reconciliation between open issues and queue coverage — non-creator filings never get queue items #7016
Closed
This was referenced Nov 8, 2026
quota gatherer: publish canonical config provider ids (_antigravity, _claude, _commandcode, _muse) #7324
Merged
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
dezren39 pushed a commit that referenced this pull request Nov 8, 2026
repo-worker-code-k
test(aggregator): pin retained quota row to the #1823 provider id (_m…
533837d
…use) after rebase
This was referenced Nov 8, 2026
test(aggregator): cover ok-but-null quota retention #6445
Merged
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
This was referenced Nov 10, 2026
feat(usage-hub): self-monitoring — feed staleness + fixture-fallback alarm #1116
Closed
_openai provider: self-contained main OpenAI door that does it all without Codex (Drew top priority) #8163
Closed
dezren39 pushed a commit that referenced this pull request Nov 10, 2026
Muse Sweep
fix(aggregator): OpenAI service ids follow the door rename — _openai.…
29f68de
…main / _openai.alt (code#8163)

Drew, 2026-11-10: 'update all old names to use equivalent new names.'
On top of PR #8329 (openaiPoolServiceId + the _openai quota id):

- quota-gather-map: OPENAI_MAIN_SERVICE_ID -> _openai.main,
  OPENAI_ALTERNATE_SERVICE_ID -> _openai.alt, OPENAI_SELF folds into
  _openai.main (the dedicated _openai door and the openai.main
  instance are the same drewrypope account). serviceIdFor('_openai')
  -> _openai.main. canonicalProviderId('codex') -> '_openai' (the
  #1823 module-spelling rule), so a gatherer still paired with a
  pre-#2261 fork binary files under the new ids; the branch-level
  dual-accept of the 'codex' spelling is retired.
- quota-extract: POOL_SPECS ids _openai.main / _openai.alt; POOL
  NAMING note records the rename (fresh snapshot series; pre-rename
  series stay in the store under the old ids, unrewritten).
- snapshot-records: the legacy codex_usage API snapshot files under
  _openai.main.
- collect-fleet-feed poolFor: codex-family rows -> _openai.main;
  _openai.alt -> _openai.alt.
- aa.ts: catalog keys _openai.alt / _openai.main (display notes only).
- Tests updated to the new ids, incl. a legacy-spelling filing test.

The one quota.test.ts failure ('every pool renders') fails identically
on the unmodified PR #8329 head — pre-existing, untouched here.
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
feat(pm-stack): drop-service chaos drill + drill schedule/interlock doc (#1283) #14237
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.