gc's interrupt drops nothing; a prompt that !stop drops is closed #36

Merged
mikluko merged 1 commit from server-interrupt into main 2026-11-16 06:06:13 +00:00
Owner

The owner's decision on spec-bb1.11 (specs-18's amendment): gc's interrupt is not !stop. It ends the turn and drops nothing; the owner's waiting messages and gc's nudges run after it, the owner's first. And a prompt that !stop drops gets a closing record, so that a room takes the ⏳ off from a record. One pull request for the three sides, since roomcity-5e's session takes no messages at the moment; the host's change is three lines and a test.

  • proto: Cancel has bool keep_waiting = 1. False is the owner's !stop, as before.
  • host (internal/host): cancel(ctx, keepWaiting) drops the owner's queued prompts only when it is false. Test: running / gc nudge / owner waits / gc nudge, interrupted: all four run, the owner's second.
  • server: Registry.Interrupt queues the Cancel with KeepWaiting, with no re-queueing of what waits; the operation interrupt and the keys Escape and Ctrl-C use it. Registry.Cancel (!stop) closes the record of each owner's prompt that has been neither delivered nor dropped with a Prompt{State: Dropped, Of: <the Stored record's Seq>}; the host's queue and the server's are both covered, since the server knows every owner's prompt not yet reported delivered. A late Handled report for a dropped prompt changes nothing. Schema: a column, keep_waiting, under the unreleased version 1.

For roomcity-ee: the closing record is session.Prompt{Seq, Source: FromOwner, Text, State: Dropped, Of}; Of is what Service.Prompt returned for it.

Assisted-By: Claude noreply@anthropic.com

The owner's decision on spec-bb1.11 (specs-18's amendment): gc's `interrupt` is not `!stop`. It ends the turn and drops nothing; the owner's waiting messages and gc's nudges run after it, the owner's first. And a prompt that `!stop` drops gets a closing record, so that a room takes the ⏳ off from a record. One pull request for the three sides, since roomcity-5e's session takes no messages at the moment; the host's change is three lines and a test. - proto: `Cancel` has `bool keep_waiting = 1`. False is the owner's `!stop`, as before. - host (`internal/host`): `cancel(ctx, keepWaiting)` drops the owner's queued prompts only when it is false. Test: running / gc nudge / owner waits / gc nudge, interrupted: all four run, the owner's second. - server: `Registry.Interrupt` queues the Cancel with `KeepWaiting`, with no re-queueing of what waits; the operation `interrupt` and the keys Escape and Ctrl-C use it. `Registry.Cancel` (`!stop`) closes the record of each owner's prompt that has been neither delivered nor dropped with a `Prompt{State: Dropped, Of: <the Stored record's Seq>}`; the host's queue and the server's are both covered, since the server knows every owner's prompt not yet reported delivered. A late `Handled` report for a dropped prompt changes nothing. Schema: a column, `keep_waiting`, under the unreleased version 1. For roomcity-ee: the closing record is `session.Prompt{Seq, Source: FromOwner, Text, State: Dropped, Of}`; `Of` is what `Service.Prompt` returned for it. Assisted-By: Claude <noreply@anthropic.com>
gc's interrupt drops nothing, and a prompt that !stop drops is closed
All checks were successful
test / changelog (pull_request) Successful in 6s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 51s
98651363df
The owner's decision on spec-bb1.11: gc's interrupt ends the running turn
and drops nothing; what waits runs after it, the owner's first. Cancel of
HostService gets keep_waiting for it, which the host reads and the server
sets for Registry.Interrupt; the operations' interrupt and the keys that
stop a turn use it. The owner's !stop is the Cancel without it.

The owner's !stop closes the record of each owner's prompt it drops, those
the server holds and those the host holds, with a Dropped prompt record
whose Of is the Stored record's Seq, so that a room can take the waiting
mark off. A report of what the host did with a prompt that comes after
its Dropped record changes nothing.

Assisted-By: Claude <noreply@anthropic.com>
mikluko deleted branch server-interrupt 2026-11-16 06:06:13 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/roomcity!36
No description provided.