Skip to content

Address PR17/PR18 review comments - #19

Merged
mavickers merged 3 commits into
developfrom
fix/pr17-review-items
Jul 8, 2026
Merged

mavickers merged 3 commits into
developfrom
fix/pr17-review-items

Conversation

@mavickers

Copy link
Copy Markdown
Owner

Addresses the Copilot review comments from #17 and #18.

Code

  • Bus.cs: last-station detection now uses the index (currentStationIndex == stationList.Count - 1) instead of station-type equality. The old check misfired when a station type was reused, bypassing cancellation handling. Adds a regression test (fails on the old code, passes now).

Docs (README)

  • Correct target-framework references to netstandard2.0
  • Fix the WithAbortOnCancel() example so it compiles (assigns bus, reads bus.Package.IsAborted)
  • Remove the stale hard-coded 'Last updated' date

Workflow

Tests: 45/45 on net8.0.

- Bus.cs: detect last station by index, not station type (fixes bypassed cancellation handling when a station type is reused); add regression test
- README: correct target-framework references to netstandard2.0, fix WithAbortOnCancel example to assign bus and read bus.Package.IsAborted, drop stale 'Last updated' date
- publish.yml: pin dotnet/nbgv to a release SHA (v0.5.2); add concurrency guard so publish runs serialize
Copilot AI review requested due to automatic review settings July 8, 2026 02:25

Copilot AI 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.

Pull request overview

This PR addresses prior review feedback from PRs #17/#18 by fixing a cancellation edge case in the bus pipeline (last-station detection), updating README guidance to match the netstandard2.0 targeting and cancellation usage, and hardening the publish workflow to avoid concurrent release races.

Changes:

  • Fix Bus.GoAsync last-station detection to use the current index (prevents mis-detecting “last” when a station type is reused).
  • Add a regression test that reproduces the reused-station-type cancellation scenario.
  • Update docs and CI publish workflow: netstandard2.0 wording, cancellation example adjustments, serialize publish runs, and pin dotnet/nbgv to a SHA.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
README.md Updates targeting/cancellation documentation and examples for netstandard2.0 + AbortOnCancel.
Cargo/Bus.cs Corrects last-station detection logic to be index-based.
Cargo.Tests/Integration/Async.cs Adds regression coverage for reused station-type with final station + cancellation.
.github/workflows/publish.yml Serializes publish runs and pins dotnet/nbgv to a specific commit SHA.

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

Comment thread README.md Outdated
Comment on lines +231 to +232
// No exception thrown — check the package state instead:
bus.Package.IsAborted // true
mavickers added 2 commits July 7, 2026 22:32
Address PR19 review: replace bare 'bus.Package.IsAborted' expression with an if-statement so the snippet compiles.
Pick up the CI workflow so this PR is gated before merge.
@mavickers
mavickers merged commit f780a6c into develop Jul 8, 2026
1 check passed
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.

2 participants