Skip to content

fix(audit): log many-to-many collection changes on summit, sponsor and venue rooms and add coverage guard - #671

Open
romanetar wants to merge 5 commits into
fix/audit-m2m-promo-codesfrom
fix/audit-m2m-summit-sponsor-venue
Open

romanetar wants to merge 5 commits into
fix/audit-m2m-promo-codesfrom
fix/audit-m2m-summit-sponsor-venue

Conversation

@romanetar

@romanetar romanetar commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

ref: https://app.clickup.com/t/9014802374/86bc72z5c

Summary

Part of a stack of 5 PRs that make every configured audit formatter handle many-to-many collection changes (ADR-004). Without a case for EVENT_COLLECTION_MANYTOMANY_UPDATE / DELETE, a configured formatter returns null and AuditLogOtlpStrategy drops the entry, so attaching or detaching items left no audit trail.

Covers: Summit (the four excluded_categories_* collections and registration_companies), Sponsor (members) and SummitBookableVenueRoom (attributes).

It also adds tests/Unit/Audit/ManyToManyAuditCoverageTest.php, which fails when a configured entity owns a many-to-many collection whose formatter does not handle the events (no allowlist). On main it lists the 19 offenders; on this branch it reports 0. ADR-004 now lists every entity with M2M audit support, no longer says other configured entities drop the events, and its "Adding M2M audit to a new entity" steps point to the shared AbstractAuditLogFormatter::formatManyToManyCollectionChange() added in #667 instead of per-formatter private methods.

One commit per formatter, each with its tests under tests/OpenTelemetry/Formatters/ (update with added and removed ids, delete with preloaded deleted_ids, and null when there is no diff).

Stack

Review in order; each PR is green on its own. The coverage guard test and the ADR-004 update land in the last PR (#671).

  1. fix(audit): log many-to-many collection changes on CFP selection entities #667 CFP: selection plans, track chairs, invitations, categories, speakers
  2. fix(audit): log many-to-many collection changes on CFP type entities #668 CFP: presentation types, event types, media upload types, documents
  3. fix(audit): log many-to-many collection changes on registration entities #669 Registration: badge types, attendee badges, extra questions, tax types
  4. fix(audit): log many-to-many collection changes on promo and discount codes #670 Promo and discount codes
  5. fix(audit): log many-to-many collection changes on summit, sponsor and venue rooms and add coverage guard #671 Summit, sponsor, venue rooms + guard test + ADR-004

🤖 Generated with Claude Code

@romanetar
romanetar added this pull request to stack #672 November 10, 2026 12:37
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3ebad6c7-4d09-4101-a9b5-7f32e026cd53
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-671/

This page is automatically updated on each push to this PR.

@romanetar romanetar self-assigned this Nov 10, 2026
The four excluded_categories_for_* collections and registration_companies now report added and removed ids through SummitAuditLogFormatter instead of being dropped (ADR-004).
members now reports added and removed ids through SponsorAuditLogFormatter instead of being dropped (ADR-004).
attributes now reports added and removed ids through SummitBookableVenueRoomAuditLogFormatter instead of being dropped (ADR-004).
…y events

Fails when an entity configured in config/audit_log.php owns a many-to-many collection and one of its formatters (default strategy or any route-scoped strategies[] entry) does not handle EVENT_COLLECTION_MANYTOMANY_UPDATE / DELETE. No allowlist. Run against the formatters on main it reports 19 offenders; with the formatters in this stack it reports none.
Extends the 'Current entities with M2M audit support' list and replaces the paragraph saying other configured entities still drop the events with a description of ManyToManyAuditCoverageTest.
@romanetar
romanetar force-pushed the fix/audit-m2m-summit-sponsor-venue branch from edf71fb to d0af19d Compare November 10, 2026 13:10
@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-671/

This page is automatically updated on each push to this PR.

1 similar comment
@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-671/

This page is automatically updated on each push to this PR.

@romanetar
romanetar marked this pull request as ready for review November 10, 2026 13:15
@romanetar
romanetar requested a review from smarcet November 10, 2026 14:10

This branch has not been deployed

No deployments
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