Skip to content

✨ This day in an earlier year comes back - #146

Open
ebigunso wants to merge 6 commits into
feature/2026-09-22/time-recencyfrom
feature/2026-09-22/time-anniversary
Open

ebigunso wants to merge 6 commits into
feature/2026-09-22/time-recencyfrom
feature/2026-09-22/time-anniversary

Conversation

@ebigunso

Copy link
Copy Markdown
Owner

Time plan Task_3, stacked on #145.

On the day something happened in an earlier year, that experience comes back, first of all when the person it was shared with is present.

  • The scene's time keeps the offset the application gave, and each experience stores its local date when it is written: a birthday breakfast at eight in the morning in Tokyo is that day, not the evening before in UTC. The stored instant is unchanged; experiences written before this carry no local date and simply never match.
  • An anniversary is the same local month and day in an earlier local year, matched exactly on the stored date. Twenty-ninth of February matches only itself.
  • It holds reserved room only when it was shared with someone the scene clearly names; an ambiguous name does not earn it, because the scene does not know which of the candidates is present. Otherwise it is still contributed and competes for room nothing else claims, so nothing is withheld.
  • Unlike a range the caller asks for, an anniversary is bounded to a small number, because nobody asked for it.
  • The local date takes part in replay equality: the same record written again with the same instant but a different local date is a conflict, not a silent change.

This branch also merges the approved Task_2 fix. Evidence: 490 tests; baseline showing the year-ago shared meeting never came before. Review and the time slice's measurement follow.

🤖 Generated with Claude Code

ebigunso and others added 2 commits September 23, 2026 06:41
…time-anniversary

Co-Authored-By: Codex <noreply@openai.com>
@ebigunso
ebigunso added this pull request to stack #149 September 22, 2026 22:00
…time-anniversary

Co-Authored-By: Codex <noreply@openai.com>
Copilot AI balanced review requested due to automatic review settings September 22, 2026 22:08

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

🟡 Changes recommended

Several graph test doubles reimplement the new selector instead of delegating to the real adapter, contrary to the repository’s port contract.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 5 Medium severity

Open (5)
What changed in this PR

Adds offset-aware anniversary recall while preserving UTC instants and integrating shared-occasion reservations with existing retrieval ranking.

Changes:

  • Persists an episode’s derived local date and enforces replay equality.
  • Adds bounded anniversary selection, ranking, trace reporting, and shared-participant handling.
  • Expands tests and documentation for offsets, lifecycle behavior, and retrieval floors.
File Description
tests/​write_planning_tests.rs Updates scenes for offset-aware time.
tests/​scene_surface_tests.rs Updates scene fixture construction.
tests/​scene_reminder_tests.rs Migrates reminder scenes to fixed offsets.
tests/​retrieval_state_tests.rs Updates state retrieval scenes.
tests/​retrieval_scope_tests.rs Updates scoped scene fixture.
tests/​retrieval_resolution_tests.rs Updates resolution scenes.
tests/​retrieval_lifecycle_evidence_tests.rs Updates lifecycle evidence scenes.
tests/​retrieval_last_interaction_tests.rs Normalizes scene instants to UTC where required.
tests/​retrieval_guardrails_tests.rs Updates episode scene fixture.
src/​usecases/​write_planning.rs Preserves offset scenes while normalizing observation instants.
src/​usecases/​retrieve/​scene.rs Uses UTC instants for interaction calculations.
src/​usecases/​retrieve/​activity.rs Marks activity roots as date-floor ineligible.
src/​usecases/​retrieve.rs Integrates anniversary selection, ranking, floors, and tracing.
src/​usecases/​remember.rs Extends its graph test double.
src/​usecases/​link.rs Extends its graph failure fixture.
src/​usecases/​correct_forget.rs Updates episode fixtures and graph wrapper.
src/​test_support.rs Adds legacy local-date fixture state.
src/​ports/​retrieval_stats.rs Updates episode stats fixture.
src/​ports/​graph_authority.rs Adds the anniversary selector contract.
src/​policy/​embedding_surface.rs Updates embedding episode fixture.
src/​memory/​write_turn_tests.rs Extends the gated graph wrapper.
src/​memory/​scene_tests.rs Migrates scene tests to offset-aware time.
src/​memory/​retrieval_turn_tests.rs Separates scene offsets from UTC metadata.
src/​memory/​retrieval_time_tests.rs Adds comprehensive anniversary behavior tests.
src/​memory/​retrieval_scene_tests.rs Normalizes non-scene timestamps to UTC.
src/​memory/​retrieval_floor_tests.rs Updates floor fixtures for offset scenes.
src/​memory/​notion_tests.rs Updates notion episode scene creation.
src/​memory.rs Updates memory-level scene fixtures.
src/​domain/​tests.rs Adds legacy local-date coverage.
src/​domain/​scene.rs Changes scene time to FixedOffset.
src/​domain.rs Adds persisted episode local date.
src/​api/​types/​retrieval.rs Adds anniversary overflow tracing.
src/​api/​types/​draft.rs Derives local dates during episode construction.
src/​adapters/​oxigraph/​vocabulary.rs Adds local-date RDF predicates.
src/​adapters/​oxigraph/​tests.rs Tests anniversary metadata selection.
src/​adapters/​oxigraph/​sparql_selectors.rs Implements anniversary SPARQL selection.
src/​adapters/​oxigraph/​shared.rs Hydrates local dates from RDF.
src/​adapters/​oxigraph/​rdf_mapping.rs Persists local-date metadata.
src/​adapters/​oxigraph/​embedded.rs Exposes the selector through Oxigraph.
README.md Documents anniversary recall semantics.
docs/​design/​database/​schema_cheat_sheet.md Documents new RDF fields.
docs/​design/​database/​graph_schema_design.md Defines persistence and selection behavior.

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

Comment on lines +557 to +558
let _ = (date, participants, limit, policy);
Ok(Vec::new())
Comment on lines +3498 to +3499
let _ = (date, participants, limit, policy);
Ok(Vec::new())
Comment thread src/usecases/link.rs
Comment on lines +575 to +576
let _ = (date, participants, limit, policy);
Ok(Vec::new())
Comment thread src/usecases/remember.rs
Comment on lines +1179 to +1180
let _ = (date, participants, limit, policy);
Ok(Vec::new())
Comment thread src/usecases/retrieve.rs
Comment on lines +3497 to +3498
let _ = (date, participants, limit, policy);
Ok(Vec::new())
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