fix(send): explain why notes were skipped instead of just counting them - #9
Merged
Conversation
`prospector send` reported skips as a bare number. On a real vault that came
out as "to send: 0 ... skipped: 47", which reads as a malfunction — while the
truth was that 46 of those notes had already been emailed and the ledger was
doing exactly its job, and the 47th simply needed a subject line.
Every skip already carried a reason; the report just filtered them out, and
they were the only outcome the operator got no explanation for.
Now grouped by reason, most common first, with the affected slugs named and a
plain-language hint for what each reason means:
skipped:
46 already in ledger (already emailed — the ledger prevents a repeat)
a-z-air-duct, ace-duct-cleaning-inc, air-central, and 43 more
1 draft has no subject (add a **Subject:** line, or re-draft the note)
monster-vac
Long groups are truncated after six slugs so a 46-note group cannot bury the
summary. A run that selects nothing now says so outright, because that is the
case most likely to be mistaken for a bug.
No behavior change to what is sent or skipped — only to what is reported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Running
prospector sendagainst a real vault produced this:That reads as a malfunction. It wasn't: 46 of those notes had already been emailed and the ledger was doing exactly its job, and the 47th just needed a subject line. But nothing in the output said so, and there was no flag to make it say so.
Every skip already carried a precise reason —
"already in ledger","draft has no subject","not an email-channel note". The report simply filtered them out: it printed rows only forSENT,FAILEDandDEFERRED_CAP. Skipped was the single most confusing outcome and the only one with no explanation attached.After
Design points:
monster-vac) is immediately actionable rather than hidden in a count."already in ledger"is accurate but tells you nothing about whether to worry.How it was verified
pytest -q→ 597 passed (4 new).New tests cover: reasons and slugs both appear; the all-skipped run states "Nothing to send"; a 9-note group truncates to "and 3 more"; and a clean run prints no skip block at all.
One test needed tightening during review — asserting
"skipped:" not in outputwas wrong, because the summary line always containsskipped: 0. It now asserts on the block header specifically.Notes for reviewers
No behavior change to what is sent or skipped — only to what is reported. The selection logic, ledger dedupe, cap arithmetic and sendability checks are untouched.
Worth noting how this surfaced: the guarantee worked perfectly and the reporting made it look like a failure. A safety mechanism that can't explain itself gets overridden by the person it's protecting — the tempting next move on seeing
skipped: 47is to find a way to force the send, which here would have meant a duplicate cold email to 46 real businesses.🤖 Generated with Claude Code