Skip to content

feat(config): compose runtime config files#461

Merged
wolfy-j merged 1 commit into
mainfrom
feat/lock-local-overlay
Jul 15, 2026
Merged

feat(config): compose runtime config files#461
wolfy-j merged 1 commit into
mainfrom
feat/lock-local-overlay

Conversation

@skhaz

@skhaz skhaz commented Jul 9, 2026

Copy link
Copy Markdown
Member

Why

Runtime environments need to compose settings without mutating the shared project baseline or inventing reserved local filenames. Workspace checkout paths are runtime/environment state, while wippy.lock remains the portable exact dependency snapshot.

What

--config is now repeatable on runtime commands:

wippy run \
  --config .wippy.yaml \
  --config .wippy.dev.yaml \
  --config config/postgres-history.yaml \
  --config .wippy.workspace.yaml \
  --profile workspace
  • Files merge left to right; later files override matching leaves and preserve unrelated settings.
  • Every explicitly selected file must exist. With no --config, .wippy.yaml remains the optional default.
  • The first file remains the project/config-directory anchor for relative runtime paths. The complete absolute list is exposed as boot.config_paths.
  • Profiles apply after file composition, in requested order. CLI overrides such as --set apply last.
  • Filenames have no reserved meaning, no overlay is auto-discovered, and wippy init does not modify ignore rules.
  • Logger preloading uses the same ordered stack, so bootstrap logging and runtime boot cannot disagree.

Any selected config can declare environment state, including multiple workspace replacements:

version: "1.0"

profiles:
  workspace:
    workspace:
      replacements:
        wippy/runtime: ../runtime
        acme/ui: ../ui

wippy run, install, update, lint, registry commands, and packing all consume the same composition path.

Dependency and history behavior

  • wippy.lock remains the portable exact module/version snapshot. Effective workspace replacements alter the load graph but are never serialized into the lock.
  • Existing tracked lock replacements remain readable for compatibility and emit a deprecation warning directing users to runtime configuration.
  • Replacement paths resolve relative to the first runtime config and must identify directories.
  • The dependency handler snapshots effective lock/replacement state at boot. Replacement trees are rehashed before history reuse, preventing changed or missing local sources from being mistaken for a stored baseline.

Publishing safeguards

  • The runtime --config stack is not a publishing input; publish --config remains the module-manifest directory option.
  • workspace configuration is unconditionally removed from published runtime metadata.
  • publish.profiles.include explicitly selects publishable non-workspace profiles. include: [] publishes none; an unknown profile fails.
publish:
  profiles:
    include: [production]

For compatibility, omitting include keeps the previous behavior for non-workspace profiles only.

Validation

  • go test ./...: pass.
  • Focused race tests for config loading and CLI composition: pass.
  • make lint: clean.
  • Production binary build: pass.
  • Binary smoke: three arbitrary config files + profile + final --set boot successfully; a missing explicit file fails immediately.
  • Publishing isolation and workspace-stripping regression tests: pass.

@skhaz
skhaz requested a review from wolfy-j July 9, 2026 19:22
@wolfy-j
wolfy-j force-pushed the feat/lock-local-overlay branch from 6852712 to 4d6212e Compare July 15, 2026 00:46
@wolfy-j wolfy-j changed the title feat(lock): wippy.lock.local overlay for local replacement overrides feat(workspace): local replacements through runtime profiles Jul 15, 2026
@wolfy-j
wolfy-j force-pushed the feat/lock-local-overlay branch from 518c1df to 55dd6b0 Compare July 15, 2026 01:25
@wolfy-j wolfy-j closed this Jul 15, 2026
@wolfy-j
wolfy-j deleted the feat/lock-local-overlay branch July 15, 2026 01:26
@wolfy-j
wolfy-j restored the feat/lock-local-overlay branch July 15, 2026 01:26
@wolfy-j wolfy-j reopened this Jul 15, 2026
@wolfy-j wolfy-j changed the title feat(workspace): local replacements through runtime profiles feat(config): compose local runtime overlays Jul 15, 2026
@wolfy-j
wolfy-j force-pushed the feat/lock-local-overlay branch from 55dd6b0 to 9e186a9 Compare July 15, 2026 01:53
@wolfy-j wolfy-j changed the title feat(config): compose local runtime overlays feat(config): compose runtime config files Jul 15, 2026
Co-authored-by: Wolfy-J <wolfy.jd@gmail.com>
@wolfy-j
wolfy-j force-pushed the feat/lock-local-overlay branch from 9e186a9 to 2626d84 Compare July 15, 2026 02:05

@wolfy-j wolfy-j left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: configuration composition, dependency/history behavior, publishing isolation, cross-platform tests, and integration with #471 are ready.

@wolfy-j
wolfy-j merged commit 91fe1e6 into main Jul 15, 2026
4 checks passed
@wolfy-j
wolfy-j deleted the feat/lock-local-overlay branch July 15, 2026 02:18
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.

2 participants