Repository navigation
fix: release session check expects the retired Doctor backup - #134422
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 3:59 PM ET / 19:59 UTC. ClawSweeper reviewWhat this changesThe 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 readinessKeep open. The two test-only corrections match the current Doctor archive and CLI cleanup owners; this MEMBER-authored, Priority: P3 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +12, Other +8. Total +20 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@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. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…w#134422) * test: verify Doctor preserves the archived session transcript * test: verify SDK diff cleanup within its owned directory
What Problem This Solves
The release Docker session runtime-context test still expected a
.pre-doctor-branch-repairbackup 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.