Skip to content

Pass Polonius flags through shared Rust setup - #80

Merged
leynos merged 12 commits into
mainfrom
use-rustflags-shared-actions-passthrough
Aug 2, 2026
Merged

Pass Polonius flags through shared Rust setup#80
leynos merged 12 commits into
mainfrom
use-rustflags-shared-actions-passthrough

Conversation

@lodyai

@lodyai lodyai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This branch updates generated Polonius-aware workflows to use the shared
setup-rust action's rustflags passthrough. This prevents toolchain setup
from replacing the generated project's required -Zpolonius=next flag while
preserving the historical -D warnings default when Polonius is disabled.

The affected shared-action references are pinned to the revision that adds the
passthrough. Coverage steps retain their explicit linker flags, while release
builds no longer repeat RUSTFLAGS after setup has exported it.

Review walkthrough

Validation

  • make test: passed, 89 tests passed and 1 skipped.
  • make spelling: passed.
  • git diff --check: passed.

Summary by Sourcery

Pass Polonius-related Rust flags through the shared setup-rust action across CI, coverage, and release workflows.

Enhancements:

  • Update CI, coverage-main, and release workflow templates to configure rustflags via the shared setup-rust action instead of per-step environment overrides.
  • Pin shared-actions workflow references to the revision that supports rustflags passthrough for setup-rust and coverage-related actions.

Tests:

  • Extend Polonius tooling contract tests to verify rustflags are propagated correctly in CI, coverage, and release workflows and that release build steps no longer define RUSTFLAGS env overrides.

References

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary

  • Pass conditional RUSTFLAGS through the shared setup-rust action.
  • Preserve -Zpolonius=next for Polonius builds.
  • Preserve -D warnings when Polonius is disabled.
  • Pin CI, coverage, and release workflows to the passthrough revision.
  • Keep coverage linker flags at the coverage boundary.
  • Remove the redundant release RUSTFLAGS override.
  • Strengthen Polonius workflow contracts, rendered snapshots, and act integration tests.
  • Log the selected Rust compiler configuration for diagnostics.
  • Document Rust flag propagation and add a workflow diagram.
  • Update the completed Rust project enhancements ExecPlan.
  • Validate with 89 tests, one skipped test, spelling checks, and git diff --check.

Walkthrough

Update CI, coverage, and release templates to use pinned shared actions and conditional Rust flags. Move release RUSTFLAGS into setup-rust. Extend contract checks, snapshots, integration assertions, and documentation.

Changes

Rust workflow migration

Layer / File(s) Summary
Update workflow setup and action pins
template/.github/workflows/ci.yml.jinja, template/.github/workflows/coverage-main.yml.jinja, template/.github/workflows/{% if flavour == 'app' %}release.yml{% endif %}.jinja
Pass -Zpolonius=next or -D warnings through setup-rust. Preserve the coverage lld flag. Remove the release build step’s separate RUSTFLAGS environment mapping. Update shared action revisions.
Validate generated workflow contracts
tests/helpers/tooling_contracts/polonius.py, tests/test_template/test_tooling_contracts.py, tests/test_template/__snapshots__/test_snapshots.ambr, tests/test_github_actions_integration.py
Validate setup flags, coverage flags and logging, release configuration, and shared-action revisions. Reject missing or incorrect configuration. Update workflow snapshots and runtime log assertions.
Document Rust flag propagation
template/docs/developers-guide.md.jinja, docs/developers-guide.md, docs/users-guide.md, docs/execplans/rust-project-enhancements.md
Document flag selection, coverage linker flags, release toolchain behaviour, capability checks, and the setup-rust passthrough contract.

Sequence Diagram(s)

sequenceDiagram
  participant WorkflowTemplates as Workflow templates
  participant SetupRust as setup-rust
  participant BuildSteps as Rust and coverage steps
  WorkflowTemplates->>SetupRust: Pass -Zpolonius=next or -D warnings
  SetupRust->>BuildSteps: Provide base RUSTFLAGS
  WorkflowTemplates->>BuildSteps: Add lld for coverage
  BuildSteps-->>WorkflowTemplates: Log selected compiler configuration
Loading

Possibly related PRs

Poem

Pin shared actions and set the flags,
Route Polonius through setup paths.
Keep coverage linker flags aligned,
Remove release environment state.
Let contracts and snapshots validate.

🚥 Pre-merge checks | ✅ 18 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title accurately describes the main workflow change but omits the required roadmap item reference for the completed execplan. Add the applicable roadmap item reference to the title, such as (1.2.3.)."},{
✅ Passed checks (18 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Testing (Overall) ✅ Passed Accept: rendered workflow contracts test both Polonius branches across CI, coverage, and release; negative tests reject stale pins and overrides; act validates both CI branches.
User-Facing Documentation ✅ Passed docs/users-guide.md documents both Rust flag branches, setup-rust passthrough, coverage lld handling, and application release inheritance; the guidance matches the workflow templates.
Developer Documentation ✅ Passed Accept: the developer guides document setup-rust rustflags, coverage and pin boundaries; ADR-004 records the design; the ExecPlan marks the work complete, with no locale or roadmap gaps found.
Module-Level Documentation ✅ Passed The aggregate PR audit found module docstrings in all three changed Python modules; all repository Python modules also have module-level docstrings.
Testing (Unit And Behavioural) ✅ Passed Retain the tests: rendered projects cover 18 Polonius/flavour/target cases, negative contract tests cover error paths, and act runs the generated CI job for both flag branches.
Testing (Property / Proof) ✅ Passed A Hypothesis test samples the rendered flavour, Polonius, and target configuration space and applies the strengthened Rust-flags workflow contracts across each case.
Testing (Compile-Time / Ui) ✅ Passed Pass: the PR changes no Rust or TypeScript source; generated Rust compilation is covered by make typecheck and act tests exercise both RUSTFLAGS branches. Structured YAML snapshots redact SHAs and...
Unit Architecture ✅ Passed Keep this design: changes are workflow templates and test contracts; query helpers are pure, while git/act subprocess effects stay in explicitly named integration-test boundaries.
Domain Architecture ✅ Passed The PR changes only workflow templates, documentation, and test contracts/integration code; it changes no domain model or domain source and introduces no domain-to-infrastructure dependency.
Observability ✅ Passed Pass the check: CI, coverage, and release workflows log rustc and bounded RUSTFLAGS at decision points; contracts and act tests verify both branches and reject incorrect diagnostics.
Security And Privacy ✅ Passed The changes add only fixed compiler flags and diagnostic output; no credentials, permissions, trust-boundary checks, or sensitive data exposure were introduced.
Performance And Resource Use ✅ Passed Findings show only bounded workflow scans and small YAML parses; the two act runs are fixed, intentional branch coverage with per-run timeouts, and no hot-path or unbounded resource growth.
Concurrency And State ✅ Passed Pass this check: the PR adds no new concurrent or shared mutable state; release matrix and caches are unchanged, and act runs use isolated temporary project and artifact paths.
Architectural Complexity And Maintainability ✅ Passed Approve this check: the diff adds local, immediately reused workflow-contract helpers and parameterised assertions only; it adds no dependencies, layers, global state, or speculative extension points.
Rust Compiler Lint Integrity ✅ Passed The PR changes only Jinja, Python, Markdown, and snapshot files; it adds no Rust source, lint suppression, artificial reference, or clone, and the Rust templates are unchanged.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch use-rustflags-shared-actions-passthrough

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Reviewer's Guide

Pass Polonius configuration through the shared setup-rust action for CI, coverage, and release workflows, and update the Polonius tooling contracts/tests to assert the new behavior.

Flow diagram for Polonius rustflags passthrough in CI/coverage/release workflows

flowchart TD
  start([Workflow start])

  start --> enable_polonius

  enable_polonius{enable_polonius}
  enable_polonius -->|true| setup_rust_polonius
  enable_polonius -->|false| setup_rust_warnings

  setup_rust_polonius["Setup Rust (setup-rust)\nwith rustflags = -Zpolonius=next"]
  setup_rust_warnings["Setup Rust (setup-rust)\nwith rustflags = -D warnings"]

  setup_rust_polonius --> coverage_polonius
  setup_rust_polonius --> release_polonius
  setup_rust_warnings --> coverage_warnings
  setup_rust_warnings --> release_warnings

  coverage_polonius["Test and Measure Coverage (generate-coverage)\nRUSTFLAGS includes -Zpolonius=next and -C link-arg=-fuse-ld=lld"]
  coverage_warnings["Test and Measure Coverage (generate-coverage)\nRUSTFLAGS includes -D warnings and -C link-arg=-fuse-ld=lld"]

  release_polonius["Build release binary (cross)\nuses nightly toolchain with -Zpolonius=next from setup-rust"]
  release_warnings["Build release binary (cross)\nuses stable toolchain with -D warnings from setup-rust"]
Loading

File-Level Changes

Change Details Files
Generalize helper for locating setup-rust steps and add assertions that setup-rust receives the correct Polonius-related rustflags in CI, coverage, and release workflows.
  • Change _setup_rust_step to accept a workflow string and job name instead of assuming the release workflow structure.
  • Add _assert_setup_rust_rustflags helper to validate that setup-rust is called with either the Polonius flag or -D warnings depending on whether Polonius is enabled.
  • Update _assert_release_workflow to read rustflags from setup-rust inputs instead of the build step env, and assert that the build step no longer defines RUSTFLAGS.
  • Extend assert_polonius_toolchain_contracts to validate setup-rust rustflags for the build-test and coverage-upload jobs.
tests/helpers/tooling_contracts/polonius.py
Wire Polonius flags through the shared setup-rust action in CI and main-branch coverage workflow templates, while keeping coverage-specific linker flags in the coverage steps and updating shared-actions revisions.
  • Update setup-rust action references in CI and coverage-main workflows to a revision that supports rustflags passthrough.
  • Add with.rustflags to setup-rust steps so Polonius-enabled workflows use -Zpolonius=next and Polonius-disabled workflows use -D warnings.
  • Keep coverage-specific lld linker flags in the Test and Measure Coverage steps, and update generate-coverage and upload-codescene-coverage action revisions to match the new shared-actions revision.
template/.github/workflows/ci.yml.jinja
template/.github/workflows/coverage-main.yml.jinja
Use setup-rust’s rustflags passthrough in the release workflow template instead of setting RUSTFLAGS directly on the build step, and pin shared-actions to the new revision.
  • Update the release workflow’s setup-rust action to the new shared-actions revision.
  • Add with.rustflags to the release setup-rust invocation to select either -Zpolonius=next or -D warnings based on enable_polonius.
  • Remove the Build release binary step’s env.RUSTFLAGS override so rustflags come exclusively from setup-rust inputs.
template/.github/workflows/{% if flavour == 'app' %}release.yml{% endif %}.jinja
Refresh snapshot expectations to match the new workflows and Polonius tooling contracts behavior.
  • Update rendered workflow snapshots so CI, coverage-main, and release workflows show setup-rust rustflags inputs and no build-step RUSTFLAGS env.
  • Ensure snapshots reflect the updated shared-actions commit IDs and coverage configuration.
  • Align snapshot content with the new Polonius tooling contracts tests for enabled and disabled coverage.
tests/test_template/__snapshots__/test_snapshots.ambr

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

@leynos
leynos marked this pull request as ready for review August 2, 2026 17:21

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@template/.github/workflows/ci.yml.jinja`:
- Around line 26-28: Preserve -D warnings in both coverage workflows when
enable_polonius is disabled by adding it to the linker-only RUSTFLAGS branches
in template/.github/workflows/ci.yml.jinja (lines 26-28) and
template/.github/workflows/coverage-main.yml.jinja (lines 35-37). Update
tests/helpers/tooling_contracts/polonius.py to assert this disabled-coverage
value.

In `@tests/helpers/tooling_contracts/polonius.py`:
- Line 54: Update the assertions in the contract checks around the rustflags
assertion and the release assertions at lines 150-157 to include diagnostic
messages instead of bare asserts. Capture each actual value, then include the
workflow or job name, expected value, and actual value in the assertion message,
following the existing setup-rust message style and using assert …, "message".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fb6a398f-df42-48c9-91e9-3b449cb3a98e

📥 Commits

Reviewing files that changed from the base of the PR and between bd8c3cf and 3dd77be.

📒 Files selected for processing (5)
  • template/.github/workflows/ci.yml.jinja
  • template/.github/workflows/coverage-main.yml.jinja
  • template/.github/workflows/{% if flavour == 'app' %}release.yml{% endif %}.jinja
  • tests/helpers/tooling_contracts/polonius.py
  • tests/test_template/__snapshots__/test_snapshots.ambr
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/whitaker (auto-detected)

Comment thread template/.github/workflows/ci.yml.jinja
Comment thread tests/helpers/tooling_contracts/polonius.py Outdated
@leynos

leynos commented Aug 2, 2026

Copy link
Copy Markdown
Owner

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

@leynos Resume automatic reviews for this pull request.

✅ Action performed

Reviews resumed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/users-guide.md`:
- Around line 51-56: Qualify the release workflow description as applying only
when flavour is app, clarifying that library renders do not include release.yml.
Update both docs/users-guide.md lines 51-56 and
template/docs/developers-guide.md.jinja lines 47-51 consistently; no other
workflow descriptions require changes.

In `@tests/helpers/tooling_contracts/polonius.py`:
- Around line 32-44: Update _setup_rust_step to match only the shared setup-rust
action using the required leynos/shared-actions/.github/actions/setup-rust@ path
followed by exactly 40 hexadecimal characters before asserting the single match.
Replace the current broad substring check while preserving the existing
uniqueness assertion and return behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cd9a7014-1c7a-480c-9590-470cf8427163

📥 Commits

Reviewing files that changed from the base of the PR and between bd8c3cf and 677b907.

📒 Files selected for processing (7)
  • docs/users-guide.md
  • template/.github/workflows/ci.yml.jinja
  • template/.github/workflows/coverage-main.yml.jinja
  • template/.github/workflows/{% if flavour == 'app' %}release.yml{% endif %}.jinja
  • template/docs/developers-guide.md.jinja
  • tests/helpers/tooling_contracts/polonius.py
  • tests/test_template/__snapshots__/test_snapshots.ambr
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/whitaker (auto-detected)

Comment thread docs/users-guide.md Outdated
Comment thread tests/helpers/tooling_contracts/polonius.py
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/developers-guide.md`:
- Line 31: In the sentence describing coverage’s explicit RUSTFLAGS override,
remove the comma before “because” so the essential explanatory clause remains
attached to the main clause. Preserve the existing en-GB wording and required
grammar triage tag.

In `@template/docs/developers-guide.md.jinja`:
- Around line 47-53: Update the “Workflow pins and Dependabot” section in the
generated guide to document the narrow RUSTFLAGS_PASSTHROUGH_REVISION exception:
assert the first capability-bearing revision only when no independent capability
probe exists, clearly define that boundary, and remove the literal revision
assertion once such a probe is available. Keep the existing general guidance
against exact SHA assertions outside this exception.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 77a02194-a24a-4964-b425-cf9132a1ceab

📥 Commits

Reviewing files that changed from the base of the PR and between 677b907 and c216513.

📒 Files selected for processing (5)
  • docs/developers-guide.md
  • docs/execplans/rust-project-enhancements.md
  • docs/users-guide.md
  • template/docs/developers-guide.md.jinja
  • tests/helpers/tooling_contracts/polonius.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/whitaker (auto-detected)

Comment thread docs/developers-guide.md Outdated
Comment thread template/docs/developers-guide.md.jinja
@lodyai
lodyai Bot marked this pull request as draft August 2, 2026 18:50
@leynos
leynos marked this pull request as ready for review August 2, 2026 18:59

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@lodyai
lodyai Bot marked this pull request as draft August 2, 2026 19:07
@leynos
leynos marked this pull request as ready for review August 2, 2026 19:27

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@leynos

leynos commented Aug 2, 2026

Copy link
Copy Markdown
Owner

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32231da1d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread template/.github/workflows/ci.yml.jinja Outdated
Comment thread tests/helpers/tooling_contracts/polonius.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@template/docs/developers-guide.md.jinja`:
- Around line 88-94: The workflow-pin policy in
template/docs/developers-guide.md.jinja must apply the same conditional
RUSTFLAGS_PASSTHROUGH_REVISION exception to the prohibition around lines
117–119: allow the literal revision only until an independent capability probe
confirms setup-rust supports rustflags, then require and document the first
capable revision and remove the assertion once probing exists. Update the
existing policy near the RUSTFLAGS_PASSTHROUGH_REVISION guidance; make no change
to docs/developers-guide.md at lines 143–148, which has no corresponding
prohibition.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 957e187e-5972-4233-b111-0ad35d30a17e

📥 Commits

Reviewing files that changed from the base of the PR and between 677b907 and 32231da.

📒 Files selected for processing (11)
  • docs/developers-guide.md
  • docs/execplans/rust-project-enhancements.md
  • docs/users-guide.md
  • template/.github/workflows/ci.yml.jinja
  • template/.github/workflows/coverage-main.yml.jinja
  • template/.github/workflows/{% if flavour == 'app' %}release.yml{% endif %}.jinja
  • template/docs/developers-guide.md.jinja
  • tests/helpers/tooling_contracts/polonius.py
  • tests/test_github_actions_integration.py
  • tests/test_template/__snapshots__/test_snapshots.ambr
  • tests/test_template/test_tooling_contracts.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/whitaker (auto-detected)

Comment thread template/docs/developers-guide.md.jinja
@leynos

leynos commented Aug 2, 2026

Copy link
Copy Markdown
Owner

@coderabbitai Have the following failed checks now been resolved?

If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures.

Do not treat warnings as optional or aspirational. Where a change is out of scope for this PR, propose a GitHub issue unless one exists already. (Treat documentation and validation coverage as in scope).

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Testing (Unit And Behavioural) ⚠️ Warning Cover rendered workflows across enabled, disabled, flavour, and target cases, but add no Polonius-specific negative tests or end-to-end execution of the changed CI, coverage, or release workflows. Add direct tests that reject stale revisions, missing flags, incorrect coverage logs, and release env overrides; run at least one affected workflow through an integration harness.
Observability ⚠️ Warning Coverage logs selected RUSTFLAGS, but the changed release path has no setup or build log; pinned setup-rust explicitly does not echo rustflags, so release failures lack flag context. Add safe, bounded logs after setup in CI, coverage, and release for the selected toolchain and base RUSTFLAGS; contract-test these logs and exclude secrets.

@leynos

leynos commented Aug 2, 2026

Copy link
Copy Markdown
Owner

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== PR metadata and checks =='
gh pr view 80 --json url,headRefName,statusCheckRollup,files \
  --jq '{url, headRefName, checks: [.statusCheckRollup[] | {name, conclusion, status}], files: [.files[].path]}'

echo
echo '== Relevant file outlines =='
ast-grep outline tests/helpers/tooling_contracts/polonius.py --items all || true
ast-grep outline tests/test_template/test_tooling_contracts.py --items all --match 'polonius|Polonius' || true
ast-grep outline tests/test_github_actions_integration.py --items all --match 'RUST_SETUP_LOG_STEP|rust|Rust' || true

echo
echo '== Rust flags, logging, and contract-test evidence =='
rg -n -C 3 \
  'setup-rust|rustflags|RUSTFLAGS|Log Rust compiler configuration|test_polonius_contract|RUST_SETUP_LOG_STEP' \
  template/.github/workflows \
  tests/helpers/tooling_contracts/polonius.py \
  tests/test_template/test_tooling_contracts.py \
  tests/test_github_actions_integration.py || true

echo
echo '== Recent validation evidence in PR comments =='
gh pr view 80 --comments --json comments \
  --jq '.comments[] | select(.body | test("test|Test|pytest|act|validation|Validation"; "i")) | {author: .author.login, body: .body}' || true

Length of output: 62959


@leynos Both warnings are resolved.

  • Testing (Unit And Behavioural): Resolved.
    The PR adds direct negative tests for:

    • stale setup-rust revisions;
    • missing setup-rust.with.rustflags;
    • incorrect coverage RUSTFLAGS logging;
    • release-step env.RUSTFLAGS overrides.

    The generated CI workflow also runs through act for both enable_polonius: false and enable_polonius: true. The integration assertions verify the post-setup Base RUSTFLAGS log. GitHub reports successful act-validation and build-test checks.

  • Observability: Resolved.
    CI, coverage, and release now run Log Rust compiler configuration immediately after setup-rust. Each log contains only:

    • rustc --version;
    • Base RUSTFLAGS: <selected value>.

    The workflow contracts require these logs for CI, coverage, and release. The coverage contract also requires the complete linker configuration log. The logs do not print secrets.

No further implementation work or GitHub issue is required for these two warnings. The current pre-merge report marks both checks as passed.

You are interacting with an AI system.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_github_actions_integration.py`:
- Around line 59-60: Update the workflow path in the test invocation near
assert_ci_exercised_expected_steps to run the act-validation workflow that emits
ACT_VALIDATION_STEP with make test WITH_ACT=1, preserving the existing
saw_test_step and saw_rust assertions; alternatively, revise those assertions to
match steps produced by ci.yml.
- Around line 171-177: Remove the unused project parameter from
assert_act_result and update every call site to stop passing the CopierProject
argument, preserving the function’s remaining arguments and behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: eb31e1ed-2331-467e-8788-35dddeba8c8a

📥 Commits

Reviewing files that changed from the base of the PR and between 32231da and 282e867.

📒 Files selected for processing (8)
  • template/.github/workflows/ci.yml.jinja
  • template/.github/workflows/coverage-main.yml.jinja
  • template/.github/workflows/{% if flavour == 'app' %}release.yml{% endif %}.jinja
  • template/docs/developers-guide.md.jinja
  • tests/helpers/tooling_contracts/polonius.py
  • tests/test_github_actions_integration.py
  • tests/test_template/__snapshots__/test_snapshots.ambr
  • tests/test_template/test_tooling_contracts.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/whitaker (auto-detected)

Comment thread tests/test_github_actions_integration.py
Comment thread tests/test_github_actions_integration.py
@leynos
leynos enabled auto-merge (squash) August 2, 2026 22:36
leynos added 2 commits August 3, 2026 00:48
Forward the generated project's selected `RUSTFLAGS` through the shared
`setup-rust` action so toolchain setup no longer shadows Cargo's Polonius
configuration. Keep coverage-specific linker flags at the coverage action
boundary and remove the redundant release build override.

Pin affected shared-action uses to the revision that provides the new
passthrough and extend rendered-workflow contracts and snapshots.
Keep `-D warnings` when disabled Polonius workflows override `RUSTFLAGS`
with coverage linker configuration.

Assert the complete coverage flag value and add expected-versus-actual
diagnostics to the setup and release workflow contracts.
leynos added 10 commits August 3, 2026 00:48
Record that generated workflows depend on the shared `setup-rust`
`rustflags` input and must preserve the passthrough when updating pins.

Explain how coverage combines the selected base flags with its linker
override, and keep literal shared-action SHAs out of contract tests.
Show how the Polonius selection controls setup, coverage, and release
flags, including the coverage linker override and release toolchain.

Provide a screen-reader description and an accessible figure caption.
Restrict setup-step matching to the pinned shared action and verify the
passthrough capability revision across affected workflow references.

Cover enabled and disabled coverage log output, qualify release guidance
as application-only, and record the completed boundary in developer
documentation and the living ExecPlan.
Keep the causal coverage explanation grammatically attached and document
the narrow revision assertion permitted until an independent capability
probe is available.
Log the selected compiler and bounded base flags after Rust setup across
CI, coverage, and release workflows. Add direct regression tests for the
passthrough contracts and require the existing `act` harness to observe
the diagnostic.
Read the exported `RUSTFLAGS` value after setup so diagnostics and the
integration harness detect passthrough failures. Restrict the capability
revision contract to `setup-rust`, allowing unrelated shared actions to
advance independently.
Apply the documented `RUSTFLAGS_PASSTHROUGH_REVISION` exception to the
generated guide's closing prohibition until an independent capability
probe is available.
Target the generated CI workflow explicitly in the `act` harness and
verify its effective base flags for both warning-only and Polonius
renders.
Detect the coverage composite's emitted Cargo commands instead of the
separate act-validation step, and remove the unused rendered-project
argument from result validation.
Apply the repository formatter after Weave combined the branch and main
contract helpers.
@lodyai
lodyai Bot force-pushed the use-rustflags-shared-actions-passthrough branch from 77f6379 to ff3b8c5 Compare August 2, 2026 22:50
@leynos
leynos merged commit 5309a33 into main Aug 2, 2026
6 checks passed
@leynos
leynos deleted the use-rustflags-shared-actions-passthrough branch August 2, 2026 22:56
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