Repository navigation
Read an email campaign's shortlist at the revision admission pinned - #405
Merged
Merged
Conversation
The campaign looked for outreach/email/SHORTLIST.csv by scanning only the last four commits on the project branch. Once four unrelated commits had landed, every campaign failed with "project state has no email shortlist revision". Admission already pins the revision where it found the shortlist in the run's prerequisite evidence. The campaign now reads the shortlist there, a retry keeps the revision an earlier attempt recorded, and only runs admitted before that evidence existed fall back to the old lookup. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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 and why
prepare_email_campaignfoundoutreach/email/SHORTLIST.csvthroughcanonical_file_history(limit=1), which scans onlylimit * 4 = 4commits. Once four unrelated commits had landed, every campaign failed with "project state has no email shortlist revision", even though the shortlist was there.Admission already pins where it found the shortlist: the campaign's required artifact prerequisite records
{"path", "revision"}inrun.prerequisite_evidence, refreshed after a settled wait. The campaign now reads the shortlist at that revision:outreach_campaignsrow, the retry reuses itssource_commit_sha, socreate_email_campaign's idempotency check still matches, including for a run already in flight during a deploy.pinned_artifact_revision(evidence, path)inworkflow_prerequisites.pyreads a satisfied pin for one path and returns None otherwise.Verification
test_email_outreach.pycovers both the admission pin and a recorded retry. Its fake storage refusescanonical_file_history, so the test fails onmainand passes with the fix.pinned_artifact_revisioncovers satisfied, unmet, other-path, malformed and legacy evidence.ruff format --check,ruff checkandlint-importsare clean.test_email_outreach,test_email_campaign_temporal,test_workflow_prerequisites,test_prerequisite_wait,test_code_authors. All passed excepttest_prerequisite_wait::test_answer_page_holds_in_temporal_until_its_prerequisite_finishes. That test fails the same way on unmodifiedmainin this local environment and doesn't touch this code.🤖 Generated with Claude Code