Skip to content

fix(live): assert native continuation from durable state - #150503

Merged
RomneyDa merged 1 commit into
mainfrom
fix/frv-native-agent-continuity
Sep 17, 2026
Merged

RomneyDa merged 1 commit into
mainfrom
fix/frv-native-agent-continuity

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

  • assert Responses continuation through the provider-side response lineage
  • verify compaction through the durable SQLite checkpoint instead of transient result metadata
  • keep replay coverage proving compaction does not repeat unnecessarily

Validation

  • pnpm check:changed

Release evidence

Updates stale native-agent live assertions exposed by Full Release Validation 35164828118. The local provider rerun was blocked by expired protected credentials after the hermetic state setup succeeded; hosted live CI remains the definitive provider proof.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

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

View the workflow run.

@RomneyDa
RomneyDa enabled auto-merge (squash) September 17, 2026 02:05
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Sep 17, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 17, 2026, 2:23 AM ET / 06:23 UTC (Revision 4).

ClawSweeper review

What this changes

Updates live agent tests to verify response continuation through provider response IDs and compaction through saved SQLite checkpoints while retaining recovery and replay checks.

Merge readiness

✅ Ready for maintainer review

Keep open: the assertion corrections remain absent from pinned main, and no blocking correctness or security defect was found. The related merged runtime fixes do not supersede this test repair.

Priority: P3
Reviewed head: e7370508e7ea6ef824c98c68b0a45c4afb0186c9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused assertion repair with meaningful outcome checks retained and no blocking defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored test-only PR is exempt from the external-contributor proof gate and changes no authority boundary. The captured body reports a blocked provider rerun; earlier merged-PR live evidence does not establish an after-fix pass for this head.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored test-only PR is exempt from the external-contributor proof gate and changes no authority boundary. The captured body reports a blocked provider rerun; earlier merged-PR live evidence does not establish an after-fix pass for this head.
Evidence reviewed 8 items Verified introduced scope: The independently inspected base-to-head diff matches the supplied introduction evidence: only live-test assertions change. The read-only diff check passed and the checkout remained clean.
Continuation contract supports the replacement: The Responses transport validates the prior history prefix, supplies previous_response_id, and sends only the remaining input. Requiring the completed receipt to appear again in the third request input conflicts with that supported continuation path.
Observable recovery safeguards remain: The complete output-limit test still requires exactly one receipt, no unfinished file, three provider requests, the receipt in the final answer, one output-limit recovery event, and no write tool result.
Findings None None.
Security None None.

How this fits together

OpenClaw’s embedded agent runner sends conversation context to a model provider and saves session history. These live tests check that interrupted tool work resumes safely and compacted context remains usable after reopening the session.

flowchart LR
  A[Live test prompts] --> B[Embedded agent runner]
  B --> C[Responses provider]
  C --> D[Response lineage]
  B --> E[SQLite checkpoint]
  D --> F[Receipt recovery checks]
  E --> G[Reopened session replay checks]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -4. Total -4 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 3 7 -4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 3 7 -4

Review metrics

None.

Technical review

Best possible solution:

Keep live coverage anchored to provider continuation and durable session state, preserving exact receipt recovery and checkpoint replay assertions.

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

Yes for the continuation assertion mismatch from source: supported response chaining omits previously supplied input. Neither live scenario was executed during this read-only review.

Is this the best way to solve the issue?

Yes. The replacements check the owning protocol and persisted state while retaining the observable recovery and replay outcomes; no production workaround is introduced.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a bounded live-test assertion repair with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored test-only PR is exempt from the external-contributor proof gate and changes no authority boundary. The captured body reports a blocked provider rerun; earlier merged-PR live evidence does not establish an after-fix pass for this head.

Evidence

What I checked:

  • Verified introduced scope: The independently inspected base-to-head diff matches the supplied introduction evidence: only live-test assertions change. The read-only diff check passed and the checkout remained clean. (e7370508e7ea)
  • Continuation contract supports the replacement: The Responses transport validates the prior history prefix, supplies previous_response_id, and sends only the remaining input. Requiring the completed receipt to appear again in the third request input conflicts with that supported continuation path. (packages/ai/src/transports/openai-responses-continuation.ts:163, c49879668263)
  • Observable recovery safeguards remain: The complete output-limit test still requires exactly one receipt, no unfinished file, three provider requests, the receipt in the final answer, one output-limit recovery event, and no write tool result. (src/agents/embedded-agent-runner.responses-output-limit.live.test.ts:157, e7370508e7ea)
  • Durable compaction and replay remain checked: After deleting the source file, the test requires a marker-bearing persisted checkpoint, removal of old tool results from active context, exact marker recall, unchanged checkpoint count on replay, and replay usage within the configured budget. (src/agents/sessions/agent-session.openai-compaction.live.test.ts:336, e7370508e7ea)
  • Runtime boundary: Both affected scenarios explicitly select the OpenClaw runtime. The runtime documentation distinguishes that selection from Codex, and the continuation implementation resides in this repository’s @openclaw/ai package; no affirmative dependency on the Codex harness establishes a sibling-source gate. (src/agents/sessions/agent-session.openai-compaction.live.test.ts:248, e7370508e7ea)
  • Still necessary on pinned main: Pinned main retains the receipt-in-input assertion; the introduced diff also confirms it retains the transient compaction-count comparison. The latest-release tree lacks the output-limit test, so this assertion repair is not established as shipped. (src/agents/embedded-agent-runner.responses-output-limit.live.test.ts:163, c49879668263)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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 (3 earlier review cycles)
  • reviewed 2026-09-17T02:17:12.528Z sha 7df6095be8af0d44423403e3c0c74b623ef5468f :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T02:44:11.122Z sha 443a5ce :: blocked before merge. :: none
  • reviewed 2026-09-17T05:27:41.150Z sha 765c8b2d22844db6e25505d2be7e5f077e880b11 :: needs maintainer review before merge. :: none

@RomneyDa
RomneyDa force-pushed the fix/frv-native-agent-continuity branch 2 times, most recently from 443a5ce to 765c8b2 Compare September 17, 2026 05:18
@RomneyDa
RomneyDa force-pushed the fix/frv-native-agent-continuity branch from 765c8b2 to e737050 Compare September 17, 2026 06:17
@RomneyDa
RomneyDa merged commit a3bea6a into main Sep 17, 2026
164 checks passed
@RomneyDa
RomneyDa deleted the fix/frv-native-agent-continuity branch September 17, 2026 06:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant