Skip to content

ci(scripts): test_program_tending.py is run by no workflow — the #1352 scaffold contracts are verified nowhere #5935

Closed

Description

@dezren39

Finding

scripts/tests/test_program_tending.py — the 8 contract tests for the program-tending scaffold (#1352, slice 1/3) — is run by no workflow in the repo, so the contracts it pins are verified nowhere:

  • .github/workflows/scripts-test.yml enumerates exactly two files: test_update_nixpkgs_inputs.py and test_worker_preflight.py (lines 31–33).
  • .github/workflows/research-workflow.yml runs test_*workflow*.py and test_plan_check.py (lines 35–37) — neither pattern matches test_program_tending.py.
  • .github/workflows/program-tending.yml (the daily schedule for the script itself) runs python3 -I scripts/program_tending.py --run (line 47) and never its tests.
  • A repo-wide search for test_program_tending / program_tending across .github/workflows/, flake.nix, and the justfile finds only the workflow's own run of the script — no test step anywhere (verified on laptop primary @ 9ddf6a8216, 2026-11-05).

This is the same gap shape as #5582 (id-native-shell in no check), in a different area: even a manual dispatch of every workflow (the house pattern since push/PR triggers were removed in 5a94833ea3) never executes these tests.

What the tests pin (and would silently lose)

Verified by running the suite on the laptop @ 9ddf6a8216: 8 tests, all pass, ~55 s.

  • the run log always covers all five sections in order (epics, roadmaps, projects, stalled-prs, loose-ends);
  • the scaffold is read-only: actions_taken == 0, every section no-action;
  • the hard-stop labels (held, user/owned, do-not-merge, do-not-auto-edit) are named in every log;
  • a per-repo fetch failure is reported in-section and never fails the run;
  • CLI contract: --run prints a valid log and exits 0; no --run exits 2;
  • the isolated-subprocess run (python3 -I) works from a clean interpreter.

The daily workflow would still succeed if most of these regressed — it only checks that one --run invocation exits 0 — so a rename of a section, a dropped hard-stop name, or a read-only violation would ship unnoticed until a human read a run log.

Secondary observation (same fix pass)

Four of the eight tests call pt.run(...) / the CLI without mocking _gh_api, so stub_stalled_prs makes a live unauthenticated api.github.com request per invocation (plus one more in the isolated subprocess). That is why the suite takes ~55 s locally and why wiring it into CI as-is imports a network dependency (unauthenticated rate limits, 30 s urlopen timeout) into the test run. The assertions do not depend on the fetch succeeding — the stub's error path returns the same section shape — so mocking _gh_api in those four tests (the pattern test_scaffold_is_read_only and test_fetch_failure_reports_never_fails already use) makes the suite hermetic and fast.

Acceptance criteria

  • Some workflow step runs python3 -m unittest discover -s scripts/tests -p 'test_program_tending.py' (e.g. a step in scripts-test.yml, matching its existing enumeration pattern), on the Python versions that workflow already matrices.
  • The four unmocked tests mock _gh_api (or an equivalent seam) so the suite passes with networking disabled and completes in seconds, not ~55 s.
  • The full suite still passes locally after the change: 8 tests OK.
  • No change to scripts/program_tending.py behavior or to the program-tending.yml schedule.

Evidence

Activity

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    area/ciCI/CD pipelines, workflows, and build automation (area)
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed (enqueue duplicate flag)

  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  7. 54 remaining items

  8. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · handed off

  9. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 8, 2026
  10. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · done

  11. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · correction

    • Agent: queue worker (repo-worker-code), lane code-y
    • Correction to note 6719593192: the merge commit for PR test: run program-tending contract suite #6252 was recorded with a corrupted full hash (62e722d5a1f511…) taken from a mixed exec stream. The verified merge commit is 62e722d — confirmed by two fresh independent reads (gh PR view and git log origin/main). Everything else in the done note (merge, issue closure, tests, workflow lines) stands as recorded.
  12. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    Addendum to the correction note above (agent repo-worker-code-y, task 12857): the done note it corrects is comment 6719623286 on this issue — the comment ID cited in the correction (6719593192) itself came from the same mixed exec stream. The merge-commit correction stands: 62e722d.

  13. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  14. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/ciCI/CD pipelines, workflows, and build automation (area)kind/ciCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions