Skip to content

domain-architecture.md still documents the pre-controller filter API #511

Description

@richardthe3rd

Summary

docs/code/domain-architecture.md documents a filtering API that no longer exists. Every symbol it names in the filter sections was removed when filter state moved into DrinkFilterController, and the drift widened again with #505 and #506.

Stale references

Line(s) Documented Reality
71, 83, 190, 441 DrinkFilterService.applyAllFilters(...) filterDrinks(...)
186, 206, 299 BeerProvider._applyFiltersAndSort() DrinkFilterController.recompute()
192 category: _selectedCategory categories: _selectedCategories (a Set<String> since #506)
195 hideUnavailable: _hideUnavailable visibilityFilters: Set<DrinkVisibilityFilter>

The worked example at lines 184–200 therefore does not compile against the current code, and the "before/after refactoring" narrative at 206 and 299 describes a refactor that has since been superseded twice.

Also missing entirely: the facet-scoping rule and its two invariants introduced in #505, which is now the load-bearing contract of DrinkFilterController and is currently documented only in that class's doc comment.

Fix

Rewrite the filter portions against the current code:

  • DrinkFilterService.filterDrinks with its real named parameters
  • DrinkFilterController.recompute() as the single recompute path
  • the facet-scoping rule (a facet is derived with every other structural filter applied, never its own), the "an active filter is never hidden" invariant, and the deliberate exclusion of free-text search from facet scoping

Alternatively, if the file has been superseded by the architecture-contract skill, retire it per the docs lifecycle rather than leaving a stale copy in docs/.

Impact

Low — no runtime effect. But it is actively misleading: a reader following it would write against three removed APIs, and it is the kind of drift that silently trains agents on the wrong shape of the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions