Skip to content

fix: verify user recall and exact file state across live OpenAI compactions - #208909

Merged
daniel-lxs merged 4 commits into
mainfrom
openclaw/openai-compaction-marker-char-3c50d0
Nov 30, 2026
Merged

daniel-lxs merged 4 commits into
mainfrom
openclaw/openai-compaction-marker-char-3c50d0

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The scheduled live test treated a model's one-character copying error as lost session state. Checking only file metadata misses a different regression: the filename can survive even when the prior conversation summary is dropped. #133180 deliberately made recall of an earlier user fact after two automatic compactions a release gate.

User Impact

Release maintainers keep both signals: changing one character of carried file state fails the test, and losing the earlier user fact fails recall. No runtime, version, or schema change.

Why This Change Was Made

I seed two independent facts. A real workspace patch produces a UUID-bearing filename. I check the original full filename in every checkpoint's modified-file list and in the final OpenAI request. A short, random two-word project nickname appears only in the first user prompt, never in the filename or recall question. After at least two automatic compactions, with tools disabled, the model must return exactly the filename color and the original nickname. The stress loop, acknowledgements, and full-context token threshold are unchanged.

Evidence

  • Main: On a959a0c, the third traced replay reproduced the scheduled missing J. The marker was intact in the request and already short in OpenAI's completed summary response. The original CI job did not retain a provider wire trace.
  • Revised test: Three detached AWS runs of the scheduled reduced-context profile passed (34.5 s, 32.3 s, 35.5 s). Each reached two automatic compactions by turn six. I fetched the GitHub pull ref and verified that published head fd0a8f3 and tested revision d091ed9 have the identical Git tree de6f89868ac18f340a22985801eb21a956f59f13.
  • User-fact control: On a separate AWS box I replaced only ember nudibranch with [omitted] in the prior summary at the second compaction. The exact filename checks passed and the model still returned the correct color. The final recall assertion failed: expected violet ember nudibranch, received violet [omitted]. The mutation is not in the PR.
  • Filename control, earlier revision: Removing one character from a carried filename failed the unchanged checkpoint assertion: expected suffix b8a8, received b8a.
  • Focused agents/sessions typecheck, file lint, formatting, and whitespace checks passed. Both AWS boxes were released. The optional full-context stress profile was not run. The prior automated review covered the filename-only revision. #167042 is related diagnostics work.

Credit: @daniel-lxs

Work sessions

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

Worked on by

🦞 Made with OpenClaw

roboclaw-bot and others added 2 commits November 30, 2026 06:15
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: e7dfcc48-ab25-42ae-94e6-7e9574167113
@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Pull request received.

ClawSweeper review complete

ClawSweeper finished reviewing this revision.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Nov 30, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. 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. 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 30, 2026
@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR checks exact carried filenames separately from a short user-supplied nickname after repeated live OpenAI compactions.

Example: A session creates violet-550e8400-e29b-41d4-a716-446655440000 and remembers the nickname ember nudibranch.

  • Before: The test relies on exact model transcription of a generated marker to judge retained conversation state.
  • After: The test checks the complete filename in checkpoint metadata and the provider request, then requires the answer violet ember nudibranch.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, coherent test repair with reported live boundary validation and negative controls; confidence is limited by narrative-only run evidence and pending CI.
Proof confidence 🦐 gold shrimp (3/6) This test-only PR reports real OpenAI AgentSession runs and targeted negative controls on a verified identical tree; raw run artifacts were not supplied, and optional full-context stress was not run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Release maintainers can receive a compaction failure caused by marker transcription rather than loss of session state.
Reason: The maintainer-authored change preserves the established recall gate while separating model memory from deterministic filename preservation.

Merge readiness

✅ Ready for maintainer review

This PR makes a useful, focused repair to the live compaction gate while preserving user-fact recall; no actionable defects were found, and exact-head CI is still pending.

Reviewed head: fd0a8f38136bf3f869fa11e76e4d6e31939702a1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The live release test drives AgentSession against OpenAI, accumulates context until automatic compaction occurs, and inspects checkpoints, outgoing requests, and the final assistant answer.

flowchart TD
  A[Initial user nickname] --> B[AgentSession]
  B --> C[Real workspace patch]
  C --> D[Tool result filename]
  D --> E[Automatic compaction checkpoints]
  E --> F[Final OpenAI request]
  F --> G[Nickname and color recall]
Loading

Technical review

Best possible solution:

Retain the existing live test with independent checks for exact runtime-carried filenames and remembered user facts.

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

The original exact-transcription oracle is visible on current main, and the public body reports a traced copying failure; this review did not execute the live test or independently inspect the blocked job logs.

Is this the best way to solve the issue?

The change addresses the oracle problem within its existing owner, preserves two-compaction user recall, and adds distinct checks for checkpoint metadata and provider-request assembly without changing runtime behavior.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 9f13f9b adds src/agents/sessions/agent-session.openai-compaction.live.test.ts:187 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9f13f9b14032; files: src/agents/sessions/agent-session.openai-compaction.live.test.ts)
  • Dallin Romney: Raw commit d11c239 adds src/agents/sessions/agent-session.openai-compaction.live.test.ts:309 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d11c239ce430; files: src/agents/sessions/agent-session.openai-compaction.live.test.ts)

PR surface

Tests +42. Total +42 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 51 9 +42
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 51 9 +42

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.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ 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 (1 earlier review cycle)
  • reviewed 2026-11-30T06:44:41.546Z sha da315b2 :: passed. :: none

Reviewed November 30, 2026, 2:10 AM ET / 07:10 UTC (Revision 2).

roboclaw-bot and others added 2 commits November 30, 2026 07:01
…ctions

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b0a5921f-02ac-4501-b5ee-113e0ab0477f
@roboclaw-bot roboclaw-bot changed the title fix: verify exact file state across live OpenAI compactions fix: verify user recall and exact file state across live OpenAI compactions Nov 30, 2026
@daniel-lxs
daniel-lxs marked this pull request as ready for review November 30, 2026 07:06
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit f821186 into main Nov 30, 2026
178 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/openai-compaction-marker-char-3c50d0 branch November 30, 2026 07:26
vincentkoc added a commit that referenced this pull request Nov 30, 2026
…ogic

* commit 'f7ccd914102ab408606c45c0aa3adbd8427051eb': (1290 commits)
  refactor(ios): remove unreachable settings and automation controls (#208958)
  fix: verify deferred activation in package recovery acceptance (#208901)
  improve(ci): avoid unused adaptive scoring work (#208926)
  chore(ui): refresh control ui locales (#208959)
  test(agents): verify user recall and file state across OpenAI compactions (#208909)
  fix(ui): update the sidebar on startup and recovery screens (#207967)
  fix(whatsapp): quote the first queued swipe-reply answer (#208791)
  test(memory-wiki): generate metadata replacement transitions (#208932)
  fix(ui): hide Claude injected context from chat (#207234)
  fix(ui): count people instead of emoji in reaction badges (#207235)
  fix: keep Daybreak when another provider's model list fails (#208883)
  test(telegram): check the registered preload at polling worker startup (#208936)
  fix(qa): test Slack verbosity with one direct shell call (#208023)
  fix(qa): wait for Telegram messages before checking their formatting (#208024)
  feat(ios): show build details at the bottom of Settings (#208944)
  chore(ui): refresh control ui locales (#208937)
  fix: goals stop after native child-result handoffs (#193024)
  fix(ui): show current tool actions in collapsed chat activity (#208925)
  improve(ios): put About last in Settings (#208928)
  test(memory-wiki): generate human-note preservation regressions (#208921)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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.

2 participants