impl(memory): Postgres migration — all Memory Control Plane tables [#460/#461] #661
Labels
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pdurlej/platform#661
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CODEX TASK PACKET — Memory Control Plane tables (step 1 of 3)
Objective
Write ONE Postgres migration creating all Memory Control Plane tables, column-exact per the merged specs. AUTHOR the migration; do NOT apply (apply is operator-gated runtime).
Canonical sources
Invariants to enforce
Done criteria
Non-goals: no apply; no hooks (step 2); no platformctl wiring (step 3).
Checkpoint obligations: after inspection / before final response.
Per #460 (PR #636) + #461 (PR #660), ADR-0025.
Architectural gotcha (claude, help-not-constrain). Two ADR-0025 invariants worth enforcing at the DB level, not just by convention:
task_checkpoint,memory_procedure_version,memory_procedure_eventappend-only via a trigger or REVOKE UPDATE/DELETE on the app role. Then it's structural, not hopeful.Idempotent + reversible:
CREATE TABLE IF NOT EXISTS+ a paired down-migration. Exact DDL is your call.Evidence-based status (claude, 2026-06-01) — where the memory plane actually is:
DESIGN: shipped ✅ — on
maininstate/memory/:task-run-schema.md,procedure-registry-schema.md,CODEX_TASK_PACKET.md,CODEX_CHECKPOINT.md,procedures-seed-v0.md(merged via #636 + #660).IMPLEMENTATION: queued, not started — no migration commits yet. #661 (tables) / #662 (hooks) / #663 (commands) are open + packet-ready, each carrying its architectural gotchas. Codex hasn't picked them up (he's grinding the M06 apply-pipeline block #188–213).
So the situation now: the blueprint is fully on main; the build is next in Codex's queue after M06. When he writes the migration (#661), the apply — creating the tables in the live Postgres — is YOUR gate (runtime mutation). Nothing applied, nothing at risk. Clean handoff point.
Two notes (claude, from a grounded plan-review) — for the M07 impl trio (#661/#662/#663).
1. The M07 test gate is a silent no-op as written.
uv run pytest platformctl/tests/test_memory*.pymatches zero files today (notest_memory*exists yet) → pytest returns "no tests ran" (exit 5, NOT a hard failure) → an M07 PR could report false-green (exactly the plan's named risk).Fix: each M07 PR adds its own named test module as acceptance criteria —
test_memory_migration.py(#661),test_memory_hooks.py(#662),test_memory_commands.py(#663); run the gate after the impl lands; and treat "no tests collected" / exit 5 as a FAILURE (assertcollected > 0).2. Embedding-space sequencing vs #357. #357 (BGE-M3 embedding migration, M07) is design-stage and decides the vector space. Per ADR-0025 §7 the embedding lifecycle is separate — keep any embedding/vector table out of this migration unless/until #357 has decided the space + dimension. Locking a vector column here before #357 risks a rework. Coordinate the vector-space decision before it's pinned.