Skip to content

feat: include created_at timestamp in search results#846

Merged
bensig merged 2 commits intoMemPalace:developfrom
sha2fiddy:feature/465/created-at-in-search
Apr 15, 2026
Merged

feat: include created_at timestamp in search results#846
bensig merged 2 commits intoMemPalace:developfrom
sha2fiddy:feature/465/created-at-in-search

Conversation

@sha2fiddy
Copy link
Copy Markdown
Contributor

Summary

  • Surfaces the existing filed_at metadata as created_at in search result objects returned by search_memories()
  • Enables temporal reasoning over search hits without additional queries (e.g., "what did I say last week?")
  • Zero breaking changes — additive field only

Closes #465

Changes

  • mempalace/searcher.py: Added created_at field to search result entry dict, sourced from meta.get("filed_at")
  • tests/test_searcher.py: Added created_at presence check to test_result_fields, plus new test_created_at_contains_filed_at verifying the value matches the stored filed_at metadata

Test plan

  • test_result_fields — verifies created_at key exists in search results
  • test_created_at_contains_filed_at — verifies value matches the seeded filed_at metadata (2026-01-01T00:00:00)
  • Full test suite: 865 passed, 84% coverage
  • Lint clean (ruff check ., ruff format --check . with CI-pinned ruff >=0.4.0,<0.5)

@igorls igorls added area/search Search and retrieval enhancement New feature or request labels Apr 14, 2026
…e#465)

Surface the existing filed_at metadata as created_at in search result
objects returned by search_memories(). Enables temporal reasoning over
search hits without additional queries.
@sha2fiddy sha2fiddy force-pushed the feature/465/created-at-in-search branch from fb3142c to 64ab16b Compare April 14, 2026 12:56
Comment thread mempalace/searcher.py Outdated
"wing": meta.get("wing", "unknown"),
"room": meta.get("room", "unknown"),
"source_file": Path(source).name if source else "?",
"created_at": meta.get("filed_at"),
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't an explicit fallback value be useful here? all the other fields that pull from external data seem to have a fallback.

Copy link
Copy Markdown
Collaborator

@bensig bensig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code reviewed — no issues found. CLAUDE.md compliance verified.

@bensig bensig merged commit a15094c into MemPalace:develop Apr 15, 2026
6 checks passed
igorls added a commit that referenced this pull request Apr 16, 2026
Advisor caught: initial boundary (962776c..develop) skipped PRs that
landed on develop after v3.3.0 tag but before the sync-back merge.
Adds entries for #871 MEMPAL_VERBOSE, #811 research() local-only
default, #866 init .gitignore, #864 MCP stdout redirect, #863
precompact hook, #865 searcher empty results, #831 cold-start palace,
#862 init help, #815 Slack provenance, #840 save hook auto-mine.
Also drops the awkward caveat on #846 created_at — it's post-v3.3.0.
shafdev pushed a commit to shafdev/mempalace that referenced this pull request Apr 17, 2026
Advisor caught: initial boundary (962776c..develop) skipped PRs that
landed on develop after v3.3.0 tag but before the sync-back merge.
Adds entries for MemPalace#871 MEMPAL_VERBOSE, MemPalace#811 research() local-only
default, MemPalace#866 init .gitignore, MemPalace#864 MCP stdout redirect, MemPalace#863
precompact hook, MemPalace#865 searcher empty results, MemPalace#831 cold-start palace,
MemPalace#862 init help, MemPalace#815 Slack provenance, MemPalace#840 save hook auto-mine.
Also drops the awkward caveat on MemPalace#846 created_at — it's post-v3.3.0.
@sha2fiddy sha2fiddy deleted the feature/465/created-at-in-search branch April 18, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/search Search and retrieval enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include created_at timestamp in search results

4 participants