Skip to content

Commit 2eedf3a

Browse files
committed
Record #1221 as migration phase 1 and correct its residual-race scope
PR #1221 implements the plan's phase 1 (topology-derived occupancy). Its analysis also corrects an overstatement here: no occupancy check prevents two sessions completing the wizard simultaneously on the same free region, so #1220's ValueError handler remains necessary rather than being subsumed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FsNGwvf1r6xa2JH4qiiJFf
1 parent a0db7ef commit 2eedf3a

3 files changed

Lines changed: 16 additions & 9 deletions

File tree

docs/developer/proposals/declarative-session-reconciler-current-state.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ race today, reproducibly after #1216's gate defers builds — the grid offers
132132
`PlotOrchestrator.add_cell`'s overlap `ValueError`, which the success handler
133133
did not catch. Two fixes: catch the error (done in #1220; the simultaneous-
134134
wizard race needs it regardless), and derive occupancy from topology (the
135-
structural half, deferred to a follow-up — phase 1 of the migration plan).
135+
structural half — phase 1 of the migration plan, in flight as
136+
[#1221](https://github.com/scipp/esslivedata/pull/1221)).
136137

137138
## Five representations of "is anyone looking"
138139

docs/developer/proposals/declarative-session-reconciler-migration.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,21 @@ to this module needs.
5555

5656
## Phase 1 — occupancy from topology (#1219, structural half)
5757

58-
`PlotGrid` stops deriving free positions from inserted widgets. Instead the
59-
reconciler hands it the occupied geometry set from the topology snapshot on
60-
each pass (or `PlotGrid` receives a callable). `_occupied_cells` shrinks to
61-
"which widget sits at which geometry" (needed for removal/replacement), and
62-
`_is_region_available` consults the topology-derived set.
58+
**Status: in flight as [#1221](https://github.com/scipp/esslivedata/pull/1221).**
59+
60+
`PlotGrid` stops deriving free positions from inserted widgets. Instead it
61+
receives a callable returning the grid's topology geometries (wired to the
62+
orchestrator by `PlotGridTabs`), and the second click of the selection
63+
gesture re-validates the region before opening the wizard. `_occupied_cells`
64+
shrinks to "which widget sits at which geometry" (needed for
65+
removal/replacement) and no longer feeds selection decisions.
6366

6467
Small, local, already agreed as the right fix in #1219. Kills the
65-
offered-then-refused wizard path entirely — including the cross-session race
66-
the `ValueError` handler now merely reports politely.
68+
stale-display path (empty cells offered over positions topology holds). One
69+
residue is unavoidable by construction: two sessions can still complete the
70+
wizard *simultaneously* on the same genuinely-free region, so the loser hits
71+
the overlap `ValueError`#1220's error handler stays necessary as the last
72+
line of defence, and no occupancy model removes it.
6773

6874
## Phase 2 — `desired()` + differ for structure and materialization
6975

docs/developer/proposals/declarative-session-reconciler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ risks, and the test strategy are in the
398398
| Phase | Content | Ships alone? |
399399
|---|---|---|
400400
| 0 | Characterization tests around the current pass | yes (pure gain) |
401-
| 1 | Occupancy derived from topology (#1219, part 2) | yes (agreed follow-up) |
401+
| 1 | Occupancy derived from topology (#1219, part 2) | yes — in flight as [#1221](https://github.com/scipp/esslivedata/pull/1221) |
402402
| 2 | `desired()` + differ for cell existence and materialization; delete signature/version memos | yes — **this is the go/no-go spike** |
403403
| 3 | Fold data-flush and freshness gating into the same shape | optional |
404404
| 4 | Stable widget shell, swap only the figure on plotter change | speculative spike |

0 commit comments

Comments
 (0)