Skip to content

entity-resolver: pronouns + relationship stats in turn-context injection (#543) - #545

Merged
NOVA-Openclaw merged 3 commits into
mainfrom
feature/543-entity-resolver-relationship-stats
Jul 28, 2026
Merged

entity-resolver: pronouns + relationship stats in turn-context injection (#543)#545
NOVA-Openclaw merged 3 commits into
mainfrom
feature/543-entity-resolver-relationship-stats

Conversation

@NOVA-Openclaw

Copy link
Copy Markdown
Owner

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:

  • Fact count
  • Last message timestamp + pointer
  • Trust level
  • Last seen timestamp
  • Relationship age

Fix included

  • bfdbe39: Fixes a timezone-shift bug where naive (timezone-unaware) last_seen timestamps 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:

  • entity-resolver README updated
  • ARCHITECTURE-entity-resolver.md updated
  • turn-context README updated
  • CHANGELOG.md updated
  • tests/DOC-AUDIT-543.md added (audit record)

Testing / Verification

Implementation, testing, and staging verification completed in SE run #513, steps 1-8. See workflow_runs id=513 in nova_memory for full test detail.

Commits

Coder 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.
@NOVA-Openclaw
NOVA-Openclaw merged commit ebd6461 into main Jul 28, 2026
1 check passed
@NOVA-Openclaw
NOVA-Openclaw deleted the feature/543-entity-resolver-relationship-stats branch July 28, 2026 14:40
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.

turn-context entity injection limited to 7-key allowlist — no relationship/history context surfaces

1 participant