Skip to content

Move dictionary storage, PostgreSQL and agent workspaces to the external 2 TB drive — execution in #211 #209

Description

@holden

Objective and priority

Execution now coordinated by #211: carry out the storage move by building and using the repeatable setup/restore process from #130. Preserve the current installation as the comparison baseline until the external installation passes exact-state and usability verification. See #211 for the executable stages and shared acceptance evidence.

Current sequence: complete the consolidation/preservation and migration-safety checkpoint, then execute #211. Full Routing Stage 2 acceptance is not a prerequisite; unfinished #194 work resumes after relocation. Capacity, data-preservation and recovery checks remain mandatory.

Move dictionary's source code, Git/worktrees, PostgreSQL databases, datasets, builds, recovery artifacts and project-related agent storage to the secondary 2 TB external drive chosen by the owner. Configure future tasks, worktrees and tests to use that drive so the internal drive does not fill again.

Owner decision: for dictionary, this replaces the previous instruction to keep source code and PostgreSQL internal. Update the applicable project guidance during migration. Other projects keep their own storage policies.

This issue defines the work; creating it does not mean the migration has happened. Detailed machine inventories and operational evidence remain in local private artifacts.

Scope

  • Repository, Git metadata, branches, unpushed commits, local edits and all dictionary worktrees.
  • Development and retained test/recovery databases, including their identities, references, schema, sequence state, ownership and grants.
  • Downloaded source data, local archives, backups, audit evidence, attachments and necessary ignored files.
  • Project-related agent sessions, logs, memories and artifacts where supported.
  • Future agent working directories, build/dependency caches, test databases, logs and temporary outputs.
  • Saved project paths, environment configuration, launchers, hooks and automation references.
  • README, project/agent instructions and a storage operations runbook.

Identify shared resources before changing them. Preserve unrelated projects and shared credentials. Where a tool cannot isolate dictionary state, document a supported relocation strategy or an explicit, measured exception; do not silently exclude large agent stores.

Stage 1 — Inventory and preserve active work

  • Record each dictionary storage location, its owner, logical/allocated size, destination and disposition: active, retain/archive, or confirmed regenerable.
  • Inventory Git/worktree registrations and locks, active agents, unpushed/detached commits, dirty/untracked files and necessary ignored data. A merged PR does not by itself make a checkout disposable.
  • Map databases to actual owners and current use. A name prefix alone is not deletion authority.
  • Inventory saved agent project/session paths and shared-state constraints without exporting secrets or transcript contents.
  • Verify the destination's actual mounted identity, filesystem, permissions and capacity. A directory under a mount path is not proof that the intended drive is mounted.
  • Coordinate a maintenance window with relevant agents, application processes and database writers. Stop services through their owning launcher/terminal and verify their state.
  • Preserve verified rollback artifacts externally. When internal capacity is critically low, establish initial headroom through verified relocation of inactive artifacts or confirmed regenerable caches before large builds or database operations.

Exit: every source has a disposition; active work is preserved; the destination is verified; the move fits within measured capacity.

Stage 2 — Move source, worktrees and agent storage

  • Preserve repository history, unpushed commits, edits, file modes, symlinks and needed ignored artifacts. A fresh clone alone is insufficient.
  • Use supported Git and agent-app relocation mechanisms; repair and verify worktree/common-directory references when paths change.
  • Use Codex's managed archive/recovery tools for genuinely retired managed worktrees, preserving needed ignored files separately.
  • Update saved project roots, shells, editors, launch settings, hooks, permissions and automation paths.
  • Configure future dictionary worktrees, caches, logs and temporary outputs externally. Keep concurrent agents' writable build outputs isolated.
  • Preserve existing session continuity and verify both a resumed dictionary session and a newly created task/worktree.
  • Use supported controls for agent-state relocation. Do not rewrite live shared metadata databases or relocate unrelated project state blindly.
  • Any temporary compatibility symlink needs a documented lifetime and a mount check that prevents silent internal fallback.

Codex documents a configurable Worktree root under Settings → Worktrees. Its broader local state also includes configuration and authentication, so moving the repository alone is insufficient. Verify the installed app's supported behavior and setting scope: worktree storage, configuration/state locations.

Exit: local work and session continuity survive, and new dictionary tasks actually write to external storage.

Stage 3 — Move dictionary PostgreSQL data

  • Identify shared-cluster boundaries. Prefer a dedicated external dictionary cluster when relocating a shared cluster would affect other projects.
  • Match the required PostgreSQL version, extensions, encoding, locale/collation, ownership, grants and permissions.
  • Use consistent backups and explicitly isolated restore destinations. Never copy individual database files out of a running shared cluster.
  • Preserve exact identities, references, sequences, migration state, routing history and curation approvals. Storage relocation must not rebuild, re-materialize or reclassify the corpus.
  • Compare source and destination at the same schema/data state using complete manifests, key sets and reference fingerprints; row counts alone are insufficient.
  • Account for unresolved recovery-tool findings in PR Stage 2 recovery: rehearse on the development corpus, then repair and re-run (#194) #208. Prove the source and destination endpoints differ and do not rely on an unverified source-protection claim.
  • Update every dictionary client: development, active worktrees, test configuration/private partitions, scripts, background jobs and recovery tools.
  • Ensure there is one intended writable endpoint after cutover. Preserve any destination writes if rollback becomes necessary; switching back to an older source is not a lossless rollback.

Reference: PostgreSQL logical backup guidance.

Exit: exact state preservation, healthy application/jobs, verified client configuration and a usable rollback procedure.

Stage 4 — Verify operation and prevent internal fallback

  • Run relevant tests and mix precommit from the external checkout on an isolated external test database; record the revision and results.
  • Exercise normal reads, representative writes, jobs, source-file access and recovery verification without unrelated feature changes or publication.
  • Restart services and relevant agent launchers; confirm saved paths and database configuration still work.
  • Verify missing/wrong/unwritable-drive startup refuses clearly and creates no replacement internal directories, database or checkout.
  • Test absence through controlled configuration or clean shutdown/unmount procedures, never by unplugging a live database volume.
  • Measure representative build/test/query performance and both drives' storage growth. Resolve unexpected internal writes.
  • Demonstrate backup restoration from the new setup and document an independent backup destination/retention policy. A second copy on the same physical drive does not cover drive failure.

Exit: normal operation and restart work externally; missing storage is handled safely; recovery is demonstrated.

Stage 5 — Reclaim space and document the new default

  • Remove superseded internal copies only after successful copy verification and cutover.
  • Drop only individually verified inactive dictionary databases through PostgreSQL; never remove files from a shared cluster manually.
  • Reconcile old worktree registrations and saved paths using the owning tools. Preserve in-use/pinned/shared work until accounted for.
  • Retain recovery evidence and backups according to the recorded retention plan.
  • Report actual before/after free space, bytes reclaimed, remaining dictionary paths and all accepted internal exceptions. Set and meet an explicit operating-headroom target from the measured workload.
  • Update README, applicable AGENTS/Claude/Codex instructions, setup hooks, database/test configuration and recovery documentation. Reconcile contradictory internal-storage guidance in related handoffs, including Local curation runtime: persistent Ollama service, pinned models and bounded Req inference #195/Local curation portability: measured Mac Studio to Mac Mini handoff #199 where applicable.
  • Commit a storage runbook covering canonical roots, mount checks, startup/shutdown, new-agent/worktree setup, test isolation, backup/restore, retention and rollback.
  • Obtain independent verification before closing this blocker. Post the completion evidence and updated handoff to Routing before launch: On overviews, standards-informed namespaces, and stable subject URLs #194.

Definition of done

All identified dictionary bulk storage and future dictionary work use the external drive, with explicit accepted exceptions for unavoidable small shared metadata. Active code/session history and exact database state are preserved. Unrelated projects remain operational. Restart, missing-drive and restore checks pass. Internal space has actually been reclaimed, and documentation agrees with the running setup.

The consolidation/preservation and migration-safety checkpoint is the prerequisite to executing this migration under #211; full Routing Stage 2 remains separate. Migration success does not close routing #194 or grant reader/publication approval; those remain later stages.

Copyable implementation prompt

Own the combined repeatable-setup and dictionary storage migration specified in #211, using this issue and #130 as requirement sources. First verify the consolidation/preservation and migration-safety checkpoint; full Routing Stage 2 acceptance is not required before relocation. Read current main, the latest routing recovery audit and applicable project instructions. The owner's new direction is external storage on the chosen 2 TB drive, superseding the earlier internal-drive preference for dictionary. Inventory and preserve active work first; then carry out the staged source/worktree/agent and database migration, exact verification, client cutover, restart/recovery checks and verified cleanup. Protect unrelated shared resources, retain rollback evidence, prevent silent internal fallback and configure future tasks/tests externally. Update README, instructions and the storage runbook. Deliver a reviewable change set and measured completion report, then hand back to the next routing stage.

Curation runtime checkpoint available — 2026-09-27

The in-flight #195 runtime proof has reached its preservation checkpoint in PR #210, head cb2e236917c67286dc13c67c5ab2258bb87d9feb: 32 planned benchmark calls recorded, nine CodeRabbit threads resolved and both checks green. Independent audit/merge remain outstanding. This is not completion of routing Stage 2. Current execution follows #211 after the consolidation and migration-safety checkpoint.

The Ollama endpoint is stopped; weights/binary/runtime home and temp are already external. Preserve the pushed branch, committed benchmark packets/results, exact model identities and the two isolated evidence databases devils_dictionary_runtime_bench and devils_dictionary_runtime_bench_b in the migration inventory. Do not delete them as disposable tests without accounting for their audit evidence. The service's database/cluster authority binding must be deliberately reconciled after database relocation; copying its old binding file is not sufficient verification.

Internal capacity at this check was about 4.6 GiB. No further inference, full-suite database creation or large recovery run was launched by the status assessment. Verify capacity before heavy work; read-only review and non-disruptive migration inventory can continue meanwhile. No migration or cleanup has been started by this update.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions