Mission Control

Artifacts

K
← Back to artifacts

UAS Database First-Class Domain Tranche 1 Handoff

Implementation HandoffCompleteCreated Apr 27, 20263 min readFull screen ↗

Tranche 1 is now live. Mission Control is reading the UAS Database from the new canonical root at data/uas-database/, the first-class domain module split is in place under mission-control/lib/uas-database/, migration and manifest plumbing are active, and a focused test covers both migration smoke behavior and core load/save conflict handling. The legacy phase-1 root is still retained for safety, but normal runtime reads now resolve to the canonical UAS Database root.

What changed

Canonical data root

  • Created canonical root: data/uas-database/
  • Materialized a copy-and-verify migration from the legacy root: data/lantronix-uas-workbench-phase1/
  • Preserved the legacy root in place for rollback safety
  • Added manifest: data/uas-database/manifest.json
  • Added migration receipt: data/uas-database/migrations/0001-tranche-1-copy-and-verify.json

Domain module split

The former monolithic store now has first-class UAS domain modules:

  • mission-control/lib/uas-database/paths.ts
  • mission-control/lib/uas-database/helpers.ts
  • mission-control/lib/uas-database/manifest.ts
  • mission-control/lib/uas-database/migration.ts
  • mission-control/lib/uas-database/records.ts
  • mission-control/lib/uas-database/validation.ts
  • mission-control/lib/uas-database/relations.ts
  • mission-control/lib/uas-database/queries.ts
  • mission-control/lib/uas-database/service.ts

Compatibility shim retained:

  • mission-control/lib/uas-database-store.ts

That shim now forwards the public list/detail/update surface to the new service layer so the existing UI and API routes continue to work without a route rewrite.

Test coverage added

  • Added tranche-1 test: mission-control/tests/uas-database/tranche1.test.mts
  • Added npm script: npm run test:uas-database

The test covers:

  • canonical root migration from a legacy-shaped temp dataset
  • manifest creation and migration receipt verification
  • list and detail loading through the new service layer
  • company save behavior
  • stale write conflict rejection

Files changed

Data root

  • data/uas-database/manifest.json
  • data/uas-database/migrations/0001-tranche-1-copy-and-verify.json
  • data/uas-database/records/**
  • data/uas-database/schema/**
  • data/uas-database/docs/**
  • data/uas-database/scripts/**

Mission Control

  • mission-control/lib/uas-database-store.ts
  • mission-control/lib/uas-database/manifest.ts
  • mission-control/lib/uas-database/migration.ts
  • mission-control/lib/uas-database/records.ts
  • mission-control/lib/uas-database/relations.ts
  • mission-control/lib/uas-database/queries.ts
  • mission-control/lib/uas-database/service.ts
  • mission-control/lib/uas-database/validation.ts
  • mission-control/package.json
  • mission-control/tests/uas-database/tranche1.test.mts
  • mission-control/tsconfig.json

Migration result

Canonical runtime root now resolves to:

  • /Users/vinny/.openclaw/workspace/data/uas-database

Manifest values:

  • dataset: uas-database
  • schema_version: 1
  • migration_version: 1
  • canonical_root: data/uas-database
  • legacy_root: data/lantronix-uas-workbench-phase1
  • compatibility.legacy_root_retained: true

Live route validation confirmed the list API is now serving from the canonical root, not the legacy path.

Validation

Automated

Command run:

  • npm run test:uas-database

Result:

  • passed

Build and runtime

Commands run:

  • npm run build
  • npm run service:restart

Live checks passed:

  • GET /api/uas-database/companies
  • GET /api/uas-database/companies/company:birdseyeview-aerobotics
  • /uas-database
  • /uas-database/companies/company:birdseyeview-aerobotics

Runtime confirmations:

  • list API reports meta.dataRoot = /Users/vinny/.openclaw/workspace/data/uas-database
  • detail API reports canonical meta.dataRoot
  • detail API no longer exposes the removed resolvedEvidenceDigest layer
  • company.evidence.source_ids remains present and intact for traceability
  • list and detail pages return HTTP 200

Remaining gaps

Tranche 1 is complete, but the larger first-class-domain plan still has future work:

  • no staging-to-canonical review flow yet
  • no commit-backed history helper for accepted canonical changes yet
  • no expanded operator docs yet
  • legacy-root fallback and retention are still present by design
  • broader test coverage beyond the tranche-1 smoke/load-save path still needs tranche 3

Recommendation

Move JAM-48 to needs-review and assign Pete. Tranche 1 is ready for review.

Recommended next build target after review:

  • Tranche 2, staging and promotion workflow