Skip to content

Runtime-first Core, persistence, and package boundary cleanup#48

Draft
tdeverx wants to merge 51 commits into
nightlyfrom
tdeverx/core-optimization-design-system-boundary
Draft

Runtime-first Core, persistence, and package boundary cleanup#48
tdeverx wants to merge 51 commits into
nightlyfrom
tdeverx/core-optimization-design-system-boundary

Conversation

@tdeverx

@tdeverx tdeverx commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Warning

This is a large breaking draft PR for the runtime-first app/database foundation. Keep it unmerged until the maintainer accepts the manual Xcode/UI pass and the runtime-provider posture.

Summary

Reshapes Contained around a runtime-first, package-first architecture. ContainedCore owns backend/runtime contracts and concrete adapter modules, ContainedApp owns app state, persistence, localization, settings, and feature policy, ContainedUI owns reusable visual primitives, and ContainedUX owns reusable interaction infrastructure.

The current release posture keeps Apple container as the only built-in runtime registered by default. Docker adapter code, fixtures, and tests remain in Core under Runtimes/Docker, but Docker is dormant until Contained chooses an independent provider/daemon model instead of depending on Docker Desktop.

Diff Check Against nightly

At pushed head 56037ab1:

  • Base: origin/nightly
  • Branch: tdeverx/core-optimization-design-system-boundary
  • Size: 444 files changed, 43,287 insertions, 14,923 deletions
  • Main areas: package extraction, Core runtime abstraction, dormant Docker adapter groundwork, runtime-first SwiftData persistence, runtime-scoped app stores, Xcode workspace/project, docs/wiki restructuring, release workflow hardening, AppKit containment, grouped form cleanup, volume/mount wiring, and generated in-bundle release notes.

Key Updates

  • Adds Packages/ContainedCore as the single backend/orchestration package with Core.* APIs, runtime descriptors/capabilities, command previews, typed package errors, semantic Core localization, canonical schema/Compose contracts, migration planning, metrics, image/registry helpers, and runtime-scoped models.
  • Moves runtime implementation behind module boundaries: shared registry and contracts live under Core Runtime/, while concrete runtime behavior lives under Runtimes/AppleContainer and Runtimes/Docker.
  • Keeps Docker unregistered from the default runtime registry. Docker commands, translators, fixtures, and direct adapter tests remain available for explicit injection, but the app no longer probes Docker, shows Docker settings, or offers Docker action targets by default.
  • Adds the runtime-first app database under Sources/ContainedApp/Persistence/AppDatabase, including runtime, container, recipe, image/tag, volume, network, personalization, history, health, readiness, and last-seen state records.
  • Rewires app stores and workflows so containers/images/volumes/networks carry runtimeKind, lifecycle/logs/stats/terminal/files/edit actions route through the originating runtime, and multi-runtime flows do not rely on a stored/global default runtime.
  • Tightens Core schema ownership: canonical field definitions are runtime-neutral, runtime support/disabled/tip behavior comes from runtime profiles, and Docker no longer derives profile copy from Apple strings.
  • Splits Compose parsing into focused helpers while keeping canonical parsing in Core and runtime-specific projection under runtime modules.
  • Adds/updates container migration planning, runtime-scoped IDs, partial inventory reporting, unsupported-runtime handling, and explicit readiness states.
  • Moves reusable visuals into Packages/ContainedUI with nested UI.* routes, contextual tokens, colocated previews, and package-internal Shared helpers for repeated implementation anatomy.
  • Moves reusable navigation/layout/morph primitives into Packages/ContainedUX, including safe-area management, source-frame measurement, panel placement, and single-surface morph behavior.
  • Fixes the container-card morph regression by using runtime-scoped container IDs for measured frames and expanded-card lookup.
  • Contains remaining AppKit to approved bridge surfaces: material/vibrancy, SwiftTerm terminal hosting, and app platform host actions. Feature views use SwiftUI file APIs, selectable/copyable text, openURL, and sensoryFeedback where available.
  • Updates run/edit/settings/volumes wiring around grouped native forms, volume-linked paths, mount access modes, runtime-neutral command previews, and capability-driven runtime settings without doing a final visual redesign.
  • Consolidates repo automation under Scripts/, replaces old change-fragment flow with Changes/Current.md and Changes/Beta.md, moves maintained docs under Documentation/, and refreshes package README/DocC/wiki sync surfaces.

Issue Links

Closes #32.
Closes #33.
Closes #34.
Closes #35.
Closes #36.

Partially addresses #4, #14, #17, #18, and #24.

Related but intentionally not closed:

  • Add optional app-owned OCI image cache #50 remains the backlog issue for the optional app-owned OCI image cache. V1 keeps runnable image stores runtime-owned and only shares registry/search/update metadata.
  • Persistent Docker Compose stack management #14 remains the follow-up for persistent Docker Compose stack management. This PR adds canonical Compose parsing/runtime projection and recipe foundations, but not durable stack orchestration.
  • Tune Swift CodeQL so it can run reliably #24 remains open for Swift CodeQL reliability/per-PR suitability. This PR addresses workflow hygiene around path filters, repository validation, and job timeouts, but not the deeper Swift CodeQL tuning question.

Out Of Scope

  • Docker Desktop or OrbStack integration.
  • Contained-owned Docker daemon/VM provider work.
  • Docker Compose stack orchestration.
  • Direct Docker Engine API use.
  • Cross-runtime image-store unification.
  • Optional app-owned OCI blob/archive cache.
  • Final visual polish/manual UI acceptance pass.

Latest Verification

Local verification on July 4, 2026, at pushed commit 56037ab1:

  • swift build
  • swift test
  • swift test --package-path Packages/ContainedCore
  • ./Scripts/check.sh all
  • git diff --check
  • swift test --filter DesignSystemBoundaryTests

Earlier branch verification also covered focused package tests, release-note/script fixtures, bundle validation, debug bundling, and Xcode app wiring. The latest pass did not relaunch the app for manual UI testing.

Current CI Snapshot

After pushing 56037ab1:

  • CodeQL: passing.
  • Actions analysis: pending.
  • Swift CodeQL analysis: skipped by policy.
  • PR workflow: pending when this body was refreshed.

Merge Note

This branch is intentionally large and breaking. Keep the manual Xcode/UI polish pass separate unless it exposes functional wiring bugs.

@tdeverx tdeverx changed the title [codex] Extract design system and optimize stats base Extract design system and optimize stats base Jul 2, 2026
@tdeverx tdeverx linked an issue Jul 2, 2026 that may be closed by this pull request
26 tasks
@tdeverx tdeverx self-assigned this Jul 2, 2026
@tdeverx tdeverx added this to the beta milestone Jul 2, 2026
@tdeverx tdeverx changed the title Finish package boundaries, native Xcode, and runtime foundations Finish Core/UI/UX package foundation and native Xcode workflow Jul 3, 2026
@tdeverx tdeverx changed the title Finish Core/UI/UX package foundation and native Xcode workflow Add runtime-first database and Docker runtime foundation Jul 3, 2026
@tdeverx tdeverx changed the title Add runtime-first database and Docker runtime foundation Add runtime-first database, Docker runtime, and design-system hardening Jul 3, 2026
tdeverx added 3 commits July 3, 2026 12:45
Move runtime behavior behind module contracts, make routing/readiness explicit, and update app/database wiring plus coverage.
@tdeverx tdeverx changed the title feat(runtime): add Docker runtime and modular app foundation feat(runtime): modular app foundation and runtime Jul 3, 2026
@tdeverx tdeverx changed the title feat(runtime): modular app foundation and runtime Runtime-first Core, persistence, and package boundary cleanup Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment