Skip to content

Require recipient confirmation before sending a detailed report - #8

Merged
CompleteDotTech merged 1 commit into
mainfrom
fix/report-requires-confirmation
Oct 22, 2026
Merged

CompleteDotTech merged 1 commit into
mainfrom
fix/report-requires-confirmation

Conversation

@CompleteDotTech

Copy link
Copy Markdown
Collaborator

Fixes gap 4 of CompleteTech-LLC/complete.tech#17.

Problem

ct_scan_admin_send_report() verified the saved contact, terms version and hash, terminal state, and manual review. It never checked confirmed_at. A job whose confirmation link expired unused ends expired, which is a terminal state. Once an operator saved manual-remainder notes, the send path would email detailed findings to an address that never confirmed the request. Found by source review; there is no evidence it happened in production, where the queue is disabled.

Change

  • The send refuses with report_recipient_unconfirmed unless confirmed_at is set, regardless of terminal state.
  • Integration test: an expired, never-confirmed job with operator notes gets no mail and no send-state change.
  • The existing unknown-mail fixture now confirms its job before failing it. It previously relied on the missing check.

Verification

  • integrations/wordpress/tests/integration.php passes in the disposable WordPress + MariaDB fixture (deployment/compose.test.yaml).
  • With the guard removed, the new case fails: "An unconfirmed recipient was allowed a detailed report."

After merge, the vendored copy in complete.tech (mu-plugins/ct-scan.php + docs/php2shell-source.json) will be updated to this revision.

🤖 Generated with Claude Code

ct_scan_admin_send_report() checked the saved contact, terms, terminal
state, and manual review, but not confirmed_at. A request whose
confirmation link expired unused could reach the send path once an
operator entered manual notes, so detailed findings could go to an
address that never confirmed the request.

The send now refuses with report_recipient_unconfirmed unless the job
was confirmed, whatever its terminal state. The unknown-mail fixture
confirms its job first, as a real job would be. A new integration case
covers an expired, unconfirmed job with operator notes: no mail, and
send state unchanged. Verified the case fails without the guard.

Refs CompleteTech-LLC/complete.tech#17 (gap 4).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T05:10:04.345034Z f34744a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CompleteDotTech
CompleteDotTech merged commit da48beb into main Oct 22, 2026
10 checks passed
@CompleteDotTech
CompleteDotTech deleted the fix/report-requires-confirmation branch October 22, 2026 05:11
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