Skip to content

fix(gateway): recover container startup after a crash - #205709

Merged
RomneyDa merged 7 commits into
mainfrom
openclaw/docker-heartbeat
Nov 26, 2026
Merged

RomneyDa merged 7 commits into
mainfrom
openclaw/docker-heartbeat

Conversation

@tideclaw-bot

@tideclaw-bot tideclaw-bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #203932

What Problem This Solves

After a Gateway container is killed, a new Gateway on the same persistent volume cannot inspect the old PID from its new PID namespace. Before this change it waited about 95 seconds and then failed with GatewayLockNamespaceError even when the old Gateway was gone, and the only way out was the manual openclaw gateway recover-lock procedure.

User Impact

  • Restarting the same container (default container-ID hostname) after SIGKILL takes over immediately.
  • A replacement container after SIGKILL takes over once the old owner's heartbeat has been stale for more than 90 seconds, within the existing 95-second wait.
  • A still-running Gateway in another container keeps the lock. The contender fails after the same bounded wait as before, and its restart policy can retry.
  • Non-container installs keep native PID checks; nothing changes for a single Gateway on one host.
  • The confirmed SQLite/PostgreSQL recover-lock backend stays available as a hidden diagnostic and is no longer advertised in startup, update, or daemon guidance.

Why This Change Was Made

Filesystem locks, persisted Gateway owner leases, and SQLite/Doctor admission now share one classification. A different Linux PID namespace counts as dead if (a) the record's hostname is the current container's 12-hex default hostname inside a container, or (b) the lock's heartbeat (sidecar mtime, renewed every 15 seconds) is more than 90 seconds old. The Gateway owner lease now records the same 15-second heartbeat interval so lease age agrees with the file lock. Wait bounds, cancellation, and refusal types match the base.

