Skip to content

issue/96+81: calendar sync idempotency + graphiti memory backend#105

Merged
hugolytics merged 3 commits into
mainfrom
issue/96-calendar-sync-idempotency
Mar 10, 2026
Merged

issue/96+81: calendar sync idempotency + graphiti memory backend#105
hugolytics merged 3 commits into
mainfrom
issue/96-calendar-sync-idempotency

Conversation

@hugolytics
Copy link
Copy Markdown
Collaborator

WIP combined work for issue #96 and #81.\n\nIncludes baseline guard + reconciliation summary wiring and graphiti backend migration/fixes.\n\nFollow-up validation and AC audit tracked in linked issues.

hugocool added 3 commits March 6, 2026 03:10
…int memory backend (config validation, defaults_memory, agent)\n- Add constraint reconciliation methods (_reconcile_constraints_for_stage_context,\n _collect_session_aspect_ids, family key/rank/relevance helpers)\n- Add graphiti-aware local constraint filtering methods\n- Add constraint-reconciliation tests + graphiti backend selection test\n- Add review-system scaffold, docs, and observability playbook\n- Resolve: keep both mem0+graphiti validations in config; fix defaults_memory\n graphiti elif condition; use issue/81 prune+log approach for local_constraint_sync
…ash pop fixes

- Update .github/ chat modes (architect, ask, code, debug) to AGENTS.md-first pattern; remove MemoriPilot references
- Update copilot-instructions.md: AGENTS.md-first directive + working-mode hints
- Update blog post: add memory-bank-goes-stale argument + In-Context Learning subtitle
- Fix defaults_memory.py: add "graphiti" to _TASK_DEFAULTS_BACKENDS
- Fix preferences.py: remove dead delete-based prune_shared_constraints; restore archive-based (issue/81) as the single canonical impl
- Fix agent.py: use duplicates_archived key consistent with archive impl
- Fix test_planning_reminder_suppression: use date.today() not hardcoded 2026-03-07
- Fix test_task_defaults_memory: migrate mem0 build test to graphiti path
- Fix test_timeboxing_constraint_store_canonicalization: direct DB inserts for dirty-state setup; assertions aligned to archive API
- Add test_review_commit_template_includes_submit_button_guidance (merged from stash)
- Update .env: TIMEBOXING_MEMORY_BACKEND=graphiti
@hugolytics
Copy link
Copy Markdown
Collaborator Author

Checkpoint (progress): committed staged restore batch and opened this PR.\n\nCommit: 1442f3f\nBranch: issue/96-calendar-sync-idempotency\n\nOpen Items\n- To decide: split #81 deployment/runtime concerns into follow-up PR or keep bundled.\n- To do: run AC audit for #96 (AC1-AC4 + e2e Slack replay) and confirm #81 graphiti runtime path.\n- Blocked by: graphiti service availability (#90) for full durable-memory verification.

@hugolytics
Copy link
Copy Markdown
Collaborator Author

Checkpoint (progress): ran #90 graphiti deployment/runtime audit and posted detailed evidence in issue #90.\n\nSummary for this PR\n- Graphiti adapter in current code is local JSON-backed (not DB-backed) and needs explicit #90 remediation to satisfy deployment ACs.\n- Latest incident logs for thread show durable backend was mem0 at runtime, so prior durable_count=0 evidence is not yet a clean graphiti-runtime signal.\n- Durable upserts only queue for PROFILE/DATESPAN scope; session-only constraints do not populate durable store.\n\nOpen Items\n- To decide: keep #90 remediation in this PR or split into a dedicated follow-up PR.\n- To do: continue #96 AC validation and end-to-end Slack replay once backend mode is locked.\n- Blocked by: none.

@hugolytics
Copy link
Copy Markdown
Collaborator Author

Checkpoint (progress): ran #90 graphiti deployment/runtime audit and posted detailed evidence in issue #90.

Summary for this PR

  • Graphiti adapter in current code is local JSON-backed (not DB-backed) and needs explicit Canonical Graphiti memory cutover: Neo4j backend, no Mem0, no file artifacts #90 remediation to satisfy deployment ACs.
  • Latest incident logs for thread 1772956522.019509 show durable backend was mem0 at runtime, so prior durable_count=0 evidence is not yet a clean graphiti-runtime signal.
  • Durable upserts only queue for PROFILE/DATESPAN scope; session-only constraints do not populate durable store.

Open Items

@hugolytics
Copy link
Copy Markdown
Collaborator Author

Checkpoint (progress): #90-first remediation implemented in this branch.

Included in this checkpoint

  • Graphiti local JSON fallback removed from adapter path.
  • Graphiti runtime startup gate added to fail fast on unavailable/misconfigured graphiti dependency.
  • Config guardrails reject JSON fallback artifact path (graphiti_memory.json).
  • Runtime/core docs updated; targeted tests added/updated.

Validation evidence

  • Ruff checks: pass
  • Targeted tests: 37 passed

Open Items

@hugolytics
Copy link
Copy Markdown
Collaborator Author

Merge Handoff

This PR is the closure vehicle for issue #81.

Acceptance Criteria status

  • Graphiti backend config validation covered
  • Backend selection for timeboxing/tasks covered
  • Canonical/applicable durable retrieval behavior covered
  • Targeted validation subset passed (46 passed)

Validation run

  • poetry run pytest tests/unit/test_settings_mcp_endpoints.py tests/unit/test_timeboxing_memory_backend_selection.py tests/unit/test_task_defaults_memory.py tests/unit/test_constraint_retriever.py tests/unit/test_timeboxing_durable_constraints.py -q

No-code-loss instructions

  1. Merge this PR to main before trying to land PR Codex/issue-91-option3-session-constraints #106.
  2. Treat this PR as the baseline stack layer; do not assume PR Codex/issue-91-option3-session-constraints #106 can replace it.
  3. After merge, retarget/rebase PR Codex/issue-91-option3-session-constraints #106 onto main and verify its diff contains only #91 follow-on scope.
  4. Close issue #81 only after this PR merge is complete and referenced in the close comment.

Open Items

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