Skip to content

docs(plan): QA-fix plan for the 2026-06-26 Havaya QA report - #89

Merged
cryptolir merged 2 commits into
mainfrom
docs/qa-fixes-plan-2026-06-26
Jun 27, 2026
Merged

cryptolir merged 2 commits into
mainfrom
docs/qa-fixes-plan-2026-06-26

Conversation

@cryptolir

Copy link
Copy Markdown
Owner

What

Plan document (for codex review before implementation) addressing every finding from the 2026-06-26 manual QA pass on app.havaya.me + life v2026.06.20.2. Lands in docs/experiments/plans/qa-fixes-2026-06-26.md. It spans two repos — this PR is the review surface; the code PRs follow in app.havaya and openclaw after review.

Findings & fixes (root causes verified against prod logs + the Graphiti server)

# Issue Severity Root cause Fix
1 Custom summary method dropped (4C) HIGH parseTitleDate() strips all content before the TITLE line. Prod logs: method was sent (methodChars=134) and the model did emit the marker — the parser deletes it. Extract TITLE/DATE without discarding other lines (app.havaya) + node:test.
2 Memory not recalled across chats (4A) HIGH Saving works (add_episode succeeded on the test date); retrieval is discretionary, no deterministic injection. Deterministic MEMORY_RECALL.md injection mirroring the app_profile bootstrap (openclaw) + vitest.
3 Google Doc raw-edit blocked (5C) LOW By design — updateTextFile rejects Google Docs (415). Small UX guard: editable flag + disabled Save w/ note.
4 Home owner-note/videos (E) docs/data Videos render on /journey by design; owner-note hidden when unset. Fix the guide; verify with data.
5 QA guide nav docs Stale /drive/admin/, /life, me.havaya.app in the report. URLs callout + move videos check to Journey.
6 5A/5C/6C/D blocked process No test data. Clean account, .txt transcript, folder w/ summary, unread chat.

Two of the report's own hypotheses (DB-wiring for #1, save-failure for #2) were disproven by the evidence and corrected in the plan.

🤖 Generated with Claude Code

Plan (for codex review) addressing all findings from the 2026-06-26 manual QA
pass on app.havaya.me + life v2026.06.20.2. Covers both repos:

- [HIGH] custom summary method dropped: parseTitleDate strips pre-TITLE content
  (app.havaya); prod logs confirm the method was sent + the marker emitted.
- [HIGH] durable memory not recalled across chats: saving works (add_episode
  succeeds), retrieval is discretionary -> add a deterministic MEMORY_RECALL.md
  injection mirroring the app_profile bootstrap (openclaw).
- Google Doc raw-edit is by-design (415); small UX guard.
- home owner-note/videos = docs/data, not a bug; QA-guide nav fixes; test-data
  enablement for the blocked cases.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@cryptolir

Copy link
Copy Markdown
Owner Author

@codex please review this plan (not code — a plan doc). It addresses the 2026-06-26 Havaya QA findings across two repos. Focus on: (1) Issue 2 — the deterministic MEMORY_RECALL.md injection design (group-id parity with the life-memory-scope hook, fail-open/timebox on the per-turn bootstrap path, TTL cache, reuse of the app_profile bootstrap pattern); (2) Issue 1 — the parseTitleDate rewrite (keep TITLE/DATE extraction while preserving leading/body content). Flag any risk, simpler approach, or missing edge case before we implement.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e2a0401abb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +75 to +79
1. **New** `src/agents/graphiti-recall-client.ts` — a small server-side streamable-HTTP MCP client that
calls Graphiti `search_memory_facts` directly (bypassing the agent tool loop). Mirror the
handshake/SSE-parse in `ops/graphiti-life/proxy/graphiti-proxy.js`
(`initialize` → `notifications/initialized` → `tools/call`; headers incl. `Host: localhost:8000`;
target `GRAPHITI_URL` default `http://graphiti-mcp:8000/mcp`). Use `fetch` + `AbortController`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep Graphiti recall behind an explicit scope boundary

Because this plan talks directly to graphiti-mcp rather than the existing proxy, the current safety mapping in ops/graphiti-life/proxy/graphiti-proxy.js is no longer on the path. For this direct bootstrap client, explicitly require the same buildUpstreamCall behavior for search_memory_facts (group_ids: [groupId], no caller-supplied group_id/group_ids/center_node_uuid, and fail closed on unsafe group ids), or call a server-side proxy helper instead; otherwise a small implementation miss can search the wrong/default scope even though the derived group id string itself is correct.

Useful? React with 👍 / 👎.

Comment on lines +85 to +87
App-sessions only; **timebox ~1.5-2.5s + fail-open** (any error/empty/no-scope → return files
unchanged, never block the turn); **short-TTL cache (~10 min, keyed by group id)** so it doesn't hit
Graphiti every turn.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Invalidate the recall cache after memory writes

A 10-minute cache keyed only by group id can reproduce the QA failure: if chat A builds MEMORY_RECALL.md, then the user saves a new goal, and chat B starts within the TTL, chat B receives the stale cached facts and still cannot recall the just-saved goal. Either skip caching for the first implementation, use a much shorter/per-turn cache, or add an invalidation path on successful Graphiti writes (add_memory/upstream add_episode) so cross-chat recall is immediate.

Useful? React with 👍 / 👎.

@cryptolir
cryptolir merged commit 3d76c11 into main Jun 27, 2026
18 of 20 checks passed
@cryptolir
cryptolir deleted the docs/qa-fixes-plan-2026-06-26 branch June 27, 2026 12:13
cryptolir added a commit that referenced this pull request Jun 27, 2026
…essions (QA 4A) (#90)

* feat(memory): deterministic durable-memory recall injection for app sessions

Report 4A: a goal saved in one app chat was not recalled in a new chat. Saving
works (verified: add_episode succeeded + search_memory_facts returns the fact);
the gap is retrieval — it is discretionary and the slim app prompt often skips
search_memory_facts at the start of a new chat.

Mirror the proven app_profile bootstrap: fetch the user's top durable facts
server-side and inject them as a synthetic MEMORY_RECALL.md context file every
turn (app sessions only), so recall no longer depends on the model searching.

- graphiti-recall-client.ts: read-only search_memory_facts over the streamable
  -HTTP MCP endpoint, mirroring the graphiti-proxy capability boundary — the only
  scope input is a server-derived groupId, unsafe ids fail closed, the call hard
  -sets group_ids:[groupId] and no caller group_id/group_ids/center_node_uuid can
  pass through. node:http (Host: localhost:8000) like the proxy; timeboxed.
- memory-recall-context.ts: appendMemoryRecallBootstrapFile — group id derived
  byte-identically to the life-memory-scope hook; ~2s timebox + fail-open; NO
  cross-turn cache (codex P2: avoid stale recall right after a write).
- bootstrap-files.ts: chain after appendAppProfileBootstrapFile (post-shaping).
- agents-md-memory-section.md: note that MEMORY_RECALL.md is pre-injected.
- 27 vitest (incl. wire/scope/timebox + hook group-id parity + fail-open + no
  -stale-cache). pnpm check (format + tsgo + lint) green.

Implements Issue 2 of docs/experiments/plans/qa-fixes-2026-06-26.md (#89).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* chore(fmt): clear pre-existing oxfmt 0.33.0 drift (unblock check)

oxfmt 0.33.0 flags two files this branch does not otherwise touch
(SKILL.md, the cron-generated bug_list.md) — identical to main, whose
older CI run passed. Reformat them so the `check` gate is green here.
Note: the daily bug_list autoscan cron will re-drift bug_list.md unless
it also formats / is ignored (separate follow-up).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Liran Peretz <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
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.

1 participant