Skip to content

fix(ci): retire unused compaction export surfaces - #201497

Merged
vincentkoc merged 2 commits into
mainfrom
fix-compaction-unused-surfaces-20261119
Nov 18, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix-compaction-unused-surfaces-20261119

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Problem

The long-history compaction migration left unused helper exports and old array adapters. The scheduled dependency check fails in both production and full-tree Knip scans: failed check.

Change

Keep module-local compaction/replay helpers private, remove obsolete re-exports and unused adapters, and move existing assertions to their maintained entry points. The serialization goldens, lazy-read limits, immutable publication checks, and final shaped payload assertions remain. The unused New Session presentation assertion helper is removed.

No package export map, runtime behavior, Knip exception, or baseline changes.

Validation

  • Affected runtime suites: 165 tests passed across 10 files, including the real stream-runtime fixture, serialization goldens, and bounded hydration checks. The corrected ID/stream fixtures were rerun successfully afterward.
  • Native Knip 6.40.0 production, full-tree, and script reports passed with no exceptions (82.65s).
  • Six scoped type graphs passed: core, packages, agents-other, agents-tools, agents-sessions, and UI E2E (46.73s).
  • Type-aware lint and formatting passed for all 31 changed files; normal signed commit hooks passed.
  • Fresh full-range local ClawSweeper review (4484f83..c5072cb): no correctness or security findings, confidence 0.92.

All local runtime proof used macOS with the pinned Bun runtime. PR CI provides the broader platform checks.

@vincentkoc vincentkoc self-assigned this Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui agents Agent runtime and tooling size: M labels Nov 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes internal compaction helpers private, removes unused adapters and re-exports, and moves existing assertions to maintained entry points.

Example: A serialization test renders conversation descriptors with a 4,000-character budget.

  • Before: The test imports the renderer through the utils forwarding export.
  • After: The test imports the renderer directly from conversation-serialization while retaining its golden output and lazy-read assertions.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The source change appears correct and focused, but the checks that establish its stated outcome have not run.
Proof confidence 🦪 silver shellfish (2/6) This behavior-preserving export cleanup requires static checks and affected tests rather than shipped-entry-point media.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: The scheduled dependency check reports unused surfaces left after the compaction migration.
Reason: The maintainer-authored direction removes unused code without changing runtime policy, package export maps, configuration, or stored formats.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides useful cleanup, and static review found no introduced correctness defects; validation remains pending while it is draft.

Priority: P3
Reviewed head: c6466a49ac3d48db5ffda76deb6ebd10433014c0

Before merge

None.

Findings

None.

Agent review details

How this fits together

Compaction prepares retained session history, renders bounded summary input, and sends it through the provider transport; Knip checks the source graph for unused exports.

flowchart LR
  A[Session transcript] --> B[Compaction preparation]
  B --> C[Bounded summary rendering]
  C --> D[Provider transport]
  D --> E[Compaction summary]
Loading

Technical review

Best possible solution:

Retain the existing compaction owners and merge this focused export cleanup once the pending validation passes.

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

Source references support the unused-surface diagnosis and GitHub confirms the preceding dependency job failed, but the exact Knip diagnostic and an after-change scan were not available.

Is this the best way to solve the issue?

Removing unused adapters and forwarding exports while testing maintained entry points is the smallest complete fix; no additional production machinery is needed.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3eee09d9b462.

Provenance checked

  • Shared compaction facts, replay helpers, and request-budget adapters keeps the original intent (777fc99: Share compaction decisions between array callers and payload-free transcript preparation while avoiding full-history residency on the Gateway thread.)
  • Legacy tool-result normalization keeps the original intent (8d152c1: Preserve occurrence-paired tool results across reset, replay, and compaction; the shared classifier remains while an unused normalization wrapper is removed.)
  • Compaction request gate assertions keeps the original intent (2b7950c: Apply the final provider request gate to compaction summaries after payload shaping; the assertions now enter through the maintained stream preparer.)
  • Unused New Session presentation assertion helper keeps the original intent (feff169: Protect pending-start presentation while Chat assets remain lazy; removing the uncalled helper changes neither the presentation nor an executing test.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Lehman: Raw commit 777fc99 adds src/agents/embedded-agent-runner/compaction-session-agent.ts:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 777fc99a8993; files: src/agents/embedded-agent-runner/compaction-session-agent.ts)
  • Peter Steinberger: Raw commit 806c8b3 adds src/agents/pi-embedded-helpers/turns.ts:73 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 806c8b312944; files: src/agents/pi-embedded-helpers/turns.ts)
  • Vito Cappello: Raw commit 2b7950c adds src/agents/embedded-agent-runner/compaction-session-agent.ts:59 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 2b7950cae3c3; files: src/agents/embedded-agent-runner/compaction-session-agent.ts)

PR surface

Source -38, Tests -29. Total -67 across 31 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 21 48 86 -38
Tests 10 47 76 -29
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 31 95 162 -67

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:

  • add P3: This is internal dead-code cleanup for a dependency check, with no demonstrated user-facing runtime regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is internal dead-code cleanup for a dependency check, with no demonstrated user-facing runtime regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Complete production and full-tree Knip scans, affected tests, and scoped type/lint checks on the reviewed head.

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 follows the weaker of proof and patch quality; ✨ 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.

Reviewed November 18, 2026, 5:57 PM ET / 22:57 UTC.

@vincentkoc
vincentkoc marked this pull request as ready for review November 18, 2026 23:04
@vincentkoc
vincentkoc enabled auto-merge (squash) November 18, 2026 23:08
@vincentkoc
vincentkoc merged commit bf7681d into main Nov 18, 2026
216 of 217 checks passed
@vincentkoc
vincentkoc deleted the fix-compaction-unused-surfaces-20261119 branch November 18, 2026 23:27
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
* fix(ci): retire unused compaction export surfaces

* fix(ci): complete compaction fixture export cleanup
RomneyDa added a commit that referenced this pull request Nov 19, 2026
* fix(ci): retire unused compaction export surfaces

* fix(ci): complete compaction fixture export cleanup

(cherry picked from commit bf7681d)

Release adaptation: omit unrelated new-session UI test-helper cleanup. Retain source compaction stream test, absent on the release baseline, at its canonical owner boundary.
Follow-up disposition: paired with #201304; no additional runtime policy changes.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit a115b897eb7bcba23496edc40b73d5b8b9a8640a)
RomneyDa added a commit that referenced this pull request Nov 19, 2026
Release adaptation: omit the new before_model_request gate regression from #201497 because its complete feature #193550 (2b7950c) is absent on this release. Keep the transport shaping regression; do not import an unrelated 54-file plugin feature to satisfy a mismatched test. Simplify the prepared alias registration-key comparison while preserving the generation-registry exemption and exact captured resolver.

Follow-up disposition: missing gate test is not compaction behavior proof; source extraction and exact replay tests provide the retained boundary coverage. PostgreSQL service qualification remains environment-blocked.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 3045afdafff9a3a21b48732b6c49711fb5fc9b71)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M 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