entity-resolver: pronouns + relationship stats in turn-context injection (#543) - #545
Merged
NOVA-Openclaw merged 3 commits intoJul 28, 2026
Merged
Conversation
added 3 commits
July 28, 2026 04:33
…543) - Fetch pronouns, trust_level, last_seen, created_at in identifier-resolution query - Extend getEntityProfile() with single aggregate query for allowlist facts, unfiltered fact count, and most recent transcript (timestamp + provider:chat_id) - Render 👤 header with pronouns and optional trust suffix, and new 📊 stats line - Keep stats query inside the existing 1s Promise.race; pronouns survive timeout - Honorific guard path unchanged: no stats query triggered - Add unit tests (entity-resolver.test.ts) and integration scaffold (test.ts) - Update stale trust_level column comment to reflect free-text usage - Add build script to entity-resolver package.json
…mp (#543) entities.last_seen is plain timestamp (no tz). Applying AT TIME ZONE 'UTC' interpreted the value in the session timezone and converted it, causing a silent shift under non-UTC sessions (e.g. America/Chicago). Render it directly with to_char(..., 'YYYY-MM-DD HH24:MI UTC') instead, matching created_at. - Fix resolveEntity() and resolveEntityByIdentifiers() SELECT clauses - Add RS-062 integration regression test under SET timezone='America/Chicago'
Documents the getEntityProfile() return-shape change ({facts, stats}),
Entity's new optional pronouns/trustLevel/lastSeen/createdAt fields, the
formatEntityContext() rendering rules (trust-suffix suppression,
stats-line composition, timeout/data-source split), and the last_seen
timezone-shift fix, across relationships/ and memory/plugins/turn-context/
docs plus root/relationships CHANGELOGs. Corrects a stale trust_level
enum claim in psyche/ARCHITECTURE-entities-users.md. Full doc audit
recorded in tests/DOC-AUDIT-543.md.
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.
Closes #543
Summary
Adds pronouns and relationship-stats summary data to the entity resolver's turn-context injection. For each resolved entity, the injected context now includes:
Fix included
bfdbe39: Fixes a timezone-shift bug where naive (timezone-unaware)last_seentimestamps were being incorrectly shifted during formatting/comparison. Naive timestamps are now handled without implicit tz conversion.Documentation
Step 9 doc audit completed and included in this branch:
ARCHITECTURE-entity-resolver.mdupdatedCHANGELOG.mdupdatedtests/DOC-AUDIT-543.mdadded (audit record)Testing / Verification
Implementation, testing, and staging verification completed in SE run #513, steps 1-8. See
workflow_runsid=513 innova_memoryfor full test detail.Commits
8ba578efeat(entity-resolver): pronouns + relationship stats in turn-context (turn-context entity injection limited to 7-key allowlist — no relationship/history context surfaces #543)bfdbe39fix(entity-resolver): avoid timezone shift on naive last_seen timestamp (turn-context entity injection limited to 7-key allowlist — no relationship/history context surfaces #543)a11c002docs(turn-context entity injection limited to 7-key allowlist — no relationship/history context surfaces #543): document pronouns/trust/relationship-stats entity injection