chore: strengthen V1.2 idempotency test and dedupe release-gate helper#178
Merged
Conversation
Three follow-up fixes from a /simplify review of the V1.2 changes: - Strengthen `test_contract_renew_effect_lease_is_idempotent_when_until_ms_unchanged` to assert what the port docstring promises: when `until_ms == lease_until_ms`, the renewal must return an unchanged record. The previous assertion only checked `lease_until_ms`, leaving the no-op invariant on `lease_owner`, `status`, and `updated_at_ms` untested. - Drop a no-op `.downcase` in the V1.2 release-gate test: the docstring fragment is already lowercase in the source, so the call only masked an inconsistency with the case-sensitive signature assertion above it. - Extract the duplicated `normalized(path)` helper from `v1_1_release_gate_test.rb` and `v1_2_release_gate_test.rb` into `spec/support/release_gate_helpers.rb` so future release-gate suites pick it up automatically. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Three follow-up fixes surfaced by a
/simplifyreview of #176 / #177.test_contract_renew_effect_lease_is_idempotent_when_until_ms_unchangedpreviously only checkedlease_until_ms. The port docstring promises the no-op case returns an unchanged record, so the test now also assertslease_owner,status, andupdated_at_msare invariant. This is what would have caught a regression that quietly appliedrecord.with(...)in the no-op branch..downcasein the V1.2 release-gate test. The docstring fragment\"cooperatively extend the lease\"is already lowercase inlib/dag/ports/storage.rb, so the call only masked an inconsistency with the case-sensitive signature assertion right above it.normalized(path)helper. It was identical in bothspec/r0/v1_1_release_gate_test.rbandspec/r0/v1_2_release_gate_test.rb. Moves it intospec/support/release_gate_helpers.rband auto-includes it onMinitest::Test, matching the convention used byRunnerFactory,WorkflowBuilders,StepHelpers, andEventHelpers.Test plan
bundle exec rakegreen: 597 runs, 40598 assertions (+3 from the strengthened idempotency test), 0 failures, 0 offenses.StorageState#renew_effect_leaseis removed (verified by reasoning, not destructive change).Out of scope
/simplifysurfaced several findings that we deliberately skipped:renew_effect_leasecontract tests — by design, the contract suite values stand-alone readability over DRY.# Implements Ports::Storage#Xdoc comments — uniform acrossstorage_state.rb, more navigation than narration.record.with(...) → state[:effects][id] = updatedpattern — transparent enough not to merit extraction.File.readin release-gate tests — full suite runs in ~0.7s, not worth caching.🤖 Generated with Claude Code