Repository navigation
fix(access-context): a refused identity-less post names the call chain that issued it (Refs #5227) - #5693
Conversation
…n that issued it
The never-null guard's Error line names the SENDING hub. On portal/reads-{meshId}
that hub stands for every root-hub holder in the process, so 47 refusals in 6 h on
memex-cloud (#5227) could not be tied to a sender. The guard runs synchronously
inside Post, so it now writes a companion Warning on its own category
(MeshWeaver.AccessContext.PostSite) that carries the post's call chain. The Error
text and the incident fingerprint stay unchanged.
Refs #5227
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Address the two moderate performance concerns around eager logger creation and unguarded stack capture.
Review effort: Lite
Findings: None
What changed in this PR
Adds caller-site diagnostics for identity-less post refusals while preserving existing refusal behavior and error logging.
Changes:
- Adds bounded, filtered call-chain warning diagnostics.
- Adds regression coverage for refusal and caller attribution.
- Documents how to correlate diagnostic logs.
| File | Summary |
|---|---|
test/MeshWeaver.Messaging.Hub.Test/UnattributedPostNamesItsSiteTest.cs |
Verifies refusal delivery and caller diagnostics. |
src/MeshWeaver.Messaging.Hub/MessageHubConfiguration.cs |
Adds companion warnings and stack formatting; logger creation and stack capture should be deferred or guarded for performance. |
src/MeshWeaver.Documentation/Data/Architecture/AccessContextPropagation.md |
Documents diagnostic interpretation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results (shard 3)443 tests 443 ✅ 1m 0s ⏱️ Results for commit 9086328. ♻️ This comment has been updated with latest results. |
Test Results (shard 1)550 tests 550 ✅ 1m 9s ⏱️ Results for commit 9086328. ♻️ This comment has been updated with latest results. |
Test Results (shard 0) 1 files 1 suites 3m 10s ⏱️ Results for commit 9086328. ♻️ This comment has been updated with latest results. |
Test Results (shard 4) 2 files 2 suites 6m 33s ⏱️ Results for commit 9086328. ♻️ This comment has been updated with latest results. |
…ack only when the Warning is written Copilot review on #5693: no per-hub logger at pipeline build, no stack walk when Warning is disabled. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Test Results (shard 2)1 647 tests 1 647 ✅ 9m 14s ⏱️ Results for commit 9086328. |
Test Results (shard 5) 5 files 5 suites 14m 45s ⏱️ Results for commit 9086328. |
Test Results 13 files 13 suites 35m 53s ⏱️ Results for commit 9086328. ♻️ This comment has been updated with latest results. |
Refs #5227. This is an instrument, not the fix. The issue stays open until the sender it names is fixed.
Why
On memex-cloud ci.9291 (Plugins#2333 live), 47 identity-less
GetDataRequests were refused in 6 h. All came fromhub=portal/reads-{meshId}, with targetsStore,Home,AgenticEngineering,SST,PricingandLossModelling. That hub posts for every root-hub holder in the process: Blazor components, mesh singletons, and Rx callbacks. So the Error line cannot name the sender. Plugins#2360 fixed three candidate senders with deterministic repros, but the 09-24 comment says it did not establish that they are the production ones. There were also two cross-pod coincidences 0–4 ms apart that nothing explains.What
UserServicePostPipeline's never-null guard runs synchronously insidePost. On the refusal path only, it now writes a companion Warning on a new category,MeshWeaver.AccessContext.PostSite:hub,messageandtarget, so it joins to the Error line.Type.Methodframes: no file info, at most 40 frames, with Rx, threading and async-machinery frames elided and counted.Doc:
Doc/Architecture/AccessContextPropagation, new section Reading a refusal: the Error names the HUB, the companion line names the CALLER.Verification
UnattributedPostNamesItsSiteTestchecks three things. The refusal is still delivered as OnError. The Error line contains no frames. The companion line namesUnattributedPostNamesItsSiteTest.IssueTheUnattributedProbe, the method that subscribed.LogWarningcall disabled and the test kept, the test goes red withExpected collection to contain a single item … a refused post must say where it came from … but found 0.MeshWeaver.Messaging.Hub.Test: 524/524 in Release.dotnet build -c Release -warnaserroris clean forMeshWeaver.Messaging.Hub,MeshWeaver.Messaging.Hub.TestandMeshWeaver.Documentation.After deploy
Once a roll carries this, run a
LogsInstanceAction for"unattributed post site"on the memex-cloud ReplicaSet. The frames name each remainingportal/readssender. Fix those at the source, the issue (Refs #5227) is resolved on a clean re-read of…-f-nullctx-reads.No public type or member was removed and no interface member was added, so no
Pairs-withorImplementersdeclaration is needed. No catalog key was added.🤖 Generated with Claude Code