Skip to content

fix(test): synchronize Git backoff cancellation readiness - #157315

Merged
steipete merged 1 commit into
mainfrom
codex/test-ci-backoff-ready-handshake
Sep 24, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-ci-backoff-ready-handshake

Conversation

@steipete

@steipete steipete commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Related: #139428

What Problem This Solves

The Git backoff cancellation fixture can miss filesystem readiness notifications and allow a retry before the test sends cancellation.

User Impact

No production behavior changes. The test synchronizes cancellation with the real backoff boundary while retaining its existing cancellation, publication and cleanup assertions.

Why This Change Was Made

The fixture now publishes readiness after the first real cancellation check and holds that boundary until the supervisor sends SIGTERM and acknowledges release. Existing watchdogs, the five-second backoff and cleanup ownership remain unchanged. The separate performance cancellation fixture is unchanged.

This adds 43 test-support lines and changes no test cases or production code.

Evidence

  • The unchanged owner file passed 129 cases with 32 native platform skips using --maxWorkers=1 (204.033 seconds complete command wall time).
  • A temporary readiness-loss control made the original existing case fail for the intended reason: expected 143, received 0, with two fetches and verified cleanup. The same control passed with the candidate: 143, one fetch and the cancellation boundary recorded. The control was removed afterward.
  • The final owner and performance sibling passed 234 cases with 32 native platform skips using --maxWorkers=1 (338.778 seconds complete command wall time). The owner's 161 ordered case names and outcomes match the baseline.

The control models lost readiness delivery; it does not reproduce the historical full-suite notification schedule or establish a speedup. All owned fixture processes and temporary roots were reconciled before source transitions.

The complete mapped changed gate passed, and independent P2 review found no actionable issues.

Hosted CI and Workflow Sanity passed on this head. The inspected Linux changed-tests job ran only test/scripts/ci-git-prerequisites.test.ts under Bun: 17 cases passed, with 4.94 seconds Vitest duration and 5.91 seconds native shard duration. The job took 55 seconds including setup, and its test step took 8 seconds. These timings do not measure the full Git owner or performance lifecycle files; their complete-file proof and costs are the local runs above.

@clawsweeper

clawsweeper Bot commented Sep 24, 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.

@steipete
steipete marked this pull request as ready for review September 24, 2026 14:05
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 10:31 AM ET / 14:31 UTC (Revision 2).

ClawSweeper review

What this changes

The branch adds a readiness handshake to the Git backoff cancellation fixture so the supervisor signals the existing test at the real retry checkpoint.

Merge readiness

✅ Ready for maintainer review

Current main still has the lost-readiness race. The PR provides a focused fixture repair with credible before-and-after evidence, and this review found no actionable patch defect.

Priority: P2
Reviewed head: 513fc93478fde1ba4be35c7e116b7c6893337a13

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture repair has relevant before-and-after proof and no identified correctness or security blocker.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The changed owner is the test fixture around the real Python Git backoff. The PR reports a controlled lost-readiness failure on the original fixture, followed by exit 143, one fetch, and recorded cancellation on the candidate, plus complete owner and sibling runs; the historical full-suite timing remains unproven. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed owner is the test fixture around the real Python Git backoff. The PR reports a controlled lost-readiness failure on the original fixture, followed by exit 143, one fetch, and recorded cancellation on the candidate, plus complete owner and sibling runs; the historical full-suite timing remains unproven. No stored-data contract changes.
Evidence reviewed 9 items Introduced fixture change: The pinned merge-base-to-head diff adds the backoff checkpoint observer and supervisor handshake only in test support.
Bounded supervisor handshake: The supervisor waits for the readiness file under its existing deadline, signals the shell, and releases the observer in a finally block.
Current main remains vulnerable: Current main still waits for a filesystem notification after the retry warning; it has no durable readiness handshake for this case.
Findings None None.
Security None None.

How this fits together

OpenClaw’s CI tests run a Python Git checkout owner under a Node supervisor fixture. The fixture records Git attempts, cancellation boundaries, exit status, and process cleanup for lifecycle assertions.

