Skip to content

[Sync] Update project files from source repository (6661e17)#268

Merged
mrz1836 merged 1 commit intomasterfrom
chore/sync-files-bitcoin-schema-20260130-115222-6661e17
Jan 30, 2026
Merged

[Sync] Update project files from source repository (6661e17)#268
mrz1836 merged 1 commit intomasterfrom
chore/sync-files-bitcoin-schema-20260130-115222-6661e17

Conversation

@mrz1836
Copy link
Member

@mrz1836 mrz1836 commented Jan 30, 2026

What Changed

  • Modified the workflow input parsing logic in .github/workflows/fortress-completion-finalize.yml to use base64 encoding and heredoc syntax instead of simple key-value assignment
  • Changed from jq -r 'to_entries | .[] | "\(.key)=\(.value)"' to jq -r 'to_entries | .[] | @base64' for both ALL_INPUTS and TIMING_DATA parsing
  • Replaced inline environment variable assignment (echo "INPUT_$normalized_key=$value" >> $GITHUB_ENV) with heredoc delimiters (EOF_INPUT_$normalized_key and EOF_TIMING_$normalized_key)
  • Added intermediate base64 decoding steps to extract keys and values separately before writing to $GITHUB_ENV

Why It Was Necessary

  • The previous implementation could not safely handle multiline values (specifically mentioned in the comment: "e.g., env-json")
  • Simple key=value assignment breaks when values contain newlines or special characters
  • Heredoc syntax is the GitHub Actions recommended approach for setting multiline environment variables safely

Testing Performed

  • Validate that workflow inputs with multiline JSON values (like env-json) are correctly parsed and stored in environment variables
  • Test that timing data continues to be properly extracted and normalized with underscores replacing hyphens
  • Verify that all downstream steps can access the parsed environment variables with the INPUT_* and TIMING_* prefixes

Impact / Risk

  • Low risk: This change improves robustness without changing the logical flow or output format of environment variables
  • Potential issue: Base64 encoding/decoding adds minor overhead, but this is negligible for typical workflow input sizes
  • Breaking change: None - the resulting environment variable names and normalization logic remain identical

Copilot AI review requested due to automatic review settings January 30, 2026 16:52
@mrz1836 mrz1836 self-assigned this Jan 30, 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 Jan 30, 2026
@github-actions github-actions bot added size/S Small change (11–50 lines) update General updates labels Jan 30, 2026
Copy link

Copilot AI left a comment

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 updates the fortress-completion-finalize reusable workflow to safely parse and export workflow inputs and timing data that may contain multiline or complex values.

Changes:

  • Switches jq parsing for ALL_INPUTS and TIMING_DATA from simple key=value strings to base64-encoded entries via jq -r 'to_entries | .[] | @base64'.
  • Adds per-entry base64 decoding and uses GitHub Actions heredoc syntax to write INPUT_* and TIMING_* environment variables, enabling safe handling of multiline values.
  • Preserves existing key normalization (hyphens to underscores) so downstream consumers of INPUT_* and TIMING_* variables remain compatible.

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

@mrz1836 mrz1836 merged commit 9f187c7 into master Jan 30, 2026
53 checks passed
@github-actions github-actions bot deleted the chore/sync-files-bitcoin-schema-20260130-115222-6661e17 branch January 30, 2026 16:58
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/S Small change (11–50 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants