fix(gmail): ensure blocklist records on single-message path and scope to scan_id#25979
Conversation
… to scan_id Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🚩 Fallback query path does not record to blocklist
When scanId && senderIds?.length is true but the scan has expired (resolved === null), the code falls back to query-based archiving per sender (lines 132-198) and returns directly at line 195 without calling recordBlocklist. This means successfully archived senders via the fallback path won't be added to the blocklist for future sessions. This is pre-existing behavior (unchanged by this PR) — the old inline blocklist code was also unreachable from this path. However, given that the senders are successfully decoded and archived, it seems like an oversight that they aren't recorded. The SKILL.md at line 187 says "The blocklist is updated automatically when gmail_archive runs with scan_id + sender_ids" which could be read as covering this path too.
(Refers to lines 187-198)
Was this helpful? React with 👍 or 👎 to provide feedback.
Addresses review feedback from #25977: - Move drainQueue() after tailMessages are pushed/persisted in agent-wake.ts so queued user messages are dequeued against up-to-date history - Revert build.sh default VELLUM_ENVIRONMENT back to local for run/fallback commands (was changed to dev, which would connect local builds to dev platform) - gmail-archive.ts blocklist fix was already landed in #25979, no action needed Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
) Addresses review feedback from #25977: - Move drainQueue() after tailMessages are pushed/persisted in agent-wake.ts so queued user messages are dequeued against up-to-date history - Revert build.sh default VELLUM_ENVIRONMENT back to local for run/fallback commands (was changed to dev, which would connect local builds to dev platform) - gmail-archive.ts blocklist fix was already landed in #25979, no action needed Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
recordBlocklist()helper that requiresscanIdto be present before writingrecordBlocklist()from both the single-message optimization path and the batch archive pathAddresses review feedback from #25971.
Test plan
🤖 Generated with Claude Code