fix: reject reject_submission after completion_deadline - #74
Merged
JamesVictor-O merged 1 commit intoAug 22, 2026
Merged
Conversation
claim_payment auto-approves a submitted proof once completion_deadline passes, as a safety valve against an unresponsive business. Without a matching check, reject_submission let the business flip an auto-approved submission to Rejected after the deadline, leaving the creator unable to submit_proof again (blocked by the same deadline) or claim_payment (status no longer ProofSubmitted). That defeats the auto-approval guarantee entirely.
JamesVictor-O
approved these changes
Aug 22, 2026
JamesVictor-O
left a comment
Contributor
There was a problem hiding this comment.
Automated review: verified the > comparison in reject_submission matches the existing convention across the file (submit_proof, claim_payment, expire_campaign), confirmed no legitimate business workflow is blocked (dispute/freeze recourse remains deadline-free), and confirmed the regression test genuinely proves the fix (claim_payment still succeeds via auto-approval while reject_submission is blocked). CI green, local test run confirmed passing. Approving.
3 tasks
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
claim_payment auto-approves a submitted proof once
env.ledger().timestamp() > campaign.completion_deadline, specifically so an unresponsive business can't hold a creator's payout hostage. reject_submission had no matching deadline check, so a business could wait until after the deadline and still call reject_submission, flipping an already auto-approved application to Rejected. At that point the creator can no longer submit_proof (blocked by the same deadline) or claim_payment (status is no longer ProofSubmitted) — the auto-approval guarantee is defeated by the exact counterparty it's meant to protect against.Fix
reject_submission now returns Error::ContentDeadlinePassed once called after campaign.completion_deadline, using the same
>comparison claim_payment already uses to decide auto_approved, so the two stay consistent.Test plan
Closes #58