Skip to content

chore(ci): cover the compaction subprocess entry in deadcode tests - #199062

Merged
roboclaw-bot merged 6 commits into
mainfrom
openclaw/nova-prawn
Nov 14, 2026
Merged

roboclaw-bot merged 6 commits into
mainfrom
openclaw/nova-prawn

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #196550

What Problem This Solves

Protects the compaction retention subprocess from silently losing its explicit full-tree deadcode entrypoint.

User Impact

No user-visible behavior change, migration, or required action. This PR now changes only a regression test; production code and analyzer configuration match integrated main.

Why This Change Was Made

Main independently landed the compaction cleanup in f57cf2b6ab1e. The integration preserves that cleanup, main's maintained serialization-index test, and its exact subprocess entry without duplicating them.

The remaining change requires the agent-core Knip workspace before reading its entries and asserts the exact workspace-relative retention-subprocess root. Net scope: one test file, +14/−2; no ignores, broad globs, or baseline growth.

Evidence

  • Reviewed integration: 583ac47156684c2b32f7ecb5208104401b456e08, pinned main cc201f44c87c16a4d5df3b0a245d7baa7f7f32ba, tree 8e7d2bcc76bedb681ad0bf66e62880688c5dbdb8. Managed publication 33ffe03b60ceb75a22c996bc8c79b54d8a226bd5 has that identical tree; its GitHub diff is exactly the one-file test delta. The guard fixes this PR's TS2532 strict-index error; no inherited-failure exception is claimed.
  • Fresh AWS proof — run_0499f09af631735a9b68d6d3e3a4a80b, completed 2026-11-14 18:48:22 UTC, exit 0. Initial and final remote trees both matched 8e7d2bcc76bedb681ad0bf66e62880688c5dbdb8; patch SHA256 3b62d3968017c2076c94115dc11cb5a6fea9a4c5116d9e236d4f4a2a7820cdf9 matched before and after checks. AWS m7a.xlarge (4 CPUs, 16 GiB), Node 24.22.1, pnpm 12.15.0; frozen install passed. Retained command results were inspected in the originating work session; this publisher verified the identical Git tree, not a local replay.
    • Tooling typecheck leaf test/tsconfig/tsconfig.test.root.tooling.json: passed, no TS diagnostics (18.9s).
    • Canonical touched-file oxfmt check: passed. Type-aware oxlint using that tooling tsconfig and one thread: passed, zero warnings/errors (24s).
    • Config test: 31/31 passed. Conflict-resolved input-budget test: 29/29 passed. Combined: 60 tests across two files (48.32s wrapper).
    • Lease cbx_205788a9a664 released successfully; task lease inventory verified empty.
  • Fresh independent P0–P2 autoreview against pinned main: complete, scoped-clean, no actionable findings. It assessed the supplied diff/source; Git ancestry and AWS execution were verified separately. Local git diff --check passed. The commit changed only metadata from the reviewed/proven candidate tree.
  • Historical diagnosis: scheduled failure at 1ac07b333581ff06e7d323015dc5912247415d4b; AWS baseline reproduced all three deadcode commands exiting 1 (eight unused export/type pairs plus the live subprocess reported unused). Original AWS candidate, committed as 1503998c915266bf0e681a012a66b93f46a74e39, passed all three commands with no findings. The original regression was red on its unpatched parent (1 failed, 30 passed), then green (31 passed); seven consumer files passed, 158 tests total. Those results belong to the original candidate, not the new head.
  • Gaps: full Knip was not rerun after integration because production/config graphs are unchanged against pinned main. No local install, tests, lint, or typecheck ran. Earlier tooling-config lint was SIGKILLed on an 8-GiB box; its cause remains unproven, while the fresh scoped lint above passed on 16 GiB. No fresh full build, all-shard CI, or three-Knip-scan success is claimed. The old hosted review at f365073c0596bad80657e3b2c5ef10ef7ce0d82a does not cover this delta; one fresh re-review was requested, which is not review completion. Current-head CI, ClawSweeper satisfaction before landing, and post-merge natural-main qualification remain separate requirements.
