Skip to content

fix(j5): not-delivered notices name the message they are about - #671

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5/notice-names-message
Oct 20, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5/notice-names-message

Conversation

@Jacksondr5

Copy link
Copy Markdown
Owner

Problem

A not-delivered notice didn't say which message it was about. In #658's live test, a Haiku agent with two messages out couldn't tell which one a notice referred to.

Closes #670

What changed

Each notice that reports on one message now names it by the id j5_send_message returned for it. An ask is also named by its intent, which its sender wrote and can recognise. For example: Your ask "incident status" (message message:j5:a2a:…) to agent:… on Home was not delivered: …, or Your message message:j5:a2a:… to agent:… may not have been delivered: ….

  • Not-delivered notices (formatNotDeliveredNotice in deliveryNotices.ts): alarms, peer-server refusals (sent directly or acknowledged by a polling peer), and peer removal's cancellations. The refused ask's notice also closes its Exchange, so this covers the Exchange-dropped notice on a refusal too. The id is already on the delivery row. The intent comes from the ask's Exchange through one small askExchange read in DeliveryWorker.ts.
  • Peer removal's Exchange-dropped notice (formatPeerDropNotice) gains It was opened by your ask "<intent>" (message <id>). when the party told sent the ask. When the ask came from the peer server, it reads It was opened by the ask "<intent>"., since that id was never this party's.
  • The removed-queued-message notice (SilenceDetector.ts) also reports on one message, so it names that message's id.
  • Unchanged: archive drop notices and silence notices. They report on an Exchange, not on one message's delivery, and already name the Exchange.

No new notice kinds and no storage changes. The a2a definition's sentence on what the notice names is rewritten, with a History line.

Live testing

Not run; this was my call. The change is the text of notices that already reach agents, and the tests assert the exact text, including the id each send returned. A live run would mostly test whether a model reads an id it was handed, which this PR can't change.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests). Each assertion compares the named id to the one the send returned:
    • Alarm, local plain message and ask: DeliveryWorker.test.ts
    • Alarm, unreachable peer server, plain message and ask: PeerOutbound.test.ts
    • Refusal, direct plain message and ask: PeerOutbound.test.ts
    • Refusal by a polling peer, ask through a real two-server round trip: PeerPollRoundTrip.test.ts
    • Refusal by a polling peer, plain message: PeerStoreService.test.ts, PeerRemovalService.test.ts
    • Peer removal cancellations, and both drop dispositions: PeerRemovalService.test.ts
    • Removed queued message: SilenceDetector.test.ts
  • UI changes: before/after screenshots above, and a video for motion or interaction (no UI change)
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR (none: J5-owned paths only)
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md (not applicable)
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md). Server-side notice text only, with no contract change. It applies the same locally, to peer servers sent to directly, and to polling peers.
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

Built by Claude Opus 5.5 in Claude Code (J5 Code).

🤖 Generated with Claude Code

A sender with two messages out couldn't tell which one a not-delivered
notice was about. Alarm, refusal and cancellation notices now name the
message by the id j5_send_message returned, and an ask by its intent too.
A peer removal's Exchange-dropped notice names the ask that opened it, and
the removed-queued-message notice names its message.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 20, 2026 12:04am UTC

Request Review

@github-actions github-actions Bot added the vouch:trusted Author is trusted by repo permissions or the VOUCHED list. label Oct 20, 2026
@github-actions github-actions Bot added the size:L 100-499 effective changed lines (test files excluded in mixed PRs). label Oct 20, 2026
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a56c6a81-29e4-4dd4-ac9c-e68129ecb0da
📥 Commits

Reviewing files that changed from the base of the PR and between 90241e0 and 9ea8c5d.

📒 Files selected for processing: 11
  • apps/server/src/j5/a2a/DeliveryWorker.test.ts
  • apps/server/src/j5/a2a/DeliveryWorker.ts
  • apps/server/src/j5/a2a/PeerOutbound.test.ts
  • apps/server/src/j5/a2a/PeerPollRoundTrip.test.ts
  • apps/server/src/j5/a2a/PeerRemovalService.test.ts
  • apps/server/src/j5/a2a/PeerRemovalService.ts
  • apps/server/src/j5/a2a/PeerStoreService.test.ts
  • apps/server/src/j5/a2a/SilenceDetector.test.ts
  • apps/server/src/j5/a2a/SilenceDetector.ts
  • apps/server/src/j5/a2a/deliveryNotices.ts
  • docs/j5/product/a2a/index.md

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

📝 Walkthrough

Delivery and cancellation notices now identify the affected message by its send ID. Notices for asks also include the ask intent when available. Peer-removal notices include exchange intent and a locally originated ask message ID when available.

Changes: Delivery notice identification

Layer / File(s) Summary
Notice content and documentation
apps/server/src/j5/a2a/deliveryNotices.ts, docs/j5/product/a2a/index.md
Not-delivered notices name the message by ID and include ask intent when provided. Peer-drop notices include the ask intent and identify whether a local ask message ID is available. The product definition describes these details.
Delivery refusal and alarm notices
apps/server/src/j5/a2a/DeliveryWorker.ts, apps/server/src/j5/a2a/DeliveryWorker.test.ts, apps/server/src/j5/a2a/PeerOutbound.test.ts, apps/server/src/j5/a2a/PeerPollRoundTrip.test.ts, apps/server/src/j5/a2a/PeerStoreService.test.ts
Refusal and alarm handling uses ask exchange intent and status to build notices and drop events. Tests check message IDs in notices and ask intent where applicable.
Peer-removal notices
apps/server/src/j5/a2a/PeerRemovalService.ts, apps/server/src/j5/a2a/PeerRemovalService.test.ts
Peer removal retrieves exchange intent and the first locally originated ask message ID. Notices and tests include intent and message IDs when available.
Queued-message removal notices
apps/server/src/j5/a2a/SilenceDetector.ts, apps/server/src/j5/a2a/SilenceDetector.test.ts
The removal notice function accepts and displays the removed message ID. Tests verify that it matches the ID returned by sending.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 9ea8c

The checked notice paths preserve the required message identification, and no merge-blocking issue is established.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: not-delivered notices now identify the message they concern.
Description check Passed The description includes the problem, solution, issue link, testing coverage, live-testing status, scope notes, checklist, and work attribution. It is complete and aligned with the template.
Linked Issues check Passed Issue #670 is directly linked and remains open. The implementation names not-delivered notices with the delivery row's message ID. Ask notices also include the stored intent. DeliveryWorker.ts cover…
Out of Scope Changes check Passed The changed source files implement issue #670 notice formatting and data retrieval. The test changes verify each affected notice path. The a2a documentation change records the required behavior. No un…
Full details: Linked Issues check

Explanation

Issue #670 is directly linked and remains open. The implementation names not-delivered notices with the delivery row's message ID. Ask notices also include the stored intent. DeliveryWorker.ts covers alarms and peer refusals. PeerRemovalService.ts covers peer-removal cancellations and Exchange drops. SilenceDetector.ts names removed queued messages. Focused tests assert IDs returned by sends across local delivery, direct peer delivery, polling peers, peer removal, and queue removal. docs/j5/product/a2a/index.md rewrites the definition as required.

Full details: Out of Scope Changes check

Explanation

The changed source files implement issue #670 notice formatting and data retrieval. The test changes verify each affected notice path. The a2a documentation change records the required behavior. No unrelated feature, storage change, or UI change appears in the reviewed diff.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@Jacksondr5
Jacksondr5 merged commit c4f1463 into j5/main Oct 20, 2026
34 checks passed
@Jacksondr5
Jacksondr5 deleted the j5/notice-names-message branch October 20, 2026 01:35

This branch was successfully deployed

1 active deployment
Preview — 9ea8c5de Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not-delivered notices name the message they are about

1 participant