Skip to content

docs(decisions): decline folding ContextRegistry into Container#330

Merged
lesnik512 merged 1 commit into
mainfrom
decline-fold-context-registry
Jul 15, 2026
Merged

docs(decisions): decline folding ContextRegistry into Container#330
lesnik512 merged 1 commit into
mainfrom
decline-fold-context-registry

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Records the ruling on Candidate 5 from the 2026-07-15 architecture review after grilling: keep ContextRegistry as its own module; do not fold it into Container.

ADR: planning/decisions/2026-07-15-fold-context-registry-declined.md.

Why decline

  • It's a documented, symmetric node in a deliberate model. architecture/containers.md has a "Registry sharing" section organizing the four registries by shared-across-tree (ProvidersRegistry, OverridesRegistry) vs per-container (CacheRegistry, ContextRegistry). ContextRegistry sits symmetric with CacheRegistry — not incidental co-location.
  • The deletion test is misleading here. The ~18 lines of code-complexity vanish if folded, but the conceptual slot doesn't: Container still has per-container context state; folding just turns a named registry into an unnamed inline dict, breaks the containers.md table, and grows the already-largest file.
  • Zero actual friction — no bug hides in the one-line delegation, and context is not a change hot-path.

Revisit trigger: the four-registry model is restructured, or concrete friction emerges in the Container → ContextRegistry delegation.

Closes out the review: candidates 1, 2, 4 built; 3 and 5 declined with ADRs. No code change. just check-planning passes.

🤖 Generated with Claude Code

Record the ruling on Candidate 5 from the 2026-07-15 architecture review: keep
ContextRegistry as its own module.

Though it is the shallowest of the four registries (~18 lines, a dict wrapper),
containers.md documents a deliberate shared-vs-per-container model in which
ContextRegistry sits symmetric with CacheRegistry as one of the two per-container
registries. Its shallowness reflects less mechanism, not a broken abstraction.
The deletion test is misleading: the code-complexity vanishes, but the conceptual
slot does not — folding turns a named registry into an unnamed inline dict,
breaks a documented table, and grows the largest file for ~18 lines with zero
actual friction. Revisit trigger: the four-registry model is restructured, or
concrete friction emerges in the delegation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 merged commit 602724b into main Jul 15, 2026
7 checks passed
@lesnik512 lesnik512 deleted the decline-fold-context-registry branch July 15, 2026 15: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