Skip to content

🩹 A failed graph read in the stats projection is reported as what it is - #119

Closed
ebigunso wants to merge 1 commit into
mainfrom
fix/2026-09-21/stats-currency-cause
Closed

ebigunso wants to merge 1 commit into
mainfrom
fix/2026-09-21/stats-currency-cause

Conversation

@ebigunso

Copy link
Copy Markdown
Owner

Follow-up to a Copilot finding on the merged #115.

When the currency query failed during stats projection, the structured cause said endpoint hydration had failed, although that read had already succeeded. ADR-I-0029 makes structured causes authoritative, so this was a false typed fact.

The fix is a rename, not a new variant: EndpointHydration becomes GraphRead in both StatsUpdateCause and RetrievalStatsHealthCause, with the message and wire token to match. A consumer acts the same way on any failed graph read that feeds the projection, and the inner graph error already says which read failed.

Evidence: the existing currency-failure regression now checks the returned and retained causes and both wire tokens. Internal Tier D review approved; fmt, check, clippy with warnings denied and the full test suite pass for the worker and independently for the reviewer.

This PR is outside the merges the decider pre-authorized and waits for approval.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings September 20, 2026 20:45

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The rename is consistently applied, accurately documented, and covered for both returned and retained serialized causes.

Review effort: Balanced
Findings: None

What changed in this PR

Corrects stats projection failures so structured causes accurately report graph-read failures.

Changes:

  • Renames both stats cause variants from EndpointHydration to GraphRead.
  • Updates wire tokens, messages, tests, and documentation.
  • Verifies currency lookup failures in returned and retained health causes.
File Description
src/​errors.rs Renames typed causes and updates conversion logic.
src/​usecases/​stats_projection.rs Reports all projection graph-read failures consistently.
src/​usecases/​remember.rs Tests currency failures and serialization tokens.
tests/​write_planning_tests.rs Updates integration expectations.
README.md Documents graph-read failure reporting.
docs/​design/​database/​graph_schema_design.md Records the structured cause contract.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ebigunso

Copy link
Copy Markdown
Owner Author

Superseded by #150: this fix was merged into the stack there (with its reconciliation against the scene surfaces the stack added) and reviewed by both tiers. Closing at the decider's direction.

@ebigunso ebigunso closed this Sep 23, 2026
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