You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Session Handoff [auto-1971]: Validate the Rulesets Response Before ruleset_id() Reads It (#1971) #1986
Fix ruleset_id()'s per_page Guard Fails Open on a Non-Array gh api Response #1971 in repo-config/configure.shruleset_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.
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.
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.
Next steps
repo-config/configure.shruleset_id(): validate that$outis a JSON array (jq_has 'type == "array"' <<<"$out", the pattern theentriescount site already uses) before the per_page length guard and theids=extraction read it, and abort with a "could not read live state"-style message andreturn 1on failure. Done looks like: a non-array 2xx body makesruleset_idreturn 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.drive-pr, its body carryingCloses on promotion: #1971, then close this lane out.External blockers
None known.
Internal dependencies
None. #1880 (CR-safe
jqrrouting of the same guard) already merged to develop as #1972, so build on develop's currentruleset_id().State
No branch, worktree, or pull request yet. Work on
feature/auto-1971in 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.