Repository navigation
refactor(link-understanding): drop unused results - #141200
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 8:11 AM ET / 12:11 UTC. ClawSweeper reviewWhat this changesThe 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 Review scores
Verification
How this fits togetherLink 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
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -13, Tests -6. Total -19 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest 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. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* 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) ...
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
89943fd30524073d679f0077a7e55418280b0e83.git diff --checkand privacy checks passed.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, andtest/scripts/tsdown-runtime-config.test.ts. Retain real HTTP body/socket cancellation, sequential URL handling, context and descendant-process cleanup proof.