Skip to content

docs: add Breaking Changes section for v2.0.0#144

Merged
steingran merged 2 commits into
mainfrom
claude/multilock-pr-117-review-1fpxvz
Jul 6, 2026
Merged

docs: add Breaking Changes section for v2.0.0#144
steingran merged 2 commits into
mainfrom
claude/multilock-pr-117-review-1fpxvz

Conversation

@steingran

Copy link
Copy Markdown
Owner

Adds a Breaking Changes section to the README ahead of the v2.0.0 release, placed near the top (right after Requirements) so upgraders see it.

The v2.0.0 entry documents:

  • Consul SessionLockDelay validation tightened — the permitted maximum dropped from 60 minutes to 60 seconds (matching Consul's own limit), so values above 60s now throw an ArgumentException at startup. Includes before/after snippets and migration guidance. Configs using the default (15s) are unaffected.
  • A note that Distributed Semaphores are a new additive feature that doesn't change existing leader-election APIs, linking to the existing section.

Docs-only change.

🤖 Generated with Claude Code

https://claude.ai/code/session_011D79i3saTKrBEKrhpMuDWv


Generated by Claude Code

Document the v2.0.0 breaking change ahead of the release: the Consul
SessionLockDelay validation upper bound was tightened from 60 minutes to
60 seconds to match Consul's own limit, so configs above 60s now throw at
startup. Includes before/after and migration guidance, plus a note that
Distributed Semaphores are a new additive feature.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011D79i3saTKrBEKrhpMuDWv
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Docs: add v2.0.0 Breaking Changes section to README

📝 Documentation 🕐 Less than 5 minutes

Grey Divider

AI Description

• Add a prominent "Breaking Changes" section near the top of the README for v2.0.0 upgraders.
• Document the Consul SessionLockDelay max change (60 minutes → 60 seconds) with migration
 guidance.
• Call out Distributed Semaphores as additive and link to the existing section.
High-Level Assessment

The approach (placing Breaking Changes near the top, immediately after Requirements) is optimal for upgrade visibility. Alternatives like a separate MIGRATION.md or release notes are complementary, but not better than this in-README placement for discoverability.

Files changed (1) +17 / -0

Documentation (1) +17 / -0
README.mdAdd v2.0.0 Breaking Changes section with Consul SessionLockDelay guidance +17/-0

Add v2.0.0 Breaking Changes section with Consul SessionLockDelay guidance

• Introduces a new "Breaking Changes" section near the top of the README. Adds a v2.0.0 entry describing the tightened Consul 'SessionLockDelay' validation (now max 60 seconds), including before/after code snippets and migration guidance, plus a note linking to Distributed Semaphores as an additive feature.

README.md

@qodo-code-review

qodo-code-review Bot commented Jul 5, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Invalid README code sample ✓ Resolved 🐞 Bug ≡ Correctness
Description
The new Breaking Changes snippet assigns to ConsulLeaderElectionOptions.SessionLockDelay, but that
option is init-only in code, so options.SessionLockDelay = ...; will not compile for users
copying the example. This blocks adoption and also makes the snippet’s runtime ArgumentException
claim misleading because the sample fails at compile time first.
Code

README.md[R28-34]

+  ```csharp
+  // No longer valid — throws ArgumentException (was previously allowed):
+  options.SessionLockDelay = TimeSpan.FromMinutes(5);
+
+  // Valid — must be between 0 and 60 seconds (default is 15 seconds):
+  options.SessionLockDelay = TimeSpan.FromSeconds(15);
+  ```
Relevance

⭐⭐⭐ High

Docs code samples were fixed to match real API/compile before (CONTRIBUTING example corrected in PR
#10).

PR-#10

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The README snippet uses direct assignment to SessionLockDelay, but the code defines
SessionLockDelay as an init-only property, so reassignment is not allowed by the C# compiler.

README.md[21-36]
src/Providers/MultiLock.Consul/ConsulLeaderElectionOptions.cs[37-60]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
README’s v2.0.0 breaking-change example uses assignment (`options.SessionLockDelay = ...`) to configure `ConsulLeaderElectionOptions.SessionLockDelay`. In the current codebase this property is `init`-only, so this assignment form is not valid C# outside an object initializer.

### Issue Context
`ConsulLeaderElectionOptions.SessionLockDelay` is declared with `init`, not `set`, so consumer code must set it via an object initializer (or configuration binding/reflection-based mechanisms), not by reassignment.

### Fix Focus Areas
- README.md[25-36]

### Suggested change
Replace the snippet with a compilable pattern, e.g.:
```csharp
// No longer valid — throws ArgumentException when provider is constructed:
var options = new ConsulLeaderElectionOptions
{
   SessionLockDelay = TimeSpan.FromMinutes(5)
};

// Valid — must be between 0 and 60 seconds (default is 15 seconds):
options = new ConsulLeaderElectionOptions
{
   SessionLockDelay = TimeSpan.FromSeconds(15)
};
```
(or show an appsettings/config-binding example if that’s the intended configuration path).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread README.md
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.85%. Comparing base (5468e8e) to head (9920408).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
- Coverage   72.97%   72.85%   -0.13%     
==========================================
  Files          65       65              
  Lines        4974     4974              
  Branches      608      608              
==========================================
- Hits         3630     3624       -6     
- Misses       1141     1146       +5     
- Partials      203      204       +1     

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5468e8e...9920408. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Address Qodo review on PR #144: SessionLockDelay is an init-only property,
so the original `options.SessionLockDelay = ...` assignment form does not
compile outside an object initializer. Rewrite the breaking-change snippet
to construct via object initializers and note the init-only constraint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011D79i3saTKrBEKrhpMuDWv
@steingran
steingran merged commit 916272f into main Jul 6, 2026
7 of 8 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