fix(slack): remove unused unsafe auth fetch helper#99944
Conversation
Co-authored-by: liyuanbin <[email protected]>
|
Land-ready proof for current-main replacement head
Known proof gap: no live Slack workspace run. The removed helper had no runtime caller and no public API export; active Slack downloads are unchanged and retain their existing guarded-fetch tests. After landing, #98495 will be closed as superseded with the canonical commit and contributor thanks. |
|
Codex review: needs real behavior proof before merge. Reviewed July 4, 2026, 8:05 AM ET / 12:05 UTC. Summary PR surface: Source -52, Tests -170, Other -2. Total -224 across 4 files. Reproducibility: not applicable. this is a dead-code cleanup PR rather than a reported runtime bug. Source search verifies no production callers, and retained tests exercise the active Slack media path. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the Slack-only merge result once required checks finish, then treat #98495 as the superseded predecessor rather than keeping two branches open. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a dead-code cleanup PR rather than a reported runtime bug. Source search verifies no production callers, and retained tests exercise the active Slack media path. Is this the best way to solve the issue? Yes: deleting the unreachable private helper is the best fix because it avoids a duplicate redirect/auth implementation while keeping active downloads on the shared guarded-fetch path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d6ed2c392c1e. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -52, Tests -170, Other -2. Total -224 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Merged via squash.
|
* fix(slack): remove unused unsafe auth fetch helper Co-authored-by: liyuanbin <[email protected]> * fix(slack): remove unused unsafe auth fetch helper --------- Co-authored-by: liyuanbin <[email protected]>
What Problem This Solves
fetchWithSlackAuthduplicated Slack redirect policy inextensions/slack/src/monitor/media.ts, contained an unsafe automatic-redirect path, and had no production callers. It was not exported through the Slack plugin API.Supersedes #98495 after its fork branch could not be rebased through GitHub's maintainer-edit API. Contributor credit is preserved in the commit trailer.
Why This Change Was Made
The original PR added another manual redirect loop. Full review showed the safer, leaner fix is deletion: remove the unused helper and helper-only tests while keeping active Slack downloads on the canonical
createSlackMediaRequest→createSlackMediaFetch→saveRemoteMedia/ shared guarded-fetch path.This branch is based on current
main, avoiding the merge-critical drift that blocked #98495.User Impact
No current runtime behavior change. The removed helper had no production caller and was not part of
extensions/slack/api.ts. Slack private-file and forwarded-image downloads remain on the existing guarded media path.Evidence
tbx_01kwpdqh65849veg0j35wzcjmx(Actions run 28704570262):corepack pnpm test extensions/slack/src/monitor/media.test.ts— 35/35 passed.env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed— extension prod/test typechecks, lint, guards, and import-cycle checks passed.c593263aaa747bc6bf05529c54a8421645388b4c: hosted CI run 28704833527 completed 105 checks with zero failures.git diff --checkpassed.Known gap: no live Slack workspace run. The removed helper was unreachable; active Slack behavior is unchanged and covered by retained tests.
No changelog entry: internal dead-code removal; release automation owns
CHANGELOG.md.