Skip to content

fix: route config.yaml mappings and digest through the routing wire codec#173

Open
pavelmaksimov25 wants to merge 2 commits into
mainfrom
fix/routing-wire-codec-config-load
Open

fix: route config.yaml mappings and digest through the routing wire codec#173
pavelmaksimov25 wants to merge 2 commits into
mainfrom
fix/routing-wire-codec-config-load

Conversation

@pavelmaksimov25

Copy link
Copy Markdown
Contributor

Summary

Restores per-repository-tier mapping and digest configuration that a prior DDD refactor silently broke by orphaning the routing wire codec. config.Load now decodes the mappings: and digest: sections through that codec again, so three regressions are fixed:

  • Per-tier reviews: / reactions: / paths: blocks load again instead of aborting boot with field 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>].
  • A digest: block without an explicit enabled: 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 the digest: error prefix.

Verified on this branch (cut from main at 0.22.2): go build ./..., go vet, and go test -race ./internal/platform/config/... ./internal/routing/... (109 tests) all green.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@github-actions

Copy link
Copy Markdown

🐳 Beta image published: ghcr.io/mptooling/notifycat:pr-173 — rebuilt on every push, removed when the PR closes.

docker pull ghcr.io/mptooling/notifycat:pr-173

Built from de6e37a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant