Repository navigation
Spec-driven change from a Jira issue - #19
Closed
dev-agentic-platform[bot] wants to merge 3 commits into
Closed
dev-agentic-platform[bot] wants to merge 3 commits into
dev-agentic-platform[bot] wants to merge 3 commits into
Conversation
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.
Agents specified, planned, built and reviewed this change from a Jira issue; the specification and the change were approved at gates before this pull request was opened. The specification, plan and tasks are under specs/. Review it as you would any change: agents can be wrong.
KAN-1: Add the Vintage Wine maturing product
Summary
This adds a new maturing product, Vintage Wine, to the
ProposedCodematuring flow. The Jira issue left the business rules to the team, so the spec sets them. Vintage Wine gains quality as its sell-by date nears and never loses quality, even after that date.Quality.Increaseclamps in its constructor, so Q49 withIncrease(2)gives Q50.The other kinds (Standard, Aged Brie, Backstage, Conjured, Sulfuras) are unchanged. The legacy
OriginalCodeis untouched.Requirements met
What changed
src/Core/ProposedCode/Domain/ItemKind.cspublic sealed record VintageWine : ItemKind;.FromNamemaps"Vintage Wine"and"Vintage"to it, before the_arm. Matching stays exact-name, as before.src/Core/ProposedCode/Domain/ItemMaturingPolicy.csItemKind.VintageWine => this.MatureVintageWine(state).MatureVintageWineapplies the rules above.tests/Core.Tests/ProposedCode/Domain/ItemKindTests.cs"Vintage Wine"and"Vintage", both expectingItemKind.VintageWine.tests/Core.Tests/ProposedCode/Domain/ItemMaturingPolicyTests.csMature_WhenKindIsVintageWine_FollowsExpectedRuleswith nine rows.tests/Core.Tests/ProposedCode/ItemMaturationServiceTests.csMature_UsesExpectedRulesForResolvedItemKinds. The-5row uses the short name"Vintage".[Fact]Mature_WhenItemIsVintageWine_PreservesName.The author rewrote each file in full, so a trailing newline may differ from the originals.
How to check
Not yet verified: nobody could run
dotnet restore,dotnet buildordotnet testwhile preparing this change (task T006). The new tests, the unchanged tests for the existing kinds, and the Roslynator/Sonar warnings are all unchecked. Please confirm CI is green before merging.Run
dotnet restore,dotnet buildanddotnet test.Confirm that:
Spot-check through
ItemMaturationServicefor "Vintage Wine" at Quality 10 (SC-004):Also check that Quality 50 stays at 50.