Skip to content

fix: avoid stalled maintainer author activity lookups - #130724

Merged
steipete merged 2 commits into
mainfrom
steipete/inspiring-tesla-d73b68
Aug 27, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/inspiring-tesla-d73b68

Conversation

@steipete

@steipete steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor
Additional instructions

MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.

What Problem This Solves

Resolves a problem where maintainer author-activity lookups could remain silent for several minutes for prolific GitHub accounts. The helper downloaded every matching issue/PR and commit for the requested window before showing even the person's profile, consuming quota merely to count records.

This is a maintainer-tooling fix, separate from any people-card or frontend work. Ownership was checked: OpenClaw owns this skill; it is not a generated copy from openclaw/agent-skills.

Why This Change Was Made

Print canonical profile identity before activity requests, and replace the two paginated scans with three single-page search aggregates using total_count and incomplete_results. The optional global lane remains one contribution-graph aggregate, giving a fixed maximum of five helper-level gh calls per resolved login regardless of activity volume.

Keep ordinary PATH gh dispatch and use its existing --cache 1h support. A bounded live probe confirmed that the fleet cache delegates author/date-filtered searches; native GitHub CLI caching covers both those REST reads and GraphQL without adding a custom cache. Local archive freshness did not establish complete annual coverage, so archive rows are not presented as complete totals. The shared plain-gh helper is unchanged because its mutation-oriented callers have a different responsibility.

User Impact

Maintainers see identity promptly and get fast, repeatable activity summaries. Missing profiles, failed or malformed responses, and incomplete searches are labeled rather than becoming misleading zero counts. Later logins still run, and unavailable/incomplete requested data produces a nonzero exit.

The helper prints separate repo/global intervals covering completed UTC days. Repo commits are default-branch search results filtered by committer date; longer requested repo windows retain an explicitly labeled 12-month cap for the global contribution API. Search indexing and the one-hour cache may lag, and contribution totals follow token visibility rather than claiming to be public-only or proving inactivity.

No frontend, runtime product, configuration, dependency, or storage-schema changes. AI-assisted implementation and review.

Evidence

  • Safe before/after reproduction used fake CLI responses, no live pagination: the original helper's stdout was empty when its first activity scan blocked. The regression fails before the fix and passes afterward.
  • Live --global steipete flow: profile at 0.841s, full result at 8.494s; cached repeat completed in 1.450s with profile at 0.396s. A proof wrapper enforced a five-call budget and refused pagination; both runs exited 0.
  • A bounded live REST search returned a total above 11,000 while fetching one item. Cached repeat probes preserved GitHub response request IDs, dates, and quota headers. No unbounded GitHub scans were run.
  • Live contribution API checks rejected a two-year interval and accepted the tested 366-day leap-year intervals.
  • node scripts/run-vitest.mjs test/scripts/github-activity-helper.test.ts test/scripts/plain-gh.test.ts test/scripts/gh-read.test.ts — 47/47 passed. The new CLI fixture was simplified to Bash/jq after a loaded-host Node-startup timeout; the existing 5000ms deadline and assertions were not relaxed.
  • bash -n .agents/skills/openclaw-pr-maintainer/scripts/github-activity.sh — passed.
  • shellcheck .agents/skills/openclaw-pr-maintainer/scripts/github-activity.sh — passed.
  • node_modules/.bin/oxfmt --check .agents/skills/openclaw-pr-maintainer/SKILL.md test/scripts/github-activity-helper.test.ts — passed.
  • Initial CI run 33042972095 found unchecked test-fixture array access in check-test-types. The fixture now asserts required entries before use; no production behavior, timeout, or behavioral assertion was changed. The root test typecheck (node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-root.tsbuildinfo) and the same 47-test group pass after repair.
  • git diff --check — passed. The .claude/skills symlink resolves to the same canonical .agents/skills files; no mirror sync is required.
  • Validation limit: the broad local changed-file checker classified this hidden skill script as all lanes and was deliberately stopped during an unrelated whole-repository database-first guard (exit 143). That run is not claimed as passing; focused proof above covers the changed helper and sibling dispatcher boundaries.

Production tooling: +98/-133 (net -35). Tests/test support: +280/-62 (net +218). Skill guidance: +7/-7.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Aug 27, 2026
@steipete
steipete marked this pull request as ready for review August 27, 2026 05:35
@steipete
steipete force-pushed the steipete/inspiring-tesla-d73b68 branch from 0389750 to 775b047 Compare August 27, 2026 05:49
@steipete

steipete commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Preparation complete for 775b0478d575800246acca96f5a7d5e3e7c73100; this PR is not merged. CI run 33043732256 completed successfully, including the required openclaw/ci-gate. Native review artifacts validated, and OPENCLAW_TESTBOX=1 scripts/pr prepare-run 130724 passed without changing the head.

The initial CI attempt found unchecked array access in the test fixture. Required entries are now asserted before use; the production helper, deadlines, and behavioral assertions are unchanged. After repair, node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.root.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/test-root.tsbuildinfo passed, and node scripts/run-vitest.mjs test/scripts/github-activity-helper.test.ts test/scripts/plain-gh.test.ts test/scripts/gh-read.test.ts passed 47/47. Fresh autoreview of the repair was clean at its P0 threshold. A native-wrapper trust-guard rebase preserved the task patch byte-for-byte.

