Skip to content

chore: remove the quality-tier API nothing drives - #134

Merged
N1k4G merged 1 commit into
mainfrom
chore/128-remove-dead-quality-api
Aug 24, 2026
Merged

chore: remove the quality-tier API nothing drives#134
N1k4G merged 1 commit into
mainfrom
chore/128-remove-dead-quality-api

Conversation

@N1k4G

@N1k4G N1k4G commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Closes #128. Adaptive quality is not planned, so per that issue's decision the dead API goes rather than being wired.

What was dead

setQualityTier() and placementCount had no callers anywhere in src, tests or scripts, and neither was on the SceneRenderer interface, so nothing could reach them polymorphically either. #qualityTier was initialised to "high" and never changed, so the tier path in the renderer never executed.

Left in place that is worse than no API. A reader finding setQualityTier() reasonably concludes quality adapts — it does not. placementCount documented two consumers, "tests and the diagnostics overlay", neither of which exists.

What stays, and why

The tier machinery underneath is real and works:

Tier Assets Dropped below it
low 18 — cars, lorries, containers, engine, helm, cave columns, anchor, warning sign
medium +10 towels, umbrellas, soft corals, gorgonians, light shafts, bunks, netting
high +1 the reef fish shoal

Every asset declares a minimumQualityTier, buildSceneLayers filters on it, and tierAllows is tested as a pure function. Callers just always pass "high". That is now a named constant with the reasoning attached, so whoever wires adaptation later finds the filtering already built and tested, and only needs something that decides a tier — a frame budget, a device probe, or a user setting.

The tiering is also sensibly ordered, which is worth preserving: things a diver navigates by survive, decoration goes first. Dropping the wreck to low removes dressing but leaves every structural landmark.

Record corrected

docs/decisions.md listed quality tiers among the PixiJS scene's delivered properties. Removed, so the record matches the code.

The mention in docs/baseline/README.md stays — that is a field to record when benchmarking a device, not a claim that adaptation works.

Verification

typecheck, lint, sites:check, 133 unit, 28 parity, 36 e2e.

The Pixi visual guard reports 0% changed pixels on all three scenes, which is the expected result of changing how an unchanged value reaches the layer factory — and the first time that guard has been used to confirm a refactor is visually inert rather than to catch a regression.

Closes #128. Adaptive quality is not planned, so per that issue's decision the
dead API goes rather than being wired.

setQualityTier() and placementCount had no callers anywhere in src, tests or
scripts, and neither was on the SceneRenderer interface, so nothing could reach
them polymorphically either. #qualityTier was initialised to "high" and never
changed, which meant the tier path in the renderer never executed.

Left as-is that is worse than no API: a reader finding setQualityTier()
reasonably concludes quality adapts, and placementCount documented two
consumers — tests and a diagnostics overlay — that do not exist.

The tier machinery underneath is real and stays. Every asset declares a
minimumQualityTier, buildSceneLayers filters on it, and tierAllows is tested as
a pure function; callers just always pass "high". That is now an explicitly
named constant with the reasoning attached, so whoever wires adaptation later
finds the filtering already built and only needs something that decides a tier.

Also drops "quality tiers" from the delivered-properties list in
docs/decisions.md, so the record matches the code. The mention in
docs/baseline/README.md stays: that is a field to record when benchmarking, not
a claim that adaptation works.

The Pixi visual guard confirms the frames are byte-identical, which is the
expected result of changing how an unchanged value reaches the layer factory.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@N1k4G N1k4G added the enhancement New feature or request label Aug 24, 2026
@github-actions github-actions Bot added the release:none No GitHub release should be created label Aug 24, 2026
@N1k4G

N1k4G commented Aug 24, 2026

Copy link
Copy Markdown
Owner Author

Reviewed 0b58be3: no findings. The dead setter/getter and mutable field are removed without disturbing marker pooling; the layer factory remains explicitly pinned to the tested high tier; and the delivered-properties record now matches the product decision. Pixi visual guard: 0% changed pixels on all three scenes. Focused asset/layer tests: 38/38 passed. Current CI is green.

@N1k4G
N1k4G merged commit c520030 into main Aug 24, 2026
7 checks passed
@N1k4G
N1k4G deleted the chore/128-remove-dead-quality-api branch August 24, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release:none No GitHub release should be created

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Cleanup] setQualityTier() and placementCount have no callers

1 participant