Skip to content

Comments

Prepare release v2.4.0#64

Merged
fredbi merged 1 commit intogo-openapi:masterfrom
fredbi:feat/async-with-error
Feb 19, 2026
Merged

Prepare release v2.4.0#64
fredbi merged 1 commit intogo-openapi:masterfrom
fredbi:feat/async-with-error

Conversation

@fredbi
Copy link
Member

@fredbi fredbi commented Feb 19, 2026

  • feat(condition): added support for Consistently
  • feat(condition): added support for func(context.Context) error to async assertions Eventually and Consistently

NOTE: refrained from adding func(ctx) error to Never,
as it introduces a confusing logic which is awkward to document and prone to errors.

BREAKING: removed Condition type - no value added to alias func() bool

Part of our plan to clean up unnecessary extra types

chore: removed bash script for local testing with hugo (now a go "script")

Part of our plan to superseded all local bash by go scripts.
Bash has a place and it's in CI only.

doc: added testable examples for async assertions (Eventually, etc) doc: fixup typos, introduced wordlist for future spellcheckers (currently experimented locally only)
doc: updated changes & upstream tracking references

Change type

Please select: 🆕 New feature or enhancement|🔧 Bug fix'|📃 Documentation update

Short description

Fixes

Full description

Checklist

  • I have signed all my commits with my name and email (see DCO. This does not require a PGP-signed commit
  • I have rebased and squashed my work, so only one commit remains
  • I have added tests to cover my changes.
  • I have properly enriched go doc comments in code.
  • I have properly documented any breaking change.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Prepares the v2.4.0 release by extending async condition assertions (adding Consistently and allowing func(context.Context) error conditions for Eventually/Consistently), removing the redundant Comparison alias type, and updating docs/tooling to match.

Changes:

  • Add Conditioner / CollectibleConditioner type constraints and introduce Consistently (+ formatted variants) across internal/assertions, assert, and require.
  • Refactor async polling to support context/error-based condition functions and update/expand tests and examples accordingly.
  • Replace the local Hugo bash helper with a Go “script” and refresh documentation, tracking, and lint/spellcheck assets.

Reviewed changes

Copilot reviewed 47 out of 47 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
require/require_types.go Exposes new condition type constraints from internal/assertions in require.
require/require_forward_test.go Removes forward-method tests for async assertions to reflect API surface changes.
require/require_forward.go Updates Condition signatures and removes Eventually* forward methods; renames waitFortimeout for Never*.
require/require_format_test.go Adds coverage for Consistentlyf (require, formatted).
require/require_format.go Adds Consistentlyf and updates Eventuallyf/EventuallyWithf to use generic condition constraints.
require/require_examples_test.go Adds ExampleConsistently usage example.
require/require_assertions_test.go Adds Consistently tests (require).
require/require_assertions.go Adds Consistently and upgrades Eventually/EventuallyWith to accept constrained condition signatures.
require/require_adhoc_example_8_test.go Adds additional runnable examples for async assertions (bool + context/error variants).
internal/testintegration/README.md Improves markdown formatting for dependency list.
internal/spew/spew_test.go Adds gosec suppression comment for a known-safe ReadFile in tests.
internal/spew/common_test.go Fixes typo and simplifies string building in test helper.
internal/spew/README.md Improves formatting / link rendering for upstream references.
internal/assertions/ifaces.go Removes Comparison type from internal interfaces.
internal/assertions/http_test.go Adds gosec suppression comment for test handler output.
internal/assertions/generics.go Introduces Conditioner and CollectibleConditioner constraints (includes context/error variants).
internal/assertions/format.go Adds gosec suppression comment for formatting output.
internal/assertions/error.go Avoids Sprintf allocations by switching to Fprintf on a builder.
internal/assertions/enable/yaml/enable_yaml.go Fixes spelling in comments (“external”).
internal/assertions/condition_test.go Adds tests for context/error conditions, introduces shared test cases for Never/Consistently, and expands coverage.
internal/assertions/condition.go Adds Consistently, generalizes condition polling to context/error functions, and adapts EventuallyWith to context-capable conditions.
hack/doc-site/hugo/testify.yaml Removes generated config from the repo (now generated locally).
hack/doc-site/hugo/gendoc.sh Removes bash-based local Hugo helper script.
hack/doc-site/hugo/gendoc.go Adds Go-based local Hugo helper to generate config and run the server.
hack/doc-site/hugo/README.md Updates local doc-site instructions to use go run gendoc.go.
hack/doc-site/hugo/.gitignore Ignores generated testify.yaml.
docs/doc-site/usage/TRACKING.md Marks Consistently as adapted and updates tracking counts/refs.
docs/doc-site/usage/MIGRATION.md Updates migration doc references (but needs count consistency).
docs/doc-site/usage/CHANGES.md Documents new async function(s), behavior changes, and breaking changes for v2.4.0.
docs/doc-site/project/maintainers/ROADMAP.md Updates roadmap text and processed-item counts to reflect current status.
docs/doc-site/api/condition.md Updates condition domain docs for new generics + Consistently, and revises signatures/semantics.
docs/doc-site/api/_index.md Updates condition domain count from 4 → 5.
docs/doc-site/_index.md Updates site index references (but needs count consistency).
docs/LINTING.md Minor doc wording/format updates (“nolint”, “test data”).
assert/assert_types.go Exposes new condition type constraints from internal/assertions in assert.
assert/assert_forward_test.go Removes forward-method tests for async assertions to reflect API surface changes.
assert/assert_forward.go Updates Condition signatures and removes Eventually* forward methods; renames waitFortimeout for Never*.
assert/assert_format_test.go Adds coverage for Consistentlyf (assert, formatted).
assert/assert_format.go Adds Consistentlyf and updates Eventuallyf/EventuallyWithf to use generic condition constraints.
assert/assert_examples_test.go Adds ExampleConsistently usage example.
assert/assert_assertions_test.go Adds Consistently tests (assert).
assert/assert_assertions.go Adds Consistently and upgrades Eventually/EventuallyWith to accept constrained condition signatures.
assert/assert_adhoc_example_8_test.go Adds additional runnable examples for async assertions (bool + context/error variants).
README.md Updates badge label wording (“CI vulnerability scan”).
CODE_OF_CONDUCT.md Formats contact email as a mailto-style link target (<...>).
.github/wordlist.txt Expands project wordlist for spellchecking.
.claude/CLAUDE.md Updates repo automation/docs references (counts + Hugo helper usage).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fredbi fredbi force-pushed the feat/async-with-error branch 2 times, most recently from 311ec80 to 74776d3 Compare February 19, 2026 14:03
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 96.02649% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.32%. Comparing base (adf1c9a) to head (7f19b12).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
internal/assertions/condition.go 93.18% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
- Coverage   91.34%   91.32%   -0.03%     
==========================================
  Files          91       91              
  Lines       11889    11925      +36     
==========================================
+ Hits        10860    10890      +30     
- Misses        817      822       +5     
- Partials      212      213       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* feat(condition): added support for Consistently
* feat(condition): added support for func(context.Context) error to async assertions Eventually and Consistently

> NOTE: refrained from adding func(ctx) error to Never,
> as it introduces a confusing logic which is awkward to document and prone to errors.

**BREAKING**: removed Condition type - no value added to alias func() bool

> Part of our plan to clean up unnecessary extra types

chore: removed bash script for local testing with hugo (now a go "script")

> Part of our plan to superseded all local bash by go scripts.
> Bash has a place and it's in CI only.

doc: added testable examples for async assertions (Eventually, etc)
doc: fixup typos, introduced wordlist for future spellcheckers
(currently experimented locally only)
doc: updated changes & upstream tracking references

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
@fredbi fredbi force-pushed the feat/async-with-error branch from 74776d3 to 7f19b12 Compare February 19, 2026 14:21
@fredbi fredbi merged commit 56b5954 into go-openapi:master Feb 19, 2026
23 checks passed
@fredbi fredbi deleted the feat/async-with-error branch February 19, 2026 14:43
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.

1 participant