Skip to content

feat(config)!: drop is_shared from IaC; ToBlockDefinitions replaces ToBlocks/ToBlock - #48

Merged
BSick7 merged 4 commits into
masterfrom
fix/is-shared-tristate
Sep 11, 2026
Merged

BSick7 merged 4 commits into
masterfrom
fix/is-shared-tristate

Conversation

@BSick7

@BSick7 BSick7 commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

nullfire's IaC block sync overwrote every block column from the parsed config.yml, including is_shared. Because the yaml key parsed to a plain bool, a block shared in the UI was un-shared on the next sync unless the yml also said is_shared: true.

Furion had explicitly removed isShared from block sync in March 2025 (furion #135), so from then until the NUL-24 port the yaml key was parsed and ignored. It was never documented. Sharing is a UI decision (POST shared_blocks), not an IaC one.

What

  • Breaking: is_shared is removed from yaml.BlockConfiguration and config.BlockConfiguration. The decoder is lenient, so a stray is_shared: in an existing config.yml still parses; it just has no effect, as it had none in the furion era.
  • New EnvConfiguration.ToBlockDefinitions is the single public way to flatten config.yml blocks. Each BlockDefinition wraps the flat types.Block with only IaC-governed fields set; it is a struct so declared-only information can be added later without another API change.
  • EnvConfiguration.ToBlocks and the exported per-type ToBlock methods are removed; per-type flattening is an unexported toBlockDefinition. Known callers (nullfire sync, CLI iac test) move in the PRs below.

Consumers

  • nullstone-io/nullfire #567 — sync only the block fields config.yml declares; never IsShared
  • nullstone-io/nullstone #683 — CLI reads blocks via ToBlockDefinitions

…om false

- yaml + config IsShared become *bool; nil means the file did not declare it
- ToBlock still collapses nil to false for callers that only need the flat block
- add EnvConfiguration.ToBlockDefinitions, which carries the tristate alongside
  each flattened block; ToBlocks is now a view over it
@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Go Tests

121 tests  +3   121 ✅ +3   0s ⏱️ ±0s
  8 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit b46aaa5. ± Comparison against base commit 409e714.

♻️ This comment has been updated with latest results.

…efinitions

One entry point for flattening config.yml blocks keeps every consumer on the
same view; callers that only need the API shape read Block off each definition.
…inition

ToBlockDefinitions is now the only public way to flatten config.yml blocks;
the tristate is_shared is attached where the flat block is built.
@BSick7 BSick7 changed the title fix(config): make is_shared tristate so syncs can tell unspecified from false fix(config): tristate is_shared; ToBlockDefinitions replaces ToBlocks/ToBlock Sep 11, 2026
Furion removed isShared from block sync in March 2025 (furion #135), so the
yaml key has been parsed-and-ignored since. It was never documented. Removing
it from the yaml and config layers makes that explicit; the lenient decoder
still accepts a stray is_shared key without error.

BlockDefinition stays as the ToBlockDefinitions element type so declared-only
information can be added later without another API change.
@BSick7 BSick7 changed the title fix(config): tristate is_shared; ToBlockDefinitions replaces ToBlocks/ToBlock feat(config)!: drop is_shared from IaC; ToBlockDefinitions replaces ToBlocks/ToBlock Sep 11, 2026
@BSick7
BSick7 merged commit ddfc80f into master Sep 11, 2026
2 checks passed
@BSick7
BSick7 deleted the fix/is-shared-tristate branch September 11, 2026 00:21
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