Skip to content

fix(webhooks): post-review polish on v0.1.25.39 emits (v0.1.25.40)#146

Merged
amavashev merged 1 commit into
mainfrom
fix/v0.1.25.40-webhook-review-polish
Apr 23, 2026
Merged

fix(webhooks): post-review polish on v0.1.25.39 emits (v0.1.25.40)#146
amavashev merged 1 commit into
mainfrom
fix/v0.1.25.40-webhook-review-polish

Conversation

@amavashev
Copy link
Copy Markdown
Collaborator

Summary

Post-merge review polish on v0.1.25.39 webhook lifecycle Events (PR #145). Fixes the four items from the review pass — all internal correctness, no spec/wire changes.

ID Fix
B1 Single-op create/update/delete emits now populate Actor.keyId from authenticated_key_id, matching the bulk path. Audit consumers see consistent API-key attribution across all webhook lifecycle paths.
B2/B3 changed_fields is now a real diff vs the prior snapshot instead of request-presence. Identity-PATCHes emit with empty changed_fields; full-identity PATCHes (no status flip) are true no-ops and emit nothing — aligns with spec v0.1.25.33 §6281. signing_secret keeps presence-based detection (stored value is encrypted; not safely comparable to plaintext request value).
B4 "no-req" literal correlation-id fallback replaced with req_<uuid>. Guarantees uniqueness under misconfigured RequestIdFilter.

Test plan

  • WebhookAdminControllerTest green — 58 tests including 4 new B1/B2/B3/B4 regression cases
  • Full admin-service test suite green locally (model + data + api modules)
  • No spec/wire changes; no EventType/schema/endpoint diffs
  • CHANGELOG + AUDIT updated with v0.1.25.40 entry
  • cycles-admin-service/pom.xml bumped to 0.1.25.40

….25.40)

Follow-up correctness pass on the v0.1.25.39 webhook lifecycle Event
work. All four items from the post-merge review:

B1 — Actor parity. Single-op create/update/delete now populate
     Actor.keyId from authenticated_key_id, matching the bulk-action
     path. Audit consumers see consistent API-key attribution on every
     webhook lifecycle Event regardless of code path.

B2/B3 — changed_fields is now a true diff. Previously any field
     present in the PATCH body was recorded even when the value
     matched the subscription's current value. Now each request-
     provided field is compared against the prior snapshot; only
     genuine mutations land in changed_fields. signing_secret keeps
     presence-based detection (stored value is encrypted and not
     safely comparable to the plaintext request value). Consequence:
     a full-identity PATCH (every field resent with existing value,
     no status flip) is a true no-op — aligns with spec v0.1.25.33
     §6281.

B4 — Correlation-id uniqueness. The "no-req" literal fallback in
     webhook_update:<sub_id>:<request_id> and
     webhook_bulk_action:<action>:<request_id> is replaced with a
     req_<uuid> fallback. Guarantees uniqueness if RequestIdFilter
     ever fails to populate the attribute.

Internal-only fixes. No EventType / schema / endpoint / wire-format
changes.
@amavashev amavashev merged commit 2fcd496 into main Apr 23, 2026
8 checks passed
@amavashev amavashev deleted the fix/v0.1.25.40-webhook-review-polish branch April 23, 2026 16:31
amavashev added a commit that referenced this pull request May 3, 2026
Same template as cycles-server PR #146 / cycles-client-python PR #55.
Adapted release notes for GHCR Docker publish via release.yml.
Adds note about admin-plane sensitivity in security-disclosure section.
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