fix: doctrine live-data rule + wallet type override case-insensitive match#165
Merged
Conversation
…match - luca-x-doctrine: hard rule forbidding agent-specific figures from memory; Luca must call agent-books or revenue-analysis before emitting any per-agent revenue/expense/GDP figure — closes stale-report truth leak - update-wallet-type: switch .eq to .ilike for address matching so mixed-case checksummed addresses (e.g. Skopos) resolve correctly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RjpGP3kYKnQuQAUoK6RZky
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
luca-x-doctrine.ts— hard doctrine rule added toSHARED_DOCTRINE(baked into every Luca prompt): Luca must callagent-booksorrevenue-analysisbefore emitting any per-agent revenue/expense/GDP figure. If no live call has been made, Luca must say "I don't have a current figure for [agent] — let me check." Closes the stale-report truth leak where Luca surfaced the corrected $3.4M Aeon figure from memory or a prior published report.update-wallet-type/route.ts— switched.eq("address", address)to.ilike("address", address)for case-insensitive matching. Fixes "no wallet found" error when the DB stores checksummed mixed-case addresses (EIP-55) but the input is lowercased.Root cause of the stale figure
The suppression system (
agent-books.tsunder_reviewcheck) works correctly for live API calls. The leak path was: a weekly report published before the suppression migration still existed inresearch_reportswith Aeon's $3.4M figure in its prose body. Luca on Hermes could surface that figure from context/memory without making a fresh skill call. The doctrine rule closes this permanently.Post-merge action required
Force-regenerate the weekly report via admin endpoint to overwrite the stale prose:
Generated by Claude Code