Repository navigation
Web UI: scope the run=1 URL marker to the tab that produced it - #113595
Conversation
Opening a `/play?run=1#...` link left the directive in a session-global `run_immediately`, and every history write recomputed the entry's marker as `run_immediately && fromRun`. So the directive leaked onto unrelated tabs: with a `run=1` link open, merely switching to another clean, run-backed tab rewrote THAT tab's URL as `?run=1&tab=Report#...`, and an ordinary reload of it then auto-executed its query — possibly a write or DDL statement the user never asked to re-run. The same global was mutated in the other direction: `reconcileStartup` cleared it on a stale reload or a dirty startup, which silently disabled auto-runnable URLs for the whole session, so no later genuine run could produce a shareable `run=1` link. Replace the mutable global with a per-tab policy, `tab.runnableUrl`: a tab's entries may carry `run=1` only when a genuine run under a `?run=1` load produced them (`saveHistory`), or when a Back/Forward entry recorded that policy itself (`window.onpopstate`). The policy is serialized into the history state so time travel carries it, and persisted with the tab, but honored on restore only when the load itself carries the directive — a plain `/play` navigation clears it, so the marker erodes instead of resurfacing in a later session. `run_immediately` is now `const` and describes only whether THIS load was asked to auto-run. The startup-suppression sites no longer need to clear anything: an entry can carry `run=1` only through the tab's own policy, never through the load's directive, so the leak they were papering over is closed at the source. Pinned by three scenarios in the existing `test_play_reconcile_startup` harness, which runs the real page script under `node`: the leak itself, the marker still being written for a tab's own run under a `run=1` load, and a plain load never producing an auto-runnable URL. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Workflow [PR], commit [d9f6ea6] Summary: ✅
AI ReviewSummaryThis PR replaces the session-global Final Verdict✅ No new blockers or majors found in the current code. No inline review comments posted. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Compile time of recompiled translation units6 translation units recompiled, 5 s compile time in total, 6 of them have a recent master baseline. |
…y entry The `window.onpopstate` restore of the per-tab `runnableUrl` policy only promoted on the legacy path: an entry written before the policy was serialized has no `runnableUrl` field, and the marker-less branch left a previously adopted `true` in place. Navigating from a modern `runnableUrl: true` entry to such a plain legacy entry kept the stale policy, so the next structural rewrite (a tab switch while the editor still reflected the entry's run) re-stamped that plain entry as `?run=1&tab=...`, and a later ordinary reload auto-executed a query the user never asked to re-run — the same leak this PR closes, resurfacing through legacy `history.state`. Fail closed instead: when the entry carries no explicit policy, derive it from the entry's own `run` marker in both directions, so a marker-less legacy entry clears the adopted policy. Pinned by a new scenario in the `test_play_reconcile_startup` harness, which fails on the previous commit with `http://127.0.0.1:8123/play?run=1&tab=Report#U0VMRUNUIDg=` and also guards the promote direction and the clean run-backed sanity of the restored tab. Addresses the AI review finding on #113595 Co-Authored-By: Claude Fable 5 <[email protected]>
|
🕵 The only red check, Stress test (arm_asan_ubsan), is unrelated to this |
The new regression scenarios for scoping the `run=1` URL marker live in `reconcile_harness.js`, which the `new_tests_check.py` gate does not count as an integration-test change, so the `Finish Workflow` check failed with "No new tests have been added". Assert the four scenarios by name in `test.py`: a harness edit that silently drops a scenario can no longer pass as "All scenarios passed", and the Bugfix Validation jobs now run this module (the scenarios fail on the pre-fix `play.html`, so the bug reproduces on master and is fixed here). Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=113595&sha=40c2ca68d6232658ec32a57db66bd4d08c3b7b05&name_0=PR&name_1=Finish%20Workflow Co-Authored-By: Claude Fable 5 <[email protected]>
|
🕵 The only red test check, Stress test (arm_msan), is unrelated to this @groeneai, investigate the failure and provide a fix in a separate PR. If a fix is already in progress, link it here. The |
|
A fix is in progress; I will link the PR here when it opens. Your read of it is right on both counts: unrelated to this One correction I owe you, because it changes who should be looking at it: this is not an Reproducer, all table settings default, on a pristine-master debug build (rc=134, deterministic CREATE TABLE t (id UInt8, `arr.n` Array(String)) ENGINE = MergeTree ORDER BY id;
INSERT INTO t VALUES (1, ['a','b']);
SYSTEM STOP MERGES t;
ALTER TABLE t MODIFY COLUMN `arr.n` Array(Nullable(String)) SETTINGS alter_sync = 0;
SELECT `arr.n`.null FROM t;The frames match yours exactly: The fix prefers a plain entry over a subcolumn entry for a group member's element type, so the |
|
🕵 The two red checks on eb79d76 are unrelated to this
@groeneai, investigate these two failures and provide fixes in separate PRs: the residual |
|
Both investigated.
|
|
…er-tab Conflicts: - `programs/server/play.html`: in `writeHistoryEntry`, master switched `buildHistoryParams` to the recorded (launch-snapshot) parameters while this branch switched the run flag from `carries_run` to the per-tab `stamp_run`. The two changes are independent, so both are kept: `buildHistoryParams(recorded_params, ..., stamp_run, ...)`. In the `IndexedDB` restore, master added `paramsSyncedQuery` next to this branch's `runnableUrl`; both fields are kept. - `tests/integration/test_play_reconcile_startup/reconcile_harness.js`: both sides appended new scenarios at the end of the file; both blocks are kept.
|
🕵 The three red checks on 774ce62 are all stress-test This is a fleet-wide spike, not specific to this PR: CIDB shows ~500 stress-test hung-check failures across master (PR 0) and dozens of PRs between 2026-08-08 and 2026-08-11, and it is still failing on master today, so a master re-merge would not clear it ( The hung stacks visible in the reports are uninterruptible CPU-bound query analysis of fuzzer-generated queries: deep @groeneai, investigate the fleet-wide hung-check spike and provide a fix in a separate PR. If a fix is already in progress, link it here. |
|
Investigated. One signature accounts for the whole spike, and the fix is already open: your own #114326. I sampled 28 distinct spike runs (14 PR + 14 master, picked at random from CIDB over the spike window) and read with Two corrections to the reading above, both about the artifact rather than the bug:
So it is not the #112203 family. #112203 is real and separate, but it does not produce the step: normalized, 0.32% of stress runs on 08-09 (11/3425), 7.6% on 08-10 (325/4268), 10.0% so far on 08-11 (182/1815), with I am not opening a competing PR, since #114326 is the right fix and it is yours. It is |
|
Following up on The fix is #115981, and it is not mine. It is a wrong-results bug in plain That also explains why only the compact variant ever failed: in a Wide part the rename mutation only renames files, which is a no-op once the merge wrote the new name. No action needed here. |
Opening a
/play?run=1#...link left the directive in a session-globalrun_immediately, and every history write recomputed the entry's marker asrun_immediately && fromRun. So the directive leaked onto unrelated tabs: with arun=1link open, merely switching to another clean, run-backed tab rewrote that tab's URL as?run=1&tab=Report#..., and an ordinary reload of it then auto-executed its query — possibly a write or DDL statement the user never asked to re-run.The same global was mutated in the other direction:
reconcileStartupcleared it on a stale reload or a dirty startup, which silently disabled auto-runnable URLs for the whole session, so no later genuine run could produce a shareablerun=1link.Replace the mutable global with a per-tab policy,
tab.runnableUrl: a tab's entries may carryrun=1only when a genuine run under a?run=1load produced them (saveHistory), or when a Back/Forward entry recorded that policy itself (window.onpopstate). The policy is serialized into the history state so time travel carries it, and persisted with the tab, but honored on restore only when the load itself carries the directive — a plain/playnavigation clears it, so the marker erodes instead of resurfacing in a later session.run_immediatelyis nowconstand describes only whether this load was asked to auto-run.The startup-suppression sites no longer need to clear anything: an entry can carry
run=1only through the tab's own policy, never through the load's directive, so the leak they were papering over is closed at the source.Pinned by three scenarios added to the existing
test_play_reconcile_startupharness, which runs the real page script undernode. The first fails onmasterwithhttp://127.0.0.1:8123/play?run=1&tab=Report#U0VMRUNUIDg=; the other two guard against fixing the leak by simply never writing the marker.Split out of #109360, which is now closed.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
In the Web UI, opening a link with
run=1no longer makes other tabs' URLs auto-run their queries on the next page reload.Documentation entry for user-facing changes
Version info
26.8.1.1259(included in26.8and later)