Skip to content

✨ Show why a calendar-email proof failed on its Settings row - #18584

Merged
kubestellar-prow[bot] merged 4 commits into
v5from
feat/18579-proof-failure-reason
Nov 17, 2026
Merged

kubestellar-prow[bot] merged 4 commits into
v5from
feat/18579-proof-failure-reason

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #18579

What

A calendar email whose proof mail was refused used to show only "pending". Now its row says why.

  • mailallow: Store.ProveAuth(code, wire.Auth) stores a LastFailure summary on the entry: the reason code (not_aligned, from_mismatch, expired), the attempt time, and the SPF result and domain, the DKIM results (capped at 5), the DMARC result, the aligned flags and the From domain. It never stores message content. Prove becomes a thin wrapper. An expired code is now recognized and recorded as expired; before this change it was reported as an unknown code. A code that matches no entry is kept, with the sender masked (a***@example.com), in a bounded in-memory list (RecentAttempts, 20 entries) with the reason "code not recognized". Re-adding an address or a successful proof clears the summary.
  • API: GET /api/meetings/calendar-emails returns last_failure on unproven rows: the summary plus message, the plain-language reason with the remedy text from the issue. A verified owner also gets recent_proof_attempts. The proof handler logs the reason code.
  • UI: Settings, Meeting attendee, My calendar emails shows the message, the attempt time, a line with what the mail server saw (SPF, DKIM, alignment) and a Check again button. The owner sees a Recent proof attempts list.
  • Docs: src/docs/meetings.md (reason table, what is kept, recent attempts), src/docs/api-reference/knowledge.md, dashboard/openapi.json, and a changelog fragment.

No src/pkg/mailin files changed: wire.Auth already carries everything the summary needs.

Tests

  • mailallow: each reason (not aligned, from mismatch, expired), the auth summary fields, the DKIM cap, persistence, clearing on success and on re-add, the bounded and newest-first recent attempts, and MaskEmail.
  • dashboard: each reason through the relayed proof endpoint and onto the list API, plus the JSON field names. Unknown-code attempts are visible to the owner only. Also covers the proofFailureMessage fallbacks.
  • UI (the existing node harness in meeting_attendee_ui_test.go): the reason, the auth summary, Check again, the owner's recent attempts and the fallbacks.

🤖 Generated with Claude Code

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#18576 ✨ Owner-only Send to on model-owned stage-tracker rows same files dashboard/openapi.json
src/pkg/dashboard/static/index.html
#18603 ✨ Settings: "Post on other projects as" control for remote write identity same files dashboard/openapi.json
src/pkg/dashboard/static/index.html
#18595 🐛 Meetings panel says plainly when notes and clarifying questions are off same files src/docs/meetings.md
#18593 ✨ Betty answers questions about the hive from its live state same files src/docs/meetings.md
#18592 🐛 Betty closes the loop on deep dives; research agents survive config reloads same files src/docs/api-reference/knowledge.md
src/docs/meetings.md
src/pkg/dashboard/static-src/js/meeting-attendee.js
src/pkg/dashboard/static/index.html
#18594 🐛 Meetings: consent posted only on a confirmed delivery; speak it or leave same files src/pkg/dashboard/static/index.html
#18600 🐛 meetings: log every failed meetings call and keep a failed approval's reason same files src/pkg/dashboard/api_meetings_email.go
src/pkg/dashboard/static/index.html
#18611 ✨ meetings: desktop companion meetings (/api/companion/*) same files dashboard/openapi.json
src/docs/meetings.md
#18602 📖 docs: Betty on Zoom without a Zoom app, options and recommendation same files src/docs/meetings.md

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Mutation testing

gremlins found 2 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.

File Line Mutation
src/pkg/mailallow/mailallow.go 121 CONDITIONALS_BOUNDARY
src/pkg/mailallow/mailallow.go 126 CONDITIONALS_BOUNDARY

5 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/pkg/dashboard/api_meetings_email.go 187 CONDITIONALS_NEGATION
src/pkg/mailallow/mailallow.go 147 CONDITIONALS_NEGATION
src/pkg/mailallow/mailallow.go 149 CONDITIONALS_BOUNDARY
src/pkg/mailallow/mailallow.go 149 CONDITIONALS_NEGATION
src/pkg/mailallow/mailallow.go 351 CONDITIONALS_NEGATION

ℹ️ 11 mutant(s) on added lines were SKIPPED because gremlins v0.6.0 only honours the first lines added lines of each default-context hunk, so non-contiguous edits in one hunk are partly missed. This does not affect the verdict.

File Line Mutation
src/pkg/dashboard/api_meetings_email.go 195 CONDITIONALS_NEGATION
src/pkg/dashboard/api_meetings_email.go 290 CONDITIONALS_NEGATION
src/pkg/mailallow/mailallow.go 373 ARITHMETIC_BASE
src/pkg/mailallow/mailallow.go 373 CONDITIONALS_BOUNDARY
src/pkg/mailallow/mailallow.go 373 CONDITIONALS_NEGATION
src/pkg/mailallow/mailallow.go 373 INVERT_NEGATIVES
src/pkg/mailallow/mailallow.go 385 ARITHMETIC_BASE
src/pkg/mailallow/mailallow.go 385 CONDITIONALS_BOUNDARY
src/pkg/mailallow/mailallow.go 385 CONDITIONALS_NEGATION
src/pkg/mailallow/mailallow.go 385 INCREMENT_DECREMENT
src/pkg/mailallow/mailallow.go 385 INVERT_NEGATIVES

Verdict: lived (#17349).

@hivecommons-hive

hivecommons-hive Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2026
@clubanderson clubanderson removed lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2026
@kubestellar-prow kubestellar-prow Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 17, 2026
Record a failure summary on the entry (reason code, time, SPF, DKIM,
alignment and domains, never message content), expose it as last_failure
in the calendar-emails API with a plain-language message and remedy, and
render it on the row with a Check again button. Expired codes are now
recognized and reported as expired. Unknown-code proof attempts are kept,
masked, for the owner as recent_proof_attempts.

Fixes #18579

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
… UI test

Signed-off-by: Andy Anderson <andy@clubanderson.com>
Signed-off-by: Andy Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the feat/18579-proof-failure-reason branch from 18fe01e to 448fe2d Compare November 17, 2026 02:22
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow
kubestellar-prow Bot merged commit c923522 into v5 Nov 17, 2026
99 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/18579-proof-failure-reason branch November 17, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Meeting attendee email: show why a calendar-email proof failed (not authenticated, wrong sender, expired) instead of just pending

1 participant