Skip to content

test(worktrees): accept additive gc result fields - #156127

Merged
RomneyDa merged 1 commit into
mainfrom
fix/scorecard-worktree-gc-contract
Sep 23, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/scorecard-worktree-gc-contract

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • keep the managed-worktree GC proof focused on the documented invariant fields
  • allow healthy additive result metadata without invalidating the product proof

Validation

  • OPENCLAW_E2E_USE_PREBUILT_DIST=1 pnpm test test/e2e/qa-lab/runtime/managed-worktrees-cli-product-proof.e2e.test.ts --maxWorkers=1
  • pnpm check:changed

Closes the managed-worktree GC failure cluster from maturity scorecard run 35794246666.

Test cost

  • Focused proof body: 10.192s; Vitest duration: 30.34s.
  • Cold focused-command wall: 495.14s, including a 7m35s runtime rebuild.
  • Exact-head hosted CI: 17m01s (run 35812668487).

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 23, 2026
@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 Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 11:58 PM ET / September 23, 2026, 03:58 UTC (Revision 2).

ClawSweeper review

What this changes

Updates the managed-worktree CLI lifecycle test to accept additional garbage-collection metadata while preserving its removal and counter assertions.

Merge readiness

✅ Ready for maintainer review

The patch is correct and still needed on current main. The earlier test-cost follow-up is resolved, and no actionable findings remain.

Priority: P3
Reviewed head: 24093a99d01ca2475323c4190475b19be3f6112b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, appropriate test repair with preserved behavioral coverage and the prior validation-documentation request satisfied.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR changes only a test matcher, so the external-contributor proof gate does not apply; the body reports focused CLI lifecycle validation and verified head CI, and no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR changes only a test matcher, so the external-contributor proof gate does not apply; the body reports focused CLI lifecycle validation and verified head CI, and no stored-data contract changes.
Evidence reviewed 6 items Introduced change preserves lifecycle checks: The pinned introduction changes only toEqual to toMatchObject. The expected empty removal array, numeric counters, registry retention checks, and filesystem existence check remain intact.
Current result contract includes additional fields: GC initializes outcome, issues, issueCount, protectedCount, and limitsSatisfied alongside the three previously asserted fields. Current main still uses the exact-object assertion, so the test repair remains necessary.
Failures remain observable: The CLI prints the full GC result and exits unsuccessfully for partial cleanup; the lifecycle test rejects unsuccessful commands before matching JSON. Dedicated CLI and service tests separately cover partial-result reporting.
Findings None None.
Security None None.

How this fits together

Managed worktrees provide isolated Git checkouts with snapshot, restore, and cleanup operations. The lifecycle test drives the CLI and verifies that garbage collection preserves manually owned checkouts.

flowchart LR
  A[Temporary Git repository] --> B[CLI lifecycle test]
  B --> C[Create and restore worktree]
  C --> D[Garbage collection]
  D --> E[JSON result assertions]
  D --> F[Manual checkout survives]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

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

Review metrics

None.

Technical review

Best possible solution:

Keep lifecycle assertions focused on observable retention behavior while allowing the GC owner to extend diagnostic metadata.

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

Yes, from source: current main compares the complete GC result against three fields despite the production result containing additional required metadata. Execution was not performed in this read-only review.

Is this the best way to solve the issue?

Yes. Partial object matching preserves every existing expected field and the subsequent checkout-retention checks without freezing diagnostic metadata.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 85b8d7747892.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a focused test-contract correction 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: The MEMBER-authored PR changes only a test matcher, so the external-contributor proof gate does not apply; the body reports focused CLI lifecycle validation and verified head CI, and no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 585312d adds src/agents/worktrees/gc-progress.ts:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 585312d8ba73; files: src/agents/worktrees/gc-progress.ts)
  • Peter Steinberger: 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 (1 earlier review cycle)
  • reviewed 2026-09-23T03:08:24.005Z sha 24093a9 :: needs changes before merge. :: none

@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa
RomneyDa enabled auto-merge (squash) September 23, 2026 06:52
@RomneyDa
RomneyDa merged commit 8e2764b into main Sep 23, 2026
157 checks passed
@RomneyDa
RomneyDa deleted the fix/scorecard-worktree-gc-contract branch September 23, 2026 06:53
vincentkoc added a commit to ycmjbot-bot/openclaw that referenced this pull request Sep 23, 2026
* commit '3ab93b4ea59804b34d02a696382db16dc95189bb': (80 commits)
  fix(gateway): keep session refreshes moving during unrelated writes (openclaw#156286)
  chore(deps): update fs-safe to 0.18.2 (openclaw#156262)
  refactor(plugins): extract ClawHub plugin archives once (openclaw#156246)
  improve(llm-core): avoid unnecessary tool validation sets (openclaw#152066)
  fix(backup): verification accepts archives missing captured databases (openclaw#156211)
  fix: cancel Guest work when its original access is revoked (openclaw#156106)
  fix(test): classify drained legacy migration refusals
  fix(anthropic): finish Opus 5.5 defaults and thinking display (openclaw#156093)
  refactor(agents): share native harness tool execution (openclaw#154217)
  fix(ui): carry typed ownership through short-route resolution
  test(worktrees): accept additive gc result fields (openclaw#156127)
  test(tasks): close sqlite borrowers before registry reload (openclaw#156131)
  chore(autoreview): sync Astra high defaults (openclaw#156175)
  refactor(node-host): await prepared workspace storage (openclaw#149519)
  improve: speed up cold Node test planning (openclaw#156234)
  fix(doctor): avoid slow legacy ownership repair in source checkouts (openclaw#156238)
  improve: speed up native build artifact validation (openclaw#156219)
  fix(ui): preserve short-route resolution ownership
  fix(doctor): name retained session metadata conflicts (openclaw#156162)
  perf(tasks): bound creation selection to matching runs (openclaw#156183)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 24, 2026
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
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