Skip to content

Session Handoff [auto-1971]: Validate the Rulesets Response Before ruleset_id() Reads It (#1971) #1986

Description

@ptr727

Next steps

  1. Fix ruleset_id()'s per_page Guard Fails Open on a Non-Array gh api Response #1971 in repo-config/configure.sh ruleset_id(): validate that $out is a JSON array (jq_has 'type == "array"' <<<"$out", the pattern the entries count site already uses) before the per_page length guard and the ids= extraction read it, and abort with a "could not read live state"-style message and return 1 on failure. Done looks like: a non-array 2xx body makes ruleset_id return non-zero at both the apply and check call sites rather than reading as "not found", covered by a test that fails with the fix reverted.
  2. Drive the pull request to develop per drive-pr, its body carrying Closes on promotion: #1971, then close this lane out.

External blockers

None known.

Internal dependencies

None. #1880 (CR-safe jqr routing of the same guard) already merged to develop as #1972, so build on develop's current ruleset_id().

State

No branch, worktree, or pull request yet. Work on feature/auto-1971 in a worktree of its own, based on develop.

Parked decisions

None.

What the last round did

Nothing yet. This lane was opened by the unattended-handoff picker.

What not to repeat

Nothing yet.

New learnings

None yet.

Activity

  1. added
    handoffA link in the session handoff chain, one open issue per track
    on Sep 28, 2026
  2. ptr727 commented on Sep 28, 2026

    @ptr727
    OwnerAuthor

    Fixed and merged to develop as 8c802f3 (PR #1988, squash of 523f0b4).

    ruleset_id() now validates $out is a JSON array before its per_page guard and the ids= extraction read it, matching the entries guard's own pattern, and covered by new tests/test_configure_ruleset_id.py.

    A local-strict-review pass over the full diff found no blocking defects: one comment-wording inaccuracy (fixed in the same commit) and one pre-existing gap in the ids= extraction for a malformed array element, filed separately as #1987 (does not block this fix).

    #1971 stays open until this lands on main; closes on that promotion.

    Scope for this lane was develop, so no promotion was driven here.

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

    handoffA link in the session handoff chain, one open issue per track

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions