Skip to content

chore(release): preserve efficiency change history - #104181

Merged
vincentkoc merged 28 commits into
mainfrom
fix/preserve-release-efficiency-history
Jul 11, 2026
Merged

vincentkoc merged 28 commits into
mainfrom
fix/preserve-release-efficiency-history

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 11, 2026 •

Copy link
Copy Markdown
Member

Related: #104162

What Problem This Solves

The landing for #104162 was explicitly required to preserve its 26-commit
series, but a linked-worktree invocation silently re-executed stale wrapper code
from the canonical checkout and used the default squash path. The release
tooling is on main, but the reviewed commit ancestry is not.

Why This Change Was Made

The first commit records the original PR head as a second parent of current
main without rewriting history or changing the tree. The second makes
scripts/pr fail closed when linked and canonical wrapper files are dirty or
come from different committed revisions.

User Impact

No runtime or release behavior changes. Maintainers regain the requested
per-commit history, and future PR operations cannot silently substitute stale
canonical wrapper behavior.

Evidence

  • Merge commit ebaa1123e9bb567f5365355ec3cea62e4d73e071 has parents
    c47ceb0f3dcc7b98e888da605509dcc601a96b16 and
    16ba8b52847a9f980c61578097b3d9fce4fd1323.
  • git diff HEAD^1 HEAD is empty.
  • The original 26 commits are reachable from the new head.
  • test/scripts/pr-wrappers.test.ts: 7 tests passed, including dirty linked,
    dirty canonical, and committed revision mismatch cases.
  • bash -n scripts/pr, oxfmt --check, and git diff --check passed.
  • Fresh structured autoreview found no actionable issues.

@vincentkoc vincentkoc self-assigned this Jul 11, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 11, 2026 04:50
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Jul 11, 2026
@clawsweeper clawsweeper Bot added 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 Jul 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S and removed size: XS labels Jul 11, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 11, 2026
@clawsweeper

clawsweeper Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 1:29 AM ET / 05:29 UTC.

Summary
The PR restores the original release-efficiency commit ancestry through a tree-identical merge commit and makes scripts/pr reject dirty or revision-mismatched canonical wrapper delegation.

PR surface: Tests +54, Other +27. Total +81 across 2 files.

Reproducibility: yes. Current main visibly delegates from a linked worktree to canonical wrapper code without revision checks, and the related landing provides a concrete occurrence of stale behavior selecting the wrong merge method.

Review metrics: 1 noteworthy metric.

  • Wrapper integrity coverage: 3 mismatch states covered. The regression test exercises dirty linked, dirty canonical, and committed revision mismatch paths that could otherwise select unreviewed landing behavior.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] A squash or rebase landing would discard the ancestry-preservation merge and leave the original reviewed commit series unreachable from main, defeating the central purpose of this PR.
  • [P1] The new guard intentionally makes linked-worktree PR operations fail closed whenever canonical and linked wrapper files are dirty or differ; maintainers must accept that operator-visible interruption and its checkout-alignment recovery path.

Maintainer options:

  1. Land through the merge-preserving path (recommended)
    Wait for exact-head checks, then use a true merge commit and verify the original release PR head remains reachable from main.
  2. Pause if only squash or rebase is available
    Keep the PR open rather than landing in a way that silently discards the history it exists to preserve.

Next step before merge

  • After exact-head CI completes, a maintainer should land this PR through a true merge commit and verify the restored ancestry; squash and rebase are unsuitable.

Maintainer decision needed

  • Question: Should this PR be landed with a true merge commit, preserving the restored ancestry and accepting fail-closed linked-worktree behavior when wrapper implementations do not match?
  • Rationale: The repository's default squash path would erase the ancestry repair, while the intentional fail-closed operator behavior is a maintainer tooling contract that CI alone cannot approve.
  • Likely owner: vincentkoc — They own the related release-tooling series, authored this repair, and are assigned to the PR.
  • Options:
    • Merge with ancestry preserved (recommended): Use a true merge commit for the exact reviewed head and verify that 16ba8b52847a9f980c61578097b3d9fce4fd1323 remains an ancestor after landing.
    • Pause the ancestry repair: Do not land until the repository can guarantee a non-squash merge and maintainers accept the linked-worktree fail-closed recovery workflow.

