Skip to content

improve: avoid full session scans during Gateway admission - #149388

Merged
steipete merged 1 commit into
mainfrom
codex/incremental-session-validation
Sep 16, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/incremental-session-validation

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #149323

What Problem This Solves

Initial session authorization and new SQLite readers can stall the Gateway while validating every saved session, including large prompt metadata, even when the physical database was already verified.

User Impact

Session admission reuses validation of unchanged rows across connection lifetimes. Startup and initial Gateway authorization validate pending rows in the existing session mutation worker, then reread current authorization before dispatch. Warm reader behavior, selected-row freshness, write ordering, transcript bytes, and retention remain unchanged.

This requires agent schema 21. Maintenance atomically installs the required pending-key table and invalidation triggers and marks existing rows pending without rewriting their JSON. Older builds refuse the migrated database. Rollback requires a verified pre-migration backup and its matching build, returning state to that backup point and excluding subsequent work. Changing schema markers or deleting the derived table is not a supported downgrade. The accepted design is recorded in #149323.

Worker startup increases elapsed readiness time and memory use. Writes perform additional validation and trigger work. The measurements below are component measurements; they do not establish production latency, memory bounds, or a fixed event-loop pause ceiling.

Why This Change Was Made

The existing database-validation owner retains first-proof status for the physical database; SQLite triggers record later canonical changes transactionally. Canonical writers certify pending stored metadata inside their existing transaction without decoding saved prompts again. The retained worker drains other changes in bounded batches and rejoins FIFO admission between them. Replacement, invalidation, and rolled-back work cannot publish successful proof.

Native admission remains keyed to the exact handle, normalized main-key policy, and physical receipt. Exact reads open a snapshot only when their guard needs new admission, so warm reads avoid extra transactions. Selected rows are read freshly; no authorization result is cached. After awaited readiness, the Gateway repeats method, profile binding, startup, and session authorization, and commit guards remain synchronous and current.

The final integration preserves main's validated-policy reuse for transcript-root writes and its excluded-value upserts. Cold validation retains its existing post-validation policy read and error order. Legacy catalog repair remains owned by Doctor, including its newly landed migration ordering.

Evidence

The combined candidate e716a8fbc203 includes landed Doctor #148834. 299 focused tests pass, covering canonical admission, physical receipts, root-policy ordering, writes, Gateway reauthorization, migration/rollback helpers, and the Doctor Workshop cases. The full selected changed-code gate passes across TypeScript, lint, dead exports, and runtime import cycles. Fresh independent review of the full combined candidate is clean through P2. Earlier composed reader/search/send integration passed 238 tests, including current visibility, async scope retirement, and accepted-send settlement.

The preceding reviewed head f8a2ce1ab4a4 passed full CI. The combined head e716a8fbc203 also passed its own CI.

Fresh paired package proof passed in Testbox run 35051588915, pinned to source e716a8fbc203 and tree a8a7f657e3adcff4e812c55e51e9b16bf60d454c. Both legacy-operator-state and workshop-doctor-recovery passed on their first attempts using published [email protected], one package, and no live provider credentials. The complete pack/run took 603 seconds. The Testbox command exited successfully before cleanup; its carrier workflow may display cancelled when the lease is stopped.

All 152 captured raw files and their hashes were checked independently. Legacy-state proof used the actual published updater, migrated agent schema 19 → 21, exercised candidate turns and Doctor without recovery, restored a verified backup, and read the original conversation with the retained schema-19 reader. The pinned rollback helper compared 26 logical tables and six transcript events against the captured baseline and preserved the absent agent database. Those database hashes were checked by the executed helper; databases were not exported for a second offline hash pass.

Workshop proof verified the original refusal left malformed state unchanged, explicit published Doctor repaired it, the published updater then ran candidate Doctor successfully, and fresh-seed standalone candidate Doctor also repaired it. All five required process witnesses matched their raw start/exit records, build identities, state flags, and parent relationships; extra continuation processes were distinguished from those witnesses.

The shared tarball SHA-256 is d0addd76bdb876630a93f58735c30b54e68600a560ac41dcb5e6864989242608, with state schema 17 / agent schema 21. Its embedded build commit is Testbox materialization 5a8c350f4278c4812d72600b0e55bb2992febeb8, whose complete source tree was verified identical to the published candidate tree above. This proof preserves one conversation; it does not claim restored Gateway history rendering or volume rollback.

The earlier completed Package Acceptance run, pinned to a1d892cada28, exercised the actual published updater: agent schema 19 → 21, candidate turns and Doctor, backup restoration, and the retained baseline's session reader. Its Docker artifact records successful rollback, restored schema-19 preflight, one readable conversation, six transcript events, and 26 matching logical-table hashes. The absent agent database remained absent. The single runtime attempt passed in 409 seconds. This proves one-conversation preservation, not restored Gateway history rendering or volume rollback.

The package artifact declares state schema 17 / agent schema 21 and embeds tested commit a1d892cada28. Its tarball SHA-256 is 83814885bf119ad69b72bdf1398388f9bbf3a0b6ca47900d6ccbbf9f74e10b92. Package metadata, build identity, downloaded artifact hashes, and raw rollback receipts were independently checked. Installer and package-integrity jobs passed.

Synthetic source-runtime measurements use 3,706 sessions with 32 KiB of saved prompt metadata per session and actual accessor/authorization entry points on Node 26.8.2. They compare base 14b8ad1d1871 with a1d892cada28 in separate processes with a warm OS cache. Parent build/test work was paused; unrelated host load was uncontrolled. This benchmark predates the final integration above.

Operation Baseline Candidate
First companion authorization guard (1 sample) 117.1 ms 1.94 ms
Clean reader reopen, median (11 samples) 115.8 ms 1.05 ms
Warm guard, median (101 samples) 0.127 ms 0.124 ms
Session write, median (101 samples) 0.411 ms 0.529 ms
Explicit full-inventory scan (1 sample) 112.0 ms 113.7 ms

Normal writes added about 0.118 ms (28.7%). Cold-worker readiness took 1.62 seconds, with a 72.6 ms maximum loop delay and 7.3 ms p99. Cold logging and mandatory commit settlement remain sources of pauses. Full inventories retain their scan path; their separate single-sample probe is not a steady-state throughput comparison.

@clawsweeper

clawsweeper Bot commented Sep 15, 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.

@steipete
steipete marked this pull request as ready for review September 15, 2026 20:03
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime scripts Repository scripts size: XL maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 16, 2026, 12:05 AM ET / 04:05 UTC (Revision 6).

ClawSweeper review

What this changes

The PR tracks changed session rows in SQLite and validates them through the existing worker, reducing Gateway admission scans while adding schema-21 migration and backup-restoration coverage.

Warning

SQLite table change

This PR modifies persisted SQLite tables in src/state/openclaw-agent-db-schema.ts, src/state/openclaw-agent-db-session-migrations.ts, src/state/openclaw-agent-schema.sql. Prefer a design that avoids changing persisted SQLite tables. If the change is necessary, verify migration and upgrade compatibility against an existing database before merge.

Merge readiness

⛔ Blocked before merge - 3 items remain

This PR remains necessary: current main still repeats validation for fresh connections. No blocking defect was found, and the accepted schema decision plus updated compatibility evidence resolve the earlier review concern without requiring renewed approval.

Priority: P2
Reviewed head: e716a8fbc2037be9be4204a5b90d6e1efb3a35e3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent performance improvement with strong package evidence and no blocking finding; compatibility costs are accepted and documented.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied exact-head package evidence exercises the published updater, candidate session turns, Doctor, and backup restoration through real executables; source-runtime measurements exercise accessor admission. Raw artifact download was host-blocked, so that independent inspection remains unavailable without negating the supplied proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The supplied exact-head package evidence exercises the published updater, candidate session turns, Doctor, and backup restoration through real executables; source-runtime measurements exercise accessor admission. Raw artifact download was host-blocked, so that independent inspection remains unavailable without negating the supplied proof.
Evidence reviewed 10 items Pinned introduction boundary: The host verifies the introduced delta from 0e19700 to the reviewed head. Its verified test merge has the pinned base followed by this exact head as parents; unrelated endpoint drift was excluded from attribution.
Current main still needs the improvement: Current main stores canonical admission in a WeakMap keyed by the native connection and scans session rows after a cache miss. The merged companion-reader optimization at #148868 does not eliminate fresh-connection admission work.
Release boundary: The latest supplied release, v2026.9.4, declares agent schema 19; fetched main declares schema 20. Schema 21 and this implementation remain proposed work.
Findings None None.
Security None None.

How this fits together

Gateway admission checks saved session metadata before authorizing requests. This change lets fresh database readers reuse validation of unchanged rows while session permissions and identity remain freshly checked.

flowchart TD
  A[Gateway request] --> B[Reader admission]
  B -->|Already certified| E[Read current session]
  B -->|Validation needed| C[Pending session keys]
  C --> D[Existing SQLite worker]
  D -->|Certify current rows| E
  E --> F[Recheck live authorization]
  F --> G[Dispatch allowed request]
Loading

Before merge

  • Resolve merge risk (P1) - The accepted schema-21 upgrade prevents older builds from reopening the database; rollback restores the backup point and excludes subsequent work.
  • Resolve merge risk (P1) - The component benchmarks and single-conversation package proof do not establish production-scale latency, memory bounds, or volume rollback.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +1316, Tests +2008, Docs +62, Config 0, Generated +5, Other +745. Total +4136 across 74 files.

View PR surface stats
Area Files Added Removed Net
Source 25 1738 422 +1316
Tests 39 2114 106 +2008
Docs 3 65 3 +62
Config 1 1 1 0
Generated 1 5 0 +5
Other 5 747 2 +745
Total 74 4670 534 +4136

Review metrics

Metric Value Why it matters
Persistent compatibility boundary Agent schema 20 → 21; released updater proof 19 → 21 The migration requires a compatible build or restoration of a verified pre-migration backup.
Implementation and proof growth Production net +1,321; tests/support net +2,008; proof tooling net +743 The accepted design explains the production growth through transactional invalidation, physical validation reuse, and worker certification.

Stored data model

Persistent data-model change detected: database schema: src/state/openclaw-agent-db-schema.ts, database schema: src/state/openclaw-agent-db-session-migrations.ts, database schema: src/state/openclaw-agent-schema.sql, migration/backfill/repair: config/knip.config.ts, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/backup-rollback.mjs, migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/backup-rollback.sh, and 13 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #149323
Summary: This PR implements the accepted reopen-independent validation request; earlier reader reuse and broader persistence starvation remain distinct in scope.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Retain the accepted backup-point rollback contract (recommended)
    Proceed within the recorded schema-21 decision and supplied published-updater proof, keeping the older-build refusal and backup-point recovery limitation explicit.

Technical review

Best possible solution:

Keep incremental validation with the existing database and worker owners, preserving the accepted backup-based upgrade contract and fresh authorization at dispatch and commit.

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

Yes, from source: a fresh connection on current main misses connection-local validation and scans unrelated session rows before admission; the supplied benchmark exercises that path, but this review did not rerun it.

Is this the best way to solve the issue?

Yes. The accepted design addresses validation lifetime through the existing owners, with transactional invalidation and current authorization rather than cached permission results.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a concrete Gateway admission performance improvement without a demonstrated urgent production regression attributable to the PR.
  • merge-risk: 🚨 compatibility: Schema 21 intentionally excludes older readers and makes backup restoration the supported rollback path.
  • 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. Sufficient (linked_artifact): The supplied exact-head package evidence exercises the published updater, candidate session turns, Doctor, and backup restoration through real executables; source-runtime measurements exercise accessor admission. Raw artifact download was host-blocked, so that independent inspection remains unavailable without negating the supplied proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied exact-head package evidence exercises the published updater, candidate session turns, Doctor, and backup restoration through real executables; source-runtime measurements exercise accessor admission. Raw artifact download was host-blocked, so that independent inspection remains unavailable without negating the supplied proof.

Evidence

What I checked:

  • Pinned introduction boundary: The host verifies the introduced delta from 0e19700 to the reviewed head. Its verified test merge has the pinned base followed by this exact head as parents; unrelated endpoint drift was excluded from attribution. (e716a8fbc203)
  • Current main still needs the improvement: Current main stores canonical admission in a WeakMap keyed by the native connection and scans session rows after a cache miss. The merged companion-reader optimization at improve: reduce repeated session read stalls #148868 does not eliminate fresh-connection admission work. (src/config/sessions/session-canonical-key.ts:39, c4a6c17dafbf)
  • Release boundary: The latest supplied release, v2026.9.4, declares agent schema 19; fetched main declares schema 20. Schema 21 and this implementation remain proposed work. (src/state/openclaw-agent-db-contract.ts:24, 3a9d69db306c)
  • Accepted storage decision: Make canonical session validation incremental across database reopens #149323 explicitly accepts the pending-key projection, schema bump, native-reader compatibility, worker certification, and backup-restoration rollback contract. The refreshed PR comment confirms compatibility verification rather than requesting another product decision.
  • Certification and invalidation: Certification compares captured JSON, identity, lineage, retained-window association, and main-key policy inside write admission before deleting markers. Tests cover stale snapshots, transactional rollback, copied clean projections, and revoked physical receipts. (src/config/sessions/session-canonical-validation.ts:182, e716a8fbc203)
  • Authorization remains current: After awaited readiness, the router repeats method, profile, startup, and session checks. Existing handler commit guards remain composed into dispatch; the new Gateway regression checks that scope revocation prevents handler invocation. (src/gateway/server-methods.ts:335, e716a8fbc203)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-15T20:16:23.595Z sha f4f96c1127383485c5ba86668aba405fabac6965 :: blocked before merge. :: none
  • reviewed 2026-09-15T21:20:28.205Z sha 3d3e4b5 :: blocked before merge. :: none
  • reviewed 2026-09-15T22:41:39.021Z sha 7923f33f480248b451251920d539ff02bdb7655b :: blocked before merge. :: none
  • reviewed 2026-09-16T02:19:19.505Z sha f8a2ce1ab4a4bd1a2000d058043311976bd8b846 :: blocked before merge. :: none
  • reviewed 2026-09-16T03:52:55.311Z sha e716a8f :: blocked before merge. :: none

@steipete
steipete force-pushed the codex/incremental-session-validation branch from f4f96c1 to 3d3e4b5 Compare September 15, 2026 20:54
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations extensions: qa-lab labels Sep 15, 2026
@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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 15, 2026
@steipete
steipete force-pushed the codex/incremental-session-validation branch from 7923f33 to f8a2ce1 Compare September 16, 2026 02:08
Track canonical validation with the physical database verification owner and
certify schema-21 pending rows in bounded retained-worker batches. Keep native
reader admission keyed to its exact handle, main-key policy, and physical
receipt while selected session reads and synchronous commit guards stay current.

Preserve warm transcript-root policy reuse and validation-before-key-refusal
ordering. Keep legacy Workshop catalog repair owned by Doctor, and retain the
published-updater schema migration and backup rollback proof.

Accepted design: #149323.
@steipete
steipete force-pushed the codex/incremental-session-validation branch from f8a2ce1 to e716a8f Compare September 16, 2026 03:33
@steipete

Copy link
Copy Markdown
Contributor Author

Compatibility verification is complete for e716a8fbc2037be9be4204a5b90d6e1efb3a35e3. The accepted schema-21 decision and backup-point rollback contract are recorded in #149323.

A fresh paired Testbox run exercised the actual published [email protected] updater and both legacy-operator-state and workshop-doctor-recovery against one source tree/package. Both scenarios passed on their first attempts; the pack/run command exited 0 in 603 seconds. The source tree was a8a7f657e3adcff4e812c55e51e9b16bf60d454c, and the tarball SHA-256 was d0addd76bdb876630a93f58735c30b54e68600a560ac41dcb5e6864989242608 (state schema 17 / agent schema 21). The PR body records the Testbox build-carrier mapping and run link.

All 152 captured raw files and hashes were independently checked. The evidence includes the schema-19 → 21 update, candidate turns/Doctor, verified backup restoration, schema-19 no-write preflight, original conversation read, and all five required Workshop process witnesses. The pinned helper compared 26 logical tables/six transcript events and preserved the absent agent database. Database archives were not exported for a second offline hash pass.

The scope limits remain explicit: rollback restores the backup point, the packaged conversation is a single-conversation cell, and the component benchmark establishes no production latency or memory bound. These limits are not claims of in-place downgrade, volume rollback, or restored Gateway history rendering. Exact-head CI is also successful, and independent full-candidate review has no P0–P2 findings.

@steipete
steipete merged commit bc28af4 into main Sep 16, 2026
219 of 220 checks passed
@steipete
steipete deleted the codex/incremental-session-validation branch September 16, 2026 04:29
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 16, 2026
Reuse the entry already read in the current write transaction when capturing
previous session identity. Preserve the other lookup keys, current authority
checks, post-write identity reads, and canonical certification.

This resolves the interaction between #149537 and #149388 without changing the
existing query budget. The unchanged test reproduces on their combined main
state; all 38 Goal, identity, and canonical-validation tests pass after repair.
steipete added a commit that referenced this pull request Sep 16, 2026
* fix(cron): normalize current-session completion payloads

* fix(cron): account for completed interim retry prompts

* fix(cron): preserve final context after retry accounting

* refactor(cron): centralize stale delivery policy

* fix(cron): clear stale billing after context-only retries

* fix(sessions): reuse the admitted entry during Goal edits

Reuse the entry already read in the current write transaction when capturing
previous session identity. Preserve the other lookup keys, current authority
checks, post-write identity reads, and canonical certification.

This resolves the interaction between #149537 and #149388 without changing the
existing query budget. The unchanged test reproduces on their combined main
state; all 38 Goal, identity, and canonical-validation tests pass after repair.

* refactor(ui): simplify chat pane callbacks

Keep the existing progress-dismiss and agent-change callbacks as explicit void expressions, preserving their undefined returns and side effects. This brings the renderer back within its existing max-lines limit after #149384 without changing UI behavior.

* fix(ci): accept file paths in extension packing fixtures
steipete added a commit that referenced this pull request Sep 16, 2026
Use the existing two-agent preflight budget and scoped reclamation workers to overlap first-admission certification. Retain each worker across its agent's batches, join native close before downstream consumers, and drain active tasks before surfacing a refusal. Keep ordinary archive FIFO and runtime worker reuse intact.

Preserve process-local physical proof and per-agent write authority. Keep legacy-main and managed-worktree startup detection-only after #150110, report pending worktree repairs from awaited found counts, and leave repair writes with Doctor.

Related: #149538, #148529, #149323, #150110. Trigger: #149388. Reported by @609NFT.
steipete added a commit that referenced this pull request Sep 16, 2026
Use the existing two-agent preflight budget and scoped reclamation workers to overlap first-admission certification. Retain each worker across its agent's batches, join native close before downstream consumers, and drain active tasks before surfacing a refusal. Keep ordinary archive FIFO and runtime worker reuse intact.

Preserve process-local physical proof and per-agent write authority. Keep legacy-main and managed-worktree startup detection-only after #150110, report pending worktree repairs from awaited found counts, and leave repair writes with Doctor.

Related: #149538, #148529, #149323, #150110. Trigger: #149388. Reported by @609NFT.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
…enclaw#149388)

Track canonical validation with the physical database verification owner and
certify schema-21 pending rows in bounded retained-worker batches. Keep native
reader admission keyed to its exact handle, main-key policy, and physical
receipt while selected session reads and synchronous commit guards stay current.

Preserve warm transcript-root policy reuse and validation-before-key-refusal
ordering. Keep legacy Workshop catalog repair owned by Doctor, and retain the
published-updater schema migration and backup rollback proof.

Accepted design: openclaw#149323.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
…49697)

* fix(cron): normalize current-session completion payloads

* fix(cron): account for completed interim retry prompts

* fix(cron): preserve final context after retry accounting

* refactor(cron): centralize stale delivery policy

* fix(cron): clear stale billing after context-only retries

* fix(sessions): reuse the admitted entry during Goal edits

Reuse the entry already read in the current write transaction when capturing
previous session identity. Preserve the other lookup keys, current authority
checks, post-write identity reads, and canonical certification.

This resolves the interaction between openclaw#149537 and openclaw#149388 without changing the
existing query budget. The unchanged test reproduces on their combined main
state; all 38 Goal, identity, and canonical-validation tests pass after repair.

* refactor(ui): simplify chat pane callbacks

Keep the existing progress-dismiss and agent-change callbacks as explicit void expressions, preserving their undefined returns and side effects. This brings the renderer back within its existing max-lines limit after openclaw#149384 without changing UI behavior.

* fix(ci): accept file paths in extension packing fixtures
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 17, 2026
…aw#150188)

Use the existing two-agent preflight budget and scoped reclamation workers to overlap first-admission certification. Retain each worker across its agent's batches, join native close before downstream consumers, and drain active tasks before surfacing a refusal. Keep ordinary archive FIFO and runtime worker reuse intact.

Preserve process-local physical proof and per-agent write authority. Keep legacy-main and managed-worktree startup detection-only after openclaw#150110, report pending worktree repairs from awaited found counts, and leave repair writes with Doctor.

Related: openclaw#149538, openclaw#148529, openclaw#149323, openclaw#150110. Trigger: openclaw#149388. Reported by @609NFT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. 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: XL 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.

Make canonical session validation incremental across database reopens

1 participant