Skip to content

Reset notification status on decision changes - #42

Merged
mtap-research merged 4 commits into
mainfrom
agent/harden-decision-email-status
Jul 27, 2026
Merged

Reset notification status on decision changes#42
mtap-research merged 4 commits into
mainfrom
agent/harden-decision-email-status

Conversation

@mtap-research

@mtap-research mtap-research commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fix

  • reset a prior Sent/Confirmed state whenever the final decision changes;
  • prevent the new decision email from being suppressed as a duplicate;
  • cover Accept→Reject transitions even when a client supplies Sent.

Validation

  • node scripts/test_sheets_sync.mjs
  • python3 scripts/check_site.py
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Changing a submission’s final decision now resets its notification status to “Not Sent,” ensuring the updated decision can trigger notification processing correctly.
  • Tests

    • Added coverage confirming that changing a previously accepted submission to “Reject” resets its notification status as expected.

@netlify

netlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploy Preview for pbast10-pacific-basin-conference-on-adso-cd-cb27cc3e73 ready!

Name Link
🔨 Latest commit 1172b1e
🔍 Latest deploy log https://app.netlify.com/projects/pbast10-pacific-basin-conference-on-adso-cd-cb27cc3e73/deploys/6a6774c296914d0008f38b37
😎 Deploy Preview https://deploy-preview-42--pbast10-pacific-basin-conference-on-adso-cd-cb27cc3e73.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mtap-research, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d51cd54-5e75-4ec4-9bf1-903b2c479751

📥 Commits

Reviewing files that changed from the base of the PR and between d6dff23 and ab4f8a7.

📒 Files selected for processing (2)
  • google-apps-script/AdminSync.gs
  • scripts/test_sheets_sync.mjs
📝 Walkthrough

Walkthrough

adminUpdate_ now resets notificationStatus to "Not Sent" when finalDecision changes. The sync test exercises this through adminUpdate_ and verifies the reset for a rejection update.

Changes

Notification status reset

Layer / File(s) Summary
Decision-change notification reset
google-apps-script/AdminSync.gs, scripts/test_sheets_sync.mjs
adminUpdate_ compares the existing and incoming finalDecision values and resets notificationStatus; the test performs a rejection update through the API and verifies "Not Sent".

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: resetting notification status when the final decision changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/harden-decision-email-status

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
scripts/test_sheets_sync.mjs (1)

669-689: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the Confirmed notification state as well.

This test verifies reset from Sent, but the behavior also promises reset from Confirmed. Add a companion case or parameterize the prior notification status to cover both idempotency states.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/test_sheets_sync.mjs` around lines 669 - 689, Extend the rejection
update test around rejectionUpdate to also exercise a prior notificationStatus
of "Confirmed", using a companion case or parameterized statuses. Verify that
changing finalDecision resets both "Sent" and "Confirmed" to "Not Sent" while
preserving the existing assertions and update flow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@google-apps-script/AdminSync.gs`:
- Around line 73-76: Update the decision comparison in the current-row
synchronization flow around adminRowFromValues_ so the stored value and
normalized.finalDecision use the same canonical representation, including
mapping an empty stored decision to "Pending". Reset notificationStatus only
when those canonical decision values differ, preserving existing Sent/Confirmed
status for no-op Pending updates.

---

Nitpick comments:
In `@scripts/test_sheets_sync.mjs`:
- Around line 669-689: Extend the rejection update test around rejectionUpdate
to also exercise a prior notificationStatus of "Confirmed", using a companion
case or parameterized statuses. Verify that changing finalDecision resets both
"Sent" and "Confirmed" to "Not Sent" while preserving the existing assertions
and update flow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 29895445-6d30-42d7-82be-d4692571122f

📥 Commits

Reviewing files that changed from the base of the PR and between ffae342 and d6dff23.

📒 Files selected for processing (2)
  • google-apps-script/AdminSync.gs
  • scripts/test_sheets_sync.mjs

Comment thread google-apps-script/AdminSync.gs Outdated
@mtap-research
mtap-research merged commit 2c6b7bc into main Jul 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant