Skip to content

backends v2.2.0: closing a report emails the reporter; people are named - #25

Merged
kenatleap merged 3 commits into
mainfrom
feat/close-email-names
Nov 13, 2026
Merged

kenatleap merged 3 commits into
mainfrom
feat/close-email-names

Conversation

@kmoy007

@kmoy007 kmoy007 commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Server half of the approved close-email design (wire contract: bug-close-email CONTRACT.md). From Chris Hamblin's report bug-20261112-124952, which was fixed and then had to be relayed by hand.

  • create_blueprint(notifier=None, app_url=""); PATCH {status, note, notify?} emails the reporter on a change to resolved/declined (never on reopen, needs a note), status change + audit row first, failed send never undoes it, second audit row records the outcome; response gains notified, GET gains canNotify.
  • New bug_report.email: Notice, render(), AcsNotifier ([email] extra, fail closed, retry_total=0, bounded wait, from_env() returns None when unset).
  • People named: actorName, changedByName; actor_identity may return {email, name}; it now also stamps changedBy/changedByName on PATCH.
  • Node: pass-through only (canNotify: false, notify ignored). Spec, types, openapi, report-contract (optional lists), e2e updated. py 2.2.0 + CHANGELOG.
  • Tests: 78 new Python, 2 Node, 3 e2e (x2 backends); mutation-checked. No network, no real send.

Not merged/tagged: coordinator tags backends-v2.2.0 after review.

End-of-implementation review (fresh reviewer, 2026-11-13)

Closed in this PR, each with a test shown to fail when its fix is undone:

  • An ACS send that is not confirmed within the wait is audited as failed, not "emailed". Undoing the poller.done() check fails 2 tests.
  • Notify driven over real HTTP with a stand-in mailer (e2e/test_notify_http.py). Dropping the _notify call fails 2 of 3.
  • A spec drift guard: every field the server sends must be in openapi.yaml (tests/test_spec_drift.py). It found kind missing (older drift), now added.
  • report-contract.json was reverted, because it is mirrored byte-identically in five repos and the new fields are optional.
  • The sending identity uses its own variable, BUG_NOTIFY_CLIENT_ID.

Settled by fact: the consumers' gunicorn timeout is 120 s, against the 30 s send wait.

Optional, not done:

  • the name rule in a shared fixture read by the Python and TS tests;
  • driving the real LROPoller;
  • making the filesystem store ignore unknown keys, for rollback safety;
  • documenting email setup in LeapIQ_UI's GETTING-STARTED.

Follow-up: when the fleet dashboard adopts names, bug_store_pg.py must add actor_name and changed_by_name.

🤖 Generated with Claude Code

kmoy007 and others added 3 commits November 13, 2026 13:14
…named (bug-20261112-124952)

Adds create_blueprint(notifier=, app_url=), PATCH notify, notified/canNotify,
bug_report.email (render, AcsNotifier behind the [email] extra), actorName and
changedByName, and identity-stamped changedBy. Node passes the fields through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; wait 30 s, not 60

LROPoller.result(timeout) returns what it last saw when the wait runs out
(None or a Running status) instead of raising; check poller.done().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ariable

- e2e/test_notify_http.py: a Python server with a stand-in mailer drives
  notify end to end (sent + audited, failed send still resolves, no notify
  sends nothing). Bites: dropping the _notify call fails 2 of 3.
- tests/test_spec_drift.py: every field the server sends is in openapi.yaml.
  It found kind missing from BugSummary (older drift); added. Bites:
  renaming changedByName in the spec fails it.
- report-contract.json reverted: it is mirrored byte-identically into five
  repos, and the new fields are optional; openapi.yaml carries them.
- BUG_NOTIFY_CLIENT_ID picks the sending identity, not AZURE_CLIENT_ID,
  so it cannot change the identity the rest of an app signs in as.
- CHANGELOG said the send wait was 60 s; it is 30.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kenatleap
kenatleap enabled auto-merge (squash) November 13, 2026 21:21
@kenatleap
kenatleap merged commit 375c555 into main Nov 13, 2026
1 check passed
@kenatleap
kenatleap deleted the feat/close-email-names branch November 13, 2026 21:22
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.

2 participants