Security
Cleared: The patch adds no dependency, secret, permission, download, or package-resolution surface and narrows execution to matching committed wrapper code.

Review details

Best possible solution:

Land the exact reviewed head with a true merge commit after CI completes, preserving the ancestry merge while retaining canonical delegation only when all sourced wrapper components match committed content.

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

Yes. Current main visibly delegates from a linked worktree to canonical wrapper code without revision checks, and the related landing provides a concrete occurrence of stale behavior selecting the wrong merge method.

Is this the best way to solve the issue?

Yes. A tree-identical ancestry merge repairs reachability without rewriting content, while checking dirty state and committed wrapper object IDs is the narrowest reliable guard before canonical re-execution.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 58b0ec9e50fd.

Label changes

Label changes:

  • add P2: This is a bounded maintainer-tooling correctness fix that prevents an incorrect PR landing method without affecting end-user runtime.
  • add merge-risk: 🚨 automation: The patch intentionally changes scripts/pr automation from silent canonical substitution to fail-closed behavior when wrapper state differs.
  • add merge-risk: 🚨 other: Landing this PR with the default squash or a rebase would remove the ancestry restoration that is the PR's primary outcome.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded maintainer-tooling correctness fix that prevents an incorrect PR landing method without affecting end-user runtime.
  • merge-risk: 🚨 automation: The patch intentionally changes scripts/pr automation from silent canonical substitution to fail-closed behavior when wrapper state differs.
  • merge-risk: 🚨 other: Landing this PR with the default squash or a rebase would remove the ancestry restoration that is the PR's primary outcome.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR nevertheless provides direct Git ancestry output and focused real-worktree test results.
Evidence reviewed

PR surface:

Tests +54, Other +27. Total +81 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 55 1 +54
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 27 0 +27
Total 2 82 1 +81

What I checked:

  • Current-main behavior: Current main still unconditionally re-executes canonical scripts/pr from a linked worktree, allowing a stale canonical implementation to replace the reviewed worktree implementation. (scripts/pr:19, 58b0ec9e50fd)
  • Ancestry restoration: The preservation commit has the previously landed squash commit and original reviewed PR head as parents, has no first-parent tree change, and makes the original head reachable from this PR head. (ebaa1123e9bb)
  • Focused regression coverage: The added test creates a real linked Git worktree and covers dirty linked files, dirty canonical files, and a committed wrapper-revision mismatch. (test/scripts/pr-wrappers.test.ts:69, 358d4cd4cc11)
  • Feature provenance: Commit 42eaee8b7e6c1704afad4f7751d233b2faccf2cd introduced canonical linked-worktree delegation to prevent stale scripts during PR review; this patch preserves that ownership model while preventing silent revision substitution. (scripts/pr:12, 42eaee8b7e6c)
  • Exact-head CI state: Security, lint, build, QA smoke, dependency, and most compact check lanes passed on the reviewed head; several broad compact lanes remained in progress during this read-only review. (358d4cd4cc11)

Likely related people:

  • vincentkoc: Authored the merged exact-SHA release series, the ancestry-preservation merge, and the current wrapper hardening. (role: recent release-tooling contributor; confidence: high; commits: 16ba8b52847a, ebaa1123e9bb, 358d4cd4cc11; files: scripts/pr, test/scripts/pr-wrappers.test.ts)
  • gumadeiras: Introduced canonical linked-worktree delegation and later split the PR workflow into its current module structure. (role: wrapper feature introducer and refactor contributor; confidence: high; commits: 42eaee8b7e6c, 31a4b45db09f; files: scripts/pr)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@vincentkoc
vincentkoc merged commit daf3b86 into main Jul 11, 2026
128 of 133 checks passed
@vincentkoc
vincentkoc deleted the fix/preserve-release-efficiency-history branch July 11, 2026 05:35
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via merge commit.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 11, 2026
…-efficiency-history

chore(release): preserve efficiency change history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: S 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