Skip to content

pm-stack(aggregator): age-feed-drill.sh runs drill/posts on unaccounted CLI arguments #10473

Closed

Description

@dezren39

Evidence

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

Repro (from repo root):

bash pm-stack/aggregator/scripts/age-feed-drill.sh --bogus-arg-test

Observed: the script does not reject --bogus-arg-test. It runs the full drill flow and exits 0 (on this host it aged/restored the feed, confirmed restoration, wrote ~/.local/state/pm-drills/age-feed-result.json, and reported posted result comment on #1283 instead of a usage error).

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. This drill mutates the live feed/state and performs external reporting side effects; accepting stray arguments means a typo can execute a real drill and post to GitHub.

Acceptance criteria / suggested fix

  • pm-stack/aggregator/scripts/age-feed-drill.sh rejects any unaccounted argument before taking the lock or mutating feed/state or posting, 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 19289), 2026-11-17: already done. Current origin/main (aac680c, pm-stack argument-contract commit) makes age-feed-drill.sh reject any positional argument with a usage error before any work runs (lines 73-75). 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