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.
Summary
docs/code/domain-architecture.mddocuments a filtering API that no longer exists. Every symbol it names in the filter sections was removed when filter state moved intoDrinkFilterController, and the drift widened again with #505 and #506.Stale references
DrinkFilterService.applyAllFilters(...)filterDrinks(...)BeerProvider._applyFiltersAndSort()DrinkFilterController.recompute()category: _selectedCategorycategories: _selectedCategories(aSet<String>since #506)hideUnavailable: _hideUnavailablevisibilityFilters: 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
DrinkFilterControllerand is currently documented only in that class's doc comment.Fix
Rewrite the filter portions against the current code:
DrinkFilterService.filterDrinkswith its real named parametersDrinkFilterController.recompute()as the single recompute pathAlternatively, if the file has been superseded by the
architecture-contractskill, retire it per the docs lifecycle rather than leaving a stale copy indocs/.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.