Skip to content

fix: cron owner E2E loses its reserved Gateway port - #163620

Merged
RomneyDa merged 1 commit into
release/2026.9.8from
fix/release-2026.9.8-gateway-port-claim
Oct 2, 2026
Merged

RomneyDa merged 1 commit into
release/2026.9.8from
fix/release-2026.9.8-gateway-port-claim

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: plugin-cron-registry-owner.e2e can lose its requested Gateway port before startup, connect to the wrong listener, and miss CRON_OWNER_SURVIVAL_FIRE.

User Impact

User impact: the 2026.9.8 Gateway E2E gate reliably verifies plugin cron ownership instead of failing on a fixture port race.

Why This Change Was Made

The fixture now retains the deterministic port-block claim until the bound Gateway has closed, then releases it during cleanup. Cron behavior and assertions are unchanged.

Evidence

  • Real E2E: 3/3 tests passed in 92.00s on this exact patch.
  • pnpm format:check --no-error-on-unmatched-pattern -- src/gateway/test-helpers.listener.ts test/plugin-cron-registry-owner.e2e.test.ts
  • Focused oxlint passed.
  • pnpm tsgo:core:test passed.
  • Fresh P1 review: scoped clean.

@clawsweeper

clawsweeper Bot commented Oct 2, 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 gateway Gateway runtime size: XS labels Oct 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Oct 2, 2026
@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 12:22 PM ET / 16:22 UTC (Revision 2).

ClawSweeper review

What this changes

The cron ownership end-to-end test retains its Gateway port claim through startup and releases it after instance cleanup.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a useful release-branch backport of an already-merged main fix. No introduced correctness or security defect was found, and MEMBER-authored work is protected from automatic closure.

Priority: P2
Reviewed head: ad3812dda739a0a4e7fc7124f9204dbd7f651954

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused fixture repair with correct lifecycle ordering, unchanged behavioral assertions, and reported scoped validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored fixture repair. The captured body reports the changed isolated-Gateway cron E2E passing; this review did not independently execute it. 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 external-contributor proof gate does not apply to this MEMBER-authored fixture repair. The captured body reports the changed isolated-Gateway cron E2E passing; this review did not independently execute it. No stored-data contract changes.
Evidence reviewed 6 items Pinned introduced change: The merge-base-to-head patch retains the existing cooperative claim without changing cron assertions, scheduling behavior, timeouts, or production runtime.
Claim ownership and cleanup: Explicit ports bypass the instance helper's internal reservation at line 773. The changed test awaits instance cleanup before releasing the external claim; failed instance cleanup therefore does not prematurely release it.
Current main already contains this change: The fetched main contains the retained-claim setup and cleanup. Git history ties it to merged #163003; its GitHub file patch exactly includes this cron fixture change. This PR instead targets release/2026.9.8, whose pinned baseline still uses the probe-only helper.
Findings None None.
Security None None.

How this fits together

The cron ownership test starts an isolated Gateway and verifies that scheduled plugin jobs survive workspace changes. Cooperative port claims prevent other test fixtures from taking its listener port.

flowchart TD
 A[Cron ownership test] --> B[Claim port block]
 B --> C[Start isolated Gateway]
 C --> D[Verify recurring plugin jobs]
 D --> E[Close and clean instance]
 E --> F[Release port claim]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +5, Tests +1. Total +6 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 0 +5
Tests 1 9 8 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 14 8 +6

Review metrics

None.

Technical review

Best possible solution:

Use the existing cooperative port-claim owner throughout the release fixture's Gateway lifetime while preserving its cron assertions.

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

No current-main failing run was established: main already contains the fix. The release baseline exposes the probe-to-startup ownership gap in source; this read-only review did not execute the race.

Is this the best way to solve the issue?

Yes: retaining the existing claim closes the cooperative fixture ownership gap without changing product readiness, cron behavior, or test assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 721501021b09.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This bounded test-fixture repair improves release validation reliability without changing shipped runtime behavior.
  • 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 external-contributor proof gate does not apply to this MEMBER-authored fixture repair. The captured body reports the changed isolated-Gateway cron E2E passing; this review did not independently execute it. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head patch retains the existing cooperative claim without changing cron assertions, scheduling behavior, timeouts, or production runtime. (test/plugin-cron-registry-owner.e2e.test.ts:551, ad3812dda739)
  • Claim ownership and cleanup: Explicit ports bypass the instance helper's internal reservation at line 773. The changed test awaits instance cleanup before releasing the external claim; failed instance cleanup therefore does not prematurely release it. (test/helpers/openclaw-test-instance.ts:773, ad3812dda739)
  • Current main already contains this change: The fetched main contains the retained-claim setup and cleanup. Git history ties it to merged fix(test): Gateway e2e connect fails with 1006 when another fixture takes the instance port #163003; its GitHub file patch exactly includes this cron fixture change. This PR instead targets release/2026.9.8, whose pinned baseline still uses the probe-only helper. (test/plugin-cron-registry-owner.e2e.test.ts:551, 8095d778b059)
  • Merged fix provenance: GitHub verifies the related main PR merged on 2026-10-02T06:04:05Z with commit 8095d77. The latest supplied release v2026.9.7 still calls getGatewayE2ePortBlock and passes its numeric result, so that release does not contain this fixture repair. (test/plugin-cron-registry-owner.e2e.test.ts, 8095d778b059)
  • Validation and review continuity: The captured body reports 3/3 isolated-Gateway E2E tests passing in 92.00 seconds, focused formatting/lint, and core-test typechecking. The previous review examined the same head and published no findings or rank-up moves. This review ran no target code; diff whitespace checking passed and the checkout remained clean. (ad3812dda739)
  • Area routing history: Available history records Peter Steinberger's repeated port-ownership repairs and Vincent Koc's earlier cron-test work. A blame attempt could not retrieve a required historical object, so source-line introduction attribution remains unverified. (test/plugin-cron-registry-owner.e2e.test.ts, b8d03ede29a8)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: 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-10-02T16:11:34.175Z sha ad3812d :: needs maintainer review before merge. :: none

@RomneyDa

RomneyDa commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa
RomneyDa merged commit 708adde into release/2026.9.8 Oct 2, 2026
160 checks passed
@RomneyDa
RomneyDa deleted the fix/release-2026.9.8-gateway-port-claim branch October 2, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. 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