You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored and
Jammy2211
committed
feat(arxiv-digest): post a 'no new papers' heartbeat on empty days
Previously empty days were silent, so a quiet #papers was ambiguous —
nothing found vs. a broken/delayed run. Per user (2026-07-13), always
post:
- count==0: a dedicated step writes a 'No new strong-lensing papers
today' notice (no Claude call, zero subscription usage).
- count>0 but Claude drops all as off-topic: Claude now writes the same
notice instead of writing nothing.
- POST always runs; a missing payload now means the Claude step failed
silently (e.g. expired OAuth token) and fails loudly instead of
masquerading as an empty day.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# No payload = a genuinely empty day (fetch found rows, but Claude
177
-
# judged none genuinely on-topic). Skip silently, do not fail.
219
+
# Every path now writes slack_payload.json: the count=0 step writes the
220
+
# "no new papers" heartbeat, and the Claude step writes either a digest
221
+
# or that same notice. A MISSING file here is therefore no longer an
222
+
# empty day — it means the Claude step failed silently (e.g. an expired
223
+
# CLAUDE_CODE_OAUTH_TOKEN, the failure mode show_full_output guards
224
+
# against). Fail loudly rather than masquerade as "nothing found".
178
225
if [ ! -s slack_payload.json ]; then
179
-
echo "No slack_payload.json — nothing genuinely on-topic today, skipping post."
180
-
exit 0
226
+
echo "::error::slack_payload.json missing — the Claude summarise step failed to write it (check for an expired CLAUDE_CODE_OAUTH_TOKEN). Empty days write the no-papers notice, so this is a real failure, not a quiet day."
227
+
exit 1
181
228
fi
182
229
if [ -z "${SLACK_WEBHOOK_URL:-}" ]; then
183
230
echo "::error::PYAUTO_PAPERS_WEBHOOK_URL not set — create the #papers Slack incoming webhook and add it as a repo secret."
0 commit comments