Skip to content

fix: preserve requester permissions when interrupted work resumes - #200394

Merged
roboclaw-bot merged 8 commits into
mainfrom
openclaw/gentle-lobster-4
Nov 17, 2026
Merged

roboclaw-bot merged 8 commits into
mainfrom
openclaw/gentle-lobster-4

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #182042, #182043 (distinct completion-recovery paths; this change repairs interrupted root turns).

What Problem This Solves

After a Gateway restart, interrupted work in a shared session can resume without the person who authorized it, or as the session's owner instead. Follow-up tools then reject the task or see the wrong person's permissions.

User Impact

Interrupted turns can resume as their original requester, within that requester's original limits and current access. Revoked or unavailable sources still fail closed. Existing markers without an original source retain their previous recovery policy; already-yielded roots with only child work alive are not covered by this change. No configuration or migration is required.

Why This Change Was Made

Reuse the existing shutdown marker and recovery owner to preserve the interrupted turn's bounded authentication source, apply its scope ceiling before session admission, and resume the accepted access grant rather than requesting another one. Do not select a later participant or substitute the session owner.

Also retain service-installation facts through the existing connection-work owner. Losing those host facts in socket callbacks caused the initial trusted-proxy connection to conflict with an already-retained database worker. This restores the same host policy without capturing requester/startup authority or weakening the worker guard. No GitHub credential or permission checks change.

Evidence

  • Original regressions reproduced missing requester authority, wrong-person fallback and refusal at initial trusted-proxy pairing. Focused tests pass for original-scope admission, revocation, own-session restrictions, original-grant reuse, owner certificates and request-context isolation. The eight requester regressions now live in the existing admission-test owner, without changing their assertions or the hosted budget.
  • Live OpenAI full-access recovery passed with gpt-5.6-luna after main integration: one original side effect, fresh shell work, a completed child and one final reply after a real Gateway replacement. The gpt-5.4 audit also passed through three replacements without another user turn. The exact retained-child → live GitHub operation remains unproven.
  • Final landing corrections use an actual signed-in requester in the process-refusal test, assert its durable captured profile, and change only that profile while the isolated Gateway is stopped. The healthy sibling still resumes; the revoked requester produces a visible failure and no resumed model request. No runtime policy or assertions were weakened. Detailed restart guidance distinguishes captured-source recovery from legacy principal recovery.
  • On final head 049f7fffc862659317db98a35862ac4e62a26053, the documented QA runtime build passed. All seven tests selected from the failed CI run passed locally: five real Gateway restart process tests and two Workshop tests. All 11 admission controls passed. The owning tsconfig.test.root.other.json typecheck, core lint for both touched tests, format and diff checks passed. Two all-type imports were corrected to top-level import type declarations.
  • Fresh independent Codex autoreview of the complete final correction against 2ee2d08dff5863a45c57c706ad257447773c499b, P0–P2: complete, scoped-clean, no actionable findings. Earlier complete runtime/main-integration reviews remain applicable to the unchanged runtime.
  • Current-head CI run 44021828880 passed on this exact head (attempt 1); no admin or inherited-failure exception was used. The prior run's Workshop timeout and subsequent cleanup refusal did not reproduce locally; passing replay is not claimed as a Workshop fix. The default typed AI build refused an external declaration input; the supported QA runtime build succeeded without bypassing that boundary or changing shared dependencies.
  • Simplification retained the existing marker, recovery and connection-work owners; no new manager or schema. The latest stable predates these restart-source fields; serialized legacy recovery controls passed, but this is not an installed-release upgrade execution.

Credit: @vincentkoc for reporting the incident and directing the investigation and fix.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 3 commits November 17, 2026 03:27
Carry the original bounded requester source through restart recovery and retain service installation facts for received connection work.

