Skip to content

refactor(subagents): keep announce cleanup action type private - #206407

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/subagent-announce-deadcode
Nov 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/subagent-announce-deadcode

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Related: #206373
Follow-up to #206383 and #206429

What Problem This Solves

The announce cleanup action type is exported even though only its defining module reads it. This finishes the requested L3 export cleanup after the runtime-helper cleanup landed separately.

User Impact

No user-visible change. The type definition, runtime function bodies, delivery decisions, and tests are unchanged.

Why This Change Was Made

Make AnnounceCleanupAction private to the obligation owner. Rebased onto the landed fix in #206429 and dropped all overlapping runtime-helper and forwarding-export changes.

Mechanical caller updates

None required. A full-index git grep finds the type only at its declaration and its local return-type annotation.

Evidence

Base: 33fa6a84cec628168f052414a2cfa023af1956c3
Head: c1dcaf8e686f22190a8c196110f885d0b55b5838

  • One file, one removed export keyword: 1 line added and 1 line removed, no runtime or test changes.
  • Formatting and git diff --check passed.
  • Fresh P0-P2 branch review on the exact rebased head passed with no actionable findings. The cleanup consumer was supplied as unchanged source context.
  • Same-engine base/head scan of the touched module: 19 functions, 599 production SLOC, and identical complexity scores. Delivery decision sites across the L3 production scope remain 33 to 33.
  • Per the coordinator's standing rule, exact-head PR CI supplies broad proof. All planned checks and the aggregate openclaw/ci-gate passed at the head above. The earlier queued Testbox allocation was stopped; no passing Testbox result is claimed.

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

clawsweeper Bot commented Nov 27, 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 agents Agent runtime and tooling size: XS labels Nov 27, 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. labels Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR removes two unused forwarding exports and makes two obligation-module declarations private.

Example: A child completes with the result ALPHA and the requester consumes it silently.

  • Before: Completion policy settles consumption using an unnecessarily exported result-building helper.
  • After: The same helper settles consumption within its owning module, with unchanged delivery behavior.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The minimal patch appears correct, but its explicitly required compile, export-analysis, and regression validation has not yet run.
Proof confidence 🦪 silver shellfish (2/6) No user-visible behavior changes: function bodies and delivery paths are unchanged, so shipped-entry-point proof is unnecessary; the body accurately identifies its remaining static and regression validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
Reason: Maintainer authorship establishes direction, and removing verified unused internal exports reduces maintenance surface without changing user behavior or public SDK contracts.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored cleanup removes unused internal exports without changing runtime logic; no actionable regression was found, and the author’s draft pause remains in effect.

Reviewed head: 6687951475e5a4e978c7677ca1b694219d4e852b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Subagent announcement code receives child outcomes and requester receipts, applies completion policy, and delegates delivery and cleanup to existing transport and lifecycle owners.

flowchart TD
  A[Child outcome] --> B[Announcement flow]
  B --> C[Completion obligation]
  C --> D[Transport adapters]
  D --> E[Requester receipts]
  E --> C
  C --> F[Lifecycle cleanup]
Loading

Technical review

Best possible solution:

Keep only consumed exports on the existing obligation owner and complete the author’s pending validation before landing.

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

No runtime bug is claimed; source inspection confirms the unused export surfaces, and no target code was executed.

Is this the best way to solve the issue?

The patch is the smallest complete cleanup: it removes unused visibility while preserving the existing owner, implementation, and consumed import paths.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Completion helper exports keeps the original intent (811f999: The predecessor centralized completion decisions while preserving existing import surfaces for consumers.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 811f999 adds src/agents/subagents/announce/subagent-announce-obligation.ts:137 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 811f999f9321; files: src/agents/subagents/announce/subagent-announce-obligation.ts)
  • Peter Steinberger: Raw commit ae6f813 adds src/agents/subagents/announce/subagent-announce-completion-delivery.ts:106 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: ae6f813e73bb; files: src/agents/subagents/announce/subagent-announce-completion-delivery.ts)

PR surface

Source -2. Total -2 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 2 4 -2
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 2 4 -2

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 rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • 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 the declared export scan, core and source-test typechecks, targeted lint, and subagent regression suites at 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 27, 2026, 12:34 AM ET / 05:34 UTC.

@vincentkoc

Copy link
Copy Markdown
Member Author

Main CI now reports the retained hasMessagingToolDeliveryToSource exports in both the forwarding module and policy owner: https://github.com/openclaw/openclaw/actions/runs/45945915837/job/140330701652.

#206429 completes that CI repair by making the helper private and moving the two Discord-thread assertions to the public completion result. Its patched source passed 21 focused tests and the production, full-tree, and script export scans with zero findings. It overlaps this draft's forwarding/result-builder cleanup; the AnnounceCleanupAction type cleanup remains separate.

@vincentkoc
vincentkoc force-pushed the refactor/subagent-announce-deadcode branch from 6687951 to c1dcaf8 Compare November 27, 2026 06:55
@vincentkoc vincentkoc changed the title refactor(subagents): trim unused completion exports refactor(subagents): keep announce cleanup action type private Nov 27, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review November 27, 2026 06:56
@vincentkoc
vincentkoc merged commit e25b84f into main Nov 27, 2026
218 of 219 checks passed
@vincentkoc
vincentkoc deleted the refactor/subagent-announce-deadcode branch November 27, 2026 07:19
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 27, 2026
…restoration-ci-189390-20261127

* commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits)
  fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341)
  refactor(codex): centralize native completion delivery (#206447)
  fix(subagents): finish claimed stops after session rotation (#206405)
  fix: let owners fork a chat with exec after a subagent or exec completion (#206483)
  test(cli): gate agent --local cold-start processes and workers (#206466)
  perf(ci): skip baseline inventory when line-cap debt is empty (#189909)
  refactor(test): share core process-result fixtures (#174149)
  refactor(ci): reuse canonical budget flag parsing (#189480)
  fix: recover Codex chats after oversized requests (#206475)
  fix(agents): skip the bootstrap ritual in one-shot runs (#206477)
  fix(test): preserve stack coordinates in redacted failure reports (#152384)
  fix(gateway): return consistent unavailable response guidance (#191933)
  fix: preserve emphasis in Markdown table row labels (#205349)
  fix(nextcloud-talk): keep webhook spool helpers private (#206470)
  perf(plugins): overlay native receipts once per visible root (#206464)
  fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129)
  perf(config): retain one snapshot for unchanged validation results (#206465)
  refactor(test): reuse canonical secret fixture cleanup (#189492)
  refactor(subagents): own descendant Stop cancellation (#206444)
  refactor(subagents): keep announce cleanup action type private (#206407)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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