Skip to content

Colony-Layout Infrastructure Migration

Status: complete as of Milestone 5, 2026-08-22.

The migration is a clean cut. Migrated local infrastructure has no fallback, shadow authority, or compatibility reader in the generic infrastructure plan/build-order architecture.

Final ownership

Owner Responsibility Persistent authority
Colony Layout Permanent fixed local geometry, including core, Labs, Extension pods, local Containers, Extractor, and operational Links RoomMemory.infrastructure.colonyLayout
Logistics Road Planning Persistent route-derived local arterial geometry RoomMemory.logisticsRoadPlanning
Unified Local Road Intent Derived merge of colony-layout lanes and logistics arterial routes None; computed on demand
Local Construction Bounded, live-safe execution of colony-layout structures and unified local Roads localConstructionExecution, localRoadConstructionExecution, and localConstructionApprovals
Remote Operations Remote source Containers and remote Roads Retained remote plans/orders plus remoteRoadRoutes
Defense infrastructure Wall and Rampart planning and construction Retained defense plans/orders

InfrastructureManager remains the cadence and safety orchestrator for the surviving remote/defense planner, logistics road-planning admission, focused local construction, link-network summaries, and bounded diagnostics. It does not generate migrated-local planned structures, build orders, or packages.

Removed architecture

Milestone 5 removed:

  • fixed-local plannedStructures and buildOrders, including all local Road copies;
  • Extension, colony-layout Extension, and Lab work packages and their proposal, reconciliation, approval, execution, debug, stats, serialization, and compaction code;
  • compatibility use of approved local orders/packages as local-construction approval tokens;
  • debug.infrastructurePackages, package approval aliases, debug.colonyLayoutRollout, and debug.colonyLayoutMigration;
  • colony-layout rollout and one-at-a-time Extension migration runtime state, including retiring-Extension hauling compatibility;
  • the local-road forwarding manager and old infrastructure-to-logistics road Memory bridge;
  • package counters, package progress telemetry, package codecs, and dead type variants.

Local manual approval is now exact and exclusive:

RoomMemory.infrastructure.localConstructionApprovals[itemId]

The stored fingerprint must match the current desired item. Legacy order or package approval cannot authorize a local placement.

One-time Memory cleanup

infrastructureCutoverCleanupVersion = 1 gates a bounded cleanup in utils/infrastructureCutover. It runs once when infrastructure Memory is initialized and then has no recurring scan cost.

The cleanup filters mixed dictionaries by purpose. It deletes all plan/order purposes except:

remote-source-container
remote-road
critical-rampart
defensive-wall

It also deletes the legacy work-package dictionary and these transitional fields when present:

authorityMigrationVersion
localRoadConsumerCutoverVersion
workPackageChildSchemaVersion
workPackageFingerprintSchemaVersion
workPackageTerminalSchemaVersion
colonyLayoutRollout
colonyLayoutExtensionMigration
localRoadPlacement
routeRoadIntents
routeIntegrationLastEvaluatedAt
routeRoadIntentFingerprintSchemaVersion
routeRoadIntentGeometrySchemaVersion

localRoadPlacement is moved once to localRoadConstructionExecution only when the latter is absent. Package/order approval references removed by the cleanup are invalidated.

The cleanup deliberately preserves:

  • colonyLayout and all current planner/validation state;
  • localConstructionExecution, localRoadConstructionExecution, and localConstructionApprovals;
  • RoomMemory.logisticsRoadPlanning;
  • remote source-container plans/orders and remote operation association;
  • remoteRoadRoutes and their approvals, paths, endpoints, and placement state;
  • Wall/Rampart plans/orders;
  • link-network runtime summaries, Lab operational reservation state, dirty cadence, events, and retained remote/defense stats.

The cleanup is idempotent. Runtime writers exclude every migrated-local purpose, the package writers no longer exist, and local Roads execute directly from unified intent, so deleted records cannot regenerate on a later evaluation.

Runtime and operator inspection

Use these owner-specific surfaces for local infrastructure:

debug.colonyLayout(roomName)
debug.localConstruction(roomName)
debug.logisticsRoutes(roomName)

debug.infrastructurePlan(roomName) now describes the retained generic remote/defense plan/order surface and shared orchestration health. Remote Roads retain debug.remoteRoads; defense remains visible through debug.defense and the retained plan/order inspection commands.

Verification

The focused cleanup verifier is:

npm run verify:infrastructure-cutover

It covers mixed-record filtering, exact preservation boundaries, cleanup versioning and idempotence, linked-order and approval-ticket invalidation, retained remote/defense records, preservation of current execution state, and source-level non-regeneration.

Run the companion verifiers to cover the completed ownership split:

npm run verify:infrastructure
npm run verify:infrastructure-authority
npm run verify:infrastructure-road-integration
npm run verify:local-road-planning
npm run verify:local-construction
npm run verify:infrastructure-memory
npm run verify:infrastructure-reconsideration
npm run verify:remote-container-recovery
npm run verify:remote-construction
npm run verify:remote-roads

Authority verification executes compiled policy methods with the real approval, fingerprint, and compaction helpers. It checks exact fixed/road approvals, rejection of legacy approval tokens, mode transitions, retained order revision and identity boundaries, and remote Roads remaining manual. Road verification covers derived geometry/provenance, focused placement, bounded cached arterial planning, and deployed module ownership. Local construction covers live facts, RCL and site limits. Retained remote lifecycle checks cover visibility, identity, approval, revalidation, and recovery. Some integration checks remain source-level contracts; these commands are not a live colony simulation.

These focused commands are additional to the normal required checks; check does not run the whole infrastructure suite. Normal completion also requires:

npm run build
npm run check

New deployed modules introduced by the final cut are utils/colonyLayoutIntent and utils/infrastructureCutover. The obsolete managers/localRoadConstruction and utils/colonyLayoutMigration modules are no longer uploaded.