Skip to content

Fix BugOrBroken resolving a delayed merge inside a concatenated list piece (#751) - #878

Open
kastoestoramadus wants to merge 2 commits into
lightbend:mainfrom
kastoestoramadus:fix/delayed-merge-replace-in-parent
Open

kastoestoramadus wants to merge 2 commits into
lightbend:mainfrom
kastoestoramadus:fix/delayed-merge-replace-in-parent

Conversation

@kastoestoramadus

@kastoestoramadus kastoestoramadus commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Draft stack, merge order #878 → #879 → #880 → #881 → #882; each branch contains the ones before it.

TLDR: A duplicate key whose later value is a substitution, inside a list that is a piece of a concatenation, no longer throws BugOrBroken: replaceChild did not find SimpleConfigList. Fixes #751.

ConfigConcatenation was missing from the substitution source's parent chain, so the delayed merge looked for its list one level too high. It now joins the chain like other containers.

Two regression tests in ConcatenationTest fail on main with that error.

Generated with GLM-5.3-Flash/effort not exposed through Claude Code

kastoestoramadus and others added 2 commits October 5, 2026 16:43
…end#751)

Resolving the issue lightbend#751 config crashes with BugOrBroken
'SimpleConfigObject.replaceChild did not find SimpleConfigList' when a
duplicate key with a substitution (a delayed merge) sits inside a list
that is a piece of a value concatenation. Add regression tests for the
optional and the defined strict substitution variants.

Co-Authored-By: GLM-5.3-Flash/effort not exposed through Claude Code <noreply@anthropic.com>
…htbend#751)

Resolving a delayed merge inside a container that is a piece of a value
concatenation threw BugOrBroken 'SimpleConfigObject.replaceChild did not
find ...' (issues lightbend#751, also hit by lightbend#339's crash): the concatenation was
never pushed onto ResolveSource's parent chain, so when the delayed merge
replaced itself within its parent, the walk up the chain skipped the
concatenation and tried to replace the container directly in its
grandparent, where it cannot be found.

ConfigConcatenation implements Container with working replaceChild and
hasDescendant; resolveSubstitutions now pushes itself onto the source's
parent chain like other containers do.

Co-Authored-By: GLM-5.3-Flash/effort not exposed through Claude Code <noreply@anthropic.com>
@kastoestoramadus

kastoestoramadus commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

TLDR: Superseded. The follow-up described here is no longer needed: #882 no longer has its own lookup view, so it does not conflict with this PR's pushParent(this).

@kastoestoramadus

kastoestoramadus commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

TLDR: Stack of 5 drafts, #878 → #879 → #880 → #881 → #882; each branch contains the ones before it.

They change the same resolver code, so a fix to a lower PR must be re-stacked into the ones above it: please do not rebase or force-push one branch alone. If the stack is hard to review, I can close them and open one combined draft from the head of #882 (each fix stays a test commit plus a fix commit).

This branch has not been deployed

No deployments
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.

null substitution in array with concatenation

1 participant