Repository navigation
pm-stack: enforce the argument contract in eleven more operator scripts - #10907
Conversation
The Kaneo, Grist and Pad deploy.sh scripts now accept at most one of deploy, render or restart; the Grist and Pad seed.sh scripts, the projector setup-deps.sh, the aggregator push-fleet-feed and both drills, kaneo-sync-guard.py and opencode-claimant/poll.py take no arguments. Each refuses anything else with a usage error and exit 2 before any work (#3352). Also repairs tests/test_kaneo_sync_guard.py, which errored 4 of 5 cases on main: its fake psql predated the #10140 compaction rewrite and listed configs in spaced JSON, which the guard now treats as drift. Fixes #10472 Fixes #10442 Fixes #10440 Fixes #10428 Fixes #10484 Fixes #10485 Fixes #10474 Fixes #10475 Fixes #10441 Fixes #10473 Fixes #10434 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Before: eleven more pm-stack operator scripts silently ignored arguments they don't take.
deploy.sh deploy extra(Kaneo, Grist, Pad) went ahead and redeployed,seed.sh --dry-runseeded for real, the drills andpush-fleet-feed.shran on any argv, andkaneo-sync-guard.pyandopencode-claimant/poll.pyignored theirs. Separately,pm-stack/tests/test_kaneo_sync_guard.pyerrored in 4 of its 5 cases on main.After: each script checks its whole command line first and refuses anything unaccounted for with a usage line naming it and exit 2, before any work:
deploy.sh,grist/deploy.sh,pad/deploy.sh: at most one ofdeploy(default),render,restart. An explicit empty argument is refused too.grist/seed.sh,pad/seed.sh,projector/scripts/setup-deps.sh,aggregator/scripts/push-fleet-feed.sh,kill-collector-drill.sh,age-feed-drill.sh: no arguments (the drills' knobs stayPM_DRILL_*environment variables).kaneo-sync-guard.py,opencode-claimant/poll.py: no arguments. The check sits in the__main__block, so tests that callmain()directly are unaffected.The Kaneo guard tests pass again (5/5).
How: a guard right after
set -euo pipefailin each shell script, per the operator script argument contract (#3352). The test fix teaches the fake psql the #10140 compaction rewrite and makes it list configs in Kaneo's compact JSON form, which a conforming row has.ruff formatwas applied to the two Python scripts and the test (kaneo-sync-guard.py had a little pre-existing format drift, now gone).Testing:
bash -nandpy_compileon all files; every script rejects a stray argument with exit 2;scripts/seed-smoke.test.sh,scripts/tailnet-bindings.test.sh,scripts/deploy-install-smoke.test.sh,push-fleet-feed.guard.sh, the two drill test files (18 pass),tests/test_kaneo_sync_guard.py(5 pass) andopencode-claimant/test_poll.py(92 pass).Fixes #10472
Fixes #10442
Fixes #10440
Fixes #10428
Fixes #10484
Fixes #10485
Fixes #10474
Fixes #10475
Fixes #10441
Fixes #10473
Fixes #10434
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.