Skip to content

test(gate): activate every activatable plugin, not just book-club#239

Merged
fabiodalez-dev merged 2 commits into
mainfrom
test/gate-activate-all-plugins
Jul 8, 2026
Merged

test(gate): activate every activatable plugin, not just book-club#239
fabiodalez-dev merged 2 commits into
mainfrom
test/gate-activate-all-plugins

Conversation

@fabiodalez-dev

@fabiodalez-dev fabiodalez-dev commented Jul 8, 2026

Copy link
Copy Markdown
Owner

The book-club activation failure (#233) reached a real install because the gate never activated the plugin. The same blind spot exists for every other bundled plugin, and for any added in the future.

Adds test 6 to plugin-integrity.spec.js: it enumerates the plugins from the DB and activates every one that isn't active yet through the real /admin/plugins/{id}/activate endpoint, asserting onActivate/ensureSchema succeeds (a failure comes back as {success:false, "Schema activation failed for: <table>"}) and that it ends up active. The list is read from the DB, so a plugin added later is covered automatically.

Why plugin-integrity and not full-test: it's a dedicated, plugin-focused spec that already runs post-install AND post-upgrade in both CI and scripts/reinstall-test.sh (Test A + Test B), and it isn't hostage to full-test's 20-phase serial chain.

The three external-API plugins (discogs/deezer/musicbrainz) are excluded — test 4 already documents that their onActivate throws when the CI host is offline, so they stay opt-in. (An earlier draft of this PR tried to activate all inactive plugins inside full-test; that would have failed on exactly those three.)

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@fabiodalez-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9976d3f4-9217-4286-b00f-3a74ba5a1b6f

📥 Commits

Reviewing files that changed from the base of the PR and between f66b016 and 863f7c3.

📒 Files selected for processing (2)
  • tests/full-test.spec.js
  • tests/plugin-integrity.spec.js
📝 Walkthrough

Walkthrough

Aggiunto un nuovo blocco di test end-to-end (Phase 19.5) in tests/full-test.spec.js che valida l'attivazione di tutti i plugin inattivi tramite l'admin panel, verificando successo della risposta API e stato is_active nel DB per ciascun plugin.

Changes

Test attivazione plugin

Layer / File(s) Summary
Setup suite e test di attivazione plugin
tests/full-test.spec.js
Nuova suite seriale con login admin e skip condizionale; il test estrae i plugin con is_active = 0, recupera il CSRF token e attiva ciascun plugin via POST a /admin/plugins/{id}/activate, verificando success nella risposta e is_active = 1 nel DB, fallendo se qualche attivazione non riesce.

Estimated code review effort: 1 (Trivial) | ~5 minuti

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Il titolo descrive chiaramente il gate di test che attiva tutti i plugin, non solo book-club.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/gate-activate-all-plugins

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…t just book-club

The book-club activation failure (#233) reached a real install because the gate
never activated the plugin. The same blind spot exists for every other bundled
plugin, and for any added in the future.

Add a check to plugin-integrity.spec.js (test 6) that enumerates the plugins from
the DB and activates every one that isn't active yet, asserting its onActivate/
ensureSchema succeeds (a failure comes back from the activate endpoint as
{success:false,"Schema activation failed for: <table>"}) and that it ends up active.
The list is read from the DB, so a plugin added later is covered automatically.

This lives in plugin-integrity rather than full-test on purpose: it's a dedicated,
plugin-focused spec that already runs post-install AND post-upgrade in both CI and
scripts/reinstall-test.sh (Test A + Test B), and it isn't hostage to full-test's
20-phase serial chain. The three external-API plugins (discogs/deezer/musicbrainz)
are excluded — test 4 already documents that their onActivate throws offline, so
they stay opt-in.
@fabiodalez-dev fabiodalez-dev force-pushed the test/gate-activate-all-plugins branch from f66b016 to 656655b Compare July 8, 2026 23:12
@fabiodalez-dev fabiodalez-dev changed the title test(gate): activate every bundled plugin in the suite, not just book-club test(gate): activate every activatable plugin, not just book-club Jul 8, 2026
…ner's

full-test's todayISO()/futureISO() built the date from new Date()'s local fields,
i.e. in the runner's timezone. CI runners are UTC; the app validates reservation
start dates against DateHelper::today() in the app timezone (Europe/Rome by default).
When CI runs late in the UTC day, UTC "today" is Rome's yesterday, so the server
rejects the reservation as past_date and Phase 15.2 "Request loan" fails — a real,
time-of-day-dependent flake unrelated to any code change (it passes when CI runs
earlier in the UTC day). Three consecutive 23:xx-UTC runs reproduced it 3/3.

Format both dates in Europe/Rome via Intl so the test's "today" matches the server's
regardless of the runner clock. Verified: at 23:30 UTC the helper now returns Rome's
date (next calendar day) instead of the UTC day.
@fabiodalez-dev

Copy link
Copy Markdown
Owner Author

Bundled a second, unrelated fix into this branch because it was blocking the CI from ever going green: full-test's todayISO()/futureISO() computed the reservation date in the runner timezone (UTC in CI) while the server validates it against DateHelper::today() in the app timezone (Europe/Rome). When CI runs late in the UTC day, UTC "today" is Rome's yesterday → the server rejects the reservation as past_date → Phase 15.2 "Request loan" fails. It reproduced 3/3 on 23:xx-UTC runs and passes when CI runs earlier — a pre-existing, time-of-day flake, not caused by the plugin-integrity change. Both dates are now formatted in Europe/Rome via Intl.

@fabiodalez-dev fabiodalez-dev merged commit 4b0b823 into main Jul 8, 2026
6 checks passed
@fabiodalez-dev fabiodalez-dev deleted the test/gate-activate-all-plugins branch July 8, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant