Skip to content

fix: sessions_yield keeps long transcript history available - #137381

Merged
jalehman merged 180 commits into
mainfrom
openclaw/yield-transcript-incremental-v3
Sep 9, 2026
Merged

jalehman merged 180 commits into
mainfrom
openclaw/yield-transcript-incremental-v3

Conversation

@jalehman

@jalehman jalehman commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where sessions_yield cleanup on long SQLite-backed sessions temporarily made transcript history and bounded context unavailable while a full transcript replacement rebuilt its projection.

Related: #109638
Related: #113190

Why This Change Was Made

Trailing-entry cleanup now performs one exact, writer-fenced SQLite suffix mutation instead of deleting and reinserting the full transcript. It rotates the transcript generation to invalidate stale cursors and repairs the affected identity, active-branch, FTS, watermark, parent, and leaf-control state in the same transaction, while retaining PR #113190's continuable non-assistant-tail behavior.

If the compare-and-swap loses a concurrent write race, both SQLite and the live SessionManager remain on the original history.

User Impact

Yielded sessions with long histories remain immediately readable and continuable after cleanup instead of entering a projection-rebuild unavailable window.

Evidence

  • pnpm check:changed — passed on the final patch before rebase; includes core/test typechecks, dead-export scans, lint, import-cycle checks, and repository guardrails.
  • pnpm check:assertion-safety — passed.
  • Focused exact-head Vitest run — 45 tests passed across yield cleanup, orchestration, SessionManager persistence/bounded history, and SQLite transcript storage.
  • Added SQLite-backed immediate-yield and multi-tool-yield regressions asserting generation rotation and immediate reopen.
  • Added a 4,000-row bounded-history regression asserting no projection-unavailable window.
  • Autoreview found one P2 race: live manager state remained trimmed after a failed suffix fence. The final patch restores the original in-memory state and adds regression coverage.

Changes Walkthrough

File Change
src/config/sessions/session-accessor.sqlite-transcript-suffix.ts Adds exact transactional suffix mutation
src/config/sessions/session-transcript-index.ts Repairs affected projection suffix inline
src/config/sessions/session-accessor.sqlite-transcript-write.ts Exposes writer-fenced synchronous mutation
src/config/sessions/session-accessor.sqlite-transcript-store.ts Shares canonical append/projection helpers
src/config/sessions/session-accessor.transcript.ts Exports suffix mutation API
src/config/sessions/session-accessor.ts Publishes accessor API
src/agents/sessions/session-manager-persistence.ts Uses suffix CAS and rolls back races
src/config/sessions/session-accessor.sqlite-transcript-store.test.ts Covers projection and generation behavior
src/agents/sessions/session-manager.persistence-compat.test.ts Covers metadata, topology, and races
src/agents/sessions/session-manager-bounded.test.ts Covers long and branched histories
src/agents/embedded-agent-runner/run/attempt.sessions-yield.test.ts Covers persisted role-continuity behavior
config/assertion-safety-baseline.txt Updates assertion ownership count

Coordinator session: https://openclaw-fsn1.tailf72dd7.ts.net/chat/main/dashboard/660ed975-cf31-4aee-bb0f-4e7cf9c8edc5

Retained-metadata recovery update

Commit: 68022cdf8d622dab954af0858bb295988b68f1b8

Bounded cleanup now keeps retained custom data in SQLite while planning and repairing its envelope. It preserves the existing writer/mutation fences, atomic projection update, and post-commit live-state adoption without increasing planning limits or hydrating the whole transcript.

Verification on the patch-identical committed tree:

  • 111 focused tests across nine files passed, including 3/5 MiB retained-data recovery, rejection/rollback, concurrency, and handoff coverage.
  • Full private-QA build and complete changed-file checks passed.
  • Fresh AWS build and real isolated Gateway/SQLite continuation proof passed: 5,000 historical messages retained, readable history/context, cursor generation rotated, and exactly one delivered/persisted completion before and after Gateway restart. Model provider and QA channel were synthetic, not authenticated external-provider proof.
  • AWS run: https://crabbox.openclaw.ai/portal/runs/run_b0a0b4f32281. The task lease was released and independently verified released.

Limitations: mandatory autoreview could not start because its isolation checks reject this host's credentialed proxy URL. Commit/push were explicitly requested with that limitation disclosed; no review success or merge approval is claimed. Recovery covers retained loaded custom data, not every bounded-window refusal, and SQLite payload-copy cost remains proportional to retained bytes.

Architecture gate correction

Follow-up: 70a8ece5d7c0549bc558732be46b12a59b2ee053. The projection helper no longer imports its caller's mutation-plan type; the typed dispatcher keeps that contract private. Retained-data queries now use schema-checked Kysely expression references and a common aliasable-expression contract instead of raw identifier shortcuts. No ignore rules, schema, or planning-limit changes.

Autoreview remains unrun for the previously disclosed isolation limitation. This is a correction/push, not a merge.

Audit follow-up and measured operating envelope

Commit: 993c856f042a449b311e446609e7d6980d83a775. This follows and preserves b6232b03e6e's public SDK fix.

  • Fixed a reproduced stale-bounded-view bug: compaction/reset was counted twice after append-triggered reload. Boundary counting now belongs to local entry adoption; a reload already carries the committed count. Both regressions failed with an expected count of 1 versus an actual count of 2 before the fix.
  • Restored four baseline rewrite-safety cases, restored the original 4 KiB yield-handoff cases, repaired the no-hydration test to poison the actual excluded message in the correct database, and strengthened exact retained-record, parent, navigation, and immediate-reopen assertions. A focused test file keeps the existing file-size limit without removing coverage or adding suppressions.
  • Removed unused API/receipt plumbing, duplicate reads and lifecycle predicates, dead scans, impossible projection branches, and an unused incremental projection SELECT. Runtime source is 104 net lines smaller; test growth restores meaningful proof.
  • Added real value-level calls through the packaged SDK consumer check, including an invalid-entry negative control.
  • Retained existing concurrency fences, append handling, exact data/identity/index atomicity, cursor invalidation, full-manager compatibility fallback, and planning limits. This commit does not split out concurrency handling or add a generic recovery system.

Validation

  • The 175-test affected suite passed, including existing branching and transcript-rewrite suites. Relocated cases and the final assertion change passed targeted reruns; the incoming SDK test also passed.
  • Complete changed-file checks, core/core-test/script typechecks, lint/dead-export checks, and architecture/Kysely guards passed. The incoming SDK commit was reconciled with verified unchanged local file hashes; the explicit public modifier emits identical JavaScript. Incoming-test typing/lint and the complete architecture gate were rechecked.
  • Canonical private-QA strict runtime/declaration build passed; all 152 public SDK subpaths and the strengthened packaged-consumer fixture passed. Generated declarations were not hand-edited. The committed patch matches the validated patch fingerprint.

Local synchronous-cost probes

Real SessionManager and SQLite; constructed warm datasets on a shared host, three repetitions per scenario. These are not production incidence estimates, Gateway round-trip measurements, controlled before/after speedups, or latency guarantees. Representative medians from the final run:

Scenario Observed path Synchronous time
5,000 / 20,000 ordinary prior entries, small cleanup tail incremental about 168 ms
Already-loaded 5 MiB retained custom data incremental about 365 ms
Already-loaded 16 MiB retained custom data incremental about 720 ms
Fully loaded manager, 5,000 prior entries and a 5 MiB removed entry full-history fallback about 403 ms

All 45 constructed trials produced their expected path; targeted row/byte/window refusals preserved raw history and live entries. Keyed-tail cleanup can still perform historical JSON searches for idempotency ownership even without full-row hydration.

A separate default-like 1,024,000-byte bounded-reopen probe with 3/5 MiB retained metadata selected no payload entries: the cleanup target was not loaded, removal returned zero, and raw history remained unchanged. Large-payload cleanup success therefore assumes the relevant payloads are loaded or the read window is sufficient; it is not a universal recovery promise. No global read/planning budget was increased.

Storage-owner acceptance of the remaining refusal/read-window behavior and synchronous cost remains required before merge. Autoreview was attempted again and stopped at the existing proxy-isolation preflight; no successful autoreview or merge approval is claimed. Publication was explicitly requested with that limitation disclosed.

CI build-profile correction

Commit: 449cc4c59d50f95b09b2fa78a79dfac5595c08aa. Fixes the build-artifacts failure on 993c856f042 without changing transcript runtime behavior.

The added consumer incorrectly imported agent-sessions as a typed public package subpath in every build. The canonical SDK inventory classifies it as a private runtime facade: normal CI artifacts retain its JavaScript but intentionally omit its declarations. The private-QA build used for the earlier local validation did emit those declarations, masking this profile mismatch.

The facade consumer now runs only in the canonical private-QA profile. All public-package consumers remain unconditional. Both valid persist calls and the invalid-entry negative control remain in the private declaration check; no declaration shim, public-export promotion, budget change, or check suppression was added.

Verification:

  • Reproduced the exact CI errors locally with pnpm build:ci-artifacts: TS7016 for the private facade and TS2578 for the now-unused negative control.
  • The complete normal pnpm build:ci-artifacts profile passes after the correction, including the UI/metadata stages.
  • The complete OPENCLAW_BUILD_PRIVATE_QA=1 pnpm build:strict-smoke profile passes.
  • With public-only artifacts, the public checker passes, while deliberately selecting the private-QA checker still rejects the missing private declaration. This verifies that the private compatibility check remains active.
  • Targeted complete changed-file checks, script typing, and lint pass.

The earlier local build evidence was private-QA evidence, not proof that the normal public CI artifact profile passed. Autoreview remains unavailable at the disclosed proxy-isolation preflight. Storage-owner acceptance remains a separate pre-merge decision; this correction does not claim it or request merging.

Worked on by


View the OpenClaw team session

Replace SessionManager trailing-entry full rewrites with an exact writer-fenced SQLite suffix mutation that preserves generation and active projection availability. Restore in-memory state when the compare-and-swap loses a concurrent race.

Refs yield-transcript-incremental-v2-e0d.
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: L maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. 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 Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 9, 2026, 12:42 AM ET / 04:42 UTC (Revision 150).

ClawSweeper review

What this changes

Replaces full transcript rewrites during trailing-entry cleanup with fenced SQLite suffix updates, preserves retained metadata, and checks the private session SDK facade only in private-QA builds.

Merge readiness

⛔ Blocked before merge - 4 items remain

The build-profile correction is sound, and the prior public-persist finding remains resolved. Current main mitigates the queued-turn failure, but this PR retains distinct incremental-storage value that the related maintainer discussion explicitly preserves.

Priority: P2
Reviewed head: 449cc4c59d50f95b09b2fa78a79dfac5595c08aa
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong runtime evidence and substantial regression coverage support a sound patch; the remaining storage tradeoff requires an explicit owner decision.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Preserved real Gateway/SQLite yield-and-restart evidence exercises the changed persistence owner with 5,000 retained messages and one completion; synthetic provider/channel boundaries are disclosed. The new head only corrects the SDK checker profile, with both build profiles and a negative control recorded; universal bounded-window recovery is not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): Preserved real Gateway/SQLite yield-and-restart evidence exercises the changed persistence owner with 5,000 retained messages and one completion; synthetic provider/channel boundaries are disclosed. The new head only corrects the SDK checker profile, with both build profiles and a negative control recorded; universal bounded-window recovery is not claimed.
Evidence reviewed 11 items Verified follow-up scope: GitHub confirms the pinned head has parent 993c856 and changes only the SDK consumer checker since the preceding review. It moves the existing persist calls and negative control behind the canonical private-QA predicate; transcript runtime is unchanged.
Canonical SDK build contract: The SDK inventory classifies agent-sessions as private-local-only, package exports retain its JavaScript without a types entry, and the declaration helper selects private QA only when OPENCLAW_BUILD_PRIVATE_QA equals 1. Public consumers and public declaration checks remain unconditional.
Previous compatibility finding resolved: SessionManager.persist remains public with the required entry argument and optional options. The current checker retains two valid calls and an invalid-entry negative control in the applicable declaration profile.
Findings None None.
Security None None.

How this fits together

SessionManager maintains the conversation history used by agent turns. Yield cleanup removes temporary trailing entries from SQLite and updates the searchable history and bounded context read by the next turn.

flowchart TD
  A[Agent yields] --> B[Identify removable transcript tail]
  B --> C[Prepare bounded suffix update]
  C --> D{Writer and history still current?}
  D -->|No| E[Preserve durable and live history]
  D -->|Yes| F[Commit rows and projections atomically]
  F --> G[Adopt committed live history]
  G --> H[Continue next agent turn]
Loading

Decision needed

Question Recommendation
Is the measured bounded-cleanup refusal/read-window behavior and synchronous payload-copy/full-history fallback cost acceptable for this storage change? Accept the documented operating envelope: Record storage-owner acceptance of the measured limits and recovery behavior while retaining the existing handoff wait.

Why: The implementation has meaningful preservation and continuation evidence, but accepting its operating envelope is an explicit repository storage-design decision.

Before merge

  • Resolve merge risk (P1) - Existing bounded sessions can refuse cleanup beyond the loaded window or planning limits; a small reopen window can omit the cleanup target entirely. Preserving data does not guarantee recovery in those cases.
  • Resolve merge risk (P2) - Retained payload copying and the full-manager fallback perform synchronous work proportional to stored data; the reported fixture timings do not establish production event-loop latency.
  • Complete next step (P2) - Record the responsible session-storage owner's acceptance of bounded-cleanup refusal/recovery behavior and measured synchronous copying and fallback costs.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +2088, Tests +3113, Other +15. Total +5216 across 37 files.

View PR surface stats
Area Files Added Removed Net
Source 24 2325 237 +2088
Tests 11 3285 172 +3113
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 16 1 +15
Total 37 5626 410 +5216

Review metrics

Metric Value Why it matters
Production versus regression coverage Production net +2,088 lines; tests net +3,113 lines The substantial production growth supports suffix planning, retained-payload preservation, and concurrency handling, making storage-design acceptance consequential.

Merge-risk options

Maintainer options:

  1. Accept the measured storage limits (recommended)
    Approve the documented refusal behavior and synchronous costs after the responsible storage owner evaluates the supplied evidence.
  2. Hold the storage redesign
    Retain main's merged handoff mitigation while the owner defines any required recovery or latency changes.

Technical review

Best possible solution:

Keep atomic suffix cleanup and the existing handoff wait, with storage-owner-approved recovery behavior and synchronous-work limits.

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

No current-main end-to-end failure was reproduced in this read-only review. Current main now waits through the rebuild, while source still shows the full-history replacement that this PR optimizes.

Is this the best way to solve the issue?

Yes for the latest build correction: it follows the canonical private-QA declaration contract without weakening public checks. The wider storage approach remains subject to acceptance of its documented operating envelope.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Useful session-storage reliability work remains, while current main already mitigates the queued-turn handoff failure.
  • merge-risk: 🚨 compatibility: Bounded cleanup introduces refusal behavior that can leave existing large sessions unable to complete a repair within their loaded window.
  • merge-risk: 🚨 availability: Synchronous payload copying and full-history fallback can stall the shared runtime for data-dependent durations.
  • 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 (logs): Preserved real Gateway/SQLite yield-and-restart evidence exercises the changed persistence owner with 5,000 retained messages and one completion; synthetic provider/channel boundaries are disclosed. The new head only corrects the SDK checker profile, with both build profiles and a negative control recorded; universal bounded-window recovery is not claimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. Preserved real Gateway/SQLite yield-and-restart evidence exercises the changed persistence owner with 5,000 retained messages and one completion; synthetic provider/channel boundaries are disclosed. The new head only corrects the SDK checker profile, with both build profiles and a negative control recorded; universal bounded-window recovery is not claimed.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • VACInc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record storage-owner acceptance of the measured refusal/read-window behavior and synchronous copy/fallback costs.

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 (149 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-08T14:37:07.445Z sha a5bdf91 :: blocked before merge. :: none
  • reviewed 2026-09-08T16:22:23.732Z sha 4f4ae11 :: blocked before merge. :: none
  • reviewed 2026-09-08T18:14:28.971Z sha 6bbb7e7 :: blocked before merge. :: none
  • reviewed 2026-09-08T20:23:28.892Z sha 68022cd :: blocked before merge. :: [P1] Preserve public access to the shipped persist method
  • reviewed 2026-09-08T20:31:29.436Z sha 68022cd :: blocked before merge. :: [P1] Preserve public access to the shipped persist method
  • reviewed 2026-09-08T20:56:22.657Z sha 70a8ece :: blocked before merge. :: [P1] Preserve public access to the shipped persist method
  • reviewed 2026-09-08T22:21:27.870Z sha b6232b0 :: blocked before merge. :: none
  • reviewed 2026-09-09T00:08:22.464Z sha 993c856 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 3, 2026
@jalehman

jalehman commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 3, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed 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. labels Sep 3, 2026
@jalehman

jalehman commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review exact head a5bdf91f49045cf2fed55c62ba5331c172e7f32c.

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@jalehman

jalehman commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review exact head 4f4ae11b2498e8968d8b339c1e1792e44f6631ee.

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@jalehman

jalehman commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged current main into exact head 6bbb7e7c584a2d5bfddeb2fa67272f579964c56f without rebasing or rewriting history.

Validation on the merged head:

  • focused transcript/session/yield regressions pass: 111/111 across eight files;
  • repository changed-file checks pass;
  • mandatory P0–P2 autoreview is scoped-clean with no actionable findings;
  • git diff --check origin/main...HEAD passes.

ClawSweeper's preceding exact-head review reported no concrete code finding; storage-owner acceptance of bounded-cleanup refusal recovery and synchronous full-history fallback costs remains the human decision.

@clawsweeper re-review exact head 6bbb7e7c584a2d5bfddeb2fa67272f579964c56f.

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Keep retained custom data in SQLite while bounded suffix planning repairs
its envelope. Preserve atomic payload copying, writer and mutation fences,
projection updates, and post-commit live-state adoption without raising
planning limits or hydrating the whole transcript.

Verified with retained-data regressions, changed-file checks, full builds,
and an isolated AWS Gateway continuation/restart proof. Mandatory autoreview
could not run because its isolation checks reject the host proxy shape;
commit and push were explicitly authorized with that limitation disclosed.

Worked on by:
- @jalehman

Co-authored-by: jalehman <[email protected]>
@jalehman

jalehman commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

roboclaw-bot and others added 2 commits September 8, 2026 20:44
Keep the orchestration plan contract private and let the projection helper
return its concrete shape without importing its caller. Replace raw Kysely
identifier references with schema-checked expression references, and reuse
the aliasable input expression instead of wrapping it in raw SQL.

The original Madge cycle was reproduced. The complete architecture gate
and recovery suite pass; query comparisons retain identical SQL and bound
parameters. No guard exclusions, schema changes, or limit changes.

Autoreview remains unavailable due to the disclosed host proxy isolation
constraint; this in-scope correction and push were explicitly authorized.

Worked on by:
- @jalehman

Co-authored-by: jalehman <[email protected]>
@jalehman

jalehman commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Pushed exact-head repair b6232b03e6ea476ec4eaa382364de516a13609c3 for the current P1 compatibility finding:

  • restores public visibility of the released SessionManager.persist method;
  • adds a typed consumer regression through openclaw/plugin-sdk/agent-sessions;
  • focused test and repository changed-file checks pass;
  • mandatory autoreview is scoped-clean through P2.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Count compaction and reset boundaries only when adopting an appended entry
locally; reloaded bounded views already contain the committed count.

Restore rewrite-race and boundary replay tests, original narrow yield
handoff limits, and exact retained-state assertions. Repair the bounded
no-hydration fixture to target the real transcript database.

Remove unused inspection and mutation-receipt plumbing, duplicate reads
and ownership predicates, dead scans, and impossible projection branches.
Preserve existing concurrency fences, recovery limits, and the public SDK
contract; add calls through the packaged SDK consumer check.

Validation: 175 affected tests plus follow-up targeted reruns, core/test/
script types, lint, architecture, and the canonical strict SDK build.
Autoreview remains unavailable due to proxy-isolation preflight; publication
was explicitly requested with that limitation disclosed.

Worked on by:
- @jalehman

Co-authored-by: jalehman <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

Please review the new head 993c856f042a449b311e446609e7d6980d83a775. The validated audit follow-up is now pushed, and the PR body records restored safety coverage, the boundary-count fix, simplifications, and representative cleanup timings/limitations. Existing concurrency guarantees and planning limits are retained. Review only; no autofix or automerge requested.

@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

agent-sessions is a private runtime facade whose declarations are only
emitted in private-QA builds. The unconditional typed consumer broke the
ordinary CI artifact profile with TS7016 and an unused expect-error.

Select that consumer using the canonical private-QA build flag. Keep all
public-package consumers unconditional and retain the positive persist
calls and invalid-entry control whenever the private declarations apply.
Do not add declarations, widen public exports, or change typecheck budgets.

Reproduced the CI-profile failure locally. The public CI artifact build
and private-QA strict build both pass after the fix; selecting private QA
against public-only artifacts still rejects the missing declaration.

Autoreview remains blocked by the disclosed proxy-isolation preflight.

Worked on by:
- @jalehman

Co-authored-by: jalehman <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

Head 449cc4c59d50f95b09b2fa78a79dfac5595c08aa corrects the CI build-profile mismatch in the added SDK consumer. Normal public CI builds omit private-facade declarations by design; the facade consumer is now scoped to private QA. The public CI artifact build, private-QA strict build, and missing-private-declaration negative control were verified locally. Details are in the PR body. No transcript-runtime change, export/budget widening, autofix, or merge requested.

@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

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

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. 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.

4 participants