Skip to content

Derive extends' merge policy from KeySpec#47

Merged
lesnik512 merged 4 commits into
mainfrom
worktree-derive-extends-merge-policy
Jul 13, 2026
Merged

Derive extends' merge policy from KeySpec#47
lesnik512 merged 4 commits into
mainfrom
worktree-derive-extends-merge-policy

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Summary

  • KeySpec (keys.py) gains a merge field, baked in automatically by the _list()/_map() factories, so a future _list/_map key can't silently skip extends support.
  • extends.py now derives concat/merge semantics for the 8 SERVICE_KEYS-shaped keys from spec.merge instead of a hand-copied _MERGE_KEYS/_CONCAT_KEYS set, closing a silent-drift failure mode (a forgotten extends.py entry used to degrade "concatenate" to "last writer wins" with no error).
  • As a side effect, list-form labels/annotations (e.g. labels: ["team=core"]) now merge correctly across extends — previously an untested gap that raised UnsupportedComposeError.
  • The 9 remaining structural keys (no KeySpec: environment, extra_hosts, healthcheck, depends_on, secrets, configs, volumes, tmpfs, env_file) keep their existing hand-maintained sets, shrunk and commented, deferring unification per decisions/2026-07-12-reject-structural-key-registry.md.

Full rationale: planning/changes/2026-07-13.05-derive-extends-merge-policy-from-keyspec.md.

Test plan

  • just test-ci — 401 passed, 100% line coverage
  • just lint-ci — clean (ruff format/check, ty, eof-fixer, planning check)
  • Two task-scoped subagent reviews (spec + quality), both approved with no Critical/Important findings
  • Final whole-branch review — ready to merge, only Minor doc-drift findings, fixed

…rge change

The Task 2 implementer could not find this file (it existed only as an
uncommitted file in the main checkout, which the worktree's fresh base ref
did not carry over) and reconstructed a shorter version from context,
losing the Motivation, Non-goals, and Risk sections. Restore the original,
already-reviewed design content; the finalized summary line is unchanged.
… design doc

Final review caught two drift spots in the design file: illustrative code
snippets still showed the 2-arg merge(base, local) signature superseded
during implementation by the 4-arg (name, key, base, local) form, and the
structural-key count said 8 instead of 9.
@lesnik512 lesnik512 merged commit e58edbe into main Jul 13, 2026
7 checks passed
@lesnik512 lesnik512 deleted the worktree-derive-extends-merge-policy branch July 13, 2026 13:10
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