Skip to content

test(scripts): answer the repository identity lookup in PR wrapper fixtures - #149288

Closed
steipete wants to merge 2 commits into
mainfrom
upd/redmain37-pr-fixture-repo-metadata
Closed

steipete wants to merge 2 commits into
mainfrom
upd/redmain37-pr-fixture-repo-metadata

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #149294, merged as 7dc8a1e79659afb833df4bbfe363744c8d775e5c while this PR was waiting for CI. Fetched main contains all four repository identity fixture repairs; this PR is closed without merging.

What Problem This Solves

Fixes red main #37: PR wrapper tests fail during the repository identity lookup introduced by #149230, before reaching their merge and recovery assertions. This is an explicitly requested maintainer repair.

Refs #149230.

User Impact

No user-visible behavior change. Restores tooling coverage for hosted merge admission, cross-checkout recovery, live admin authorization, and native cleanup without changing production merge behavior.

Why This Change Was Made

Add exact repository metadata responses to the four fake GitHub implementations. REST node/database IDs agree with GraphQL responses and the numeric identity retained by the cross-checkout receipt. The shared fixture also repairs main-refresh coverage. Unknown endpoints remain rejected, and the existing merge, authorization, and no-redispatch assertions remain intact; call-count expectations account for the new metadata request.

Evidence

Before the fixture repair:

node scripts/run-vitest.mjs test/scripts/pr-merge-hosted.test.ts test/scripts/pr-cross-checkout.test.ts test/scripts/pr-crabbox-merge-bypass.test.ts
Test Files  3 failed (3)
Tests       23 failed | 42 passed (65)
Error: Unexpected GitHub API endpoint repos/fixture/repo
Unexpected GitHub operation: api --hostname github.com repos/fixture/repo -H Cache-Control: max-age=0
unexpected endpoint: repos/openclaw/openclaw

After the repair, the same three suites plus test/scripts/pr-merge-outcome.test.ts and test/scripts/pr-main-refresh.test.ts passed: 5 files, 424 tests.

The first PR CI run exposed the same outdated repository contract in the operation-lock cleanup fixture (job 104483793080). A focused local reproduction confirmed it:

node scripts/run-vitest.mjs test/scripts/pr-operation-lock.test.ts -t 'finishes native cleanup'
Tests  4 failed | 1 passed | 136 skipped (141)
Merge outcome: invalid repository locator

Updated that fixture's locator field list and exact REST response, keeping its lifecycle assertions unchanged. node scripts/run-vitest.mjs test/scripts/pr-operation-lock.test.ts then passed the full suite: 140 passed, 1 platform skip. Total local coverage: 564 passing tests across six suites.

node scripts/check-changed.mjs -- test/scripts/pr-main-refresh.test-support.ts test/scripts/pr-cross-checkout.test.ts test/scripts/pr-crabbox-merge-bypass.test.ts test/scripts/pr-operation-lock.test.ts passed, including root-test typechecking, scoped lint, formatting, guards, and dead-export scans. git diff --check passed. Independent local and final committed-head reviews were scoped-clean at P1. Final-head CI had no failed or cancelled jobs at the last direct read, including a successful formerly failing cleanup shard. The watcher then stopped with CONFLICTING-MID-WAIT after #149294 landed the same repairs; this PR does not claim a green final CI run or a merge.

An additional node scripts/run-oxlint.mjs <the three files> invocation without a scoped tsconfig hit the known nested-checkout declaration-boundary error resolving an ancestor installation. The required check-changed scoped lint and direct node_modules/.bin/oxfmt --check <the three files> both passed. No dependencies or generated files were changed to work around it.

Original failing jobs on PR #149055:

Production changes: none. Test support: +26/-7 lines. No contributor code was adopted.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 15, 2026 17:07
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 1:52 PM ET / 17:52 UTC (Revision 3).

ClawSweeper review

What this changes

Updates fake GitHub responses so PR workflow tests pass repository identity checks and reach their merge, recovery, authorization, and cleanup assertions.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair absent from fetched main. No actionable correctness or security findings remain, and the overlapping open PR does not establish a merged replacement.

Priority: P2
Reviewed head: 96e52e4a9a8769cee7d0c3c2272865a4ac63dd90

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture repair that matches the production contract and preserves meaningful coverage.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer fixture repair changes no production behavior or authority boundary; reported wrapper-suite results provide relevant validation without requiring live GitHub merge proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer fixture repair changes no production behavior or authority boundary; reported wrapper-suite results provide relevant validation without requiring live GitHub merge proof.
Evidence reviewed 6 items Production contract: Initialization requests REST repository metadata and binds its node/database identity pair; subsequent GraphQL observations accept the matching id or databaseId. The fixture changes supply those fields without changing the production owner.
Behavioral assertions preserved: Cross-checkout coverage retains numeric historical receipts, foreign-ref preservation, retained captures, and no-redispatch checks. Crabbox tests retain revoked-admin rejection before merge; cleanup cases retain exact lifecycle and lock-release assertions.
Necessity and release check: The fetched-main comparison retains all four fixture repairs, while the production identity owner is identical to the reviewed head. The inspected v2026.9.4 cross-checkout fixture also lacks the new response. No merged fixing replacement was established.
Findings None None.
Security None None.

How this fits together

OpenClaw's maintainer tooling checks GitHub repository identity before merging or recovering recorded merge outcomes. These fixtures supply synthetic GitHub responses while exercising the workflow's ownership and cleanup checks.

flowchart LR
 A[Test scenarios] --> B[Fake GitHub client]
 B --> C[REST and GraphQL metadata]
 C --> D[Repository identity checks]
 D --> E[Merge and recovery workflow]
 E --> F[Ownership and cleanup assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +19. Total +19 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 26 7 +19
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 26 7 +19

Review metrics

None.

Technical review

Best possible solution:

Keep the authoritative identity checks and align the existing fixtures with their REST and GraphQL contract while preserving downstream assertions.

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

Yes, from source: initialization requests a repository endpoint rejected by the original fake clients, preventing their intended assertions. The PR records matching failures; this review did not execute tests.

Is this the best way to solve the issue?

Yes. Updating existing fixture responses and accounting for the additional read is the narrow repair; production validation and meaningful rejection assertions remain intact.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 05c501ab7ebe.

Labels

Label justifications:

  • P2: Repairs a concrete maintainer-workflow fixture mismatch without changing production behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer fixture repair changes no production behavior or authority boundary; reported wrapper-suite results provide relevant validation without requiring live GitHub merge proof.

Evidence

What I checked:

  • Production contract: Initialization requests REST repository metadata and binds its node/database identity pair; subsequent GraphQL observations accept the matching id or databaseId. The fixture changes supply those fields without changing the production owner. (scripts/pr-lib/merge-outcome.sh:21, 96e52e4a9a87)
  • Behavioral assertions preserved: Cross-checkout coverage retains numeric historical receipts, foreign-ref preservation, retained captures, and no-redispatch checks. Crabbox tests retain revoked-admin rejection before merge; cleanup cases retain exact lifecycle and lock-release assertions. (test/scripts/pr-cross-checkout.test.ts:171, 96e52e4a9a87)
  • Necessity and release check: The fetched-main comparison retains all four fixture repairs, while the production identity owner is identical to the reviewed head. The inspected v2026.9.4 cross-checkout fixture also lacks the new response. No merged fixing replacement was established. (test/scripts/pr-cross-checkout.test.ts:73, 05c501ab7ebe)
  • Related merged contract and routing history: Git history and supplied GitHub metadata identify fix(scripts): preserve merge receipts across repository ID formats #149230 as the merged repository-identity contract change. Recent cleanup work also supplies an adjacent routing candidate. Missing historical blobs prevented complete blame/follow inspection, so no exact source-line introduction attribution is asserted. (scripts/pr-lib/merge-outcome.sh:21, 7e8a52c3f76e)
  • Overlapping repair remains open: fix: PR workflow tests fail during repository identity checks #149294 addresses the same fixture mismatch and remains open and unmerged. Its human discussion emphasizes operation-lock coverage; the reviewed head now includes that coverage too. Neither protected PR should be automatically closed. (348bf025a823)
  • Validation and review continuity: The complete supplied body reports 564 passing tests across six suites, scoped checks, and before-fix failures at repository identity resolution. Previous completed reviews contain no findings or published rank-up moves. This review independently passed diff whitespace inspection; tests were not executed under the read-only contract. (96e52e4a9a87)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-15T17:14:45.394Z sha e1c8eea :: needs maintainer review before merge. :: none
  • reviewed 2026-09-15T17:45:52.380Z sha 96e52e4 :: needs maintainer review before merge. :: none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant