Skip to content

fix(pm-stack): bound invariant-sweeper subprocess calls #11416

Closed

Description

@dezren39

Finding

pm-stack/invariant-sweeper.py:186-199 runs gh api through gh_graphql and gh_run with no subprocess timeout; line 364 does the same for docker exec ... psql in kaneo_links(). These helpers are called from the live main() path and the pm-invariant-sweeper.timer runs the script daily with --act --post-epic (pm-stack/systemd/pm-invariant-sweeper.service and .timer). Because this is a Type=oneshot unit with no TimeoutStartSec, systemd disables its default start timeout; a stuck GitHub CLI or Docker/psql process can wedge the run indefinitely.

Suggested fix

Give the subprocess helpers explicit timeouts, convert TimeoutExpired to a clear report/failure, and consider a systemd TimeoutStartSec as a final outer bound. Test each helper with a timed-out fake process.

Not enqueued in this pass: the dispatch explicitly prohibits creating/dispatching further tasks for findings.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 17, 2026
  2. developing-today commented on Nov 17, 2026

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

    @dezren39
    MemberAuthor

    Queue disposition: deliberately not enqueued because this dispatched suggestions pass explicitly prohibits creating or dispatching further tasks. The finding and proposed direction are captured above.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)status:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions