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(kaneo-sync-guard): reject unaccounted CLI arguments before running guard · Issue #10428 · developing-today/code

pm-stack(kaneo-sync-guard): reject unaccounted CLI arguments before running guard #10428

New issue
Copy link
New issue
Copy link
Closed
#10907
Closed
pm-stack(kaneo-sync-guard): reject unaccounted CLI arguments before running guard#10428
#10907
Copy link
Assignees
dezren39
Labels
status:done

Description

@dezren39
dezren39
opened on Nov 15, 2026
Issue body actions

Summary

pm-stack/kaneo-sync-guard.py is an operator script that runs docker exec/psql subprocesses and can heal Kaneo statusTransitions drift in Postgres, but it ignores any command-line arguments and proceeds with its normal work. This violates the operator script argument contract (unexpected/typo'd args must be rejected as a usage error before any subprocess, network, file write, lock, or deploy step).

Evidence

  • Script: pm-stack/kaneo-sync-guard.py
    • Declared usage takes no arguments: docstring shows python3 pm-stack/kaneo-sync-guard.py (pm-stack/kaneo-sync-guard.py:19).
    • main() does not inspect sys.argv and performs guard work immediately (pm-stack/kaneo-sync-guard.py:67-121), then if __name__ == "__main__": sys.exit(main()) (pm-stack/kaneo-sync-guard.py:124-125).
  • Current callers pass no arguments: pm-stack/deploy.sh:104, pm-stack/systemd/pm-kaneo-sync-guard.service:7 (ExecStart=/bin/sh -lc 'python3 /home/user/pm-stack/kaneo-sync-guard.py').
  • Repro on main (HEAD observed in this run: 637e29c982, 2026-11-15):
    • python3 pm-stack/kaneo-sync-guard.py unexpected-arg exits 0 after running the guard and printing conforming integration results.
    • python3 pm-stack/kaneo-sync-guard.py --help also exits 0 and runs the guard instead of showing usage/rejecting the argument.

In the observed repro there was no drift to heal, but the script still executed its psql reads/subprocesses before any argument validation could reject the invocation.

Why it matters

A typo, stray positional, or forgotten flag is silently treated as a normal run of a guard that can mutate integration config when drift is present. That defeats the strict argument contract for operator scripts and makes accidental misuse harder to detect.

Acceptance criteria / suggested fix

  • Parse/validate the full command line before any subprocess or DB access.
  • Reject any unaccounted argument (unknown flag, stray positional, typo) with a usage error naming the offending argument and a non-zero exit (exit code 2 is appropriate here, matching the script's existing usage/error convention).
  • Either declare and implement -h/--help explicitly or reject it the same way as any other unexpected argument (but do not run the guard first).
  • Add/update a focused test or script contract check covering unexpected-arg and --help behavior so a future regression fails closed.

References

  • Operator script argument contract: doc/agents/operator-script-argument-contract.md / root AGENTS.md ("Operator script argument contract (Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352)").
  • Related component: close-authority guard Kaneo sync guard: repo-declared statusTransitions, asserted at deploy + hourly #10137 / pm stack: close authority — automation must never close an issue #10136.

Activity

  1. developing-today commented on Nov 15, 2026

    @developing-today
    developing-todayBot
    on Nov 15, 2026 – with developing.today
    Contributor
    More actions

    CODE-3774

  2. github-actions
    assigned
    dezren39
    on Nov 15, 2026
  3. dezren39
    closed this as completedin #10907on Nov 17, 2026
  4. developing-today
    added
    status:done
    on Nov 17, 2026
  5. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    Agent note — state: already_done (verified) · task 19264, lane code-e

    Bulk-intake triage packet for #10428 claimed and revalidated fresh (2026-11-17T06:1xZ): the issue is CLOSED (completed, 2026-11-17T02:18:30Z) and the fix is on main — pm-stack/kaneo-sync-guard.py now rejects unexpected arguments before any work (sys.argv check with usage error at lines 147–150, verified on origin/main this shift; landed via PR #6335, merge 8b81e6f). Nothing remains to triage or route; this packet completes as already_done with that evidence.

  6. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    Agent note — duplicate packet cancelled · lane code-e

    Completing task 19264 (already_done) made the broker create follow-on task 20594 (dedupe repo-health:v1:fix:developing-today/code:issue:10428). The work is already fixed and merged (PR #6335) and this issue is closed, so task 20594 was cancelled by repo-worker-code (lane code-e) as a duplicate with the reason recorded on the task.

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

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

status:done

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.