Skip to content

fix(tests): prevent bootstrap locale from leaking into Workboard - #174065

Merged
steipete merged 1 commit into
mainfrom
fix/ui-bootstrap-locale-isolation
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/ui-bootstrap-locale-isolation

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The bootstrap preference fixture selects German through the real i18n owner but leaves its locale and document language behind. In the shared UI worker, subsequent Workboard clock tests render gerade eben where they expect just now. Main hourly 38875037669 reproduced both clock failures.

User Impact

No user-visible behavior changes. The shared UI test worker no longer carries this fixture’s German locale into later tests.

Why This Change Was Made

Capture the incoming i18n state before each bootstrap fixture installs timers or storage mocks, then restore it with the existing captureI18nStateForTesting helper after test cleanup. The helper restores the original locale, exact document lang/dir attributes, and stored preference.

This is test-only. Every bootstrap preference/identity assertion and Workboard clock, focus, and visibility assertion stays unchanged. No product behavior, timeouts, retries, or test selection changes.

Evidence

  • Current-main Workboard file alone: 2/2 pass.
  • Unpatched bootstrap followed by Workboard in the shared native UI runner: 2 pass / 2 fail, both with the exact gerade eben mismatch.
  • Fixed producer-first replay with one worker: 4/4 pass. The diagnostic sequencer only pins these two files to the failing order and is not part of the patch. An initial default-order green replay ran Workboard first and is not counted as causal proof.
  • Existing i18n restoration regression: 3/3 pass, covering absent, empty, and explicit document/preference state.
  • Targeted ui-app test type graph, file lint, formatting, and whitespace checks pass.
  • Independent P2 review: no accepted/actionable findings.

The leaking fixture was introduced by 79422aa (#170649), after the Workboard clock tests already existed. Its intended authenticated pre-hello preference behavior is preserved. Three authorized direct pushes were rejected by concurrent main updates; no remote main write occurred. The patch stayed byte-identical through those rebases. No CI dispatch or rerun was used.

The bootstrap preference fixture added in #170649 selects German through
the real i18n owner but did not restore its locale or document attributes.
The shared UI worker retained document.documentElement.lang=de, so a later
Workboard clock test rendered "gerade eben" instead of "just now".

Capture the incoming i18n state before fixture setup and restore it with
onTestFinished after runtime cleanup. Reuse the existing locale, storage,
and document-attribute restoration helper. Keep all bootstrap identity,
preference, clock-boundary, focus, and visibility assertions unchanged.
No production behavior changes.

Current-main proof: Workboard alone passes 2/2; bootstrap followed by
Workboard reproduces both hourly failures. The fix passes all four cases
with producer-first order explicitly pinned through the native UI runner.
The existing restoration helper's absent, empty, and explicit state cases
also pass. No CI dispatch, rerun, timeout change, retry, or weaker assertion.
Targeted UI-app test typecheck, file lint/format, whitespace checks, and
independent P2 review pass.
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 16, 2026 09:29
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T09:31:28.099403Z ab299c7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete enabled auto-merge (squash) October 16, 2026 09:37
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 16, 2026
@steipete
steipete merged commit 395c7ab into main Oct 16, 2026
126 of 128 checks passed
@steipete
steipete deleted the fix/ui-bootstrap-locale-isolation branch October 16, 2026 09:40
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit 'ac03ca0b6d26a7dc55d0d262e40d2549631b1ea7': (25 commits)
  fix: apply shared plugin model policy to decisions (#156621)
  perf: shortlist transcript relevance scores before metadata reads (#174058)
  fix: strip standalone trailing NO_REPLY from replies (#171990)
  fix(ci): avoid repeated discovery during changed-test planning (#174069)
  fix(sqlite): preserve transaction outcomes when warnings throw (#157151)
  fix(ai): native video handoff to chat-completions providers + preflight video cost (#170920)
  fix(litellm): image generation fails when the backend returns image URLs (#173508)
  test(memory,gateway,infra,subagents): remove low-value tests (batch d152) (#174034)
  perf(memory): bound derived worker snapshot and pricing retention (#174067)
  fix(test): reduce eager imports during test startup (#174056)
  refactor(codex): share lifecycle preflight fixtures (#174062)
  test(gateway,matrix,agents,ui): remove low-value tests (batch d150) (#174025)
  perf(infra): batch usage refresh maintenance (#174050)
  fix(gateway): revert cold session list worker regression (#174052)
  refactor(config): consolidate browser meeting configuration (#173947)
  fix(cron): keep global-session deliveries on the selected agent (#173855)
  test(compaction): assert structured stale-writer failure (#174064)
  fix(cli): local terminal chat sends model requests without the configured proxy (#173530)
  test(ui): restore bootstrap preference locale after each case (#174065)
  fix: download session files through the development proxy (#173973)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…aw#174065)

The bootstrap preference fixture added in openclaw#170649 selects German through
the real i18n owner but did not restore its locale or document attributes.
The shared UI worker retained document.documentElement.lang=de, so a later
Workboard clock test rendered "gerade eben" instead of "just now".

Capture the incoming i18n state before fixture setup and restore it with
onTestFinished after runtime cleanup. Reuse the existing locale, storage,
and document-attribute restoration helper. Keep all bootstrap identity,
preference, clock-boundary, focus, and visibility assertions unchanged.
No production behavior changes.

Current-main proof: Workboard alone passes 2/2; bootstrap followed by
Workboard reproduces both hourly failures. The fix passes all four cases
with producer-first order explicitly pinned through the native UI runner.
The existing restoration helper's absent, empty, and explicit state cases
also pass. No CI dispatch, rerun, timeout change, retry, or weaker assertion.
Targeted UI-app test typecheck, file lint/format, whitespace checks, and
independent P2 review pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant