Skip to content

pm-stack(aggregator): kill-collector-drill.sh runs drill on unaccounted CLI arguments #10475

Closed

Description

@dezren39

Evidence

At HEAD 7d3dcebe1e (2026-11-15), pm-stack/aggregator/scripts/kill-collector-drill.sh is an operator chaos-drill script (kills the fleet-feed collector and verifies honesty signals) but it never parses or rejects its command line.

  • File: pm-stack/aggregator/scripts/kill-collector-drill.sh (225 lines). It acquires interlocks, checks incident/preconditions, and can stop timers/services and run/report the drill.
  • No --help/usage handling and no rejection of unknown or extra arguments.

Repro (from repo root):

bash pm-stack/aggregator/scripts/kill-collector-drill.sh --bogus-arg-test

Observed: the script does not reject --bogus-arg-test. It proceeds past argument handling into drill logic (interlock/precondition checks and drill flow) and exits 0 with a domain result rather than a usage error (on this host it reached a domain refusal: [drill] ... REFUSED/FAILED: fleet-feed-collector.timer is not active... after running its checks, instead of failing fast on the unknown argument).

Why it matters

Per AGENTS.md / doc/agents/operator-script-argument-contract.md (#3352), operator scripts must parse strictly and treat unaccounted arguments as a usage error with a non-zero exit before any subprocess, network, file write, lock, or deploy step. Drill scripts stop/restart services and can file/report findings; accepting stray arguments risks running a disruptive drill on a typo.

Acceptance criteria / suggested fix

  • pm-stack/aggregator/scripts/kill-collector-drill.sh rejects any unaccounted argument before taking the lock or touching timers/services/state, printing usage to stderr and exiting non-zero.
  • --help/-h prints usage and exits 0 with no side effects.
  • Existing no-argument behavior remains unchanged.
  • Add/extend a regression check consistent with neighboring pm-stack scripts.

Activity

  1. developing-today commented on Nov 15, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — triaged by openchamber-scheduled-lane (repo-worker-code, task 19291), 2026-11-17: already done. origin/main kill-collector-drill.sh (commit aac680c) rejects positional arguments with a usage error before work (line 48). Issue is already CLOSED; no code change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions