Skip to content

chore: remove dead artifacts — send-notification queue (#170), dead metrics class + trace source (#171)#174

Merged
emeraldleaf merged 6 commits into
mainfrom
chore/remove-dead-artifacts
Jul 19, 2026
Merged

chore: remove dead artifacts — send-notification queue (#170), dead metrics class + trace source (#171)#174
emeraldleaf merged 6 commits into
mainfrom
chore/remove-dead-artifacts

Conversation

@emeraldleaf

@emeraldleaf emeraldleaf commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Closes #170. Closes #171.

Both artifacts were found by the ultracode review of #159: things the docs presented as live that nothing actually used. Canon says speculative/dead coupling gets deleted (same rule that retired IRecipientResolver), so both go — and where a real signal was missing, it's replaced, not just removed.

#170send-notification was dead-end wiring

SendNotificationCommand had zero references: no handler, no publisher. The working path is untouched — event handlers return the internal SendNotificationRequest and Wolverine cascades it in-process to SendNotificationHandler; it never touched the queue.

Worse than dead: event-catalog.md told any service it could publish there, and such a message would arrive unhandleable and be silently discarded. Removed the contract (+ the now-empty Commands/), the queue const, the listener, and every doc/diagram reference.

#171 — dead observability artifacts, replaced with real telemetry

  • MessagesAbandoned: declared, never .Add()-ed (the ASB processors that fed it died in the Wolverine migration). An operator alerting on it got a permanently-zero signal while Wolverine dead-lettered silently.
  • .AddSource("NextAurora.Messaging"): registered with no emitter.
  • Root cause + real fix: only the "NextAurora" meter was registered, so Wolverine's own metrics were never collected at all. Now AddMeter("Wolverine*")wolverine-dead-letter-queue (the real DLQ alarm), -execution-failure, -messages-sent/-received, inbox depth. The wildcard is load-bearing: Wolverine's meter is Wolverine:{ServiceName}, so a literal AddMeter("Wolverine") collects nothing.
  • The architecture review then found the whole NextAuroraMetrics class was dead (registered, never injected — every real counter is created inline in its handler). All five counters were declared-and-never-incremented. Class deleted.

The control caught a flaw in itself — and it was mine

The architecture-review gate (#160's rule, run pre-PR) found that my tombstone allowlist was file-scoped: docs/architecture.md, allowlisted for the ASB patterns in #159, was thereby exempt from every tombstone added afterward. So check-tombstones.sh reported clean while architecture.md still documented both deleted artifacts as live. The control built to make "sweep to zero" mechanical was returning green on a sweep that wasn't.

Fixed: tombstones are grouped, and allowlist entries are <group> <path> — an exemption is scoped to one group, never the whole audit. The corrected control immediately surfaced 6 hidden hits, all now swept.

Rules encoded (same PR as the fix, per the loop)

  • CLAUDE.md — allowlist exemptions are group-scoped, never whole-audit.
  • architecture-reviewer — new metrics checklist: a declared-but-never-incremented instrument is a defect (it reads as a working alarm and never fires); prefer the framework's own instruments.
  • .coderabbit.yaml**/Metrics/*.cs dead-instrument rule + the Wolverine meter-name rule (don't "tidy" the wildcard to a literal).

Verification

  • Build 0 errors; tombstone + messaging-topology audits clean.
  • 145/145 tests — integration 40 (Order 11, Payment 6, Shipping 4, Catalog 19) + unit 105.
  • Both diagrams re-rendered as pairs. Also documented a newly-found audit blind spot: line-broken identifiers in .excalidraw JSON evade the regex (found via the rendered PNG, not the grep).
  • Architecture-reviewer pass run pre-PR (per the chore(dev-loop): gate architecturally-significant PRs on an architecture-reviewer pass #160 gate): 2 Must-fix + 3 Should-consider — all applied in the second commit.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Breaking Changes

    • Removed the standalone notification queue and its public command contract.
    • Notification processing now follows event-specific fanout queues.
  • Observability

    • Replaced the unused abandoned-message metric with Wolverine’s native dead-letter and execution metrics.
    • Updated OpenTelemetry configuration to collect Wolverine metrics and removed dormant messaging traces.
  • Documentation

    • Updated architecture, messaging, monitoring, and deployment documentation to reflect the revised topology and metric names.
    • Added guidance for the organization-wide knowledge layer and improved audit documentation.

emeraldleaf and others added 2 commits July 12, 2026 22:25
…ned-counter + emitter-less trace source (#171)

Closes #170. Closes #171.

Both were found by the ultracode review of #159: things the docs presented as live that
nothing actually used. Canon says speculative/dead coupling gets deleted (same rule that
retired IRecipientResolver), so both go.

#170 — send-notification was dead-end wiring:
- NextAurora.Contracts.Commands.SendNotificationCommand had ZERO references — no handler,
  no publisher. The working path is unaffected: event handlers return SendNotificationRequest
  and Wolverine cascades it IN-PROCESS to SendNotificationHandler; it never touched the queue.
- Worse than dead: event-catalog.md told any service it could publish there, and such a
  message would arrive unhandleable and be silently discarded.
- Removed: the contract + Commands/ folder, MessagingQueues.SendNotification, the listener,
  the catalog row + command section, the architecture/README/observability entries, and the
  diagram box.

#171 — two artifacts documented as live, incremented/emitted by nothing:
- NextAuroraMetrics.MessagesAbandoned: declared, never .Add()-ed (the ASB processors that fed
  it died in the Wolverine migration). An operator alerting on it got a permanently-zero
  signal while Wolverine dead-lettered silently.
- .AddSource("NextAurora.Messaging"): registered with no emitter.
- ROOT CAUSE + real fix: only the "NextAurora" meter was registered, so Wolverine's OWN
  metrics were never collected. Now .AddMeter("Wolverine*") — wolverine-dead-letter-queue
  (the real DLQ alarm), -execution-failure, -messages-sent/-received, inbox depth. The dead
  counter is deleted and REPLACED by telemetry that actually fires.

Identifier-move discipline applied: removed names tombstoned; swept to zero (the audit is
the completion criterion, not memory). Documented a newly-found blind spot in the audit —
line-broken identifiers in .excalidraw JSON evade the regex (found via the rendered PNG,
not the grep), so diagram hits need a visual check too.

Verified: build 0 warn/0 err; tombstone + messaging-topology audits clean; integration
40/40 (Order 11, Payment 6, Shipping 4, Catalog 19); unit 57/57; both diagrams re-rendered.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…g the very drift it audits

The review of this branch caught a structural flaw in MY OWN control, plus a half-done
deletion. Both Must-fixes applied.

MUST-FIX 1 — the tombstone allowlist was FILE-scoped, so it silently exempted files from
every FUTURE tombstone:
  docs/architecture.md was allowlisted for the ASB patterns (#159). That exemption then
  covered the send-notification and messages.abandoned tombstones added months later — so
  `check-tombstones.sh` reported "clean" while architecture.md still documented BOTH deleted
  artifacts as live (a publishable SendNotificationCommand row; messages.abandoned as the DLQ
  alarm). The control that exists to make "sweep to zero" mechanical was returning green on a
  sweep that wasn't. Found by architecture review, not by the control.
  FIX: tombstones are now GROUPED ([group-name] headings) and allowlist entries are
  `<group> <path>` — an exemption is scoped to ONE group, never the whole audit. Rewritten
  check-tombstones.sh enforces it. The fixed control immediately surfaced 6 hidden hits, all
  now swept (architecture.md ×6, performance-and-data-correctness.md).

MUST-FIX 2 — #171 deleted 1 of 5 dead counters; the whole class was dead:
  NextAuroraMetrics was registered via AddSingleton but NEVER INJECTED anywhere — every real
  counter is created inline (`new Meter("NextAurora")`) in the handler that emits it. So all
  five of its counters were declared-and-never-incremented, i.e. the exact defect #171 exists
  to eliminate, in the file the PR was already editing. Deleted the class + its registration.

Also (should-consider):
- Extensions.cs now names the meter explicitly: Wolverine's is `Wolverine:{ServiceName}`, so
  AddMeter("Wolverine*") is LOAD-BEARING — a literal AddMeter("Wolverine") collects nothing.
  (Reviewer runtime-verified this against Wolverine 6.8.0 + OTel 1.15.3.)
- Re-flowed two tier-1 comments left mid-sentence by the surgical edits; fixed a doubled `---`
  in event-catalog.md; framed the project-decisions OTel snippet as as-of-that-decision; noted
  the topology guard's direct-queue branch is now a forward-guard.

Rules encoded (all three the review asked for):
- CLAUDE.md: allowlist exemptions are group-scoped, never whole-audit.
- architecture-reviewer: new "metrics / Meter / Counter" checklist section — a
  declared-but-never-incremented instrument is a DEFECT (it reads as a working alarm and
  never fires); prefer the framework's own instruments.
- .coderabbit.yaml: **/Metrics/*.cs dead-instrument rule + the Wolverine meter-name rule for
  ServiceDefaults (don't "tidy" the wildcard).

Verified: build 0 err; tombstone + messaging-topology audits clean; 145/145 tests
(integration 40 — Order 11, Payment 6, Shipping 4, Catalog 19; unit 105).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 5 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1a67246b-5a0b-417f-a68a-115f00606ec3

📥 Commits

Reviewing files that changed from the base of the PR and between 2a36b3a and 171d2a7.

⛔ Files ignored due to path filters (2)
  • docs/efcore-query-write.svg is excluded by !**/*.svg
  • docs/nextaurora-architecture.svg is excluded by !**/*.svg
📒 Files selected for processing (30)
  • .claude/agents/architecture-reviewer.md
  • .claude/commands/grid-infographic.md
  • .claude/scripts/check-messaging-topology.sh
  • .claude/scripts/check-tombstones.sh
  • .claude/tombstones-allowlist.txt
  • .claude/tombstones.txt
  • .coderabbit.yaml
  • CLAUDE.md
  • CONTEXT.md
  • NextAurora.Contracts/Commands/SendNotificationCommand.cs
  • NextAurora.Contracts/Messaging/MessagingTopology.cs
  • NextAurora.ServiceDefaults/Extensions.cs
  • NextAurora.ServiceDefaults/Metrics/NextAuroraMetrics.cs
  • NotificationService/Features/SendNotification.cs
  • NotificationService/Program.cs
  • README.md
  • docs/STATUS.md
  • docs/architecture.md
  • docs/code-flows/notificationservice.md
  • docs/decisions/2026-07-17-sixth-surface-okl.md
  • docs/dotnet-10-features.md
  • docs/ef-core.md
  • docs/efcore-query-write.excalidraw
  • docs/event-catalog.md
  • docs/event-driven-observability.md
  • docs/event-replay.md
  • docs/nextaurora-architecture.excalidraw
  • docs/observability.md
  • docs/performance-and-data-correctness.md
  • docs/project-decisions.md

Walkthrough

The PR removes the direct notification queue and dormant observability artifacts, registers Wolverine metrics, introduces group-scoped tombstone auditing, finalizes the OKL documentation, and updates architecture and operational references.

Changes

Architecture and observability cleanup

Layer / File(s) Summary
Remove direct notification queue
NextAurora.Contracts/..., NotificationService/..., README.md, docs/architecture.md, docs/event-catalog.md, docs/nextaurora-architecture.excalidraw
The SendNotificationCommand, queue constant, listener wiring, and direct-queue documentation are removed.
Adopt Wolverine observability
NextAurora.ServiceDefaults/Extensions.cs, docs/..., docs/nextaurora-architecture.excalidraw
Dormant application metrics and tracing registration are removed, Wolverine meters use AddMeter("Wolverine*"), and DLQ documentation uses Wolverine-native signals.

Identifier drift controls

Layer / File(s) Summary
Group-aware tombstone auditing
.claude/scripts/check-tombstones.sh, .claude/tombstones*.txt, CLAUDE.md
Tombstones and allowlist entries are grouped, and the audit applies exclusions only within the active group.
Review and topology guardrails
.claude/agents/architecture-reviewer.md, .coderabbit.yaml
Review rules flag dead instruments, require Wolverine meter wildcards, and document direct-queue coverage expectations.

Knowledge surface documentation

Layer / File(s) Summary
Finalize the OKL surface
CONTEXT.md, docs/decisions/..., .claude/commands/grid-infographic.md
The sixth surface is documented as a fail-closed, cross-repository Org Knowledge Layer with a linked decision record.
Refresh architecture diagrams
docs/efcore-query-write.excalidraw, docs/nextaurora-architecture.excalidraw
Diagram labels, routing descriptions, retry/DLQ terminology, and presentation text are updated.

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

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change set by describing removal of the send-notification queue and dead metrics/trace artifacts.
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 chore/remove-dead-artifacts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Joshua Dell and others added 2 commits July 17, 2026 19:37
…path

The 6th surface — a fail-closed, cross-repo knowledge layer — is built (the OKL),
so the tracked ADR replaces the gitignored docs/post-ideas/ draft the canon had
been pointing at (a dangling 404, itself the doc-orphan drift the method polices).

- docs/decisions/2026-07-17-sixth-surface-okl.md: the decision record
- CONTEXT.md: 6th-surface note "not built" -> "built as the OKL", ref repointed
- .claude/commands/grid-infographic.md: ref repointed to the tracked path
…ifacts

# Conflicts:
#	.claude/tombstones-allowlist.txt
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
NotificationService/Program.cs 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@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: 3

🤖 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 @.claude/scripts/check-tombstones.sh:
- Around line 56-74: Update the allowlist parsing loop to use read -r with
separate group and path variables, preserving comment/blank-line skipping and
matching only the current group while supporting paths with spaces. In the git
grep execution around the status handling, pass the tombstone pattern through
-e, and append the excludes arguments only when the excludes array is non-empty
so Bash 3.2 with nounset enabled does not fail on an empty expansion.

In `@docs/decisions/2026-07-17-sixth-surface-okl.md`:
- Around line 62-67: In the discussion of OKL’s distinct wedge, replace the
adverb “exactly” with “precisely” while preserving the surrounding list and
meaning.

In `@docs/STATUS.md`:
- Line 19: Update the “Last updated” date near the top of docs/STATUS.md from
2026-07-12 to 2026-07-19, leaving the status content unchanged.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bd2b53d6-7c55-4020-b0bc-bab51d1a10b5

📥 Commits

Reviewing files that changed from the base of the PR and between 2a36b3a and 0d7b7b9.

⛔ Files ignored due to path filters (2)
  • docs/efcore-query-write.svg is excluded by !**/*.svg
  • docs/nextaurora-architecture.svg is excluded by !**/*.svg
📒 Files selected for processing (30)
  • .claude/agents/architecture-reviewer.md
  • .claude/commands/grid-infographic.md
  • .claude/scripts/check-messaging-topology.sh
  • .claude/scripts/check-tombstones.sh
  • .claude/tombstones-allowlist.txt
  • .claude/tombstones.txt
  • .coderabbit.yaml
  • CLAUDE.md
  • CONTEXT.md
  • NextAurora.Contracts/Commands/SendNotificationCommand.cs
  • NextAurora.Contracts/Messaging/MessagingTopology.cs
  • NextAurora.ServiceDefaults/Extensions.cs
  • NextAurora.ServiceDefaults/Metrics/NextAuroraMetrics.cs
  • NotificationService/Features/SendNotification.cs
  • NotificationService/Program.cs
  • README.md
  • docs/STATUS.md
  • docs/architecture.md
  • docs/code-flows/notificationservice.md
  • docs/decisions/2026-07-17-sixth-surface-okl.md
  • docs/dotnet-10-features.md
  • docs/ef-core.md
  • docs/efcore-query-write.excalidraw
  • docs/event-catalog.md
  • docs/event-driven-observability.md
  • docs/event-replay.md
  • docs/nextaurora-architecture.excalidraw
  • docs/observability.md
  • docs/performance-and-data-correctness.md
  • docs/project-decisions.md
💤 Files with no reviewable changes (3)
  • NextAurora.Contracts/Commands/SendNotificationCommand.cs
  • NextAurora.ServiceDefaults/Metrics/NextAuroraMetrics.cs
  • README.md

Comment thread .claude/scripts/check-tombstones.sh
Comment thread docs/decisions/2026-07-17-sixth-surface-okl.md
Comment thread docs/STATUS.md Outdated


- check-tombstones.sh: git grep -e "$pattern" (a tombstone starting with '-' is no longer
  parsed as a flag); guard "${excludes[@]}" so an exemption-less group doesn't trip set -u on
  bash 3.2 (macOS default); read -r grp pth instead of set -- (handles spaces, drops the
  shellcheck disable). Verified: clean run + a leading-hyphen pattern in an empty-exemption
  group matches without crashing.
- STATUS.md: Last-updated date + #170/#171/#174 state.

Declined the LanguageTool 'exactly'->'precisely' nit on the ADR (subjective, no correctness or
consistency impact).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@emeraldleaf

Copy link
Copy Markdown
Owner Author

All three addressed in dddbd12:

@emeraldleaf

Copy link
Copy Markdown
Owner Author

@coderabbitai resolve

@emeraldleaf

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

…tAuroraMetrics literal

The tombstone CI audit correctly caught it (I edited STATUS after the last local audit run
and didn't re-verify). A living status doc doesn't earn a permanent allowlist — reworded to
'business-metrics holder class'. Both audits re-run clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@emeraldleaf

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@emeraldleaf

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 5 minutes.

@emeraldleaf
emeraldleaf merged commit 10c0113 into main Jul 19, 2026
8 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

1 participant