Accepted edge cases, with no added code: a container paused for more than 90 seconds can resume next to its replacement until its next restart, because this change adds no self-fencing (SQLite's native locking still protects the database file). Two different containers given the same custom 12-hex hostname on one volume would be treated as the same container. Production/docs: +139/−176. Tests: +129/−70.

Error surfaces

Full diff against merge-base 90ba7624dbdd. Each row is a new or changed failure path. "Healthy" means a single Gateway, or a normal update, on one host.

Path Fires when healthy? Rollback/outage risk Decision
Foreign-namespace owner classified dead (container hostname or heartbeat over 90 s) No. Same-namespace owners never take this branch No new refusal. It removes one. The risk is overlap after a pause of more than 90 s (accepted above) Kept: this is the fix
Wait on a foreign-namespace owner (acquireGatewayLock) No Same 95 s bound and GatewayLockError as base. Only the log text changed Kept as base. An earlier head waited without limit; removed in 2505c29 and ac69712
Doctor admission signal.throwIfAborted() in assertCurrent — Would have been a new throw inside Doctor/update admission Removed (2505c29). Only the removed unbounded wait needed it
Unparseable owner record now threw GatewayLockNamespaceError instead of contention Only with a malformed record Changed Doctor's retry and the update failure class Removed (2505c29). Contention handling is the same as base
Projection lock (gateway.state.lock) reclaim: unknown owner returns "not stale" instead of throwing No. The state owner is acquired first Same outcome (startup fails with GatewayLockError), different message Kept: equivalent and removes a duplicate classifier call
Doctor restoration reservation no longer passes its path to the stale check No Linux unchanged. Only a namespace-less Windows/macOS reservation (written when boot identity was unavailable) loses heartbeat-based reclaim Kept: reservations don't renew their mtime, so heartbeat age must not make a live one look dead
hasVerifiedLiveSqliteOwner returns false for a dead-classified owner No Fewer throws. A paused foreign owner may be read as offline Kept: consistent with the fix
Gateway owner lease heartbeat 100 s → 15 s; lease state uses heartbeat age across namespaces No refusal More frequent lease writes. A live older (pre-change) Gateway in another container can look "dead" in the lease between 90 and 100 s, but its 15 s file-lock heartbeat still excludes takeover Kept: required so a live lease isn't judged stale
gateway recover-lock hidden; --json drops command; guidance text in legacy-lock, update-refusal, and daemon-diagnostic messages — Text/visibility only. No new exit or refusal Kept

No new throw, exit, refusal, rollback trigger, or tightened validation remains in Gateway startup or update/Doctor admission.

Evidence (exact head ac69712a4729)

All runs used private rootless Podman 5.7.0 (task-owned --root/--runroot, --network none, --http-proxy=false for builds) and synthetic config/state. The candidate is the npm package built from ac69712a4729 with scripts/package-openclaw-for-docker.mjs (build-info commit ac69712a4729d751…, buildId 2026.11.10-ac69712a4729-2026-11-26T05-55-50.847Z).

  • update.run through Doctor admission, systemd user unit (non-container service path): Debian bookworm + systemd, Node 24.22.3. Published [email protected] was installed globally and run as openclaw-gateway.service via openclaw gateway install. update.run targeted the candidate through a loopback registry fixture. For the updater, the candidate's package version was relabeled to 2026.11.11; dist and build-info commit/buildId are unchanged. The run ended succeeded/finished in 106 s (recorded downtime 52 s). Ledger: candidate-admission ok, service-stop ok, openclaw doctor exit 0 (maintenance.begin 0.6 s, schema-admission 0.1 s), post-update verification ok. After the update the service reported the candidate buildId with /healthz 200, /readyz 200, and authenticated health RPC ok.
  • Normal restarts of that service: openclaw gateway restart served again in 11 s, systemctl --user restart in 9 s, and SIGKILL of MainPID (systemd restart) in 13 s. Each came back with the same buildId, a new bootId, and healthz/readyz/health RPC ok. The unit journal had 0 ownership refusals.
  • Container cells, official image entrypoint (tini → docker-entrypoint.mjs → Doctor → Gateway), shared named volume:
    • Same-container SIGKILL restart: ready plus health RPC in 17/18 s, with no wait logged.
    • Replacement container after SIGKILL: waited on the heartbeat and reached ready plus health in 100/101 s.
    • Contender beside a live holder: exited 1 after 98 s. The holder stayed /readyz 200 with health RPC ok throughout.
    • After the holder's graceful stop, the contender restarted and was ready in 17 s.
    • One-off doctor --fix beside a live Gateway: bounded refusal after 97 s (cannot verify Gateway ownership). The serving Gateway was unaffected.
    • Graceful restart: ready in 15/16 s.
  • Container image upgrade: a published 2026.11.10 image Gateway was SIGKILLed. The candidate on the same volume completed Doctor and was ready plus health in 102/103 s. Config SHA-256 and the persisted disabled cron job were unchanged. All fixture containers and volumes were removed.
  • Hosted CI runs on this head.

Unit tests cover additional rows but are not counted as proof here. These are covered only by unit tests: macOS/Windows legacy namespace-less locks, custom-hostname containers, a paused container overlapping its replacement, PostgreSQL lease recovery, mixed-version lease ages, and the restoration-reservation path.

Redacted terminal capture (exact head)
# systemd user unit, update.run
[+27s] baseline serving: version 2026.11.10 commit 6ea542f healthz 200 readyz 200 healthRpc true
[+29s] run running requested
[+42s] run running validating
[+120s] run running verifying
[+130s] run succeeded finished
[+133s] after update (106s): version 2026.11.11 commit ac69712 buildId 2026.11.10-ac69712a4729-2026-11-26T05-55-50.847Z healthz 200 readyz 200 healthRpc true
[+144s] cli-restart: serving again in 11s
[+153s] systemctl-restart: serving again in 9s
[+166s] sigkill: serving again in 13s (NRestarts 1)
[+166s] ownership refusals in unit journal: 0

# container cells
[+45s] same-container-sigkill: /readyz 200 in 17s, authenticated health RPC OK in 18s
[+153s] replacement-after-sigkill: /readyz 200 in 100s, authenticated health RPC OK in 101s
waiting for the previous Gateway to stop (last heartbeat 13s ago)
[+251s] entrypoint contender beside live holder: exit 1 after 98s; holder /readyz 200
[+269s] contender-restart-after-holder-graceful-stop: /readyz 200 in 17s
[+366s] one-off Doctor beside live Gateway: exit 1 after 97s
[+366s] serving Gateway still ready after Doctor: 200
[+383s] graceful-restart: /readyz 200 in 15s
[+503s] upgrade-after-sigkill (published 2026.11.10 -> candidate): /readyz 200 in 102s, health RPC OK in 103s
└  Doctor complete.
[+504s] upgrade preserved config bytes and the disabled cron job
remaining containers: 0; volumes: 0

Worked on by

tideclaw-bot and others added 2 commits November 26, 2026 02:32
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 51d3c870-57c0-45d2-b1c7-601c5a9fd876
@clawsweeper

clawsweeper Bot commented Nov 26, 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 cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling size: XL labels Nov 26, 2026
@tideclaw-bot
tideclaw-bot marked this pull request as ready for review November 26, 2026 02:37
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. impact:crash-loop Crash, hang, restart loop, or process-level availability failure. 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 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Restore automatic Gateway recovery after container crashes using container identity and expired heartbeats while retaining bounded waits and hidden confirmed recovery.

Example: A replacement container starts on the same persistent volume after the previous Gateway receives SIGKILL.

  • Before: Startup waits about 95 seconds and refuses ownership until an operator performs confirmed recovery.
  • After: Startup takes ownership after the previous heartbeat exceeds 90 seconds and reaches readiness automatically.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A worthwhile, focused repair with shipped-entry-point and upgrade proof; the deliberate ownership tradeoff is documented and accepted.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Exact-head terminal captures exercise the official container entrypoint through Doctor and Gateway for crash recovery and live-holder refusal, plus stable-to-candidate container and systemd upgrades with healthy RPC results and preserved config and cron state.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An OOM-killed or force-killed Gateway container remains unavailable despite its restart policy because persistent ownership cannot be verified.
Reason: The failure affects an official released container deployment, and maintainer authorship supplies direction for the expressly documented recovery tradeoff.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR addresses a confirmed container restart failure that remains on main; no blocking correctness or security defect was found.

Reviewed head: ac69712a4729d751c313da6cec9612185b801261

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show a red-on-base run of the committed regression tests.
Agent review details

How this fits together

Gateway startup and Doctor admission inspect physical ownership files and persisted Gateway leases before admitting database access and starting the server.

flowchart TD
 A[Container entrypoint] --> B[Doctor and Gateway admission]
 B --> C[Shared owner classifier]
 C --> D[Physical ownership files]
 C --> E[Gateway owner lease]
 D --> F[Admitted Gateway startup]
 E --> F
Loading

Technical review

Best possible solution:

Use the existing shared ownership classifier for automatic container recovery, preserve bounded live-holder refusal, and retain confirmed recovery for unsupported identities.

Do we have a high-confidence way to reproduce the issue?

The linked report supplies SIGKILL/restart steps, current main establishes the refusal path, and the PR supplies after-fix container captures; this review executed no target code.

Is this the best way to solve the issue?

Centralizing the recovery decision in the existing classifier is a focused fix, with the changed paused-owner policy explicitly accepted and documented by the maintainer-authored PR.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 254f60242899.

Provenance checked

  • Foreign PID-namespace reclamation changes intended behavior with a stated reason (edea119: Prevent paused or unreachable live Gateways from losing ownership merely because their heartbeat exceeded 90 seconds.)
  • Gateway SQL lease renewal cadence changes intended behavior with a stated reason (69ea417: Reduce durable SQL renewal commits when heartbeat age was diagnostic; this PR needs faster renewal because age now participates in container recovery.)
  • Confirmed SQLite and PostgreSQL recovery keeps the original intent (557e702: Recover an independently confirmed stopped foreign owner while preserving unrelated persisted state and rejecting changed records.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 798570b adds src/infra/gateway-lock-payload.ts:149 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 798570bc460f; files: src/infra/gateway-lock-payload.ts)
  • Dallin Romney: Raw commit 92e17e8 adds docs/gateway/gateway-lock.md:29 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 92e17e85f76d; files: docs/gateway/gateway-lock.md)

PR surface

Source +24, Tests +59, Docs -63, Other +2. Total +22 across 30 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 12 95 71 +24
Tests 10 129 70 +59
Docs 7 42 105 -63
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 30 268 246 +22

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Gateway SQL lease heartbeat 100 seconds → 15 seconds The increased renewal frequency keeps healthy Gateway leases below the new 90-second takeover threshold.

Labels

Label changes:

No label changes.

Label justifications:

  • merge-risk: 🚨 session-state: Heartbeat takeover changes shared-state ownership guarantees; overlap after a paused container resumes is explicitly accepted in this maintainer-authored PR.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-26T02:55:20.492Z sha fd5b1ac :: blocked before merge. :: [P1] Preserve explicit recovery for owners automatic takeover cannot classify | [P2] Restore actionable guidance for stopped legacy temporary-lock owners
  • reviewed 2026-11-26T03:14:11.868Z sha 0203cfd :: blocked before merge. :: none
  • reviewed 2026-11-26T03:23:30.639Z sha 0203cfd :: needs maintainer review before merge. :: none

Reviewed November 26, 2026, 1:17 AM ET / 06:17 UTC (Revision 4).

tideclaw-bot and others added 2 commits November 26, 2026 03:02
Keep existing SQLite and PostgreSQL compatibility recovery without advertising it in help or diagnostic next steps.

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

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: bc9cb3f9-1809-44db-9515-c11c4f6af0fa
@tideclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 26, 2026
@clawsweeper clawsweeper Bot removed the clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. label Nov 26, 2026
@tideclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Nov 26, 2026
A foreign-namespace wait now uses the role's ordinary deadline (five minutes
for Gateway startup, 95 seconds for Doctor) instead of waiting indefinitely
on a renewing owner. This removes the Doctor cancellation check that only
the unbounded wait needed, and restores ordinary contention for an
unparseable owner record.