flowchart LR
A[Git workflow test] --> B[Python Git owner]
B --> C[Retry backoff]
C --> D[Readiness handshake]
D --> E[Supervisor cancellation]
E --> F[Exit and cleanup report]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +43. Total +43 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 45 2 +43
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 45 2 +43

Review metrics

Metric Value Why it matters
Test-audit code cost production +0; test support +43 net lines The linked campaign counts added support against removals, and the PR explains the added handshake as a fixture-race repair.

Technical review

Best possible solution:

Retain one bounded fixture handshake at the Git owner’s cancellation checkpoint while preserving the existing exit, retry, and cleanup assertions.

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

Yes for the lost-readiness mechanism: the old wait depends on a notification that can be missed, and the PR reports a controlled original-failure and candidate-pass comparison. The historical full-suite schedule itself was not reproduced.

Is this the best way to solve the issue?

Yes. The handshake uses the existing fixture and the real owner checkpoint without changing production behavior or the separate performance cancellation path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8488c7c2285e.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded CI fixture reliability fix with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed owner is the test fixture around the real Python Git backoff. The PR reports a controlled lost-readiness failure on the original fixture, followed by exit 143, one fetch, and recorded cancellation on the candidate, plus complete owner and sibling runs; the historical full-suite timing remains unproven. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed owner is the test fixture around the real Python Git backoff. The PR reports a controlled lost-readiness failure on the original fixture, followed by exit 143, one fetch, and recorded cancellation on the candidate, plus complete owner and sibling runs; the historical full-suite timing remains unproven. No stored-data contract changes.

Evidence

What I checked:

  • Introduced fixture change: The pinned merge-base-to-head diff adds the backoff checkpoint observer and supervisor handshake only in test support. (test/scripts/ci-git-owner.test-support.ts:353, 513fc93478fd)
  • Bounded supervisor handshake: The supervisor waits for the readiness file under its existing deadline, signals the shell, and releases the observer in a finally block. (test/scripts/fixtures/ci-platform-checkout.mjs:1452, 513fc93478fd)
  • Current main remains vulnerable: Current main still waits for a filesystem notification after the retry warning; it has no durable readiness handshake for this case. (test/scripts/fixtures/ci-platform-checkout.mjs:1441, 8488c7c2285e)
  • Existing behavioral assertions: The retained test checks cancellation exit code, fetch count, absence of publication, and the cancellation boundary. (test/scripts/ci-git-owner.test.ts:1199, 513fc93478fd)
  • Real owner checkpoint: The Python Git owner checks cancellation inside its five-second retry backoff; the fixture inserts observation immediately after that check. (.github/actions/git-owner/owner.py:386, 513fc93478fd)
  • Reported direct behavior proof: The captured PR body reports that a temporary lost-readiness control failed on the original fixture with exit 0 and two fetches, then passed on the candidate with exit 143, one fetch, and recorded cancellation. It also reports passing complete owner and performance-sibling runs. The historical full-suite notification schedule was not reproduced. (513fc93478fd)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: 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-24T14:12:49.913Z sha 513fc93 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit bc9a4e7 into main Sep 24, 2026
156 of 157 checks passed
@steipete
steipete deleted the codex/test-ci-backoff-ready-handshake branch September 24, 2026 14:50
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '9ccfc7d1bea21e34da48edbd54afd2e1be57db40': (89 commits)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  fix: validate Codex model references in Docker (#157175)
  fix(state): tolerate brief WAL coordinator contention (#157121)
  fix: unblock conversations after recovery preparation fails (#157214)
  test(telegram): avoid wall-clock pacing in HTTP conformance (#157281)
  fix: keep independent database work responsive under load (#157230)
  refactor(sqlite): centralize WAL checkpoint execution (#157263)
  improve(android): show tool outcomes in collapsed work (#156950)
  fix: remove tracked release scratch blocking source capture (#157308)
  test(update): remove legacy probe stream ordering race
  fix: preserve steering across reconnects and show queued input (#157135)
  fix(ui): keep typing focus when the GitHub reader opens (#157202)
  fix(ios): keep screenshot logs outside capture evidence
  test(codex): await startup teardown in lifecycle fixtures
  chore(ui): refresh control ui locales (#157311)
  refactor(memory): deslop memory plugins (#156867)
  refactor(test): share CLI diagnostics fixture setup (#157201)
  fix(release): retry notarization submit/wait on transport failures and name the resume command (#157116)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (122 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...
vincentkoc added a commit that referenced this pull request Sep 24, 2026
* test(ui): cover stack-free tooltip disconnect cleanup

* fix(build): scope normalization declarations to package sources

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.

* Merge normalization declaration scope for tooltip proof

* commit '81aeccb3db80136a118d6d2f98b67d836ec25e51':
  fix(build): scope normalization declarations to package sources

* fix(ui): avoid retaining tooltip anchors in abort reasons

* Merge main to include native wrapper source inventory repair

* commit '02ad6b76b1a2ee2b414b170072e6e3e606fda3d4': (134 commits)
  fix(build): scope normalization declarations to package sources (#157174)
  fix: exit after validating Codex model references (#157323)
  fix(gateway): guard workspace adoption during active work (#157259)
  fix(update): rebuild stale Git runtimes when source is already current (#156996)
  fix: require a click before diagnosing failed updates (#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (#157352)
  fix(skills): refresh skills after watched directories are replaced (#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (#157334)
  fix(gateway): retain owned suspension status during restart (#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (#157337)
  test(daemon): use the native PowerShell probe budget (#157289)
  fix(exec): avoid gateway stalls during background task writes (#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (#157315)
  ...

Co-authored-by: Vincent Koc <[email protected]>
@roboclaw-bot roboclaw-bot mentioned this pull request Sep 24, 2026
2 of 8 tasks
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* test(ui): cover stack-free tooltip disconnect cleanup

* fix(build): scope normalization declarations to package sources

Give normalization-core its own TypeScript project so declaration generation does not load the repository-wide source set. Preserve the existing DTS build command and compiler policy.

* Merge normalization declaration scope for tooltip proof

* commit '81aeccb3db80136a118d6d2f98b67d836ec25e51':
  fix(build): scope normalization declarations to package sources

* fix(ui): avoid retaining tooltip anchors in abort reasons

* Merge main to include native wrapper source inventory repair

* commit 'f11e16cd65951f284264bd202b49984e21091cf5': (134 commits)
  fix(build): scope normalization declarations to package sources (openclaw#157174)
  fix: exit after validating Codex model references (openclaw#157323)
  fix(gateway): guard workspace adoption during active work (openclaw#157259)
  fix(update): rebuild stale Git runtimes when source is already current (openclaw#156996)
  fix: require a click before diagnosing failed updates (openclaw#157359)
  test(release): provide sealed artifact inputs to writer fixtures
  fix(ios): preserve chat state and adapt layout when iPad windows resize (openclaw#156683)
  fix(test): prepare native UI fixtures before compilation
  fix(test): await outbound delivery readiness before assertions
  fix: clarify deferred Codex catalog refresh warnings (openclaw#157352)
  fix(skills): refresh skills after watched directories are replaced (openclaw#156324)
  ci: reduce Node fixture overhead and defer seven release matrices (openclaw#157341)
  chore(test): stop Codex Computer Use and Signal batching tests flaking under load (openclaw#157334)
  fix(gateway): retain owned suspension status during restart (openclaw#157258)
  fix(ci): scope desktop status assertions to the selected worker
  chore(i18n): refresh native locales (openclaw#157337)
  test(daemon): use the native PowerShell probe budget (openclaw#157289)
  fix(exec): avoid gateway stalls during background task writes (openclaw#157177)
  test(cli): isolate preaction title setter state
  fix(test): synchronize Git backoff cancellation readiness (openclaw#157315)
  ...

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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