Skip to content

refactor(link-understanding): drop unused results - #141200

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/link-understanding-unused-results-current-owner
Sep 7, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/link-understanding-unused-results-current-owner

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Link preprocessing carries detected-URL metadata and an apply result that no production caller uses. This maintainer-requested cleanup removes that unused result flow while retaining the fetched summaries and inbound-context effects.

Why This Change Was Made

Return the runner's existing output array directly and make the apply step return void. Update only assertions for those private return shapes. Keep URL discovery before the no-model check, the lazy runtime entrypoint, all imports, strict SSRF handling, ordered processor fallback, cancellation and transport cleanup unchanged.

Production LOC: +12/-25 (net -13). Tests: +10/-16 (net -6), across four files. No config, dependency, package export, schema or public API changes.

User Impact

No intended user-visible change. Successful summaries still enrich the same message fields in the same order. Empty output and pre-aborted work still leave context untouched; cancellation and ordinary failure retain their existing reply behavior.

Evidence

  • Reviewed signed head: 89943fd30524073d679f0077a7e55418280b0e83.
  • All four implemented file blobs match the independently reviewed plan. The runner helpers and processing loop remain byte-identical to the base.
  • Oxfmt 0.65.0 checked all four files successfully; git diff --check and privacy checks passed.
  • Fresh whole-candidate P3 review completed with no findings. Review, stdout capture and launcher exited 0. Independent actual-head review approved publication.
  • Runtime tests, relevant types/lint, candidate-bound build/artifacts and attached CI are pending; no runtime or build pass is claimed.
  • Before merge, require every case in src/link-understanding/runner.test.ts, src/link-understanding/runner.transport.test.ts, src/link-understanding/detect.test.ts, src/auto-reply/reply/get-reply.message-hooks.test.ts, and test/scripts/tsdown-runtime-config.test.ts. Retain real HTTP body/socket cancellation, sequential URL handling, context and descendant-process cleanup proof.
  • Require relevant production/test types and lint, actual build/artifact provenance and preserved lazy-entry loading, all required CI checks, and an exact-head ClawSweeper review with no actionable findings or remaining rank-up moves.

@vincentkoc vincentkoc self-assigned this Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 7, 2026 12:06
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 7, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 7, 2026
@clawsweeper

clawsweeper Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 8:11 AM ET / 12:11 UTC.

ClawSweeper review

What this changes

The PR removes unused return metadata from link preprocessing while preserving fetched summaries and message enrichment, and updates tests for the simpler internal return values.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused, maintainer-requested cleanup that remains absent from current main. No introduced correctness defect was found; the retained assertions protect the observable behavior.

Priority: P3
Reviewed head: 89943fd30524073d679f0077a7e55418280b0e83

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused internal simplification with consistent callers and retained behavioral coverage; ordinary validation remains pending in the captured context.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored internal refactor is exempt from the external-contributor proof gate and changes no authority boundary; retained transport tests were inspected, but no runtime or build pass is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal refactor is exempt from the external-contributor proof gate and changes no authority boundary; retained transport tests were inspected, but no runtime or build pass is claimed.
Evidence reviewed 6 items Introduced change verified: The merge-base-to-head diff contains only the return-shape cleanup and corresponding assertions. Fetching, processor fallback, cancellation, and transport cleanup retain their existing control flow.
Production caller ignores the removed result: The reply pipeline awaits applyLinkUnderstanding for its context effects and ignores its return value. The lazy runtime facade remains unchanged; repository searches found no other production consumer requiring the removed metadata or a plugin SDK export of these functions.
Behavioral assertions retained: Both changed test files were read fully. They retain context preservation and enrichment, strict guarded-fetch arguments, ordered fallback, streaming cancellation, socket closure, sequential URL handling, and descendant-process cleanup assertions. Tests were inspected, not executed.
Findings None None.
Security None None.

How this fits together

Link preprocessing extracts URLs from incoming messages, fetches permitted content, and passes it through configured command-line processors. Successful summaries enrich the message before the agent generates a reply.

flowchart LR
  A[Incoming message] --> B[Extract eligible URLs]
  B --> C[Guarded page fetch]
  C --> D[Configured processors]
  D --> E{Summaries available and not canceled}
  E -->|Yes| F[Enrich message context]
  E -->|No| G[Leave context unchanged]
  F --> H[Agent reply]
  G --> H
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -13, Tests -6. Total -19 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 12 25 -13
Tests 2 10 16 -6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 22 41 -19

Review metrics

None.

Technical review

Best possible solution:

Keep the internal result flow minimal while preserving message enrichment, lazy loading, and the existing cancellation and transport boundaries.

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

Not applicable: this is behavior-preserving cleanup, and source inspection confirms production callers do not consume the removed results.

Is this the best way to solve the issue?

Yes: returning summaries directly and making the context-mutating apply step return void removes unused structure without introducing another abstraction.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This removes unused internal return values without changing intended user behavior, configuration, or public APIs.
  • 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 MEMBER-authored internal refactor is exempt from the external-contributor proof gate and changes no authority boundary; retained transport tests were inspected, but no runtime or build pass is claimed.

Label justifications:

  • P3: This removes unused internal return values without changing intended user behavior, configuration, or public APIs.
  • 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 MEMBER-authored internal refactor is exempt from the external-contributor proof gate and changes no authority boundary; retained transport tests were inspected, but no runtime or build pass is claimed.

Evidence

What I checked:

  • Introduced change verified: The merge-base-to-head diff contains only the return-shape cleanup and corresponding assertions. Fetching, processor fallback, cancellation, and transport cleanup retain their existing control flow. (src/link-understanding/runner.ts:206, 89943fd30524)
  • Production caller ignores the removed result: The reply pipeline awaits applyLinkUnderstanding for its context effects and ignores its return value. The lazy runtime facade remains unchanged; repository searches found no other production consumer requiring the removed metadata or a plugin SDK export of these functions. (src/auto-reply/reply/get-reply.ts:281, 89943fd30524)
  • Behavioral assertions retained: Both changed test files were read fully. They retain context preservation and enrichment, strict guarded-fetch arguments, ordered fallback, streaming cancellation, socket closure, sequential URL handling, and descendant-process cleanup assertions. Tests were inspected, not executed. (src/link-understanding/runner.transport.test.ts:170, 89943fd30524)
  • Cleanup remains absent from main and latest release: Current main still returns ApplyLinkUnderstandingResult, and direct inspection of v2026.9.2 shows the same return contract. The proposed cleanup remains distinct; no verified replacement PR was established. (src/link-understanding/apply.ts:8, 766cfd92b72e)
  • Area history supports reviewer routing: Current-main history includes SunnyShu's cancellation work and Peter Steinberger's shared-scope refactor. These support routing suggestions, not claims of feature introduction; missing historical blobs prevented complete line-parent verification. (src/link-understanding/runner.ts, 766cfd92b72e)
  • Maintainer context and validation limits: The captured complete PR body describes maintainer-requested cleanup and explicitly leaves runtime/build validation pending. The author is MEMBER and the PR carries maintainer protection. Live GitHub queries failed due to network connectivity, so discussion and check assessment use the supplied snapshot. Local source inspection succeeded, diff whitespace checks passed, and the checkout remained clean. (89943fd30524)

Likely related people:

  • SunnyShu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@vincentkoc
vincentkoc merged commit ff40e82 into main Sep 7, 2026
245 checks passed
@vincentkoc
vincentkoc deleted the refactor/link-understanding-unused-results-current-owner branch September 7, 2026 12:29
vincentkoc added a commit that referenced this pull request Sep 7, 2026
* commit 'b07b7d8bd1293c4e70ece7281b9cb8422318ae5a': (30 commits)
  fix(ui): keep reopened select menus visible (#141047)
  test(ui): fix dashboard gallery client fixtures (#141203)
  refactor(links): remove unused understanding results (#141200)
  refactor(plugins): share manifest contribution projection (#141193)
  refactor(logging): share portable redaction pattern mechanics (#140742)
  chore(ui): refresh control ui locales (#141208)
  refactor(minimax): reuse generated video asset downloader (#141094)
  fix(test): await Telegram loopback prompt reception (#141204)
  refactor(acp): remove unused in-memory event ledger (#141145)
  improve(models): reduce overhead in catalog discovery (#141154)
  refactor(channels): share approval reaction settlement (#140645)
  chore(i18n): refresh native locales (#141089)
  refactor: share one-shot tickets and WebSocket helpers across desktop, node, and browser streams (#141185)
  refactor(google-meet): share browser open and recovery setup (#140972)
  refactor(plugins): share npm version queries (#141166)
  refactor(http): share bounded response byte consumption (#140654)
  refactor(whatsapp): share prompt selection (#141195)
  fix: bound temporary storage for terminal upload batches (#141116)
  perf(markdown): reuse image parser configuration (#141126)
  fix(policy): align tool requirements with core vocabulary (#140628)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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: S 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