Exact fresh AWS check commands
OPENCLAW_LOCAL_CHECK=0 OPENCLAW_CI_STATIC_EVIDENCE=1 node scripts/run-tsgo-core-test-shards.mjs --root-stripe 1/4
CI= OPENCLAW_FORMAT_TOOL=oxfmt node scripts/run-format.mts --check test/scripts/check-deadcode-exports.test.ts
CI= OPENCLAW_LINT_TOOL=oxlint node scripts/run-oxlint.mjs --tsconfig test/tsconfig/tsconfig.test.root.tooling.json --threads=1 test/scripts/check-deadcode-exports.test.ts
pnpm test test/scripts/check-deadcode-exports.test.ts packages/agent-core/src/harness/compaction/summarization-input-budget.test.ts --maxWorkers=1

All commands were timeout-bounded and serialized on the remote box.

Contributor credit: @obviyus and @steipete. Original compaction implementation: @RomneyDa in #196550.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 14, 2026 17:40
Keep compaction implementation helpers private and remove the unused
serialization wrapper and iterator re-export introduced by #196550.
Register the retention subprocess at its exact workspace-relative path
and keep its Knip contract and consumer tests in sync.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
Worked on by:
- @obviyus
- @steipete

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: e832247b-2616-8963-b8f1-773b1a4610e2
@clawsweeper

clawsweeper Bot commented Nov 14, 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 agents Agent runtime and tooling size: S labels Nov 14, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. P2 Normal backlog priority with limited blast radius. 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. 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 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR checks that the agent-core workspace retains the compaction retention subprocess as an explicit full-tree Knip entry.

Example: The entry src/harness/compaction/compaction-floor.retention.test-support.ts! is removed from the agent-core Knip workspace.

  • Before: The existing workspace-entry regression test does not detect its removal.
  • After: The added assertion fails on the missing subprocess entry.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A useful, minimal test-only change supported by reported focused validation; broad exact-head CI remains pending.
Proof confidence 🐚 platinum hermit (4/6) Only an analyzer configuration test changes, so shipped runtime proof is unnecessary.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Maintainers could lose the explicit analyzer root for a live subprocess without the existing configuration tests detecting it.
Reason: The maintainer-authored direction is narrow, preserves existing behavior, and adds an independent static contract guard for a real path-launched fixture.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR adds useful, focused coverage for an existing analyzer contract, with no actionable defects found.

Priority: P3
Reviewed head: 33ffe03b60ceb75a22c996bc8c79b54d8a226bd5

Before merge

None.

Findings

None.

Agent review details

How this fits together

Knip configuration maps repository files and dynamic subprocess roots into analyzer workspaces; the changed test checks that mapping before CI relies on its deadcode reports.

flowchart LR
  A[Production workspace configuration] --> B[Full-tree Knip configuration]
  C[Path-launched retention probe] --> B
  B --> D[Deadcode reports]
  E[Workspace contract test] --> B
Loading

Technical review

Best possible solution:

Retain the exact-entry assertion and existing workspace guard without adding analyzer machinery or broadening entry globs.

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

The final scope is test-only; source inspection confirms the probe is launched by path and its explicit Knip entry already exists on main.

Is this the best way to solve the issue?

The assertion belongs in the existing workspace-contract suite, uses its established helper, and covers a launch edge outside the compiled-worker registries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2176ca7b07f0.

Provenance checked

  • Full-tree Knip workspace guards and executable-root coverage keeps the original intent (7e1d93d: Enforce full-repository hard-zero deadcode checks while modeling real executable roots and test consumers.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff only adds agent-core workspace narrowing and an exact subprocess-entry assertion; analyzer configuration and runtime code are unchanged. (test/scripts/check-deadcode-exports.test.ts:24, 33ffe03b60ce)
  • Existing main implementation: Main already registers the exact workspace-relative retention probe; the independent compaction cleanup explicitly modeled its real spawned entry rather than suppressing unused-file detection. (config/knip.all-exports.config.ts:215, f57cf2b6ab1e)
  • Distinct contract coverage: The floor test launches the probe directly by source path, while the neighboring registry test covers compiled-worker registry entries; the new assertion protects a separate launch edge. (packages/agent-core/src/harness/compaction/compaction-floor.test.ts:23, 33ffe03b60ce)
  • Focused validation: The PR reports passing focused tests, tooling typecheck, format, and lint on tree 8e7d2bcc76bedb681ad0bf66e62880688c5dbdb8; local tree inspection confirms the published head matches that tree. These checks were not replayed during this read-only review. (33ffe03b60ce)
  • Exact-head CI: The latest inspected check runs contain no completed failures, with lint and baseline checks still running; the aggregate CI gate remains pending. (33ffe03b60ce)
  • Policy and provenance: Root and test policies were read and applied; no maintainer-notes directory exists. The original hard-zero refactor introduced the workspace guard and full-tree contract tests. Broader history searches reached unavailable old blobs, but the relevant provenance commit and pinned revisions were readable. (test/scripts/check-deadcode-exports.test.ts:23, 7e1d93d36d76)

Likely related people:

  • Peter Steinberger: Raw commit 7e1d93d adds test/scripts/check-deadcode-exports.test.ts:15 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7e1d93d36d76; files: test/scripts/check-deadcode-exports.test.ts)

PR surface

Tests +12. Total +12 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 14 2 +12
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 14 2 +12

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 preventive test coverage with no runtime or analyzer configuration change.
  • remove P2: Current review triage priority is P3, so this older priority label is no longer current.

Label justifications:

  • P3: This is preventive test coverage with no runtime or analyzer configuration change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-14T17:50:50.273Z sha f365073 :: needs maintainer review before merge. :: none

Reviewed November 14, 2026, 1:58 PM ET / 18:58 UTC (Revision 2).

roboclaw-bot and others added 4 commits November 14, 2026 18:29
Require the agent-core workspace alongside the other Knip test owners
before reading its entries. Preserve the retention-probe assertion while
satisfying strict indexed access after #199062.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
Join the published PR head while preserving the reviewed strict workspace narrowing unchanged.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
Preserve main's independently landed compaction cleanup and its exact subprocess entry. Resolve the budget-test conflict with main's maintained serialization-index test, remove the duplicate entry, and retain the strict agent-core Knip config assertion.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
Worked on by:
- @obviyus
- @steipete

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 07e47899-ed95-4a04-b86d-578e3523f6d8
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed agents Agent runtime and tooling size: S labels Nov 14, 2026
@roboclaw-bot roboclaw-bot changed the title fix(ci): restore compaction deadcode checks chore(ci): cover the compaction subprocess entry in deadcode tests Nov 14, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Nov 14, 2026
@clawsweeper clawsweeper Bot removed P2 Normal backlog priority with limited blast radius. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 14, 2026
@roboclaw-bot
roboclaw-bot merged commit 32abe7e into main Nov 14, 2026
110 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/nova-prawn branch November 14, 2026 19:12
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 15, 2026
…penclaw#199062)

* fix(ci): restore compaction deadcode checks

Keep compaction implementation helpers private and remove the unused
serialization wrapper and iterator re-export introduced by openclaw#196550.
Register the retention subprocess at its exact workspace-relative path
and keep its Knip contract and consumer tests in sync.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>

* fix(ci): restore compaction deadcode checks

Worked on by:
- @obviyus
- @steipete

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: e832247b-2616-8963-b8f1-773b1a4610e2

* fix(test): narrow the agent-core Knip workspace

Require the agent-core workspace alongside the other Knip test owners
before reading its entries. Preserve the retention-probe assertion while
satisfying strict indexed access after openclaw#199062.

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>

* Publish openclaw/nova-prawn

Worked on by:
- @obviyus
- @steipete

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 07e47899-ed95-4a04-b86d-578e3523f6d8

---------

Co-authored-by: obviyus <[email protected]>
Co-authored-by: steipete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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