Skip to content

fix: release session check expects the retired Doctor backup - #134422

Merged
steipete merged 2 commits into
mainfrom
codex/frv-session-archive-proof
Aug 31, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/frv-session-archive-proof

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The release Docker session runtime-context test still expected a .pre-doctor-branch-repair backup beside the old JSONL transcript. Public Doctor now stages its repair in SQLite and moves the untouched original into the migration archive; the standalone file-repair API retains the old backup behavior. The packaged test had already verified the migrated active branch and excluded hidden context before failing on the obsolete filename.

Why This Change Was Made

The packaged-flow change updates that test harness. It captures the original transcript before Doctor, requires exactly one corresponding migration archive, and verifies the complete archived bytes. Existing visible-prompt, active-branch, and hidden-context assertions remain unchanged. No product, schema, storage, lifecycle, timeout, retry, or provider behavior changes.

User Impact

Internal release-test repair only. The packaged harness changes by +11/-3 lines; the SDK cancellation test is also corrected as described below. Production runtime delta: zero. This restores release verification against the documented migration contract without weakening rollback preservation.

Evidence

Validation used the exact frozen 594f500 package and functional Docker image from full run 33423706952. ZIP digests, package/image manifests, inner archive digest and loaded Docker image IDs were verified. On Linux Node 24.19 with 4 CPUs, the unchanged test reproduced the original backup assertion failure; the one-file candidate passed through the same packaged flow. The canonical one-path changed gate passed, including scripts types, lint, format, and Docker boundary checks, and independent managed review was clean. The two arm timings are not a controlled performance comparison.

Hosted CI Repair

The first exact-head CI run passed the packaged-flow code checks but failed the SDK comparison cancellation test: a runner bookkeeping file remained in RUNNER_TEMP. The comparison CLI only owns its unique child directory, so asserting that the entire runner parent was empty exceeded the cleanup contract. The origin of the hosted bookkeeping file is inferred; the repair does not depend on recognizing that filename.

The test now captures the actual registered revision worktree, asserts that its owned temporary root existed and is removed after cancellation, retains worktree deregistration, exit143 and the five-second deadline, and verifies that an unrelated runner sentinel survives. No production cleanup behavior changes.

A controlled Git wrapper writing bookkeeping beside the tool directory reproduces the original assertion failure and passes with the corrected ownership check. Negative controls that retain the owned root or delete the unowned parent both fail. This strengthens the cleanup contract without deleting runner files or ignoring a named artifact.

The ClawSweeper migration/storage classifier applies to a test of existing archive behavior; no persistent data model or migration implementation is changed. Native archive proof covers the unchanged packaged-flow file. The SDK change has separate real-CLI cancellation proof, canonical changed-gate coverage and combined managed review. Exact-head hosted CI is required before merge.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: XS maintainer Maintainer-authored PR labels Aug 31, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 3:59 PM ET / 19:59 UTC.

ClawSweeper review

What this changes

The PR updates the packaged Doctor migration test to verify the archived original transcript and narrows a Plugin SDK comparison test to the CLI-owned temporary directory while preserving unrelated runner files.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. The two test-only corrections match the current Doctor archive and CLI cleanup owners; this MEMBER-authored, maintainer-labeled PR should proceed through normal exact-head CI and maintainer handling.

Priority: P3
Reviewed head: 9c0a90eb5277c83832fdba409d6e2ea84e8b1bbf

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned test repair with no actionable correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable to this MEMBER-authored test-only PR. The PR body describes packaged Docker and controlled CLI cancellation runs; this read-only review independently verified their source-to-assertion boundaries but did not execute repository code.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to this MEMBER-authored test-only PR. The PR body describes packaged Docker and controlled CLI cancellation runs; this read-only review independently verified their source-to-assertion boundaries but did not execute repository code.
Evidence reviewed 7 items Current Doctor archive contract: The current archive planner places migrated transcripts in the agent-level import archive and names them with the original basename plus .imported-; this supports checking the archived bytes rather than a retired sibling backup.
Current main still has the obsolete assertion: The fetched current-main version of the Docker harness still searches beside the legacy transcript for .pre-doctor-branch-repair-, so the central test failure remains unresolved on main.
Doctor test repair: The introduced assertion finds exactly one matching archived transcript and byte-compares it with the seeded original, while retaining the existing active-branch and hidden-context checks.
Findings None None.
Security None None.

How this fits together

The release Docker harness seeds a legacy session, runs Doctor, and verifies the resulting SQLite-backed session and preserved archive. Separately, the Plugin SDK API comparison CLI creates temporary Git worktrees under a runner directory and cleans up only its own temporary root.

flowchart LR
A[Legacy session transcript] --> B[Doctor migration]
B --> C[SQLite session and archive]
C --> D[Packaged Docker assertion]
E[SDK comparison CLI] --> F[Temporary worktree root]
F --> G[Cancellation cleanup assertion]
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head required CI is still in progress, so the final hosted validation gate remains unverified.
  • Complete next step (P2) - No repair lane is needed: the branch already contains the narrow source-aligned correction; normal exact-head CI and maintainer merge handling remain.
Agent review details

Security

None.

PR surface

Tests +12, Other +8. Total +20 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 16 4 +12
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 11 3 +8
Total 2 27 7 +20

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; test and test-support +27/-7 Both changed files are release or test harnesses; the patch adds no production runtime behavior.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/session-runtime-context-docker-client.ts, serialized state: scripts/e2e/session-runtime-context-docker-client.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the focused assertions: verify the immutable transcript archive produced by Doctor and require cancellation cleanup only for the comparison CLI’s unique temporary root.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the focused assertions: verify the immutable transcript archive produced by Doctor and require cancellation cleanup only for the comparison CLI’s unique temporary root.

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

Yes. Current main still asserts the retired nearby backup while the current Doctor owner archives the transcript elsewhere; the source establishes the failing packaged-harness path, although this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. The assertions follow the actual owners: Doctor’s archive path and the CLI’s unique temporary root, avoiding weaker filename assumptions and over-broad runner-directory cleanup.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ebc71a9a23d6.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • remove rating: 🦞 diamond lobster: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This corrects internal release and CI test expectations without changing user-facing runtime behavior.
  • 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: Not applicable to this MEMBER-authored test-only PR. The PR body describes packaged Docker and controlled CLI cancellation runs; this read-only review independently verified their source-to-assertion boundaries but did not execute repository code.

Evidence

What I checked:

Likely related people:

  • unknown: The blamed commit carries this line unchanged from a recorded parent; no introducing author is attributed. (role: carried-forward source line; confidence: low)

Rank-up moves

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

  • Allow the exact-head required CI run to complete successfully before merging.

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 (1 earlier review cycle)
  • reviewed 2026-08-31T19:36:20.290Z sha f0fa8cb :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The packaged archive assertion is unchanged and its native proof remains valid. The new commit fixes the unrelated SDK cancellation-test failure from the first CI run by checking only the CLI-owned temporary directory and preserving unrelated runner data. Controlled reproduction, two cleanup-fault controls, ten owner/sibling tests, the changed gate, and combined managed review pass. The PR body records the distinction; fresh exact-head CI is running.

@clawsweeper

clawsweeper Bot commented Aug 31, 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. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 31, 2026
@steipete
steipete merged commit dfb9f1f into main Aug 31, 2026
160 checks passed
@steipete
steipete deleted the codex/frv-session-archive-proof branch August 31, 2026 20:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 2026
…w#134422)

* test: verify Doctor preserves the archived session transcript

* test: verify SDK diff cleanup within its owned directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox 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. scripts Repository scripts 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