Skip to content

Fix Whitaker test-helper assertions - #331

Closed
leynos wants to merge 2 commits into
fix-audit-vulnerabilitiesfrom
fix-whitaker-test-helper-expects
Closed

Fix Whitaker test-helper assertions#331
leynos wants to merge 2 commits into
fix-audit-vulnerabilitiesfrom
fix-whitaker-test-helper-expects

Conversation

@leynos

@leynos leynos commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Pull Request

Summary

  • Adds a shared ExpectValid assertion boundary for test-only helpers.
  • Routes helper assertions through that boundary so Whitaker accepts intentional test failures.
  • Upgrades the CI Whitaker installer to 0.2.7 for current suite behaviour.

Change Type

  • CI/Infrastructure
  • Refactor

Linked Issue

None; this is a targeted CI lint-regression repair.

Validation

  • make all
  • make typecheck
  • make markdownlint
  • make nixie
  • git diff --check

Security Impact

None. This changes test assertion boundaries and CI lint tooling only.

Database Impact

None. No schema, migration, query, or data changes.

Blast Radius

Limited to test helpers compiled by the Whitaker CI lint job.

Rollback Plan

Revert the shared assertion boundary and installer update if they prove incompatible.


Review track: C (CI)

References

Summary by Sourcery

Make test-helper assertions compatible with current Whitaker linting while preserving their failure diagnostics.

Bug Fixes:

  • Update Whitaker CI tooling to accept intentional assertion failures in test-only helpers.

Enhancements:

  • Introduce a shared ExpectValid assertion boundary and apply it across test helpers and fixtures without changing test behavior.

CI:

  • Upgrade the Whitaker installer used by the code-style workflow from 0.2.6 to 0.2.7.

Use Whitaker installer 0.2.7 so CI recognises helpers inside test-only
modules and reports genuine lint violations rather than false positives.
@sourcery-ai

sourcery-ai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the Whitaker CI linter installer version to use the corrected test-context detection, ensuring test-only helpers are no longer linted as production code.

File-Level Changes

Change Details Files
Bump Whitaker installer version used in the code-style CI workflow to pick up corrected test-context handling.
  • Update WHITAKER_INSTALLER_VERSION from 0.2.6 to 0.2.7 in the code_style workflow job environment
  • Ensure CI lint job runs against the new Whitaker release with fixed test-context classification
.github/workflows/code_style.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions Bot added the scope: ci CI/CD workflows label Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Your free Security trial is over. An organization admin can activate billing to continue.

@github-actions github-actions Bot added the size: XS < 10 changed lines (excluding docs) label Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Your free Security trial is over. An organization admin can activate billing to continue.

@github-actions github-actions Bot added risk: medium Business logic, config, or moderate-risk modules contributor: core 20+ merged PRs labels Aug 23, 2026
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1d974411-0343-414f-a0f9-b7913afb3ed7

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.

codescene-access[bot]

This comment was marked as outdated.

Replace helper-level `expect` calls with the shared `ExpectValid` assertion
boundary so Whitaker can distinguish intentional test failures from
production error handling.
@leynos leynos changed the title Update Whitaker test-context detection Fix Whitaker test-helper assertions Aug 23, 2026
@github-actions github-actions Bot added scope: channel/web Web gateway channel scope: tool/builtin Built-in tools scope: llm LLM integration scope: orchestrator Container orchestrator scope: worker Container worker scope: agent Agent core (agent loop, router, scheduler) scope: channel/wasm WASM channel runtime size: XL 500+ changed lines and removed size: XS < 10 changed lines (excluding docs) labels Aug 23, 2026
@leynos leynos closed this Aug 23, 2026
@leynos
leynos deleted the fix-whitaker-test-helper-expects branch August 23, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: medium Business logic, config, or moderate-risk modules scope: agent Agent core (agent loop, router, scheduler) scope: channel/wasm WASM channel runtime scope: channel/web Web gateway channel scope: ci CI/CD workflows scope: llm LLM integration scope: orchestrator Container orchestrator scope: tool/builtin Built-in tools scope: worker Container worker size: XL 500+ changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant