fix: route config.yaml mappings and digest through the routing wire codec#173
fix: route config.yaml mappings and digest through the routing wire codec#173pavelmaksimov25 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de6e37ad16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for org, repos := range wire { | ||
| tiers := make(domain.Org, len(repos)) | ||
| for name, repoConfig := range repos { | ||
| tiers[name] = repoConfig.toDomain() |
There was a problem hiding this comment.
Preserve digest.enabled inheritance for tier schedules
When an operator has global digest.enabled: false and a repo/org tier sets only digest.schedule, this path now decodes that tier through repoConfigWire, whose missing enabled is defaulted to true before toDomain(). Provider.DigestFor treats any non-nil tier digest as overriding Enabled, so the tier unexpectedly re-enables digest and posts Slack digests despite the global opt-out; preserve whether enabled was present, or only override the schedule for tier digests.
Useful? React with 👍 / 👎.
|
🐳 Beta image published: docker pull ghcr.io/mptooling/notifycat:pr-173Built from de6e37a. |
Summary
Restores per-repository-tier mapping and digest configuration that a prior DDD refactor silently broke by orphaning the routing wire codec.
config.Loadnow decodes themappings:anddigest:sections through that codec again, so three regressions are fixed:reviews:/reactions:/paths:blocks load again instead of aborting boot withfield reviews not found in type domain.RepoConfig.mentions:is a true tri-state again — an explicit list is honored rather than silently resolving to[<!channel>].digest:block without an explicitenabled:defaults to enabled, matching the documented default-on behavior, instead of decoding as disabled.Notes
This is a pre-existing regression on
main, unrelated to any in-flight feature. It is split out as its own PR so the fix can land independently and quickly. Two commits: the wire-codec rewire, plus a follow-up for null-section consistency and thedigest:error prefix.Verified on this branch (cut from
mainat 0.22.2):go build ./...,go vet, andgo test -race ./internal/platform/config/... ./internal/routing/...(109 tests) all green.