chore(settings): roll phlix-shared v0.48.0 — the restart-flag audit now closes - #592
Conversation
…oses
v0.48.0 corrects the last 8 "restart": false keys. All 72 schema keys are now
traced to a consumer: 49 restart:true, 23 restart:false, none unverified.
These 8 were held back in v0.47.0 because a literal-key search found no
getEffective()/getOverride() consumer, and port-forward.upnp_enabled had just
shown that "no obvious consumer" can mean INERT rather than mis-flagged.
Tracing them explains the empty search: none is read through SettingsRepository
at all.
* webhooks.enabled / stats.enabled -- EffectiveConfig::file(). The call site
is per-request so it LOOKS live, but $overrides is a static array populated
once by bootstrap() (which runs in onWorkerStart) and file() memoises per
bootstrap generation. The data is a per-worker snapshot.
* transcoding.tone_mapping_mode / .prefer_hdr_output -- HwAccelConfig::get()
-> FfmpegRunner::setConfig(): the same path as
transcoding.preferred_accelerator, already restart:true.
* newsletter.enabled / .send_hour -- boot $config, read when the timer is
registered at worker start.
* relay.reconnect_delay / .ping_interval -- captured into the RelayConfig DI
factory.
No lock-in test broke this time. Adds the reasoning to
docs/dev/settings-restart-gap.md, including the EffectiveConfig::file() trap
(use-time call, boot-time data) and the restart-vs-reload distinction: the
admin Restart control is a graceful SIGUSR2 reload, and a key needing that
cycle is restart:true even though systemctl is not involved.
Also clarifies the StatsCollector and WebhookDispatcher docblocks so their
existing "applies on reload" wording cannot be re-read as "no restart needed"
-- that class of code/schema contradiction is what put the wrong flag on the
lastfm.* keys in the first place.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage ∅ diff coverage · 0.00% coverage variation
Metric Results Coverage variation ✅ 0.00% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (ecbc77f) 62907 41202 65.50% Head commit (cb8b5e3) 62907 (+0) 41200 (-2) 65.49% (0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#592) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #592 +/- ##
============================================
- Coverage 66.33% 66.32% -0.01%
Complexity 21322 21322
============================================
Files 663 663
Lines 67016 67016
============================================
- Hits 44453 44451 -2
- Misses 22563 22565 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Final part of the audit started in #585 and continued in #590. Companion to detain/phlix-shared#37 (v0.48.0).
All 72 schema keys are now traced to a consumer: 49
restart: true, 23restart: false, none unverified.Why these 8 were held back
#590 deliberately left them alone: a literal-key search found no
getEffective()/getOverride()consumer for any of them, andport-forward.port_forwarding.upnp_enabledhad just demonstrated that "no obvious consumer" can mean inert rather than mis-flagged. Guessing a flag would have been the same mistake twice.Tracing them explains the empty search — none of them is read through
SettingsRepositoryat all. Every one reaches its consumer by a route that snapshots per worker. None is inert.webhooks.enabledWebhookDispatcher::getConfig()→EffectiveConfig::file('webhooks')stats.enabledStatsCollector::isEnabled()→EffectiveConfig::file('stats')transcoding.tone_mapping_mode,prefer_hdr_outputHwAccelConfig::get()→FfmpegRunner::setConfig()transcoding.preferred_accelerator, alreadyrestart: true— sibling keys, same config file, same consumer, contradictory flagsnewsletter.enabled,send_hour$config['newsletter']relay.reconnect_delay,ping_intervalRelayConfig::class => factory(…)EffectiveConfig::file()at use time is not liveThis is what made two of these look correct, and it is worth stating plainly because it will catch the next person:
EffectiveConfig::$overridesis astaticarray populated once bybootstrap(), which runs insideonWorkerStart(six call sites instart.php), andfile()is memoised per bootstrap generation.So an override saved while a worker is running is invisible to that worker however often
file()is called. ContrastSettingsRepository::getEffective(), which does an uncachedSELECTper call and is genuinely live. That distinction is the entire line between the 23 keys that stayrestart: falseand everything else.On "restart" vs "reload"
restart: truehere means the admin Restart server control, which sends a graceful SIGUSR2 reload — workers cycle, re-runonWorkerStart, re-bootstrap the overlay, rebuild DI containers. A key needing that cycle isrestart: trueeven thoughsystemctlis not involved.StatsCollector::isEnabled()'s existing phrase "applies on reload without a full restart" is accurate and does not conflict with the flag — but it could easily be re-read as "no restart needed", so this PR adds a clarifying note there and inWebhookDispatcher::getConfig(). That exact class of code/schema contradiction is what left the wrong flag on thelastfm.*keys.Cross-check
The 23 keys remaining at
restart: falseare exactly the 23 this audit independently verified as correct (each resolving throughSettingsRepositoryat use time). The two lists matching is a clean confirmation that nothing was left unclassified.Verification
phpunit --testsuite Unitphpstan --level=9(changed src)phpcs --standard=PSR12(changed src)No lock-in test broke this time (unlike the v0.46.0 and v0.47.0 rolls, which each pinned a wrong flag in a test). Pin verified rather than assumed: locked ref
08f1b490is the v0.48.0 tag commit, and the vendored schema at that ref carries the flags.Production untouched — no data changed, no service restarted.
🤖 Generated with Claude Code