Skip to content

fix(pr): keep the reviewed workflow stable between maintainer commands - #167350

Merged
vincentkoc merged 4 commits into
mainfrom
fix/pr-workflow-admission-binding
Oct 19, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
fix/pr-workflow-admission-binding

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes maintainer commands silently selecting a different workflow revision when main advances between review, preparation, and landing.

User Impact

No product-runtime change. An ongoing PR operation keeps its admitted workflow and dependency contract until native completion. The corrected implementation also preserves supported cold startup when no local main tracking ref exists.

Why This Change Was Made

The trusted entrypoint retains the workflow it actually admitted in a repository- and PR-bound Git ref. Later commands validate and reuse that immutable source; verified native completion retires the exact binding. Admission is prospective, with no caller-selected revision override.

Cold startup uses the existing locked canonical-fetch owner to establish trust before binding. It compares immutable executing and selected source closures, preserves failed qualification evidence, and leaves shared main tracking refs untouched. Separate descriptor ownership preserves supervised cleanup. Repository identity now distinguishes SSH users, endpoints, ports, path case, and relative paths.

The correction preserves the original PR ancestry and fixes both reviewed regressions: cold provisioning and sibling lock-fixture admission. The canonical tooling guide documents continuity and recovery. The extra production code implements source qualification and lifecycle ownership; it does not add a second provisioning or cleanup owner.

Evidence

  • On Linux Testbox, two cold-start and seven repository-identity cases failed against the original wrapper at the intended assertions. All nine pass with the repair.
  • Six focused suites: 356 passed, zero failed, two skips because the installed mv lacks the declared exchange capability. The wrapper import-inventory case and three shell syntax checks passed.
  • Root typechecking, script lint, changed-test lint, dependency checks and the remaining scoped checks passed. Formatting initially identified one test file; its three formatting-only hunks were corrected remotely, followed by passing all-path formatting/parity and whitespace checks.
  • The full changed-check aggregate remains failed: core test-root budgets (725/723 versus 720) and two unused exports in extensions/diffs/src/config.ts reproduce with the tracked source exactly restored to frozen main 59c74d52601820df7f751b89391acc34e187cd87. Those unrelated budgets/exports are unchanged. No skip, weakened check, or merge exception is requested.
  • Independent source, test and correction reviews resolve both original ClawSweeper findings. The additional autoreview repository-identity finding is fixed and regression-proven.
  • Proof used verified source tree 73033bf6edcdd1734e30bcc0ced91afa827d3db6; final tree acdc61e3988ba39f3693d1e111a7a5fee8473cac differs only by the verified formatting-only test blob. The original failed-verifier and changed-check receipts are retained rather than rewritten. All proof children joined; native lease cleanup completed.

These fixtures exercise the actual native wrapper with controlled Git/GitHub boundaries, not a production main-movement experiment. Exact published-head CI and native completed-hosted landing gates remain required; this PR is not yet merge-qualified.

Current CI Disposition

Previous published head 11c2bd103216d2b566f18c2934841d51b6469747 passed the hosted build and all 112 main-refresh plus 23 workflow-binding cases, with zero skips in those two suites. The earlier runner-assignment wait ended normally; it is no longer the blocker.

CI39321423337 completed with failures in check-test-types-core-4 and check-lint-core-1. Both concern the missing createDeferredCore import in src/gateway/local-http-probe.test.ts, introduced on main by #177670. The tested merge and its main parent share offending blob cb50eabba3e6638baad1a3860e8f602449757f75; this PR and its frozen baseline retain the import and do not change that path. The other lint diagnostics are nonfatal file-length warnings.

The maintainer restored exactly that import in b6bd9e8b. Its commit message reports focused probe/type/lint/format proof; those reported checks are not independently captured evidence here.

Native publication now selects signed fcfecdf6e1e3f2c1d12314acb9987aca4d95bc9c, an ancestry-preserving integration of main 08e32fdb4df002c9d4eea158b855d6521dd1e916. Its tree is 0f9d99c2039deba94fcdee67edbff02da5a6bbcf; all eleven PR files are byte-identical to the preceding reviewed head, and the baseline-relative patch remains exactly eleven paths. The relevant wrapper, helper, library, focused-test, dependency and CI workflow inputs are unchanged between the previous CI's main parent and this integration baseline. Independent inspection confirmed the integration and retained proof binding; no completed application proof was replayed.

Fresh exact-head CI39328494720 actually executed and passed all112 main-refresh and23 workflow-binding cases, zero skips, including the two cold-start and seven repository-identity regressions. Both job logs bind their checkout to this published head merged into08e32fdb. The hosted build also passed at this exact head. The aggregate remains pending on boundary/lint/type and ratchet work, not qualified green. This PR remains unmerged until required current-head CI and completed-hosted native landing gates pass. The original failed run remains failed; no CI rerun, inherited-failure exception, direct-main write or weakened gate was used.

@vincentkoc vincentkoc self-assigned this Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 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.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: L labels Oct 8, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 8, 2026 17:18
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed October 8, 2026, 1:32 PM ET / 17:32 UTC (Revision 2).

ClawSweeper review

What this changes

The branch retains a PR’s admitted maintainer workflow revision across commands and retires its binding after verified completion.

Example: A maintainer repeats scripts/pr review-guard 123 after origin/main advances.

  • Before: The next command can select a newer workflow revision.
  • After: The next command reuses the previously admitted revision.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The direction is useful and the boundary fixtures are meaningful, but introduced provisioning and coverage regressions prevent merge readiness.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; supplied evidence exercises the workflow owner with synthetic repositories and transports. Source confirms prospective admission in a separate private Git-ref format without rewriting existing artifacts, and no unresolved authority-chain violation was established.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Maintainers can resume reviewed work with different tooling after main advances between commands.
Reason: Cross-command continuity adds a useful maintainer capability beyond the existing per-command trust contract. The author’s prior merged area work supports the direction, and the existing wrapper can own it.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⛔ Needs changes before merge - 3 items remain

This PR provides useful workflow continuity, but it breaks supported cold provisioning and leaves sibling regression suites failing for introduced reasons.

Priority: P2
Reviewed head: bf37cb9d2481e234be94b54651acb4fa604dfd70

Before merge

  • Preserve cold provisioning without a local main tracking ref (P2) - The expanded selection condition now routes canonical landing commands through the remote-anchor requirement. With no existing binding and no refs/remotes/origin/main, review-checkout-main 42 exits at wrapper selection before the existing cold-provisioning owner can fetch main. The base canonical entrypoint supports this case, and exact-head CI now fails its no-anchor and interrupted-fetch regressions. Establish a trusted initial revision through cold acquisition without requiring the tracking ref to exist beforehand.
  • Adapt sibling lock fixtures to workflow admission (P2) - Admission now reads repository identity and persists a binding before command validation, but the sibling operation-lock fixtures still install an uncommitted wrapper without an origin and assert that every Git ref remains unchanged. Three cases consequently stop with Git read failed instead of exercising supervisor, temporary-storage, or metadata failure handling; two authentication cases reject the intentional binding ref. Commit valid trusted fixture sources, scope fault injection to the intended phase, and preserve unrelated-ref assertions while allowing the admitted binding. This was visible at the previously reviewed unchanged head and was missed in that review.
  • Complete next step (P2) - Repair the introduced native-workflow regressions on this branch.

Findings

  • [P2] Preserve cold provisioning without a local main tracking ref — scripts/pr:443
  • [P2] Adapt sibling lock fixtures to workflow admission — scripts/pr:941

Provenance

  • canonical cold provisioning without a local main anchor: original intent not found (unknown: The feature-history search could not read an unavailable promisor blob; current tests and the base entrypoint establish the supported path, but its introduction remains unknown.)

Tests

  • Missing end-to-end proof: Reported validation uses synthetic repositories and command/GitHub fixtures; it does not show a real maintainer operation spanning main advancement through completion. No reviewer execution was authorized.
Agent review details

How this fits together

The maintainer CLI coordinates PR review, preparation, and landing using trusted repository scripts. This change stores the selected script revision between commands and removes that record when native completion is verified.

flowchart TD
  A[Maintainer command] --> B[Trusted workflow selection]
  C[Repository and PR binding] --> B
  B --> D[Operation lock and admission]
  D --> E[Review preparation or landing]
  E --> F{Verified completion}
  F -->|No| C
  F -->|Yes| G[Retire exact binding]
Loading

Technical review

Best possible solution:

Keep native workflow continuity while allowing trusted cold acquisition to establish its first revision and preserving the existing lock and recovery contracts.

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

Not applicable to the proposed continuity capability; its introduced regressions have exact-head hosted failure traces and clear source triggers.

Is this the best way to solve the issue?

No, not yet: the existing wrapper is the right owner, but admission must preserve cold acquisition and its sibling regression coverage.

Full review comments:

  • [P2] Preserve cold provisioning without a local main tracking ref — scripts/pr:443
    The expanded selection condition now routes canonical landing commands through the remote-anchor requirement. With no existing binding and no refs/remotes/origin/main, review-checkout-main 42 exits at wrapper selection before the existing cold-provisioning owner can fetch main. The base canonical entrypoint supports this case, and exact-head CI now fails its no-anchor and interrupted-fetch regressions. Establish a trusted initial revision through cold acquisition without requiring the tracking ref to exist beforehand.
    Confidence: 0.98
  • [P2] Adapt sibling lock fixtures to workflow admission — scripts/pr:941
    Admission now reads repository identity and persists a binding before command validation, but the sibling operation-lock fixtures still install an uncommitted wrapper without an origin and assert that every Git ref remains unchanged. Three cases consequently stop with Git read failed instead of exercising supervisor, temporary-storage, or metadata failure handling; two authentication cases reject the intentional binding ref. Commit valid trusted fixture sources, scope fault injection to the intended phase, and preserve unrelated-ref assertions while allowing the admitted binding. This was visible at the previously reviewed unchanged head and was missed in that review.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 56c033e8267a.

Provenance checked

Testing

Proof path: in-process harness. Added test files: 4.

Security

None.

Evidence

Acceptance criteria:

  • [P1] pnpm test test/scripts/pr-main-refresh.test.ts test/scripts/pr-operation-lock.test.ts test/scripts/pr-workflow-binding.test.ts test/scripts/pr-wrappers.test.ts test/scripts/pr-merge-completion.test.ts --maxWorkers=1.
  • [P1] pnpm test test/scripts/eager-import-closure.test.ts -t "PR wrapper inventory" --maxWorkers=1.
  • [P1] bash -n scripts/pr.
  • [P1] git diff --check.

What I checked:

Likely related people:

  • Vincent Koc: Raw commit dab8c15 adds scripts/pr-lib/process-group-runner.mjs:37 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: dab8c1513dbc; files: scripts/pr-lib/process-group-runner.mjs)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

PR surface

Tests +362, Docs +2, Other +206. Total +570 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 364 2 +362
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 4 219 13 +206
Total 9 585 15 +570

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: Existing canonical cold-start commands fail when the local origin/main tracking ref is absent.
  • add merge-risk: 🚨 automation: The introduced admission behavior breaks sibling native-workflow CI coverage unless its fixtures and expectations are adapted.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • remove status: 👀 ready for maintainer look: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P2: This bounded maintainer-tooling improvement has a cold-provisioning regression without an urgent end-user runtime impact.
  • merge-risk: 🚨 compatibility: Existing canonical cold-start commands fail when the local origin/main tracking ref is absent.
  • merge-risk: 🚨 automation: The introduced admission behavior breaks sibling native-workflow CI coverage unless its fixtures and expectations are adapted.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-08T17:24:13.308Z sha bf37cb9 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Oct 19, 2026
* commit '08e32fdb4df002c9d4eea158b855d6521dd1e916': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (#177614)
  fix(release): tag restart plugin cohorts consistently (#177725)
  refactor(ui): inline single-caller detail requests (#177705)
  chore(i18n): refresh native locales (#177721)
  refactor(codex): drop unread private runtime reports (#177689)
  refactor(ui): consolidate static artwork registries (#177692)
  refactor(ui): derive settings schema analysis in the view (#177624)
  refactor(media): consolidate capability defaults and compression grids (#177665)
  refactor(auth): bind OAuth managers to native provider operations (#177676)
  refactor(ui): remove redundant component rendering layers (#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (#166082)
  fix(agents): report failed secret input prompt delivery (#177688)
  refactor(ui): share chat message render contracts (#177668)
  fix(ui): settle model status after overlapping publication (#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (#177670)
  refactor(runtime): rely on canonical async lifecycle owners (#177635)
  refactor: fold private operation helpers into their callers (#177655)
  refactor(ui): remove unused chat leaf element adapters (#177582)
  perf(talk): use published authority for foreign voice writes (#177533)
  ...
@vincentkoc
vincentkoc merged commit c821108 into main Oct 19, 2026
126 checks passed
@vincentkoc
vincentkoc deleted the fix/pr-workflow-admission-binding branch October 19, 2026 22:31
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

steipete added a commit that referenced this pull request Oct 20, 2026
Workflow binding from #167350 reads its source closure from Git and
verifies the writer before locked operations. The cross-checkout fixture
only copied wrapper files onto disk, and the preflight fixture had no
committed HEAD or remote identity, so neither reached its intended check.

Commit the existing production inventory, retain it in source and landed
trees, and provide local origin/main and the existing dependency links.
Model the mandatory writer read in the cross-checkout GitHub stub and
assert its exact order. Keep owner-only reconciliation, invalid gate
refusals, lock state and retained evidence assertions intact.

No production workflow, update behavior, timeout, retry, permission or
baseline changes.

Validation: 22 cases pass across both affected files with one worker;
targeted tooling types, typed lint, formatting and P2 review pass.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
openclaw#167350)

* fix(pr): retain the admitted workflow across maintainer commands

* fix: refresh the reviewed correction baseline

Baseline-Refresh: a89bd166b79d54b343b93ad374f8ebfa4f3d1163

* fix(pr): preserve cold workflow admission and repository identity

* chore(pr): integrate canonical main CI repair

* commit '4f8617589b6c71d754171052b603fe534901bfa1': (52 commits)
  test(gateway): restore local probe deferred import
  fix(agents): release prompt diagnostics for retired sessions (openclaw#177614)
  fix(release): tag restart plugin cohorts consistently (openclaw#177725)
  refactor(ui): inline single-caller detail requests (openclaw#177705)
  chore(i18n): refresh native locales (openclaw#177721)
  refactor(codex): drop unread private runtime reports (openclaw#177689)
  refactor(ui): consolidate static artwork registries (openclaw#177692)
  refactor(ui): derive settings schema analysis in the view (openclaw#177624)
  refactor(media): consolidate capability defaults and compression grids (openclaw#177665)
  refactor(auth): bind OAuth managers to native provider operations (openclaw#177676)
  refactor(ui): remove redundant component rendering layers (openclaw#177607)
  fix(ios): model sign-in is a permanent row under the composer instead of an item in the model menu (openclaw#166082)
  fix(agents): report failed secret input prompt delivery (openclaw#177688)
  refactor(ui): share chat message render contracts (openclaw#177668)
  fix(ui): settle model status after overlapping publication (openclaw#177667)
  refactor(gateway): reuse native workspace and lifecycle facts (openclaw#177670)
  refactor(runtime): rely on canonical async lifecycle owners (openclaw#177635)
  refactor: fold private operation helpers into their callers (openclaw#177655)
  refactor(ui): remove unused chat leaf element adapters (openclaw#177582)
  perf(talk): use published authority for foreign voice writes (openclaw#177533)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
Workflow binding from openclaw#167350 reads its source closure from Git and
verifies the writer before locked operations. The cross-checkout fixture
only copied wrapper files onto disk, and the preflight fixture had no
committed HEAD or remote identity, so neither reached its intended check.

Commit the existing production inventory, retain it in source and landed
trees, and provide local origin/main and the existing dependency links.
Model the mandatory writer read in the cross-checkout GitHub stub and
assert its exact order. Keep owner-only reconciliation, invalid gate
refusals, lock state and retained evidence assertions intact.

No production workflow, update behavior, timeout, retry, permission or
baseline changes.

Validation: 22 cases pass across both affected files with one worker;
targeted tooling types, typed lint, formatting and P2 review pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant