Skip to content

chore: simplify macOS Claude session catalog tests - #118571

Merged
steipete merged 1 commit into
mainfrom
codex/cleanup50k-macos-wave5-2d45
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cleanup50k-macos-wave5-2d45

Conversation

@steipete

@steipete steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The macOS Claude session catalog tests repeated temporary-home setup, transcript/index construction, catalog calls, response decoding, and cleanup across every case. That made the coverage costly to maintain and obscured the invariants each test protects.

Why This Change Was Made

Centralizes test-only fixture setup, encoding/decoding, catalog enumeration observation, and cleanup in one fixture while retaining every scenario and assertion. Production code and behavior are unchanged.

User Impact

No user-visible behavior changes. Maintainers get a smaller, clearer test suite with the same catalog regression coverage.

Evidence

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: L maintainer Maintainer-authored PR labels Aug 3, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 3, 2026, 4:38 AM ET / 08:38 UTC.

ClawSweeper review

What this changes

The PR consolidates repeated temporary-home, Claude transcript/index, JSON decode, catalog-call, observer, and cleanup helpers in the macOS Claude session catalog test suite while retaining its existing scenarios.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this maintainer-labeled PR open for normal landing review. The branch changes only the Claude session catalog test fixture layer; source inspection shows the same nine scenarios and assertion counts remain, with no runtime, dependency, security, or configuration change. No discrete patch defect was found, but the head’s macos-swift check is still in progress.

Priority: P3
Reviewed head: 3596c319f079387a4200f1d08d0ad9bef0a2d4aa
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-consistent test refactor with retained coverage and no actionable correctness finding; the remaining merge gate is the in-progress macOS Swift check.
Proof confidence 🌊 off-meta tidepool Not applicable: This protected maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its focused native-suite and lint evidence remains useful supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This protected maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its focused native-suite and lint evidence remains useful supplemental validation.
Evidence reviewed 5 items Fixture-only refactor: The branch introduces a Fixture that owns the temporary home, synthetic Claude files, JSON conversion, catalog calls, observer setup, and cleanup; each test still invokes the real catalog entry points with its isolated home directory.
Behavioral coverage retained: Direct source counts match before and after the refactor: 9 test cases, 41 #expect assertions, and 32 #require checks. The retained cases cover Desktop/CLI merge precedence, unsafe transcript filtering, access revocation, pagination leases, moved files, response-size bounds, and advertisement gating.
Runtime boundary unchanged: The production catalog still owns configuration gating, list/read parameter decoding, session discovery, and test-only enumeration observation; the node-mode worker remains the caller of the catalog’s production-home overloads. The PR does not alter either file.
Findings None None.
Security None None.

How this fits together

The macOS app reads Claude Code project transcripts and Desktop metadata from the local home directory, then exposes session-list and session-read results through its node-mode IPC runtime. This test suite creates isolated filesystem fixtures, invokes the catalog directly, and verifies discovery, pagination, access, cache, and advertisement behavior.

flowchart LR
  A[Temporary Claude home] --> B[Test fixture builder]
  B --> C[Transcript and index files]
  C --> D[Claude session catalog]
  D --> E[Node-mode IPC worker]
  E --> F[Catalog response assertions]
  D --> G[Enumeration observer assertions]
Loading

Decision needed

Question Recommendation
Once macos-swift completes, should the protected maintainer-labeled test-only refactor be merged as the canonical fixture cleanup for the Claude session catalog suite? Merge after green native check: Merge the branch if macos-swift succeeds on head 3596c319f079387a4200f1d08d0ad9bef0a2d4aa; the shared fixture preserves the covered catalog paths without changing production behavior.

Why: The patch has no supported correctness finding, but the protected maintainer label requires an explicit human landing decision after the native check settles.

Before merge

  • Add real behavior proof - Not applicable: This protected maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its focused native-suite and lint evidence remains useful supplemental validation.
  • Resolve merge risk (P1) - macos-swift is still in progress for the current head, so final merge readiness depends on that required native test result rather than on a source defect in this refactor.
Agent review details

Security

None.

PR surface

Other -201. Total -201 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 348 549 -201
Total 1 348 549 -201

Review metrics

Metric Value Why it matters
Regression coverage retained 9 tests, 41 expectations, 32 required values before and after The refactor reduces duplicate setup while preserving the suite’s observable catalog assertions.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the shared test fixture, merge after the current macOS Swift check succeeds, and keep future catalog scenarios expressed through the same isolated filesystem boundary rather than reintroducing per-test setup and cleanup.
  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 shared test fixture, merge after the current macOS Swift check succeeds, and keep future catalog scenarios expressed through the same isolated filesystem boundary rather than reintroducing per-test setup and cleanup.

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

Not applicable: this PR is a test-fixture refactor, not a report of broken user behavior. Its retained scenarios directly exercise the real local-home catalog APIs in isolated test directories.

Is this the best way to solve the issue?

Yes: centralizing repeated test-only setup at the fixture boundary is the maintainable solution because it preserves direct calls to the production catalog while avoiding nine independently maintained filesystem/JSON cleanup paths.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is narrowly scoped test-maintenance work with no user-visible production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This protected maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its focused native-suite and lint evidence remains useful supplemental validation.

Label justifications:

  • P3: This is narrowly scoped test-maintenance work with no user-visible 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 protected maintainer-labeled, test-only PR is outside the external contributor real-behavior-proof gate; its focused native-suite and lint evidence remains useful supplemental validation.

Evidence

What I checked:

Likely related people:

  • steipete: Available history attributes the original Claude session fleet implementation and subsequent native session-loading work to Peter Steinberger; the current branch is a focused test refactor in that same surface. (role: feature introducer and recent area contributor; confidence: high; commits: c3b426f280a9, 2c1c5b3a97a3; files: apps/macos/Sources/OpenClaw/NodeMode/MacNodeClaudeSessionCatalog.swift, apps/macos/Tests/OpenClawIPCTests/MacNodeClaudeSessionCatalogTests.swift)
  • Vincent Koc: Commit 776f564081b739905408c710adf30da89dc1c691 added the discovery-reuse behavior whose pagination and enumeration assertions this refactor preserves. (role: recent cache-behavior contributor; confidence: high; commits: 776f564081b7; files: apps/macos/Sources/OpenClaw/NodeMode/MacNodeClaudeSessionCatalog.swift, apps/macos/Tests/OpenClawIPCTests/MacNodeClaudeSessionCatalogTests.swift)
  • Papilionidae: Commit 3dfb4c9cd73b941eae0663c3c8613d7875207f4f changed accepted Claude CLI entrypoints, covered by the retained fallback/entrypoint test scenario. (role: adjacent catalog-behavior contributor; confidence: medium; commits: 3dfb4c9cd73b; files: apps/macos/Sources/OpenClaw/NodeMode/MacNodeClaudeSessionCatalog.swift, apps/macos/Tests/OpenClawIPCTests/MacNodeClaudeSessionCatalogTests.swift)

Rank-up moves

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

  • Wait for macos-swift to complete successfully on the current head.

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.

@steipete
steipete merged commit 21b3904 into main Aug 3, 2026
82 of 93 checks passed
@steipete
steipete deleted the codex/cleanup50k-macos-wave5-2d45 branch August 3, 2026 08:45
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 3, 2026
…ion-routing

* origin/main:
  refactor(agents): remove stale runner state plumbing (#118495)
  test(gateway): skip servers for handler fixtures (#118581)
  test(tui): reuse real gateway PTY fixture (#118567)
  fix: keep command tests independent of ambient Gateway tokens (#118577)
  fix: show effective channel model in Telegram status (#118548)
  test(system-agent): reuse approval CLI fixture (#118572)
  test(macos): deduplicate Claude session catalog fixtures (#118571)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos 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: L 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