Skip to content

v1.122.0: namespaced config file naming with legacy fallback#87

Merged
TheAbider merged 1 commit into
masterfrom
config-namespaced-naming
Jul 17, 2026
Merged

v1.122.0: namespaced config file naming with legacy fallback#87
TheAbider merged 1 commit into
masterfrom
config-namespaced-naming

Conversation

@TheAbider

Copy link
Copy Markdown
Owner

Adopts the namespaced config-file naming convention: the base config becomes rackstack.config.json and company overrides become <company>.rackstack.config.json, with full backward compatibility.

What changes

  • Per-file resolution order: rackstack.config.json is used when it exists; otherwise a legacy defaults.json is still read. The same rule applies to each company file (<company>.rackstack.config.json preferred over <company>.defaults.json), with the new name winning when both exist. _companyDefaults selection and multi-company support are unchanged.
  • Writes follow the loaded file: the in-tool defaults editor and save picker persist to whichever file was resolved, so legacy setups keep working in place. New installs (first-run wizard) create the new name.
  • Company discovery (Get-CompanyDefaultsFiles) enumerates both schemes, deduped per company key. Also fixes a latent array-nesting bug that collapsed multiple company files into one picker entry.
  • UI labels show the actually-loaded filename instead of a hard-coded name.
  • Exit cleanup removes config files under both schemes, company files, and crash-leftover .tmp siblings; the wildcard sweeps are gated to directories identifiable as the tool's own home so a shared folder is never glob-swept.
  • Example template renamed to rackstack.config.example.json (release asset list updated in the same change).
  • .gitignore ignores both schemes; the tracked example stays tracked.
  • Docs: README, CONTRIBUTING, SECURITY, ROADMAP, docs/, issue templates, and the assurance case updated; company config files are now documented including the fallback rules.
  • Tests: new section covering resolution order (behavioral), dual-name company discovery (behavioral), cleanup gating, .gitignore, and release-asset pins. Suite: 5402 structural + 312 Pester, all passing; PSSA 0 errors.

Compatibility

No action needed for existing deployments: a machine with only defaults.json (or <company>.defaults.json) continues to load and save that file. Renaming the file to the new scheme opts in at any time.

The base config is now rackstack.config.json and company overrides are
<company>.rackstack.config.json, so the files stay unambiguous when the
EXE or monolithic script runs from a shared folder. Fully backward
compatible: legacy defaults.json and <company>.defaults.json are still
read whenever the new-named file is absent (per file), and the tool
keeps saving to whichever file it loaded.

- Get-RackStackConfigPath resolves the base config once at init
  (prefer new name, fall back to legacy, create new name when neither
  exists); the first-run wizard and defaults editor write through the
  resolved path
- Get-CompanyDefaultsFiles discovers company files under both naming
  schemes, deduped per company key with the new name winning; also
  fixes a latent bug where the returned array nested inside callers'
  @() wrappers and collapsed multiple companies into one entry
- Save picker, menus, and prompts show the actually-loaded filename
- Exit cleanup removes config files under both schemes plus company
  files and crash-leftover .tmp siblings; the company-file wildcard
  sweeps are gated to directories identifiable as the tool's own home
  so shared folders are never glob-swept
- Example template renamed to rackstack.config.example.json and the
  release asset list updated to match
- .gitignore covers both schemes; the tracked example stays tracked
- Docs, wiki-facing guides, issue templates, and the config guide
  updated; company config files now documented with the fallback rules
- New test section covers resolution order, dual-name company
  discovery, cleanup gating, .gitignore, and release-asset pins
@TheAbider
TheAbider merged commit f49f3ae into master Jul 17, 2026
6 checks passed
@TheAbider
TheAbider deleted the config-namespaced-naming branch July 17, 2026 05:06
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant