Repository navigation
thirdshift email-test through Resend - #119
Merged
Merged
Conversation
… API The User config gains an [email] section with to and from, and the key comes only from RESEND_API_KEY. The tests point THIRDSHIFT_RESEND_URL at a local Resend stand-in that records each request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A refusal with an empty reply prints only the status, an empty THIRDSHIFT_RESEND_URL falls back to Resend, and the test email no longer claims it reached anyone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Combines main's logs.dir setting (#117) with this branch's [email] section: the User config now knows the merge, logs and email sections, holds both the resolved logs directory and the email settings, and the README and help text document both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Summary
thirdshift email-test [<address>]sends one test email through Resend's HTTP API, so the email setup can be checked without a Run. The checks and the send live inemail::Resend, which Run notifications are to reuse (ADR 0005).reqwestbecomes a direct dependency withrustls,blockingandjson. It was already in the tree throughaxoupdater. A new packaging test fails ifopenssl,openssl-sysornative-tlsever joins the tree (ADR 0003).Evidence
tests/email_test.rsfailed 9 of 9, becauseemail-testwas parsed as an Issue URL (exit 2).After: 9 of 9 pass. They cover the request shape,
email.toand the argument winning over it,email.from, a missing address, an unset or empty key (no request sent in either case), a 401 JSON error and a 500 text error printed word for word, an unknown[email]key, and an extra argument.cargo testpasses andcargo clippy --all-targetsis clean.packaging::the_binary_never_links_opensslpasses.Merge Danger
Door: two-way
A new command and a new optional config section. Nothing existing changes behaviour, apart from
update's ending now going through a shared helper, with the same output.Blast Radius: small
The binary gains reqwest's blocking client, which adds a few futures crates to
Cargo.lock. The failed-run commit message still sayshost unknownwhen the OS gives no hostname.Unaddressed findings
Standards
Resend::newreads the environment itself. The issue specifies the environment variablesRESEND_API_KEYandTHIRDSHIFT_RESEND_URLas the seam, andpoll.rsalready uses the same pattern.Resendis public but has one caller. The issue requiresemail-testto use the same checks and sending code as Run notifications, so this seam is what the issue asked for."unknown"vs"unknown host". The issue fixes "unknown host" for the email. The failed-run commit readshost unknown, which would becomehost unknown hostwith one shared fallback, so each caller keeps its own.config.rs: sections are matched twice. The outer match only checks each section's shape. The inner(section, key)match is the single table of settings, and splitting it further adds code without removing any.Resendnames the vendor. ADR 0005 picks Resend on purpose, and the type speaks Resend's API. A second provider would be the time to name the role.Strings. There is no validation to hold (Resend validates), so a newtype would add nothing yet.Spec
email.to/email.frommust be strings. This wasn't asked for. It matches howmerge.alwaysis type-checked.host.rs. It was moved so both callers could share it. Failed-run behaviour is unchanged, except that an empty hostname now readsunknown.messagefield, not the whole JSON.messageis Resend's error text. Any reply without one, such as a plain-text 500, is printed whole.updatealso follows: stdout stays empty and messages go to stderr.Closes #113
🤖 Generated with Claude Code