The PR body retains the bounded live timings, offline pre-fix reproduction, and deliberately stopped broad-local-check limitation. No raw activity data or transcripts were uploaded. Final maintainer review has approved this exact head. The completed ClawSweeper review reports no actionable patch or security findings. Its remaining verification items are satisfied by the completed exact-head CI run above and the maintainer-verified bounded GitHub API/live helper proof recorded in the PR body; the reviewer’s DNS limitation does not replace that evidence. The automated “persistent cache schema” marker does not correspond to an OpenClaw schema change: this helper uses the existing GitHub CLI --cache option and introduces no OpenClaw store, schema, or migration.

@clawsweeper

clawsweeper Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 1:57 AM ET / 05:57 UTC.

ClawSweeper review

What this changes

The PR replaces paginated GitHub activity scans with bounded search and contribution aggregates, then updates the maintainer guidance and regression fixtures.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. This is an active maintainer-authored fix to current-main helper behavior, with no superseding main-branch implementation or discrete patch defect found.

Priority: P2
Reviewed head: 775b0478d575800246acca96f5a7d5e3e7c73100

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused source, fixture, and reported live-run evidence support a sound bounded-helper repair, subject to pending exact-head CI and the stated API-verification limitation.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This is a maintainer-authored internal tooling PR, so the external-contributor proof gate does not apply; the PR body nevertheless records a bounded live helper run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored internal tooling PR, so the external-contributor proof gate does not apply; the PR body nevertheless records a bounded live helper run.
Evidence reviewed 6 items Current-main stall path: Current main performs paginated issue and commit scans before printing the resolved profile, so a stalled scan delays all visible identity output.
Bounded replacement: The branch prints the validated profile before three one-item search aggregates and an optional GraphQL aggregate; incomplete or malformed responses are not rendered as zero.
Focused regression coverage: The revised fixture asserts profile output precedes blocked activity work, verifies three non-paginated aggregate queries, and covers failures, incomplete results, date bounds, and later-login continuation.
Findings None None.
Security None None.

Live Verification

Command: bash .agents/skills/openclaw-pr-maintainer/scripts/github-activity.sh --help

Result: PASS (completed)

Usage: .agents/skills/openclaw-pr-maintainer/scripts/github-activity.sh [--repo owner/repo] [--months N] [--global] ‹github-login› [login...]

Assertions:

  • PASS expect_output: Usage:

How this fits together

The maintainer-review skill uses a shell helper to resolve an opener’s GitHub profile and summarize repository and GitHub activity. The helper’s output feeds review and triage context for maintainers.

flowchart LR
  A[Review or triage workflow] --> B[Activity helper]
  B --> C[Profile lookup]
  B --> D[Repository search totals]
  B --> E[Contribution aggregate]
  C --> F[Activity summary]
  D --> F
  E --> F
Loading

Before merge

  • Resolve merge risk (P1) - Independent live verification of the GitHub search and contribution API responses was unavailable because this review environment could not resolve github.com; the PR body supplies a bounded live-run claim, and exact-head CI remains pending.
  • Complete next step (P2) - This protected, maintainer-authored PR is active and has no concrete automated repair finding; it should continue through normal exact-head CI and maintainer review.
Agent review details

Security

None.

PR surface

Tests +218, Docs 0, Other -35. Total +183 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 280 62 +218
Docs 1 7 7 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 98 133 -35
Total 3 385 202 +183

Review metrics

Metric Value Why it matters
Production versus test LOC production tooling +98/-133 (net -35); tests +280/-62 (net +218); skill guidance +7/-7 The fix reduces production helper code while adding focused boundary coverage for the new query and failure behavior.

Stored data model

Persistent data-model change detected: persistent cache schema: .agents/skills/openclaw-pr-maintainer/scripts/github-activity.sh. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one owner-bound helper that emits identity first and uses validated bounded aggregates, while preserving its explicit incomplete-data and interval disclosures.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one owner-bound helper that emits identity first and uses validated bounded aggregates, while preserving its explicit incomplete-data and interval disclosures.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: current main runs the paginated activity calls before profile output, and the branch adds a fixture that blocks activity after confirming the profile is already emitted.

Is this the best way to solve the issue?

Yes. Moving the profile emission ahead of activity and replacing row scans with response aggregates fixes the owning helper; retaining pagination with a timeout would not bound request volume or guarantee prompt identity output.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 42ce03e72e34.

Labels

Label changes:

  • add P2: This repairs bounded maintainer-review tooling behavior with limited blast radius and no demonstrated end-user runtime impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: This repairs bounded maintainer-review tooling behavior with limited blast radius and no demonstrated end-user runtime impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.

Evidence

What I checked:

Likely related people:

  • steipete: Current-main history attributes the helper and its test to this area, and the proposed branch continues that work. (role: current helper owner and recent area contributor; confidence: high; commits: 30e7ecb45435, 27b96ae04976, b489a62a06dd; files: .agents/skills/openclaw-pr-maintainer/scripts/github-activity.sh, test/scripts/github-activity-helper.test.ts, .agents/skills/openclaw-pr-maintainer/SKILL.md)
  • Vincent Koc: This PR removes the helper’s use of the shared plain-GitHub-CLI wrapper, which this contributor recently changed. (role: adjacent GitHub command-wrapper contributor; confidence: medium; commits: f13a10c798d7; files: scripts/lib/plain-gh.sh)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 3aef4d5 into main Aug 27, 2026
170 checks passed
@steipete
steipete deleted the steipete/inspiring-tesla-d73b68 branch August 27, 2026 06:17
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
* fix: avoid stalled maintainer author activity lookups

* test: validate required author activity fixture entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant