Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. What this changesAdds deleted/reset transcript archive counts to session cleanup previews and results while protecting directories shared with unselected agents. Example: With seven-day archive retention, a directory contains one expired deleted archive and one fresh reset archive.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain This PR retains useful archive-reporting work that current main does not provide; its reported merge conflict requires integration with the newer retention lifecycle. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe sessions cleanup CLI delegates to the Gateway or local cleanup service, which selects session stores and applies retention to SQLite history and filesystem artifacts. flowchart TD
A[Sessions cleanup CLI] --> B[Gateway or local cleanup service]
B --> C[Logical store selection]
C --> D[Shared directory coordinator]
D --> E[Archive retention owner]
E --> F[Transcript archive files]
B --> G[SQLite session lifecycle]
E --> H[Cleanup summaries]
Technical reviewBest possible solution: Integrate archive preview and removal counts into current main's canonical cleanup lifecycle, reusing its artifact-directory resolver and retaining shared-directory protection. Do we have a high-confidence way to reproduce the issue? Current main's preview and summary omit dedicated archive-retention counts; source establishes that reporting gap without executing target code. Is this the best way to solve the issue? A shared retention owner is the right fix location, but the final integration should reuse current main's directory and SQLite lifecycle owners rather than establish a competing cleanup flow. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ff0df28d9385. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +382, Tests +594, Other -1. Total +975 across 21 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (10 earlier review cycles; latest 8 shown)
Reviewed October 16, 2026, 1:37 AM ET / 05:37 UTC (Revision 11). |
|
@clawsweeper re-review Pushed c079b74d630a48643bc68dc1f630bade32ef09b4 to address the dry-run double-count finding. Archive cleanup dry-run now receives the disk-budget exclusion set, with regression coverage for disk-budget-claimed archive files. I also updated the PR body with redacted CLI dry-run/apply proof and the rerun validation. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c079b74d63
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Rebased onto current @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This XL PR has had no commits since August 13 and still needs real behavior proof. Please open a fresh, smaller PR against current main if archive cleanup reporting is still missing. |
Fixes #75658
What Problem This Solves
Fixes an issue where operators running
openclaw sessions cleanup --dry-runcould not preview expired.deleted.*and.reset.*transcript archives, and apply output did not report the physical archive files it removed.Why This Change Was Made
Cleanup uses the configured archive-retention rules for preview and apply reporting. Physical archive retention is owned by the canonical config/session lifecycle module shared by SQLite cleanup and Gateway callers, without a config-to-Gateway runtime bridge or a new session-accessor debt exemption.
Logical ownership remains separate from physical directory identity. A selected agent cannot remove archives from a directory shared by another configured agent, including a symlink alias;
--all-agentscan clean that physical directory once.Successful retention deletion clears reset-archive discovery state before notifying transcript subscribers. Dry-run stays non-mutating: archive-directory identity checks use a read-only matcher and never create missing-path alias probes.
User Impact
Users can see deleted/reset transcript archive cleanup in dry-run and apply summaries. Shared directories stay protected during agent-scoped cleanup, while all-agent cleanup deduplicates physical work and reports the result.
Current Head
add96cdb4c807a6d3e5c6b60ffc352b5292733ca.main165a2e9ede696adbc84313bbb731ee89c1ef53d2.Sami Rusani <[email protected]>.Evidence
git diff --checkpassed.pnpm devrebuilt the CLI and bundled plugin assets before the isolated CLI proof.CLI Proof
Disposable isolated fixture with two logical agents sharing one archive directory, one expired
.deletedarchive, and one fresh.resetarchive:shared-directory-requires-all-agentsand preserves the directory;No external service, credentials, or user data was used.
AI Assistance
AI-assisted: yes. Codex was used to inspect contributor rules and review feedback, rebase the patch, resolve current-main integration conflicts, run focused validation, and produce the isolated CLI proof. No agent transcript is attached.