openclaw/scripts/pr-lib
Peter Steinberger 4cb202363d
fix(pr): recover partially written review transitions (#144431)
* fix(pr): recover partially written review transitions

Classify index and working-tree entries independently against the journaled
source and target before replaying an interrupted native restore. Preserve
foreign bytes, ignored overlaps, and hidden index metadata, including
intent-to-add and resolve-undo state. Rebuild the validated source index so
completed index deletions can still remove their remaining source files.

Preserve the reserved .local artifact namespace and existing journal endpoints.
Unknown zero-byte files remain refused rather than inferred as owned writes.

Validation: 66 native owner cases, complete changed checks, and independent
review. Regression cases demonstrate worktree-first and index-first recovery,
plus fail-before/pass-after coverage for intent-to-add and resolve-undo guards.

Related: #143802

* fix(pr): register the journal validator executable entry

* test(pr): preserve Git reader coverage for journal recovery

Exercise the active Node-helper Git reader in the failure fixture and keep operation artifacts in the reserved .local namespace. Record reader starts and delayed exits after stdout closure so successful validation still proves every producer joined before lock release.

Validation: focused reader cases changed from two failures to five passes; full operation-lock suite passed 114 tests with one Linux-only zombie case skipped on macOS. Complete changed checks and focused independent review passed. Production runtime bytes are unchanged.

* fix(pr): preserve leading BOM characters in Git path records

Treat Git output as pathname records rather than a BOM-framed text document. Preserve an initial U+FEFF while keeping fatal UTF-8 decoding, so an untracked lookalike cannot be misclassified as a target path before native replay.

The native regression previously changed HEAD before final refusal; it now preserves the source state. All 67 owner tests, complete changed checks, and focused independent review pass.
2026-09-10 15:48:05 -07:00
..
changelog.sh fix(maintainers): avoid redundant main fetches during PR prep (#132274) 2026-08-28 19:38:04 -07:00
ci-dispatch.mjs
clawsweeper-review-gate.mjs fix(maintainers): require completed ClawSweeper review (#134926) 2026-09-01 16:03:31 +08:00
common.sh fix(release): preserve newer draft notes during closeout (#138162) 2026-09-04 03:45:13 -07:00
crabbox-gate-contract.mjs
crabbox-gate-plan.mts
crabbox-merge-bypass.mjs
crabbox-merge-bypass.sh fix(scripts): preserve protected GitHub CLI routing (#133624) 2026-08-30 17:59:40 -07:00
gates.sh fix(pr): reject unexpected branch changes during publication (#141188) 2026-09-07 21:05:22 +08:00
gh-api-preflight.mjs fix(pr): restore retry guidance for GraphQL quota error variants (#135873) 2026-09-01 21:43:03 -07:00
merge-body.mjs fix(tooling): drop machine squash credit and carry human co-author trailers (#142167) 2026-09-08 06:10:55 -07:00
merge-outcome.sh fix: finish administrative completion after merge recovery (#140992) 2026-09-07 10:42:56 -07:00
merge.sh fix: finish administrative completion after merge recovery (#140992) 2026-09-07 10:42:56 -07:00
operation-lock.sh
prepare-core.sh fix(pr): reject unexpected branch changes during publication (#141188) 2026-09-07 21:05:22 +08:00
process-group-runner.mjs fix(pr): recover merges invoked from another checkout (#134778) 2026-08-31 21:51:03 -07:00
push.sh fix(pr): reject unexpected branch changes during publication (#141188) 2026-09-07 21:05:22 +08:00
review-artifacts.mjs
review-transition-state.mjs fix(pr): recover partially written review transitions (#144431) 2026-09-10 15:48:05 -07:00
review.sh fix(pr): recover merges invoked from another checkout (#134778) 2026-08-31 21:51:03 -07:00
worktree.sh fix(pr): recover partially written review transitions (#144431) 2026-09-10 15:48:05 -07:00
wrapper-components.txt fix(testing): run package contracts without unrelated runtime builds (#142159) 2026-09-08 07:01:55 -07:00