Co-authored-by: RomneyDa <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot removed the commands Command implementations label Nov 26, 2026
Startup and Doctor wait up to 95 seconds for an owner in another PID
namespace, as before. That covers heartbeat expiry after a crash; a
still-renewing owner keeps the existing bounded refusal.

Co-authored-by: RomneyDa <[email protected]>
@tideclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@RomneyDa
RomneyDa merged commit 2dbd121 into main Nov 26, 2026
161 checks passed
@RomneyDa
RomneyDa deleted the openclaw/docker-heartbeat branch November 26, 2026 07:22
tideclaw-bot added a commit that referenced this pull request Nov 26, 2026
* fix(gateway): recover container startup after a crash

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

* fix(gateway): recover container startup after a crash

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 51d3c870-57c0-45d2-b1c7-601c5a9fd876

* fix(gateway): keep legacy lock guidance and prune stale ratchet entry

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

* fix(gateway): retain confirmed recovery as a hidden diagnostic

Keep existing SQLite and PostgreSQL compatibility recovery without advertising it in help or diagnostic next steps.

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

* Publish openclaw/docker-heartbeat

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: bc9cb3f9-1809-44db-9515-c11c4f6af0fa

* fix(gateway): keep lock waits bounded and contention unchanged

A foreign-namespace wait now uses the role's ordinary deadline (five minutes
for Gateway startup, 95 seconds for Doctor) instead of waiting indefinitely
on a renewing owner. This removes the Doctor cancellation check that only
the unbounded wait needed, and restores ordinary contention for an
unparseable owner record.

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

* fix(gateway): keep the foreign-owner wait at its original bound

Startup and Doctor wait up to 95 seconds for an owner in another PID
namespace, as before. That covers heartbeat expiry after a crash; a
still-renewing owner keeps the existing bounded refusal.

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

---------

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2dbd121)
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
tideclaw-bot added a commit that referenced this pull request Nov 26, 2026
* fix(gateway): recover container startup after a crash

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

* fix(gateway): recover container startup after a crash

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 51d3c870-57c0-45d2-b1c7-601c5a9fd876

* fix(gateway): keep legacy lock guidance and prune stale ratchet entry

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

* fix(gateway): retain confirmed recovery as a hidden diagnostic

Keep existing SQLite and PostgreSQL compatibility recovery without advertising it in help or diagnostic next steps.

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

* Publish openclaw/docker-heartbeat

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: bc9cb3f9-1809-44db-9515-c11c4f6af0fa

* fix(gateway): keep lock waits bounded and contention unchanged

A foreign-namespace wait now uses the role's ordinary deadline (five minutes
for Gateway startup, 95 seconds for Doctor) instead of waiting indefinitely
on a renewing owner. This removes the Doctor cancellation check that only
the unbounded wait needed, and restores ordinary contention for an
unparseable owner record.

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

* fix(gateway): keep the foreign-owner wait at its original bound

Startup and Doctor wait up to 95 seconds for an owner in another PID
namespace, as before. That covers heartbeat expiry after a crash; a
still-renewing owner keeps the existing bounded refusal.

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

---------

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2dbd121)

Release adaptation: remove the release-local spelling of the superseded shouldReclaimGatewayLock helper, keeping unrelated Gateway ownership and release behavior. Backport review: #205821 follows this owner-lease change; #205812 shares only Docker docs and is not a startup prerequisite.

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot added a commit that referenced this pull request Nov 26, 2026
* fix(gateway): avoid the Windows boot probe stall at startup

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

* test(state): narrow the mocked boot probe call before reading it

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

* fix(state): return undefined explicitly from the boot provenance guard

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

---------

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

Backport review: follows #205709 in the owner lease, preserving the shorter heartbeat and the release owner publication path. No later overlapping upstream commits at the pinned scan end.

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
* fix(gateway): recover container startup after a crash

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

* fix(gateway): recover container startup after a crash

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 51d3c870-57c0-45d2-b1c7-601c5a9fd876

* fix(gateway): keep legacy lock guidance and prune stale ratchet entry

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

* fix(gateway): retain confirmed recovery as a hidden diagnostic

Keep existing SQLite and PostgreSQL compatibility recovery without advertising it in help or diagnostic next steps.

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

* Publish openclaw/docker-heartbeat

Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: bc9cb3f9-1809-44db-9515-c11c4f6af0fa

* fix(gateway): keep lock waits bounded and contention unchanged

A foreign-namespace wait now uses the role's ordinary deadline (five minutes
for Gateway startup, 95 seconds for Doctor) instead of waiting indefinitely
on a renewing owner. This removes the Doctor cancellation check that only
the unbounded wait needed, and restores ordinary contention for an
unparseable owner record.

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

* fix(gateway): keep the foreign-owner wait at its original bound

Startup and Doctor wait up to 95 seconds for an owner in another PID
namespace, as before. That covers heartbeat expiry after a crash; a
still-renewing owner keeps the existing bounded refusal.

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

---------

Co-authored-by: RomneyDa <[email protected]>
Nosdave added a commit to Nosdave/OpenClawHomeAssistant that referenced this pull request Nov 28, 2026
2026.11.11 is the maintenance release of the 2026.11.10 line (no config,
schema or CLI changes; state 40 / agent 42 as before).

- Dockerfile: OPENCLAW_VERSION=2026.11.11, NPM_BEFORE=2026-11-28T04:06:00Z.
- oc-patches/2026.11.11 replaces the 2026.11.10 set (never shipped): the same
  five patches, carried to the new chunk names; the patched modules are
  byte-identical apart from chunk names in imports. The doctor patch stays:
  the statement is unchanged upstream.
- Node harnesses renamed and pointed at the new chunks.
- Docs, changelog, security notes, translations: bundled version, publish
  times, and the start after an unclean stop (gateway lock takeover after
  90 s, openclaw/openclaw#205709).

Tests: pytest 1007 passed / 3 skipped, wrapper 272, node harnesses 31,
test_real_package against the unpacked 2026.11.11 package.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BaA7Y516JjzXvphq8hMwwt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes docker Docker and sandbox tooling docs Improvements or additions to documentation gateway Gateway runtime impact:crash-loop Crash, hang, restart loop, or process-level availability failure. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker: a hard-killed Gateway container cannot restart (GatewayLockNamespaceError on its own previous PID 1)

2 participants