Skip to content

fix(generator): emit context-independent service awaits - #4872

Merged
thomhurst merged 6 commits into
mainfrom
issue-4848-generated-service-awaits
Sep 13, 2026
Merged

thomhurst merged 6 commits into
mainfrom
issue-4848-generated-service-awaits

Conversation

@thomhurst

@thomhurst thomhurst commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Generated Homebrew and Podman wrappers captured the caller's synchronization context. This PR incorporates authoritative Homebrew 6.0.22 and Podman 6.1.1 regeneration: all 382 service awaits now use ConfigureAwait(false). The shared template and its four root/nested, required/optional regression cases landed through #4855.

Feature-branch generation now uses a SHA-256 identity of the complete source ref in output branch names. The resolver recognizes that suffix, and CI runs for PRs targeting feature branches. Tests cover nested refs, case differences, slash/dash collisions, repeat runs, and routing for four tools.

Validation:

  • Fresh generation run 34779079394 succeeded; its output is incorporated in 1e081de and fca5a30. Both provenance checks pass against the current head.
  • Homebrew and Podman Release builds pass with zero warnings/errors; all four integration tests pass.
  • Branch/resolver and required-pipeline regression tests pass. Node 24.14.1 yarn install and yarn build pass (331 documents).
  • All 17 current-head GitHub checks pass, including Linux, Windows, macOS, analyzers, trim/Native AOT, and documentation validation. The subsequent Claude review clears fca5a30.

Refs #4848. That issue remains open until the affected gcloud output tracked by #4869/#4870 is incorporated.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T22:42:40.011215Z fca5a30 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@thomhurst

Copy link
Copy Markdown
Owner Author

Authoritative brew and podman generation is running at https://github.com/thomhurst/ModularPipelines/actions/runs/34772450013, with auto-merge and coverage-shrinkage approval disabled. Expected output branches: automated/update-cli-options-brew-issue-4848-generated-service-awaits and automated/update-cli-options-podman-issue-4848-generated-service-awaits. Generated-output review and integration validation remain required.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 48cda9ca-a8e1-4d50-a288-c706c3c67802

📥 Commits

Reviewing files that changed from the base of the PR and between 7f2288d and 4dbd41a.

⛔ Files ignored due to path filters (93)
  • src/ModularPipelines.Homebrew/Generated/Brew.CommandCoverage.json is excluded by !**/generated/**
  • src/ModularPipelines.Homebrew/Generated/Brew.Generation.json is excluded by !**/generated/**
  • src/ModularPipelines.Homebrew/Options/BrewAuditOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Homebrew/Options/BrewContributionsOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Homebrew/Options/BrewFindAppcastOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Homebrew/Options/BrewGenerateCaskTokenOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Homebrew/Options/BrewTapOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Homebrew/Options/BrewTestsOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Homebrew/Services/Brew.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Homebrew/Services/IBrew.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Enums/PodmanComposeProgress.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Enums/PodmanContainerCreateSystemd.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Enums/PodmanContainerRunSystemd.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Enums/PodmanCreateSystemd.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Enums/PodmanImagePushFormat.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Enums/PodmanPushFormat.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Enums/PodmanRunSystemd.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Generated/Podman.CommandCoverage.json is excluded by !**/generated/**
  • src/ModularPipelines.Podman/Generated/Podman.Generation.json is excluded by !**/generated/**
  • src/ModularPipelines.Podman/Options/PodmanBuildOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanCommitOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanComposeBridgeConvertOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanComposeCpOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanComposeUpOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerCommitOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerCreateOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerInitOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerPortOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerRunOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerTopOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerUnmountOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanContainerUpdateOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanCreateOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanFarmBuildOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanHealthcheckRunOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanImageBuildOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanImageTrustSetOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanImageTrustShowOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanInitOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanKubePlayOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanMachineInitOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanMachineListOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanMachineOsApplyOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanMachineOsUpgradeOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanMachineRestartOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanMachineSetOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanMachineStartOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanManifestPushOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanNetworkCreateOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanNetworkReloadOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanNetworkRmOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanPodPauseOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanPodPsOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanPodRestartOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanPodTopOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanPodUnpauseOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanPortOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanQuadletInstallOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanQuadletListOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanQuadletRmOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanRunOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanTopOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanUnmountOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanUnshareOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanUpdateOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanVolumePruneOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Options/PodmanVolumeRenameOptions.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/IPodmanCompose.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/IPodmanMachine.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/IPodmanPod.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/IPodmanVolume.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/Podman.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanArtifact.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanCompose.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanComposeBridge.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanComposeBridgeTransformations.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanContainer.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanFarm.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanGenerate.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanHealthcheck.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanImage.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanImageTrust.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanKube.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanMachine.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanMachineOs.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanManifest.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanNetwork.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanPod.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanQuadlet.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanSecret.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanSystem.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanSystemConnection.Generated.cs is excluded by !**/*.generated.*
  • src/ModularPipelines.Podman/Services/PodmanVolume.Generated.cs is excluded by !**/*.generated.*
📒 Files selected for processing (10)
  • .github/workflows/dotnet.yml
  • .github/workflows/generate-cli-options.yml
  • docs/docs/mp-packages/cli/brew.md
  • docs/docs/mp-packages/cli/podman.md
  • scripts/Get-GeneratedOptionsBranch.ps1
  • scripts/Resolve-GeneratedIntegrationValidation.ps1
  • scripts/Test-ResolveGeneratedIntegrationValidation.ps1
  • src/ModularPipelines.Homebrew/PublicAPI.Unshipped.txt
  • src/ModularPipelines.Podman/PublicAPI.Shipped.txt
  • src/ModularPipelines.Podman/PublicAPI.Unshipped.txt
💤 Files with no reviewable changes (1)
  • src/ModularPipelines.Podman/PublicAPI.Shipped.txt

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The workflow now derives ref-specific branches for generated CLI options. Validation accepts feature-branch refreshes. Homebrew and Podman public API records and CLI documentation add or update command support.

Changes

CLI options generation and validation

Layer / File(s) Summary
Ref-specific generated-option branches
.github/workflows/..., scripts/*
Linux and Windows jobs use hashed source-ref branch names. Validation removes the branch suffix before tool resolution. Tests cover branch determinism, uniqueness, feature branches, and unrestricted pull-request targets.
Homebrew API and command synchronization
src/ModularPipelines.Homebrew/PublicAPI.Unshipped.txt, docs/docs/mp-packages/cli/brew.md
Homebrew adds option types and methods for find-appcast and generate-cask-token, adds BrewTestsOptions.Shard, and documents both commands.
Podman API and command synchronization
src/ModularPipelines.Podman/PublicAPI.*.txt, docs/docs/mp-packages/cli/podman.md
Podman updates enum and option members, adds machine restart, machine OS upgrade, and volume rename APIs, removes obsolete members, and documents the new commands.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant GetGeneratedOptionsBranch
  participant GitHubPullRequests
  GitHubActions->>GetGeneratedOptionsBranch: resolve branch from tool and source ref
  GetGeneratedOptionsBranch-->>GitHubActions: return GENERATED_OPTIONS_BRANCH
  GitHubActions->>GitHubPullRequests: look up pull request by branch
  GitHubActions->>GitHubPullRequests: create or update pull request
Loading

Merge Risk: ⚪ Minimal · up to 4dbd4

No actionable current-head risk remains from the reviewed changes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (9 skipped: 9… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main generator change: service awaits become context-independent. This matches the stated PR objective.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (9 skipped: 9 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-4848-generated-service-awaits

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

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

@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates generated service wrappers to avoid synchronization-context capture and adds focused coverage for required/optional options in root and nested services. It also isolates feature-branch generation output by incorporating the source branch into generated PR branch names.

  • Both service-await template branches now append ConfigureAwait(false).
  • Four test cases exercise root/nested and required/optional generation.
  • Linux and Windows generation jobs share the new branch-isolation convention.
  • The new convention is incompatible with the existing CI parser for generated-integration branches.

Confidence Score: 4/5

The PR is not safe to merge until generated-integration CI can correctly recognize branches using the new feature-branch suffix.

The service-generation fix is complete and covered, but feature-branch generated PRs are parsed with an invalid tool identifier, bypassing their intended freshness and integration-validation route.

Files Needing Attention: .github/workflows/generate-cli-options.yml

Important Files Changed

Filename Overview
.github/workflows/generate-cli-options.yml Isolates generated branches by source ref, but the resulting names are incompatible with generated-integration CI tool parsing.
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator.Tests/Generators/ServiceAwaitGenerationTests.cs Adds focused regression coverage for all root/nested and required/optional service-await combinations.
tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Generators/GeneratorUtils.cs Emits context-independent service awaits in both template branches and applies semantics-preserving collection-expression formatting.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Feature-branch workflow dispatch] --> B[Generated branch: prefix + tool + source ref]
  B --> C[Generated pull request]
  C --> D[CI takes everything after prefix as tool]
  D --> E[Manifest lookup fails]
  E --> F[Generated integration and freshness route skipped]
Loading

Reviews (1): Last reviewed commit: "fix(ci): isolate feature-branch generati..." | Re-trigger Greptile

Comment thread .github/workflows/generate-cli-options.yml Outdated

@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: 7f2288dc97

ℹ️ 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".

@github-actions

Copy link
Copy Markdown
Contributor

Review

Build-breaking bug (blocking): tools/ModularPipelines.OptionsGenerator/src/ModularPipelines.OptionsGenerator/Generators/GeneratorUtils.cs:408-410

The PR converts CSharpKeywords from new(StringComparer.Ordinal) { ... } into a collection expression, but the result is invalid C#:

private static readonly HashSet<string> CSharpKeywords =
[
    with(StringComparer.Ordinal),
    "abstract", "as", "base", ...
];

with(StringComparer.Ordinal) is parsed as a call to an undefined method with sitting inside the collection literal — collection expressions have no syntax for passing a comparer to the target type's constructor. This won't compile, which means the generator project (and the new ServiceAwaitGenerationTests.cs added in this same PR, which references it) can't build. This directly contradicts the PR description's claim that the Release build passes with zero errors and that the 28 focused tests pass.

Suggested fix — revert to the explicit constructor form, since constructing a HashSet<string> with a non-default comparer isn't expressible via a bare collection expression:

private static readonly HashSet<string> CSharpKeywords = new(StringComparer.Ordinal)
{
    "abstract", "as", "base", ...
};

Secondary, non-blocking concern: .github/workflows/generate-cli-options.yml:139 (and the mirrored Windows job)

GENERATED_OPTIONS_BRANCH: automated/update-cli-options-${{ matrix.tool }}${{ github.ref_name != github.event.repository.default_branch && format('-{0}', github.ref_name) || '' }}

This embeds the raw github.ref_name in the branch name. Two issues worth resolving before merge:

  • Branch names containing / (e.g. feature/foo) will produce a generated ref like automated/update-cli-options-brew-feature/foo, which can collide with git's "a ref can't be both a leaf and a directory prefix" rule if another branch (feature) is also regenerated — the push/PR step would then fail for one of them.
  • A prior automated review on this PR (Greptile) already flagged that this branch-naming change appears incompatible with the existing CI step that parses the tool name back out of automated/update-cli-options-<tool> for generated-integration validation. That concern doesn't look addressed yet — worth confirming the consuming parser still recognizes the branch when a source-ref suffix is appended, since a naive tool = branch.split('-')[-1]-style parse would break on a suffixed ref (especially one containing /).

Sanitizing the ref segment (e.g. replacing / with -) and double-checking the consuming parser handles the new suffix would close both gaps.

What's good: the ConfigureAwait(false) additions to both service-await template branches are a real, targeted fix for sync-context capture in generated code, and the new ServiceAwaitGenerationTests.cs gives solid focused coverage across root/nested and required/optional permutations — once the build is fixed, this looks like a well-scoped change.

@thomhurst
thomhurst force-pushed the issue-4848-generated-service-awaits branch from 7f2288d to 4dbd41a Compare September 13, 2026 19:53
@greptile-apps

greptile-apps Bot commented Sep 13, 2026

Copy link
Copy Markdown

Too many files changed for review (103 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@thomhurst

Copy link
Copy Markdown
Owner Author

Pushed and verified 4dbd41a. This incorporates both generated child outputs and addresses the source-ref naming/parser findings. The current generator template is already on main via #4855; its comparer-bearing collection expression compiled in that PR's successful generator CI under the pinned SDK and LangVersion=preview. No syntax rewrite is needed for the earlier compiler claim.

Both integration Release builds pass with zero warnings/errors, all four integration tests pass, and every one of the 382 Homebrew/Podman generated awaits uses ConfigureAwait(false). Full formatting verification finds existing diagnostics in unchanged dependencies; the PowerShell/workflow checks and git diff --check pass. Freshness correctly rejects the old source fingerprint after shared generator/workflow changes; actual regeneration is running at https://github.com/thomhurst/ModularPipelines/actions/runs/34779079394. The PR remains blocked on that output, fresh CI/review, and the shared Microsoft.Build 18.10.1 NU1701 restore failure. No generated provenance was edited to bypass freshness.

@github-actions

Copy link
Copy Markdown
Contributor

Review

Previous blocking findings — both resolved:

  1. Build-breaking with(StringComparer.Ordinal) collection expressiontools/ModularPipelines.OptionsGenerator/.../GeneratorUtils.cs is no longer part of this PR's diff at all (confirmed byte-identical to the base branch). That generator template landed separately via fix(generator): preserve repeatable GitHub CLI attachments #4855, so this concern doesn't apply to the current head.

  2. Branch-naming collision / tool-name parsing — properly fixed. scripts/Get-GeneratedOptionsBranch.ps1 now derives the output branch as automated/update-cli-options-<tool> for default-branch refreshes, and appends a case-sensitive SHA-256 hash of the full source ref (-ref-<64 hex>) for feature-branch refreshes, so slashes/dashes/case can't collide. scripts/Resolve-GeneratedIntegrationValidation.ps1 strips that anchored -ref-[a-f0-9]{64} suffix before extracting the tool name, so generated-integration validation still recognizes feature-branch PRs. New tests in Test-ResolveGeneratedIntegrationValidation.ps1 cover repeat-run stability, distinctness across feature, feature/foo, feature-foo, Feature/foo, feature/foo/bar, and correct tool resolution across all 4 generated tools — good coverage of exactly the cases the earlier review flagged.

Spot-checked the regenerated output:

  • All 382 generated service-await call sites (258 in Podman, 124 in Homebrew) end in .ConfigureAwait(false), matching the PR description and closing the sync-context-capture bug this PR is titled for.
  • PublicAPI.Shipped/Unshipped.txt and the CLI docs tables (brew.md, podman.md) were updated consistently with the new subcommands (find-appcast, generate-cask-token, machine os upgrade, machine restart, volume rename).

One non-blocking observation: .github/workflows/dotnet.yml's pull_request: trigger now has no branches filter at all (previously branches: ["main"]), so full CI now runs for any pull request regardless of target branch, not just the automated generated-options PRs this change is meant to validate. That's a reasonable trade-off given pull_request triggers can't filter on head ref, but it's worth knowing it also broadens CI to human-authored PRs targeting non-main branches (e.g. stacked feature-branch PRs), which increases CI load/noise beyond the generated-PR case. Not a correctness issue, just a scope-widening side effect worth being deliberate about.

No other issues found. This is a well-scoped fix that directly incorporates the prior review feedback with real regression coverage.

@thomhurst
thomhurst deployed to Pull Requests September 13, 2026 22:40 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Code review

Reviewed at head fca5a30212b212c27df8d7e5a1d092bf8a1c2efe, focusing on what changed since the earlier bot review that cleared 4dbd41a (build breakage + branch-naming/tool-resolution concerns): the two follow-up commits that incorporate the authoritative Homebrew/Podman regeneration output (1e081dec / fca5a302).

Previously flagged issues — still resolved, unchanged at this head:

  • scripts/Get-GeneratedOptionsBranch.ps1 / scripts/Resolve-GeneratedIntegrationValidation.ps1 still correctly derive and strip the -ref-<sha256> suffix for feature-branch refreshes, so generated-integration validation keeps recognizing the branch and resolving the right tool. Test coverage in scripts/Test-ResolveGeneratedIntegrationValidation.ps1 (feature ref permutations, tool resolution for all 4 tools) is present and unchanged.
  • No trace of the earlier with(StringComparer.Ordinal) collection-expression issue — that generator file isn't part of this diff.

Spot-checked the newly-incorporated regeneration output:

  • All 382 generated service-await call sites (124 in Brew.Generated.cs, 258 across the Podman Services/*.Generated.cs files) end in .ConfigureAwait(false) — the sync-context-capture fix this PR is titled for is applied consistently, including in the newly-added RenameAsync/RestartAsync/UpgradeAsync/FindAppcastAsync/GenerateCaskTokenAsync methods.
  • New generated option records (BrewFindAppcastOptions, BrewGenerateCaskTokenOptions, PodmanVolumeRenameOptions, PodmanMachineRestartOptions, PodmanMachineOsUpgradeOptions, etc.) are syntactically valid and follow the established generator output shape.
  • PublicAPI.Shipped.txt/Unshipped.txt correctly move removed members through *REMOVED* entries (e.g. the PodmanMachineOsApplyOptions positional parameter rename from Image to Uri, and the Podman enum value renumbering) rather than being hand-patched — consistent with this repo's "generated output is authoritative" policy, and no stale .Image references remain elsewhere in src/.
  • docs/docs/mp-packages/cli/{brew,podman}.md are updated in step with the new subcommands.

Non-blocking, already-noted: .github/workflows/dotnet.yml's pull_request: trigger still has no branches filter, so full CI now runs for any PR targeting any branch, not just main. This was flagged as an acceptable, deliberate trade-off in the prior review (pull_request triggers can't filter on head ref) and hasn't changed — just restating it as context, not a new concern.

No actionable issues found in the incorporated regeneration output.

@thomhurst

Copy link
Copy Markdown
Owner Author

Review gate audit: the branch naming/parser concern is fixed by 4dbd41a and explicitly cleared by both subsequent Claude reviews. The regenerated-output concern is fixed and validated at fca5a30. CodeRabbit reports no actionable current-head risk; its aggregate docstring percentage does not identify a missing public contract, and these changes add a script entry point and regression cases rather than undocumented library APIs. No documentation-only rewrite is warranted for that aggregate warning. The broader feature-target CI trigger is intentional so stacked PRs receive the same validation gates.

@thomhurst
thomhurst merged commit ae1b1b9 into main Sep 13, 2026
17 checks passed
@thomhurst
thomhurst deleted the issue-4848-generated-service-awaits branch September 13, 2026 23:15
@github-actions github-actions Bot mentioned this pull request Sep 13, 2026
1 task
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