feat(opgaver): rename gRPC surface from microting.opgaver.Opgaver to backend_configuration.Events#802
Merged
Merged
Conversation
…backend_configuration.Events Plugin side of the Danish->English migration per docs/superpowers/specs/2026-05-11-opgave-to-event-migration.md. Renames proto package, service, the opgave-noun messages (Opgave->Event, OpgaveChange->EventChange, CompleteOpgave*->CompleteEvent*), and the corresponding C# handler class + registration. The proto file itself moves opgaver.proto->events.proto. Intentionally mixed-language: Ejendom, Tavle, rode fields stay Danish this PR -- they're tracked in follow-up phases. Private locals inside the handler are also out of scope per the plan's smallest-viable diff ceiling. Helm chart already routes /backend_configuration.Events/ as h2c so the mobile client cutover is lockstep but the wire path is already wired through Traefik on the cluster. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The prior mechanical Opgaver->Event rename overshot and produced 6 references to non-existent Eventr* types. The private JSON envelope classes (OpgaverCustomEnvelope, OpgaverCommentBody, OpgaverPhotoBody) are explicitly carved out of the smallest-viable-diff per the migration plan - they stay Danish. Restore the references.
Simplifier pass: trimmed redundant header + collapsed paragraph structure from 16 to 11 lines. Same load-bearing info: spec link, exact noun scope (opgave only), Ejendom/Tavle/rode deferral, field- name preservation rationale, smallest-viable-diff framing.
There was a problem hiding this comment.
Pull request overview
This PR updates the Backend Configuration plugin’s gRPC contract and server implementation to support the ongoing Danish “opgave” → English “event” migration by renaming the public wire surface (proto package/service/RPCs and generated C# namespace) and aligning the ASP.NET Core gRPC endpoint mapping accordingly.
Changes:
- Renamed the gRPC proto surface to
backend_configuration.Events(newevents.proto, new C# generated namespace). - Renamed the server implementation to
EventsGrpcServiceand updated endpoint registration to map the new service. - Updated a few related inline references/comments in calendar/task models to point at
EventsGrpcService.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/GrpcServices/EventsGrpcService.cs | Renames the gRPC service implementation and swaps generated types from Opgave* to Event* where applicable. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/BackendConfigurationCalendarService/BackendConfigurationCalendarService.cs | Updates a comment reference from OpgaverGrpcService to EventsGrpcService. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Protos/events.proto | Introduces the renamed proto surface (backend_configuration package, Events service, Event* messages/RPCs). |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Infrastructure/Models/Calendar/CalendarTaskRequestModel.cs | Updates documentation to reference EventsGrpcService as the actionable-only consumer. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/EformBackendConfigurationPlugin.cs | Updates endpoint registration to map EventsGrpcService. |
| eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/BackendConfiguration.Pn.csproj | Switches the protobuf include from opgaver.proto to events.proto. |
Comments suppressed due to low confidence (3)
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/GrpcServices/EventsGrpcService.cs:853
- Inside StreamEventChanges, there are still log-message prefixes referring to the old service/method name (e.g., "OpgaverGrpcService.StreamOpgaveChanges ..."). This makes production logs hard to grep and can mislead during incident triage; update those strings to "EventsGrpcService.StreamEventChanges" (or a consistent new prefix) to match the renamed gRPC surface.
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/GrpcServices/EventsGrpcService.cs:1603 - This comment still describes synthesizing a minimal "completed" Opgave, but the code now synthesizes an Event instance. Please update the wording (e.g., Event/task) to keep the inline documentation consistent with the renamed API surface.
eFormAPI/Plugins/BackendConfiguration.Pn/BackendConfiguration.Pn/Services/GrpcServices/EventsGrpcService.cs:186 - The new/renamed Events gRPC surface (ListEvents/StreamEventChanges/CompleteEvent) currently has no unit tests, while other gRPC services in this repo do (e.g., CalendarGrpcServiceTests, PropertiesGrpcServiceTests). Adding a few focused tests (permission denied, service-failure mapping, and basic response shape) would help prevent regressions during the ongoing opgave→event migration.
renemadsen
added a commit
that referenced
this pull request
May 11, 2026
Previously the test tampered the LAST base64url char of the JWT signature. For a 32-byte HMAC-SHA256 → 43 base64url chars (no padding), the last char encodes only 4 significant bits of byte 31; the other 2 bits are padding bits the encoder always emits as 00. .NET's Convert.FromBase64String silently ignores those padding bits — so flipping the last char between 'A' (000000) and 'B' (000001) is a no-op for the decoded signature byte whenever byte 31's low-4-bits == 0. That happens ~1/16 of the time (uniform random HMAC output). Empirically: 6.33% undetected over 10000 trials. CI manifested the bug on https://github.com/microting/eform-backendconfiguration-plugin/actions/runs/25660940289 (stable HEAD after PR #802) — not a regression introduced by that rename, just a long-standing 6% flake that finally rolled snake-eyes. Fix: tamper a char in the MIDDLE of the signature segment instead. Middle chars use all 6 bits as data, so any flip is guaranteed to mutate the decoded signature. Empirically 0/10000 false-passes. Production verifier in GoogleDriveAuthService.VerifyEnvelopeJwt is correct as-is (FixedTimeEquals on the decoded byte arrays); only the test's tamper logic was unsound. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
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.
Summary
Plugin side of the opgave→event Danish→English migration per
docs/superpowers/specs/2026-05-11-opgave-to-event-migration.md.Renamed wire surface:
opgaver.proto→events.protomicroting.opgaver→backend_configurationOpgaver→Eventscsharp_namespace:BackendConfiguration.Pn.Grpc.Opgaver→…Grpc.EventsOpgave→Event,OpgaveChange→EventChange,CompleteOpgaveRequest/Response→CompleteEventRequest/ResponseListOpgaver→ListEvents,StreamOpgaveChanges→StreamEventChanges,CompleteOpgave→CompleteEventC# handler:
OpgaverGrpcService.cs→EventsGrpcService.cs(viagit mv)OpgaverGrpcService→EventsGrpcServiceOpgaver.OpgaverBase→Events.EventsBaseMapGrpcService<EventsGrpcService>()atEformBackendConfigurationPlugin.cs:790<Protobuf Include="…events.proto"/>updatedSmallest-viable-diff carve-out
Intentionally stays Danish in this PR — tracked for follow-up phases:
opgave_id,tavle_id,ejendom_id,opgaver,rode-prefixed) — keeps generated C# accessors stable, no handler property cascade.Ejendom,Tavlemessages.LoadOpgaverAsync,BuildIdempotentCompleteOpgaveResponse,SynthesiseMinimalOpgave,ParseOpgaveId).OpgaverCustomEnvelope,OpgaverCommentBody,OpgaverPhotoBody).UploadPhoto,RemovePhoto,SetComment,SetFieldValue,ListTaskTracker,ListEjendomme,ListTavler).Mixed-language proto flagged with a top-of-file comment for future readers.
Lockstep
Merge order: this PR (toward `stable`) FIRST, then deploy the new backend image, then merge the flutter-eform consumer PR (forthcoming) which regenerates Dart stubs against the renamed proto. The Helm chart already routes BOTH
/microting.opgaver.Opgaver/*(legacy) and/backend_configuration.Events/*(new) to the same backend service.Verification
Eventr*typos from the original mechanical rename (overshot into the carved-out JSON envelope classes) → restored toOpgaver*in commit66e9721e. Code-simplifier trimmed the top-of-file migration comment inevents.proto.dotnet clean && dotnet buildagainst the embedded copy: 0 errors, only pre-existing CS8632/NU1510 warnings.Known follow-ups (not in this PR)
Ejendom→Property,Tavle→Board,rode→Overduemigrations (own PRs).🤖 Generated with Claude Code