Skip to content

Centralize Unbounded configuration equality and STUN normalization - #34

Merged
myleshorton merged 2 commits into
atavism/usermessagefrom
fix/unbounded-config-equality
Sep 10, 2026
Merged

Centralize Unbounded configuration equality and STUN normalization#34
myleshorton merged 2 commits into
atavism/usermessagefrom
fix/unbounded-config-equality

Conversation

@myleshorton

Copy link
Copy Markdown
Contributor

Move effective donor configuration equality and STUN normalization into Common, alongside UnboundedConfig and its fallback pool. Radiance can use UnboundedConfig.Equal to decide when to restart and NormalizeDonorSTUNServers when constructing the worker's STUN sampler.

Equality compares all configuration fields, treats STUN ordering, duplicates, and surrounding whitespace as insignificant, and treats empty pools as the default pool. Nil configurations equal only nil configurations. Normalization returns an independent slice without modifying its input.

Companion: getlantern/radiance#634. Based on atavism/usermessage, where #33 merged.

Validation: go test ./... -timeout=90s, including each config field, nil handling, equivalent pools, fallback behavior, and slice isolation.

Copilot AI lite review requested due to automatic review settings September 10, 2026 15:37
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 46db12cd-f529-45cb-9355-e62a6d4a493a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Copilot AI 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.

🟢 Approval recommended

No unresolved review issues remain.

Pull request overview

Centralizes UnboundedConfig equality and STUN normalization in Common.

Changes:

  • Adds nil-safe equality with normalized STUN pools.
  • Adds sorting, deduplication, trimming, and fallback handling.
  • Adds comprehensive tests, including slice isolation.
File summaries
File Description
types.go Implements configuration equality and STUN normalization.
types_test.go Tests equality, fallback behavior, normalization, and slice isolation.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@myleshorton
myleshorton merged commit 08e0303 into atavism/usermessage Sep 10, 2026
2 checks passed
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.

2 participants