AI-window failsafe arming check self-matches: pgrep -f 'sleep 4200' reports armed when nothing is armed
#89
Closed
opened 2026-08-30 02:47:09 -04:00 by logan
·
1 comment
No Branch/Tag Specified
Labels
Clear labels
area/ai-pipeline
area/auth
area/billing
area/correlation
area/discord
area/frontend
area/governance
area/growth
area/infra-deploy
area/legal
area/map
area/mqtt
area/node-ota
area/osint
area/recording-audio
area/sdr-radio
area/transcription
board
board:agenda
minutes:draft
minutes:final
role:ceo
role:cfo
role:cio
role:ciso
role:cmo
role:coo
role:cto
Scene/entity extraction, summarizer, AI providers, embeddings
AuthN/Z, roles, tenancy/org scoping, API keys, credentials
Plans, entitlements, AI spend accounting and caps
Incident correlation, linking, lifecycle, severity, corr_debug
Discord bot, radio bots, voice streams, bot tokens, webhooks
Web UI: Next.js app and the edge-node local dashboard
Board process, minutes, unattended runner, agent tooling
Go-to-market, outreach, cold email, discovery conversations
CI/CD, VM, registry, Firestore rules/indexes deploy, Terraform/Caddy
ToS, retention, licences/DAAs, CAN-SPAM, E&O, name suppression
Live map: pins, paths, tiles, legend, geocoding
Node-C2 MQTT, checkins, commands, node sweeper, dynsec
Node install, enrollment, OTA updater, image skew
External feeds: cameras, 511, ADS-B, AIS, outages, and their licences
Call capture, boundaries, PulseAudio, ring buffer, trimming, attribution
OP25 decode, SDR hardware/tuning, conventional, second SDR, mesh radio
STT, transcript correction, place verification, name accuracy
Board process: minutes and board-filed items
Needs board scoping at the next sitting; CEO removes the label once scoped
One exec pre-read, closed by CEO
CEO ruling; open until enacted
Filed by the CEO
Filed by the CFO
Filed by the CIO
Filed by the CISO
Filed by the CMO
Filed by the COO
Filed by the CTO
kind
behavior-bug
Wrong product behavior; the instrument reads it correctly
kind
measurement-bug
Corrupts the recording/instrument (debug data, evals, health checks), not behavior
priority
p0
Drop everything: prod broken, live exposure, or owner-ruled P0
priority
p1
Next up: blocks a gate, a customer, or core incident quality
priority
p2
Normal: real defect or planned work, schedule in turn
priority
p3
Low: minor, cosmetic, or someday
status
blocked
Waiting on an external party, spend, or another issue
status
in-progress
Branch or PR open against it
status
needs-decision
Waiting on an owner or board ruling before work
status
needs-info
Root cause or repro unknown; needs a reading first
type
bug
Something built is wrong: code, data, or a measurement
type
chore
Maintenance, refactor, tests, pinning, cleanup: no user-visible change
type
decision
A ruling to make or record: board minutes, owner calls, legal reviews
type
docs
Docs, runbooks, CLAUDE.md, skills, SOPs
type
feature
New capability or an extension of an existing one
type
security
Security, privacy, credential or tenant-isolation exposure
type
tracking
Tracker, checklist, initiative or punch-list spanning several changes
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: logan/server-26#89
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found and reproduced during the unattended run of 2026-08-30. Searched open and closed for a duplicate: none. This is a live money defect in the operating procedure, not in shipped code.
The defect
.claude/scheduled/drb-worksession.mdSTEP 5a arms a server-side shutoff so an AI evaluation window closes even if the agent crashes, then confirms it with:Run over SSH, the literal string
sleep 4200is part of the remote shell's own command line.pgrep -fmatches against the full command line, so it matches itself and prints a PID whether or not the failsafe was ever armed.Reproduction, 2026-08-30
ssh drb 'pgrep -f "sleep 4200"'→ returned PID2867433.ssh drb 'ps -o pid,etime,cmd -p 2867433'→ no such process. It was the pgrep's own SSH shell.ssh drb 'pgrep -af "sleep 42[0]0" || echo NONE_ARMED'→NONE_ARMED.The process table was empty of failsafes the whole time. The check said otherwise.
Why this one matters
STEP 5a's own rule is "If arming fails, DO NOT open the window." That rule is the only thing standing between a crashed run and an AI window that bills every minute until a human notices. The check meant to enforce it cannot fail, so the rule has never actually been tested — every run so far has believed it was protected.
The same self-match is in the STEP 5d teardown,
pkill -f 'sleep 4200'. Therepkillwould try to kill the SSH shell issuing it, so the teardown can report having done something while a real failsafe survives and fires against a later window, closing it early and wasting the spend that window was opened to justify.Fixed in the runbook this run
Both call sites now use a self-excluding bracket pattern, plus an explicit liveness re-check and a
NONE_ARMEDsentinel:NONE_ARMED, or a PID not still alive on a second check, now counts as arming failed.Second, smaller drift fixed in the same pass
The runbook told each run to write the shutoff to
drb:/opt/drb/ai_off.py. The working tooling has actually lived at/opt/drb/aiwin/since 2026-08-26 —ai_on.py,ai_off.py,ai_state.py,ai_common.py,corr_dump.pyand.shwrappers. Following the runbook literally meant re-creating a file next to a working copy at a different path, with the wrapper still pointing at the old one. The runbook now names/opt/drb/aiwin/and says to reuse what is there.State confirmed while checking, both good
stt_enabled: false,correlation_enabled: false. No window was left open. Last window ran 2026-08-26.Why this is filed rather than just fixed
The runbook is a local file at the
Version 5Croot, which is not a git repository, so the fix has no commit and no history. This issue is the durable record. Related: #57 (standing correlation-quality evaluation procedure) owns the window procedure and should absorb this if it is ever rewritten.Refs #57, #62.
Closing - fixed and verified, unattended run 2026-08-31.
Both halves of this now use a pattern that cannot match itself:
.claude/scheduled/drb-worksession.md(sections 5a and 5d) usespgrep -af 'sleep 42[0]0', and carries an explicit warning explaining why the naive pattern self-matches over SSH and why a false positive here is the dangerous direction - it would open an AI window with no backstop at all.drb:/opt/drb/aiwin/(ai_common.py,ai_off.py,ai_on.py,ai_state.py,corr_dump.py) contains no occurrence ofpgrep -f 'sleep 4200'anywhere.No broken occurrence of the self-matching check remains in either the runbook or the server tooling.