Co-authored-by: vincentkoc <[email protected]>
Keep the existing checkpoint programs and assertions while avoiding required-result mode, which correctly refuses an explicit unfinished yield.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: ae7b4a92-2ec6-4092-8b76-1f63dfd010ef
@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime extensions: qa-lab size: M labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 049f7fffc862659317db98a35862ac4e62a26053
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/session-sharing-authorization-async.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/session-system-turn-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@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. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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 Nov 17, 2026
@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head d416ba9e61cfae522c933ce17b8f597822c7f775, but the PR head is now 8708fff7621c551ba4e336cb84da00de50112dfe. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-17T03:58:39.241Z sha d416ba9 :: blocked before merge. :: [P2] [P2] Register the new regression in the source-owner expectation | [P2] [P2] Update the restart refusal test to revoke the actual requester | [P3] [P3] Align the detailed recovery documentation with the new policy

roboclaw-bot and others added 2 commits November 17, 2026 04:03
Integrate main for the observed merge-context failures, retain all eight authority regressions in the existing restart admission suite, and require that fixture consumer in affected-owner planning. This removes the extra hosted job without raising the budget.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 8ac7f510-c978-4fdc-b8a3-66ff171f5424
@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 17, 2026
roboclaw-bot and others added 2 commits November 17, 2026 05:04
Exercise distinct signed-in requester profiles instead of loopback owner credentials, and change only the captured profile after shutdown. Keep the healthy sibling and visible refusal assertions unchanged.

Co-authored-by: vincentkoc <[email protected]>
@roboclaw-bot
roboclaw-bot merged commit d80fbe7 into main Nov 17, 2026
149 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/gentle-lobster-4 branch November 17, 2026 05:36
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

obviyus added a commit that referenced this pull request Nov 18, 2026
… crashes (#200533)

## Problem

An accepted (acknowledged) queued chat message could disappear without a trace:

- It could be cancelled with no stored reason. History showed nothing, and retrying the same message ID could return a cached success although the message never ran.
- A Gateway crash (SIGKILL) lost it. Recovery depended on a graceful-shutdown marker, so a crash before the acknowledgment, or between claiming the message and the turn taking it over, left neither a queued row nor a running turn. On restart nothing answered and nothing explained why.

This changes #185730's accepted SIGKILL loss for acknowledged queued input.

## Fix

**Recorded end causes**
- Store a closed `end_cause` (`user-stop`, `delete`, `reset`, `revoked`, `restart-unrecoverable`, `overflow`, `policy-refused`, `failed`) through the existing pending-input owner. One settlement owner classifies causes (an explicit Stop, delete, reset or revocation wins over a temporary outage), releases consumed custody and records terminal endings.
- Temporary authority or dispatch outages: before the input is accepted (no acknowledgment sent; the caller gets the error), the row ends `failed`, as main cancels it today. After acceptance, the row stays queued and the failed attempt gives up its live ownership, so the existing owner (follow-up drain, mailbox, or startup replay) runs it once.
- Read durable cancellation before cached success/abort responses; a queued retry reports in flight.
- Chat shows one translated sentence per cause (for example "The Gateway restarted before this message ran. Send it again."). A message the user stopped shows no notice, as before (#186073).
- Channel redelivery under a fresh run ID still reclaims an attempt that ended `failed`, `restart-unrecoverable`, or with no recorded cause (#193602). Explicit caller retries may reopen a cancelled row unless a final completion receipt exists or the user stopped it. One function (`isRetryableSessionPendingInputEndCause`) defines retryable endings for redelivery and Doctor repair; when Doctor merges two copies of one input, a deliberate ending in either copy wins.

**Crash recovery**
- Store the already captured, authenticated sender source on the pending row (`origin_source_json`). Startup replays queued, unconsumed rows in FIFO order after running-root resume admission and revalidates current authority when work starts. A missing source ends as `restart-unrecoverable`. The column is cleared when custody ends. It is not the retired, untrusted `recovery_intent_json` envelope; historical v24 interruption is unchanged.
- The transaction that appends the user message and consumes the pending row also writes the turn's existing lifecycle start fields, so restart recovery always finds the input as either a queued row or a running turn. No new table, scheduler or reconstruction machinery.
- If replay defers because authority or dispatch is temporarily unavailable, the session keeps its older rows ahead of new input: the shared admission point (`waitForAgentInputAdmission`) runs that session's deferred replay once before admitting fresh input, and refuses fresh input with the same retryable error while it still defers. Other sessions are unaffected. No timer or retry loop.
- Legacy `queuedInputSources` move from shutdown markers to their pending rows through the startup/Doctor rewrite owner. #200394's `resumeAfterRestart.operatorSource` (the interrupted root requester) is kept; a crash writes no marker, so source-less root recovery keeps the existing session-principal policy.

## Agent schema 43 (one bump)

The agent database schema advances from 42 to 43 on SQLite and PostgreSQL through the existing versioned migration owners. It adds nullable `end_cause` and `origin_source_json` to `session_pending_inputs` and, in the same transaction, sets `end_cause = 'user-stop'` for older cancelled rows whose message carries `__openclaw.pendingInputCancelledByUser: true` or `display: false` (message bytes unchanged; dismissed rows stay hidden). Runtime readers use only `end_cause`.

Every pre-43 historical schema, including the schema-14 preflight, is derived without the two columns; PostgreSQL v42 predecessor DDL is unchanged. Older builds refuse schema 43; rollback needs the pre-upgrade backup and the matching binary. No schema-version bypass.

Pre-migration backup: `session_pending_inputs` is the agent schema's only `AUTOINCREMENT` table, and the scoped migration snapshot does not cover `AUTOINCREMENT` tables (shared `sqlite_sequence`), so Doctor takes its existing full-database backup for 42 → 43 wherever that table exists. Upgrades from stable 2026.11.4 already take a full backup (schema 30 has no scoped entry). For stores already on 42 this is a one-time copy about the size of the agent database (3.0 GB on one measured long-lived store). The migration inserts no rows, and no backup code changes.

## User impact

- A queued message survives a crash: it is answered once, or ends with a visible reason. Same-ID retries never start a second answer.
- Cancelled messages explain why, in plain words, instead of looking successful.
- During a startup access outage, new messages in an affected session get a "try again" error until its older messages have run; nothing runs out of order.

Accepted edges:
- Explicit `sessions.delete` removes input rows and message bodies; the delete confirmation is the visible result.
- Stop on 2026.11.4 and earlier wrote no marker; such rows stay generically cancelled and reclaimable by a same-content channel redelivery, as on main.
- An accepted input whose path has no in-process retrier (direct agent execution after acknowledgment) and that hits a temporary outage stays visibly queued until the next Gateway start replays it.
- The upgrade from 42 to 43 takes a full-database backup where `session_pending_inputs` exists (see Agent schema 43).
- No exactly-once guarantee for external tool effects or provider billing.

## Evidence

- Head `ed2c3b46d558`, rebased on current main: format, lint and line caps pass; `pnpm tsgo:core`, all `pnpm tsgo:core:test` configurations and the script typecheck pass; all baseline ratchets and the import-cycle guard pass. Regression tests (each red on an earlier head) cover deferred replay ordering, the shared-store graceful-restart agent, pre-acceptance outages, an accepted follow-up that waits out an outage and then runs exactly once, a same-key attempt with a different run ID (refused), startup replay racing the follow-up drain (one run), a user Stop during an outage, and the original abort signal on cleanup. An internal stop is not recorded as `user-stop`; only a user-initiated Stop is. Only the recorder that confirmed a relinquish may re-attach its queued row; a fresh send, a redelivery or a row whose settlement failed cannot (the revoked-parent-after-stop test stays refused). Startup replay re-attaches only its exact durable row by input ID after a deferred outage.
- Schema: reopening a main v42 PostgreSQL store failed before the migration (`PostgreSQL schema drift detected against generated DDL`) and now migrates to 43; 10 real PostgreSQL tests pass. The v14-to-v15 migration test failed with `column definitions differ for session_pending_inputs` before the historical-schema fix and passes now. Each review fix carries a regression test that failed before it.
- Crash proof on head `ed2c3b46d558`: isolated source Gateway, Node inspector, real model, external SIGKILL at the exact breakpoint; `plugins.allow=["openai"]`, `plugins.slots.memory="none"`, `cron.enabled=false`. Baseline is main at `6747b1ec5ae3`.

  | Fault | Main answers / queued model calls | This PR answers / queued model calls | Stored outcome |
  | --- | --- | --- | --- |
  | Message row written, before acknowledgment | 0 / 0 | 1 / 1 | Answered; no pending row; session done |
  | Message claimed, before the turn took it over | 0 / 0 | 1 / 0 (one running-turn recovery call) | Answered; the message was already in the transcript and the row gone at the pause; session done |

  Each produced exactly one answer and no extra model calls after a same-ID retry. Earlier runs on pre-43 head `975900737b4f` covered a crash just after takeover (one answer, no duplicate) and mid-turn (one answer).
- Upgrade from 2026.11.4 (schema 27), clean shutdown and SIGKILL: both reach schema 43 with both columns; a message still queued after the SIGKILL ends `cancelled / restart-unrecoverable`, shown in history and on same-ID retry, with zero model calls. Both this branch and pinned main fail their first start after that SIGKILL with a secrets/SQLite disk-I/O error and succeed on the second start; filed separately as #200617. Doctor's Control UI build during that upgrade is #200618.
- Chat notice before/after screenshots are in the PR comments.

No full release declaration proof or real PostgreSQL conformance suite is claimed beyond the tests above.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
…enclaw#200394)

* fix: preserve requester permissions when interrupted work resumes

Carry the original bounded requester source through restart recovery and retain service installation facts for received connection work.

Co-authored-by: vincentkoc <[email protected]>

* test(qa): select intentional suspension for restart checkpoints

Keep the existing checkpoint programs and assertions while avoiding required-result mode, which correctly refuses an explicit unfinished yield.

Co-authored-by: vincentkoc <[email protected]>

* fix: preserve requester permissions when interrupted work resumes

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: ae7b4a92-2ec6-4092-8b76-1f63dfd010ef

* Publish openclaw/gentle-lobster-4

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 8ac7f510-c978-4fdc-b8a3-66ff171f5424

* fix: align restart refusal proof with requester authority

Co-authored-by: vincentkoc <[email protected]>

* test: revoke the captured restart requester in process proof

Exercise distinct signed-in requester profiles instead of loopback owner credentials, and change only the captured profile after shutdown. Keep the healthy sibling and visible refusal assertions unchanged.

Co-authored-by: vincentkoc <[email protected]>

* test: keep restart admission imports type-only

Co-authored-by: vincentkoc <[email protected]>

---------

Co-authored-by: vincentkoc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
… crashes (openclaw#200533)

## Problem

An accepted (acknowledged) queued chat message could disappear without a trace:

- It could be cancelled with no stored reason. History showed nothing, and retrying the same message ID could return a cached success although the message never ran.
- A Gateway crash (SIGKILL) lost it. Recovery depended on a graceful-shutdown marker, so a crash before the acknowledgment, or between claiming the message and the turn taking it over, left neither a queued row nor a running turn. On restart nothing answered and nothing explained why.

This changes openclaw#185730's accepted SIGKILL loss for acknowledged queued input.

## Fix

**Recorded end causes**
- Store a closed `end_cause` (`user-stop`, `delete`, `reset`, `revoked`, `restart-unrecoverable`, `overflow`, `policy-refused`, `failed`) through the existing pending-input owner. One settlement owner classifies causes (an explicit Stop, delete, reset or revocation wins over a temporary outage), releases consumed custody and records terminal endings.
- Temporary authority or dispatch outages: before the input is accepted (no acknowledgment sent; the caller gets the error), the row ends `failed`, as main cancels it today. After acceptance, the row stays queued and the failed attempt gives up its live ownership, so the existing owner (follow-up drain, mailbox, or startup replay) runs it once.
- Read durable cancellation before cached success/abort responses; a queued retry reports in flight.
- Chat shows one translated sentence per cause (for example "The Gateway restarted before this message ran. Send it again."). A message the user stopped shows no notice, as before (openclaw#186073).
- Channel redelivery under a fresh run ID still reclaims an attempt that ended `failed`, `restart-unrecoverable`, or with no recorded cause (openclaw#193602). Explicit caller retries may reopen a cancelled row unless a final completion receipt exists or the user stopped it. One function (`isRetryableSessionPendingInputEndCause`) defines retryable endings for redelivery and Doctor repair; when Doctor merges two copies of one input, a deliberate ending in either copy wins.

**Crash recovery**
- Store the already captured, authenticated sender source on the pending row (`origin_source_json`). Startup replays queued, unconsumed rows in FIFO order after running-root resume admission and revalidates current authority when work starts. A missing source ends as `restart-unrecoverable`. The column is cleared when custody ends. It is not the retired, untrusted `recovery_intent_json` envelope; historical v24 interruption is unchanged.
- The transaction that appends the user message and consumes the pending row also writes the turn's existing lifecycle start fields, so restart recovery always finds the input as either a queued row or a running turn. No new table, scheduler or reconstruction machinery.
- If replay defers because authority or dispatch is temporarily unavailable, the session keeps its older rows ahead of new input: the shared admission point (`waitForAgentInputAdmission`) runs that session's deferred replay once before admitting fresh input, and refuses fresh input with the same retryable error while it still defers. Other sessions are unaffected. No timer or retry loop.
- Legacy `queuedInputSources` move from shutdown markers to their pending rows through the startup/Doctor rewrite owner. openclaw#200394's `resumeAfterRestart.operatorSource` (the interrupted root requester) is kept; a crash writes no marker, so source-less root recovery keeps the existing session-principal policy.

## Agent schema 43 (one bump)

The agent database schema advances from 42 to 43 on SQLite and PostgreSQL through the existing versioned migration owners. It adds nullable `end_cause` and `origin_source_json` to `session_pending_inputs` and, in the same transaction, sets `end_cause = 'user-stop'` for older cancelled rows whose message carries `__openclaw.pendingInputCancelledByUser: true` or `display: false` (message bytes unchanged; dismissed rows stay hidden). Runtime readers use only `end_cause`.

Every pre-43 historical schema, including the schema-14 preflight, is derived without the two columns; PostgreSQL v42 predecessor DDL is unchanged. Older builds refuse schema 43; rollback needs the pre-upgrade backup and the matching binary. No schema-version bypass.

Pre-migration backup: `session_pending_inputs` is the agent schema's only `AUTOINCREMENT` table, and the scoped migration snapshot does not cover `AUTOINCREMENT` tables (shared `sqlite_sequence`), so Doctor takes its existing full-database backup for 42 → 43 wherever that table exists. Upgrades from stable 2026.11.4 already take a full backup (schema 30 has no scoped entry). For stores already on 42 this is a one-time copy about the size of the agent database (3.0 GB on one measured long-lived store). The migration inserts no rows, and no backup code changes.

## User impact

- A queued message survives a crash: it is answered once, or ends with a visible reason. Same-ID retries never start a second answer.
- Cancelled messages explain why, in plain words, instead of looking successful.
- During a startup access outage, new messages in an affected session get a "try again" error until its older messages have run; nothing runs out of order.

Accepted edges:
- Explicit `sessions.delete` removes input rows and message bodies; the delete confirmation is the visible result.
- Stop on 2026.11.4 and earlier wrote no marker; such rows stay generically cancelled and reclaimable by a same-content channel redelivery, as on main.
- An accepted input whose path has no in-process retrier (direct agent execution after acknowledgment) and that hits a temporary outage stays visibly queued until the next Gateway start replays it.
- The upgrade from 42 to 43 takes a full-database backup where `session_pending_inputs` exists (see Agent schema 43).
- No exactly-once guarantee for external tool effects or provider billing.

## Evidence

- Head `ed2c3b46d558`, rebased on current main: format, lint and line caps pass; `pnpm tsgo:core`, all `pnpm tsgo:core:test` configurations and the script typecheck pass; all baseline ratchets and the import-cycle guard pass. Regression tests (each red on an earlier head) cover deferred replay ordering, the shared-store graceful-restart agent, pre-acceptance outages, an accepted follow-up that waits out an outage and then runs exactly once, a same-key attempt with a different run ID (refused), startup replay racing the follow-up drain (one run), a user Stop during an outage, and the original abort signal on cleanup. An internal stop is not recorded as `user-stop`; only a user-initiated Stop is. Only the recorder that confirmed a relinquish may re-attach its queued row; a fresh send, a redelivery or a row whose settlement failed cannot (the revoked-parent-after-stop test stays refused). Startup replay re-attaches only its exact durable row by input ID after a deferred outage.
- Schema: reopening a main v42 PostgreSQL store failed before the migration (`PostgreSQL schema drift detected against generated DDL`) and now migrates to 43; 10 real PostgreSQL tests pass. The v14-to-v15 migration test failed with `column definitions differ for session_pending_inputs` before the historical-schema fix and passes now. Each review fix carries a regression test that failed before it.
- Crash proof on head `ed2c3b46d558`: isolated source Gateway, Node inspector, real model, external SIGKILL at the exact breakpoint; `plugins.allow=["openai"]`, `plugins.slots.memory="none"`, `cron.enabled=false`. Baseline is main at `c303d979c41b`.

  | Fault | Main answers / queued model calls | This PR answers / queued model calls | Stored outcome |
  | --- | --- | --- | --- |
  | Message row written, before acknowledgment | 0 / 0 | 1 / 1 | Answered; no pending row; session done |
  | Message claimed, before the turn took it over | 0 / 0 | 1 / 0 (one running-turn recovery call) | Answered; the message was already in the transcript and the row gone at the pause; session done |

  Each produced exactly one answer and no extra model calls after a same-ID retry. Earlier runs on pre-43 head `975900737b4f` covered a crash just after takeover (one answer, no duplicate) and mid-turn (one answer).
- Upgrade from 2026.11.4 (schema 27), clean shutdown and SIGKILL: both reach schema 43 with both columns; a message still queued after the SIGKILL ends `cancelled / restart-unrecoverable`, shown in history and on same-ID retry, with zero model calls. Both this branch and pinned main fail their first start after that SIGKILL with a secrets/SQLite disk-I/O error and succeed on the second start; filed separately as openclaw#200617. Doctor's Control UI build during that upgrade is openclaw#200618.
- Chat notice before/after screenshots are in the PR comments.

No full release declaration proof or real PostgreSQL conformance suite is claimed beyond the tests above.

Co-authored-by: Ayaan Zaidi <[email protected]>
RomneyDa pushed a commit that referenced this pull request Nov 19, 2026
…00394)

* fix: preserve requester permissions when interrupted work resumes

Carry the original bounded requester source through restart recovery and retain service installation facts for received connection work.

Co-authored-by: vincentkoc <[email protected]>

* test(qa): select intentional suspension for restart checkpoints

Keep the existing checkpoint programs and assertions while avoiding required-result mode, which correctly refuses an explicit unfinished yield.

Co-authored-by: vincentkoc <[email protected]>

* fix: preserve requester permissions when interrupted work resumes

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: ae7b4a92-2ec6-4092-8b76-1f63dfd010ef

* Publish openclaw/gentle-lobster-4

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 8ac7f510-c978-4fdc-b8a3-66ff171f5424

* fix: align restart refusal proof with requester authority

Co-authored-by: vincentkoc <[email protected]>

* test: revoke the captured restart requester in process proof

Exercise distinct signed-in requester profiles instead of loopback owner credentials, and change only the captured profile after shutdown. Keep the healthy sibling and visible refusal assertions unchanged.

Co-authored-by: vincentkoc <[email protected]>

* test: keep restart admission imports type-only

Co-authored-by: vincentkoc <[email protected]>

---------

Co-authored-by: vincentkoc <[email protected]>
(cherry picked from commit d80fbe7)

Backport review: Preserve accepted operator identity across restart recovery and fail closed for a missing known source; do not widen the session owner authority.
Co-authored-by: RomneyDa <[email protected]>

(cherry picked from commit b5a4aaedd058d8914bd2512c09362f1de0e9dfa0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: qa-lab gateway Gateway runtime P2 Normal backlog priority with limited blast radius. security-sensitive-changed size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant