Skip to content

Let the current provider settle a record its predecessor left - #32

Merged
archledger merged 1 commit into
plasma-fusionfrom
fix/settle-by-successor
Nov 14, 2026
Merged

archledger merged 1 commit into
plasma-fusionfrom
fix/settle-by-successor

Conversation

@archledger

Copy link
Copy Markdown
Owner

What

Once the provider that admitted a window has retired, the writer's current provider may settle the window's released record, under the same evidence as before. Until now only the admitting provider could, so a record its provider left behind lasted until the window closed, and the window could not be tiled again (archledger/plasma-fusion#175).

When it happens

The placement script is unloaded or reloaded after a release and before it settled the record:

  • the teardown's restore never started (the claim was refused) and the tree's release detached the window;
  • the user moved the window while the restore was in flight;
  • the script stopped without its teardown, so the controller released the window detach-only.

The reloaded script finds the record (floatingFrame answers), but settleWindow refused it as another provider's (2).

The change

Window::settleReleasedTransientOwnership:

  • The caller must be registered. The writer holds one provider at a time.
  • A caller other than the admitting provider is accepted only while the admitting provider is not registered.

Every evidence condition is unchanged:

  • no live restoration: a reloaded provider never takes a window over a record in flight, it gets NotReleased;
  • an ordinary mode outside every tile;
  • settled geometry;
  • the window on its floating frame (or its image), or where the user's own move or resize left it.

The writer finalizes as before. The doc comments in window.h and transienttilingapi.h say so.

Tests

testTransientTilingFacadeReleasedMaster gains a successor column and five rows: desktop-removed-successor, moved-by-hand-successor, key-conflict-successor, output-removed-successor and re-checked-by-the-workspace-successor. In each, the admitting provider is destroyed after the release and a new one registers. Then:

  • the first provider's token answers StaleProvider, and so does a random token;
  • the new provider returns the window and settles the record as the first would have, then admits the window again and restores it.

Without the change the five rows fail: settle answers StaleProvider to the new provider. The other 16 rows are unchanged.

  • The fork's suite campaign (27 suites): all pass.
  • Mutation: an unregistered caller let through. The five successor rows fail (the random token is no longer refused).
  • Equivalent by the writer's one-provider rule: dropping the "while the admitting one is not registered" clause. When the admitting provider is registered, no other caller can be.

The script's side

The placement script's start ends such records (tiler.adoptStranded): the window goes back to the floating frame the record holds, unless the user put it where it stands, and is settled. On a fork without this change the settle answers 2 and the script leaves the window alone, as before.

A released record could end only through the provider that admitted
the window. When that provider retired first, nothing could ever end
the record. This happens when the placement script is unloaded or
reloaded after a release, before it settled: its teardown's restore
never started, the user moved the window while the restore was in
flight, or the script stopped without its teardown. The window kept
its record until it closed and could not be tiled again
(plasma-fusion#175).

settleReleasedTransientOwnership now also accepts the writer's current
provider once the admitting provider has retired. The caller must be
registered; another provider than the admitting one only while the
admitting one is not. Every evidence condition is unchanged: no live
restoration, an ordinary mode outside every tile, settled geometry,
and the window on its floating frame or where the user's own move or
resize left it. A live restoration is still nobody's to settle, so a
reloaded provider never takes a window over a record in flight.

testTransientTilingFacadeReleasedMaster gains a successor column and
five rows: a removed desktop, the user's move, a second window of the
app, a removed output and the work area's re-check. In each, the
admitting provider is destroyed after the release and a new one
registers. The first's token settles nothing; the new provider returns
the window and settles it as the first would have, and admits it
again. The five rows fail without the change: settle answers
StaleProvider.

Signed-off-by: Wisbendji Fimerlus <archledger236@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 14, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T11:02:06.488891Z b6f262a PR opened
ℹ️ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants