Skip to content

fix(migration): swap obsolete --primary/--fallback for --backend in L3 scripts#34

Merged
DarkCodePE merged 1 commit into
mainfrom
chore/fix-l3-migration-flags
May 18, 2026
Merged

fix(migration): swap obsolete --primary/--fallback for --backend in L3 scripts#34
DarkCodePE merged 1 commit into
mainfrom
chore/fix-l3-migration-flags

Conversation

@DarkCodePE
Copy link
Copy Markdown
Owner

Summary

ruflo >=3.7.0-alpha.67 collapsed the old --primary <backend> --fallback <backend> flag pair into a single --backend <backend> flag (verify with ruflo memory configure --help). The L3 migration and rollback scripts still called the old form, which the new CLI silently ignores — so step 7 (cutover) and rollback step 2 became no-ops while the scripts reported SUCCESS.

Why this matters

Per the L3 runbook (MIGRATION-PG.md step 7), cutover is what actually flips the repo from sql.js to RuVector. With the stale flag, the migration would complete, the new schema would be populated, but ruflo memory store/search would keep hitting .swarm/memory.db. The rollback path had the symmetric bug.

Discovered during a real migration attempt this turn: ruflo memory configure --primary ruvector --fallback sqljs returned no error but did nothing.

Changes

File Step Before After
scripts/migrate-l2-to-l3.sh 7 (cutover) --primary ruvector --fallback sqljs --backend ruvector
scripts/rollback-l3.sh 2 (revert) --primary sqljs --fallback none --backend sqljs
docs/arquetipo/deliverables/memory/MIGRATION-PG.md §7 same swap same swap

A short comment near each call explains the flag collapse so future readers don't reintroduce the old form.

Out of scope

Five additional references to the obsolete flags live in historical research/design docs under docs/arquetipo/sprint5/ and docs/arquetipo/research/. Per surgical-changes rule, those are point-in-time records from sprint 5 and were not touched:

  • docs/arquetipo/research/b10-memory-strategy.md:362
  • docs/arquetipo/sprint5/architecture-design.md:310, 334
  • docs/arquetipo/sprint5/research-findings.md:464, 491

If we want a clean sweep, that's a separate doc-archive PR.

Behavior change to acknowledge

The new --backend flag has no "fallback" concept; fallback selection is now runtime-implicit. The runbook line was updated to reflect this. If a teammate relied on the explicit dual-backend chain, this is the moment to surface that.

Test plan

  • bash -n scripts/migrate-l2-to-l3.sh passes.
  • bash -n scripts/rollback-l3.sh passes.
  • bash scripts/migrate-l2-to-l3.sh --dry-run shows the new command: [dry-run] ruflo memory configure --backend ruvector.
  • Real migration end-to-end against a populated .swarm/memory.db and a healthy ruvector-postgres container (deferred to follow-up turn; container is up and healthy, schema claude_flow.embeddings still pending creation).

Co-Authored-By: claude-flow ruv@ruv.net

…3 scripts

ruflo >=3.7.0-alpha.67 collapsed the dual flag pair into a single
--backend flag (memory configure --help). Migration and rollback
scripts were calling --primary/--fallback, which the new CLI
silently ignores, leaving steps 7 (cutover) and step 2 (rollback)
as no-ops. The migration would report SUCCESS while the repo
remained on the prior backend.

Updates:
- scripts/migrate-l2-to-l3.sh step 7: --backend ruvector
- scripts/rollback-l3.sh step 2: --backend sqljs
- docs/arquetipo/deliverables/memory/MIGRATION-PG.md §7: same swap

Out of scope (historical research docs in sprint5/, not actionable
runbooks): docs/arquetipo/research/b10-memory-strategy.md:362,
sprint5/architecture-design.md:310,334, sprint5/research-findings.md:464,491.

Verified: bash -n on both scripts, dry-run shows correct flag.

Co-Authored-By: claude-flow <ruv@ruv.net>
@DarkCodePE DarkCodePE merged commit bb4052e into main May 18, 2026
2 of 3 checks passed
@DarkCodePE DarkCodePE deleted the chore/fix-l3-migration-flags branch May 18, 2026 14:41
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