Skip to content

[Sync] Update project files from source repository (d0f1a8f) - #352

Merged
mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20260822-161759-d0f1a8f
Aug 22, 2026
Merged

mrz1836 merged 1 commit into
masterfrom
chore/sync-files-go-bitcoin-20260822-161759-d0f1a8f

Conversation

@mrz1836

@mrz1836 mrz1836 commented Aug 22, 2026

Copy link
Copy Markdown
Member

What Changed

  • .github/actions/setup-benchstat/action.yml: Replaced sed-based Go version parsing with anchored regex validation using BASH_REMATCH. The new logic explicitly rejects malformed inputs (e.g., "1.25junk", "127", "1.2z") instead of silently coercing them, matching the pattern used for BENCHSTAT_LATEST_MIN_GO validation.
  • .github/env/10-mage-x.env: Updated MAGE_X_VERSION from v1.26.3 to v1.26.4 and MAGE_X_STATICCHECK_VERSION from 2026.2 to 2026.2.1.
  • .github/workflows/fortress-test-matrix.yml: Expanded runner validation to reject both Windows and macOS runners (previously only Windows). Updated documentation and error messages to clarify that only Linux (ubuntu-*) runners are supported due to bash-only steps and the required Linux service container. Added validation to ensure the test matrix input is a JSON object, not an array/string/number.

Why It Was Necessary

  • The sed-based Go version extraction silently accepted invalid inputs like "1.25junk" as valid version 1.25, creating potential for misconfiguration to go unnoticed.
  • macOS runners are incompatible with this workflow because service containers (redis or placeholder) require Docker and only run on Linux runners, causing job setup failure before any steps execute.
  • Updating mage-x and staticcheck versions ensures the workflow uses the latest tooling with bug fixes and improvements.

Testing Performed

  • Verified that the new regex-based Go version parser correctly rejects malformed version strings that the old sed logic would have accepted.
  • Confirmed that the matrix validation logic correctly identifies and rejects both Windows and macOS runner entries from the test matrix JSON structure.
  • Validated that the new JSON object type check prevents non-object inputs from causing cryptic jq indexing errors downstream.

Impact / Risk

  • Low risk: The Go version parsing change makes validation stricter and more explicit, catching configuration errors earlier rather than silently accepting invalid inputs.
  • Breaking change: Any workflow configurations using macOS runners in PRIMARY_RUNNER or SECONDARY_RUNNER will now fail validation with a clear error message, requiring migration to ubuntu-* runners.
  • Improved reliability: The enhanced validation prevents job failures at service container initialization by catching unsupported runner types during the preflight validation step.

Copilot AI lite review requested due to automatic review settings August 22, 2026 16:18
@mrz1836 mrz1836 self-assigned this Aug 22, 2026
@mrz1836 mrz1836 added automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps labels Aug 22, 2026
@github-actions github-actions Bot added update General updates size/M Medium change (51-200 lines) labels Aug 22, 2026

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

Syncs CI/project configuration from the upstream source repository to make validation stricter and keep tool pins current, primarily improving GitHub Actions reliability and error reporting.

Changes:

  • Tighten Go version parsing in setup-benchstat by using anchored regex validation instead of sed extraction.
  • Update mage-x and staticcheck version pins.
  • Improve fortress-test-matrix preflight validation (reject macOS runners in addition to Windows; add JSON-object shape validation for the matrix input).

Reviewed changes

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

File Description
.github/actions/setup-benchstat/action.yml Switches Go version extraction to anchored regex validation using BASH_REMATCH to reject malformed versions.
.github/env/10-mage-x.env Bumps mage-x and staticcheck version pins.
.github/workflows/fortress-test-matrix.yml Expands runner validation to reject macOS + Windows and adds a guard that the matrix input is a JSON object.
Suppressed comments (1)

.github/workflows/fortress-test-matrix.yml:167

  • This error message tells users to "Set PRIMARY_RUNNER/SECONDARY_RUNNER to ubuntu-* runners", but those identifiers are not inputs to this reusable workflow (it has an input named "primary-runner"). Consider updating the guidance to reference the actual configuration surface (the test-matrix "os" values and/or the "primary-runner" input) to avoid confusing callers.
          if [[ -n "$UNSUPPORTED" ]]; then
            echo "::error title=Unsupported runner::Test matrix contains non-Linux runner(s): ${UNSUPPORTED}. This workflow is bash-only and uses a Linux service container, so only Linux (ubuntu-*) runners are supported. Set PRIMARY_RUNNER/SECONDARY_RUNNER to ubuntu-* runners."
            echo "❌ Non-Linux runners in matrix: ${UNSUPPORTED}"

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mrz1836
mrz1836 merged commit 0b77cf7 into master Aug 22, 2026
25 checks passed
@github-actions
github-actions Bot deleted the chore/sync-files-go-bitcoin-20260822-161759-d0f1a8f branch August 22, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-sync Automated sync PR, e.g. from a fork or external repo automerge Label to automatically merge pull requests that meet all required conditions chore Simple dependency updates or version bumps size/M Medium change (51-200 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants