Repository navigation
refactor(notifications): raise the auto-update and pin-drift admin notifications through one NotifiesAdmins trait - #570
Merged
Conversation
…tions with a golden Assisted-by: ClaudeCode:claude-opus-5-5
…tifications through one NotifiesAdmins trait AutoUpdateNotifier::fireAll and PinDriftHandler::notifyAdmins carried the same linked per-admin notification loop. Both now describe their notification as an AdminNotice (object, subject, log line) and hand it to the shared trait. Assisted-by: ClaudeCode:claude-opus-5-5
…ler::handle Assisted-by: ClaudeCode:claude-opus-5-5
…ders; tag AdminNotice with its specs Assisted-by: ClaudeCode:claude-opus-5-5
Contributor
Quality Report — ConductionNL/versioniq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| composer | ✅ | ✅ 32/32 | |||
| npm | ❌ | ✅ 302/302 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| lockfile sync | ✅ | ||||
| PHPUnit | ✅ 923/923 · 7 skipped (8 legs) | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development. |
||||
| Hydra gates | ✅ |
Quality workflow — 2026-11-02 23:31 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AutoUpdateNotifier::fireAll(26 LOC, 4 params) andPinDriftHandler::notifyAdmins(29 LOC, 3 params) carried the same loop: build the admin settings link once, then for every admin create, address, describe and send a notification, logging a warning when one admin fails. That loop now lives once in theNotifiesAdminstrait. Each caller describes its notification as anAdminNotice(object, subject, link, log line and log context), built step by step with at most 2 parameters per step. Subjects, objects, links, log messages and log context keys are unchanged.NotifierTest::sentSubjectsreads the sent subjects from lib/ by pattern; it now also reads them from->withSubject('…'and the auto-update->notice('…'helper, so every subject still has to render.SIG numbers (gate 122, five-star profile, PHP, against development 1955bdd)
This adds about 29 lines of margin to the PHP duplication 5-star check that #568 brings within the limit. Every touched or new unit is within the 5-star unit bounds (at most 15 LOC, McCabe 4, 2 params), except the public
notifySuccess/notifyFailuresignatures (3 and 4 params), whichAutoUpdateJobcalls and which keep their shape. versioniq stays 37/44 at 4-star. Gate 122 ratchet: 0 findings (2 inherited constructors). Gate 123: 36 floored checks held.Verification
AdminNotificationsGoldenTest: 25 cases (success, failure and drift; no admin group, empty, two admins, a duplicate admin, a failure while addressing, while setting the subject and while sending; drift that matches the pin, is already recorded, or has no pin), comparing every group, URL, clock, notification-setter, send and logger call. Recorded on the old code; plain re-run green on old and new.withLinkmutating instead of cloning) is equivalent, because each notice is linked once. No-op control survived each round.--fail-on-risky: OK (907 tests). psalm on the whole project: no errors; php-cs-fixer flags only the inheritedRemoveRetiredCronJobspair. Hydra gates--scope-to-diff --base origin/development: exit 0.AI assisted (Claude Code); reviewed against the golden before opening.