fix: reconcile live deep-memory commit function#569
Conversation
|
Updates to Preview Branch (codex/deep-memory-live-reconcile) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe migration replaces the deep-memory commit function with input, producer, count, generation, and referential-integrity validation; reconciles staged rows and metadata; returns commit details; and limits execution to ChangesDeep memory reconciliation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant CommitFunction
participant StagedRows
participant MetadataPatch
Caller->>CommitFunction: submit deep-memory commit
CommitFunction->>StagedRows: validate and lock staged data
StagedRows-->>CommitFunction: validation results
CommitFunction->>StagedRows: reconcile committed and stale rows
CommitFunction->>MetadataPatch: apply document metadata patch
MetadataPatch-->>CommitFunction: metadata update result
CommitFunction-->>Caller: return commit summary
🚥 Pre-merge checks | ✅ 5 | ❌ 6❌ Failed checks (6 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Comment |
…eak-OR footgun Follow-through on the memory/task review. Cross-checked every tracked ongoing/recommended task against the current tree and updated the ledgers to match reality: - ingestion-concurrency-fix-workorder: mark deep-memory delete-scoping RESOLVED (producer-scoped model — migration 20260713030000 + #569 + deep-memory.ts cleanupStagedArtifacts). This doc now has no open repository items. - operator-backlog: close the drift-codify forward-migration row (step 1h) — the forward-codify work-order is complete (applied 2026-07-13). Add a new "apply repo-ahead migrations to live" verify row for the three committed-but-unapplied migrations (20260713201542, 20260714110000, 20260717120000). - audit-remediation-plan-2026-07-14: add a dated reconciliation block recording which findings are now DONE in code, which remain open (OWNER:CODE), which are in flight (PRs #708/#710), and which are operator-pending. Also fix a config footgun the review surfaced (audit finding F5): .env.example advertised RAG_TEXT_WEAK_OR_RELAXATION=true, but src/lib/env.ts defaults it to false because it is a known-regressive opt-in experiment (buries some correct docs after re-ranking). Align the example with the safe code default. Docs + one config default only; no runtime code or schema changed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Zbpyexer9cLgxhrB61RCU
Summary
commit_document_deep_memory_generationsupabase/schema.sqlWhy
After PR #568 was applied, live drift fell from two function mismatches to one. The enrichment function reconciled, but the deep-memory function remained unchanged because the first forward migration repeated the older migration body rather than the canonical schema body. This migration applies the exact manifest-backed definition.
Verification
npx supabase db push --linked --dry-run: only20260713090500_reconcile_deep_memory_commit.sqlwould applygit diff --check: passedSafety
Function-only
CREATE OR REPLACEplus service-role ACL reassertion. No table DDL, row mutation, backfill, or raw SQL apply.