Skip to content

fix(test): wait for reload admission before restart polling - #157964

Merged
vincentkoc merged 1 commit into
mainfrom
fix-gmail-reload-test-publication-20260925
Sep 25, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix-gmail-reload-test-publication-20260925

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The deferred-restart SecretRef test treats promotion notification as completion of the reload transaction, so its restart poll can run while reload root admission is still held.

User Impact

No production or user-visible behavior changes. This makes the test wait for the lifecycle boundary it intends to exercise.

Why This Change Was Made

The fixture now waits for reload root admission to release before advancing the restart poll. A held-promotion variant proves that preflight remains deferred while the real reload root is active, then preserves the original failed-secret and retry assertions. Existing secrets-fixture helpers move unchanged to their current support module so the test stays within its line-cap ratchet.

Evidence

  • Final candidate: 270 tests in the complete owning file, with --maxWorkers=1; Gateway test types passed.
  • Measured on the native Blacksmith CI proof: owning-file wall time 42.27 seconds, canonical single-worker test shard 44.50 seconds. The entire remote command took 210.035 seconds including setup, formatting and types; that is not the file cost. Hosted PR merge-ref file duration is separate and is not inferred from these timings.
  • Both changed files passed formatting; the native line-cap ratchet passed with no new violations or growth of the over-cap file.
  • Independent source review and completed autoreview found no actionable findings.
  • The earlier CI failure in PR #157744 timed out after 120 seconds without identifying the stalled await. This patch demonstrates and repairs the fixture ordering gap; it does not claim to have localized that historical timeout.

ClawSweeper review disposition: the unchanged-head review found no source or security findings. Its before-merge and rank-up request for one-worker test cost is addressed by the measured timings and Actions link above. The historical CI timeout remains unlocalized.

@vincentkoc vincentkoc self-assigned this Sep 25, 2026
@clawsweeper

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

@vincentkoc
vincentkoc marked this pull request as ready for review September 25, 2026 06:21
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Sep 25, 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 Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 25, 2026, 2:28 AM ET / 06:28 UTC.

ClawSweeper review

What this changes

The PR makes a Gateway restart test wait for config reload admission to finish, adds a held-promotion scenario, and moves shared secrets fixtures into test support.

Merge readiness

⛔ Blocked before merge - 2 items remain

Current main still has the early-polling test. The PR addresses a source-supported fixture ordering gap and adds a held-promotion case, though the earlier CI timeout did not identify its stalled await.

Priority: P2
Reviewed head: aec41c0f98407f6400be320e040d390b644c9d7c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The fixture correction is narrow and has a meaningful held-promotion case, with test-cost reporting still outstanding.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored, test-only fixture change is exempt from the external real-setup proof gate. The PR reports 270 owning-file tests passing; 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: This member-authored, test-only fixture change is exempt from the external real-setup proof gate. The PR reports 270 owning-file tests passing; no stored-data contract changes.
Evidence reviewed 7 items Introduced test change: The held-promotion case checks that preflight stays deferred while root work is active, then waits for that work to end before advancing the restart poll.
Reload admission boundary: The managed reloader runs a config transaction under independent Gateway root-work admission, supporting the distinction between promotion notification and transaction completion.
Restart decision: The restart deferral polls active work before its emission hook runs SecretRef preflight and can schedule an emission retry.
Findings None None.
Security None None.

How this fits together

The Gateway reloads configuration after a write and may defer a restart while work is active. This test controls promotion and SecretRef availability to check when restart preflight and retry run.

flowchart LR
A[Config write] --> B[Gateway reload transaction]
B --> C[Snapshot promotion]
C --> D[Root admission release]
D --> E[Restart poll]
E --> F[Secret preflight and retry]
Loading

Before merge

  • Resolve merge risk (P1) - The changed Gateway test file has no measured one-worker wall time or CI duration in the PR, leaving its recurring test cost unquantified.
  • Complete next step (P2) - Add measured one-worker wall time and CI duration for the changed Gateway test file to the PR Evidence section.
Agent review details

Security

None.

PR surface

Tests +37. Total +37 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 106 69 +37
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 106 69 +37

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the test synchronized with the reload admission boundary and retain its SecretRef failure and retry assertions within the Gateway test budget.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the test synchronized with the reload admission boundary and retain its SecretRef failure and retry assertions within the Gateway test budget.

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

No executed current-main failure is shown. Source establishes that promotion can notify before reload admission ends, but the earlier CI timeout did not identify which await stalled.

Is this the best way to solve the issue?

Yes. Waiting for admission to end addresses the fixture ordering gap without changing production behavior, and the held-promotion case checks why that boundary matters.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This is a bounded Gateway test reliability fix with limited blast radius and no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored, test-only fixture change is exempt from the external real-setup proof gate. The PR reports 270 owning-file tests passing; no stored-data contract changes.

Label justifications:

  • P2: This is a bounded Gateway test reliability fix with limited blast radius and no production behavior change.
  • 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: This member-authored, test-only fixture change is exempt from the external real-setup proof gate. The PR reports 270 owning-file tests passing; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the changed test file’s one-worker wall time and CI duration in the PR body.

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.

@vincentkoc
vincentkoc merged commit 8fe893d into main Sep 25, 2026
201 checks passed
@vincentkoc
vincentkoc deleted the fix-gmail-reload-test-publication-20260925 branch September 25, 2026 06:36
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
…4-prep

* commit '8fe893da516ebdc817692fb2d272e27bc3c88376': (31 commits)
  fix(test): wait for reload admission before restart polling (#157964)
  refactor(mattermost): reuse DM retry option selection (#157800)
  chore(i18n): refresh native locales (#157850)
  perf(sessions): reuse current participants across transcript appends (#157622)
  refactor(signal): share pending transport migration results (#157777)
  fix(tui): open model pickers without waiting for the Gateway (#157839)
  fix(gateway): apply config despite delayed file notifications (#157906)
  fix(auth): clear deleted account selections and support account recovery (#157745)
  fix: plugin reloads lose tool results and strand subagent settlement (#157339)
  fix(gateway): avoid preview errors during worker metadata updates (#157943)
  refactor(diffs): reuse native promisify for compression (#157835)
  fix(models): keep current choices on the first picker page (#157869)
  fix(plugins): retain existing quarantine across unrelated reloads (#157907)
  fix(openai): prioritize ChatGPT sign-in and clarify auth choices (#157792)
  chore(ui): refresh control ui locales (#157955)
  fix(ui): refresh connected accounts after auth changes (#157950)
  fix(scripts): avoid redundant npm version process in package checks (#157809)
  refactor(usage): capture hosted pricing once per operation (#157838)
  refactor(ui): share slash-command failure results (#157649)
  fix(cron): announce runs miss the channel's formatting rules (#157877)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
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: 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