Skip to content

test: reuse publish workflow repository fixtures - #133438

Merged
steipete merged 1 commit into
mainfrom
codex/test-perf-publish-fixtures
Aug 30, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-perf-publish-fixtures

Conversation

@steipete

@steipete steipete commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Performance-workflow fixtures already reuse a copied base repository, but publish-mode cases still rebuild their reports repository for every case. That repeats repository initialization, remote setup, fetch, checkout, configuration and commit work before exercising the real workflow.

Why This Change Was Made

Keep two immutable fixture snapshots, one for base cases and one for publish cases, using the existing temporary-directory tracker and copy mechanism. Construct the reports repository before capturing the publish snapshot, then copy complete repositories into each case's workspace. Per-case inputs and race mutations happen only after copying. Specialized baseline and duplicate variants retain fresh construction.

Use a relative local fetch source during setup so FETCH_HEAD's source description remains valid in the copied workspace. Its object ID and the configured public origin URL retain their meanings. Both destination SHA reads, transport routing, inspection closures and all production workflow commands remain per-case.

User Impact

Test execution only. Seven setup Git launches are removed per warm publish fixture, from nine to two. No product code, dependencies, sharding, concurrency, selection, assertions, command deadlines, real process lifecycle or persistence coverage change. Production/tooling: +0/-0. Test support: +19/-14, net five lines.

Evidence

  • Eight balanced publish-setup pairs on macOS Node 26.5: median 363.265 ms before / 103.734 ms after. Eight balanced pairs on the same Linux Node 24.19 worker: 19.077 ms before / 5.837 ms after. These measure fixture setup, not whole-CI duration.
  • Both complete consumer suites passed on Linux: 144 tests, including races, cancellation, failure cleanup, duplicate reconciliation and publish semantics. All 14 changed-file checks passed.
  • Cold and warm base/publish probes compare Git trees, indexes, configuration, ref names and history subjects. Files have independent inodes, with no object alternates or retained original workspace paths. Mutating report files, hooks, configuration, refs, seed and bare remote cannot affect either snapshot or a peer fixture.
  • FETCH_HEAD retains the report-parent object ID and intentionally changes only its source spelling to a portable relative path. Absent, invalid, trailing-newline, duplicate and race variants retain their behavior. The unsupported publish-plus-duplicate combination remains rejected by Git identically in baseline and candidate.
  • Both cached directories and map entries are removed by suite cleanup. Probe children were joined, temporary roots removed, tracked source hashes verified unchanged, and the Linux worker stopped successfully.
  • Independent full-priority source review and Codex review found no actionable findings. Exact-head hosted CI33327453673 completed successfully for c4fc55f. The latest ClawSweeper review was read in full, including its Rank-up moves: exact-head CI and checking the latest review are both complete; no unresolved code finding or additional move remains.

Remaining Coverage

All workflow command traces, destination-specific paths, real repositories, persistence, race creation, cancellation and cleanup assertions remain. The cache stores only completed setup state before scenario mutation. No live process, mutable Git state or transport closure is shared between cases.

@steipete steipete self-assigned this Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 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: XS maintainer Maintainer-authored PR labels Aug 30, 2026
@steipete
steipete marked this pull request as ready for review August 30, 2026 18:13
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 2:27 PM ET / 18:27 UTC.

ClawSweeper review

What this changes

The branch caches separate copied Git-repository fixtures for base and publish performance-workflow test cases so publish setup is not rebuilt for each case.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: this maintainer-owned test-only PR has a coherent, isolated fixture optimization and no source-supported correctness finding. Exact-head CI remains in progress, and the latest filtered ClawSweeper comment should be checked for any rank-up move before landing.

Priority: P3
Reviewed head: c4fc55fd8a4b27baef678faab340409f8f939942

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test-support refactor with preserved consumer coverage and no actionable source finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, test-only PR changes fixture construction; existing workflow-suite coverage is the relevant validation surface, while no external contributor real-behavior proof is required.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, test-only PR changes fixture construction; existing workflow-suite coverage is the relevant validation surface, while no external contributor real-behavior proof is required.
Evidence reviewed 5 items Introduced fixture isolation: The introduced map selects a distinct base or publish snapshot; publish initialization and its report commit occur before that snapshot is copied, while race mutation remains after the copy.
Consumer workflow coverage: The lifecycle suite invokes every mode, including publish after the base modes, and asserts publish output, pushes, and no initial fetch; its race case also verifies both report paths survive concurrent publication.
Fixture cleanup owner: The shared temporary-directory tracker retains created snapshot directories and removes every tracked directory during cleanup; the PR clears the associated in-memory map in the same afterAll handler.
Findings None None.
Security None None.

How this fits together

The performance workflow tests construct temporary OpenClaw and reports Git repositories, then execute real workflow shell steps against isolated copies. This change only alters the reusable test-fixture setup that supplies those scenarios.

flowchart LR
  A[Test case options] --> B[Fixture builder]
  B --> C{Base or publish mode}
  C --> D[Cached repository snapshot]
  D --> E[Per-case copied workspace]
  E --> F[Performance workflow commands]
  F --> G[Assertions and cleanup]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head CI is still in progress.
  • Resolve merge risk (P1) - The latest ClawSweeper comment was omitted from the supplied discussion context and could not be retrieved because GitHub network access was unavailable; check it for rank-up moves before landing.
  • Complete next step (P2) - Normal maintainer PR handling remains: await exact-head CI and review the most recent ClawSweeper comment; no concrete repair lane is needed.
Agent review details

Security

None.

PR surface

Tests +5. Total +5 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 19 14 +5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 19 14 +5

Review metrics

Metric Value Why it matters
Production versus test-support delta production +0/-0; test support +19/-14 (net +5) The performance improvement is confined to test-fixture construction and does not alter shipped runtime behavior.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land only after exact-head CI is green and the final review comment confirms no unresolved rank-up move; retain the separate immutable base and publish snapshots.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land only after exact-head CI is green and the final review comment confirms no unresolved rank-up move; retain the separate immutable base and publish snapshots.

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

Not applicable: this PR changes test-fixture construction rather than reporting a user-facing defect.

Is this the best way to solve the issue?

Yes: separating immutable base and publish snapshots preserves the existing per-case copy boundary while avoiding repeated publish-repository setup.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 32edafc91e2e.

Labels

Label changes:

  • add P3: This is a bounded test-only performance cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, test-only PR changes fixture construction; existing workflow-suite coverage is the relevant validation surface, while no external contributor real-behavior proof is required.

Label justifications:

  • P3: This is a bounded test-only performance cleanup with no production behavior change.
  • 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-authored, test-only PR changes fixture construction; existing workflow-suite coverage is the relevant validation surface, while no external contributor real-behavior proof is required.

Evidence

What I checked:

  • Introduced fixture isolation: The introduced map selects a distinct base or publish snapshot; publish initialization and its report commit occur before that snapshot is copied, while race mutation remains after the copy. (test/scripts/openclaw-performance-workflow.test-support.ts:67, c4fc55fd8a4b)
  • Consumer workflow coverage: The lifecycle suite invokes every mode, including publish after the base modes, and asserts publish output, pushes, and no initial fetch; its race case also verifies both report paths survive concurrent publication. (test/scripts/openclaw-performance-git-lifecycle.test.ts:35, c4fc55fd8a4b)
  • Fixture cleanup owner: The shared temporary-directory tracker retains created snapshot directories and removes every tracked directory during cleanup; the PR clears the associated in-memory map in the same afterAll handler. (test/helpers/temp-dir.ts:72, c4fc55fd8a4b)
  • Area history: History shows the preceding merged fixture-reuse change and the earlier performance-workflow Git-lifecycle work were authored by the same current-area contributor; the introduced commit has the stated main parent. (db963ca2e82d)
  • Scope and production delta: The verified introduced diff touches only test support: 19 lines added and 14 removed, with no production or dependency files changed. (test/scripts/openclaw-performance-workflow.test-support.ts:15, c4fc55fd8a4b)

Likely related people:

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

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Finish exact-head CI and confirm the latest ClawSweeper comment has no unresolved rank-up move.

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 9050011 into main Aug 30, 2026
204 checks passed
@steipete
steipete deleted the codex/test-perf-publish-fixtures branch August 30, 2026 18:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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