Skip to content

fix: resolve upstream-sync.yml workflow failures#25

Merged
bashandbone merged 2 commits intomainfrom
copilot/fix-upstream-sync-failure
Mar 5, 2026
Merged

fix: resolve upstream-sync.yml workflow failures#25
bashandbone merged 2 commits intomainfrom
copilot/fix-upstream-sync-failure

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

Two bugs caused the upstream-sync.yml workflow to fail at the Setup Environment step with Invalid value. Matching delimiter not found 'UPSTREAM_PROMPT_DELIMITER', and a silent invalid-JSON bug in Create MCP Config.

Changes

  • _upstream_agent_prompt.md — add trailing newline (POSIX convention). Without it, cat output the file flush against the heredoc delimiter, so GitHub Actions couldn't locate UPSTREAM_PROMPT_DELIMITER on its own line when parsing $GITHUB_ENV.

  • Setup Environment step — add printf '\n' before the delimiter echo as a defensive guard against any future file lacking a trailing newline:

        cat "$GITHUB_WORKSPACE/.github/_upstream_agent_prompt.md"
    +   printf '\n'
        echo 'UPSTREAM_PROMPT_DELIMITER'
  • Create MCP Config step — fix heredoc EOF indentation. The EOF marker was indented 2 spaces relative to cat in YAML, so after YAML block-scalar stripping it became EOF in the shell script — not at column 0, so bash read until end-of-file and appended EOF to the JSON, producing invalid output. Fix aligns EOF to the same YAML indentation level as cat so it lands at column 0 post-stripping.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add trailing newline to _upstream_agent_prompt.md (POSIX convention,
  prevents delimiter from being appended to last content line in GITHUB_ENV)
- Add printf '\n' before delimiter echo in Setup Environment step for
  defensive robustness against files without trailing newlines
- Fix Create MCP Config heredoc: align EOF at same YAML indentation level
  as the cat command so it appears at column 0 after YAML processing,
  preventing bash from reading until end-of-file and producing invalid JSON

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failure in upstream-sync.yml action fix: resolve upstream-sync.yml workflow failures Mar 5, 2026
@bashandbone bashandbone marked this pull request as ready for review March 5, 2026 19:04
Copilot AI review requested due to automatic review settings March 5, 2026 19:04
@bashandbone bashandbone merged commit d183dce into main Mar 5, 2026
36 of 37 checks passed
@bashandbone bashandbone deleted the copilot/fix-upstream-sync-failure branch March 5, 2026 19:09
Copilot AI review requested due to automatic review settings March 23, 2026 23:42
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