OpenClaw / ClawSweeper
Merged upstreamCorrectnessMerged Aug 26, 2026

Keep projected GitHub reads out of the ETag cache

Prevented exact-publication apply runs from replaying an ETag-cached GitHub response produced by a different jq or template projection.

openclaw/clawsweeper · #1242

Pull-request safety fix

Projected GitHub responses can no longer contaminate close-eligibility reads and hide active reviewer or team requests.

Problem

The durable ETag cache key did not include GitHub CLI output projections. A projected response cached by one call site could be reused by the pull-request close guard, omitting requested reviewers or teams and making a review-blocked PR appear eligible for automatic closure.

Approach

Bypassed the durable ETag broker whenever `gh api` uses jq or template output flags, including split, attached, compact, and clustered short-option forms, while preserving caching for full-resource GET requests.

Impact and scope

  • Protects active reviewer and team requests from being hidden by a differently shaped cached response.
  • Keeps automated close decisions fail-safe without changing the established full-resource cache contract.
  • Covers every supported GitHub CLI projection-flag form rather than only the originally observed syntax.

Validation

  • Added six focused ETag broker regression tests and exercised five projection forms against the production GitHub runtime path.
  • Verified direct read-only GitHub execution while the broker endpoint was intentionally unavailable.
  • The authored commit and upstream merge commit are GitHub-verified, and GH-1239 closed as completed.