Skip to content

Fix registry path validator parsing and satisfy mission protocol gate#2

Merged
weslleycapelari merged 6 commits into
mainfrom
copilot/fix-syntax-error-validate-registry-paths
May 13, 2026
Merged

Fix registry path validator parsing and satisfy mission protocol gate#2
weslleycapelari merged 6 commits into
mainfrom
copilot/fix-syntax-error-validate-registry-paths

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

marketplace-integrity failed in Validate registry paths exist because .github/scripts/validate-registry-paths.sh had a Bash parse error (unexpected end of file). The failure came from invalid error-handling syntax around the Python heredoc block.

  • Root cause

    • The script combined a heredoc with || { ... } in a form Bash could not parse, so execution stopped before any path checks ran.
  • Change made

    • Replaced the invalid construct with a valid if ! ... <<'PYEOF' ... then ... fi wrapper around the Python extractor command.
    • Kept script behavior and output semantics unchanged; only parsing/control-flow structure was corrected.
  • Code shape (before/after)

    # before (parse error)
    python3 - "$REGISTRY" >"$TMPFILE" <<'PYEOF' || {
      echo "ERROR: Path extractor (python3) failed..." >&2
      exit 1
    }
    ...
    PYEOF
    
    # after (valid)
    if ! python3 - "$REGISTRY" >"$TMPFILE" <<'PYEOF'
    ...
    PYEOF
    then
      echo "ERROR: Path extractor (python3) failed..." >&2
      exit 1
    fi

Additionally, the PR now includes a mission protocol artifact to satisfy the non-trivial PR gate in the same workflow:

  • Added .github/MISSIONS/copilot-to-copilot-fix-marketplace-integrity-gate-2026-05-13.md with the required mission keys.
  • Updated mission context and validation steps so validate-mission-protocol.sh passes for this branch.
Original prompt

Run bash .github/scripts/validate-registry-paths.sh
bash .github/scripts/validate-registry-paths.sh
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.11.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.15/x64/lib
.github/scripts/validate-registry-paths.sh: line 88: syntax error: unexpected end of file
Error: Process completed with exit code 2.

The user has attached the following file paths as relevant context:

  • .github\scripts\validate-registry-paths.sh
  • .github\copilot-instructions.md

Created from VS Code.

Copilot AI changed the title [WIP] Fix syntax error in validate-registry-paths.sh Fix Bash heredoc parsing in registry path validation script May 11, 2026
Copilot AI requested a review from weslleycapelari May 11, 2026 11:40
@weslleycapelari weslleycapelari requested review from Copilot and removed request for weslleycapelari May 13, 2026 13:56
Copy link
Copy Markdown
Contributor

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 fixes a Bash parsing error in .github/scripts/validate-registry-paths.sh that caused the marketplace-integrity workflow’s “Validate registry paths exist” step to fail before running any checks. The change rewrites the Python heredoc invocation to use a Bash-valid if ! ... <<'PYEOF' ... then ... fi error-handling structure.

Changes:

  • Replaced an invalid heredoc || { ... } construct with a valid if ! ... heredoc ... then ... fi wrapper.
  • Preserved the script’s behavior/output while ensuring the script parses and can execute path validation.

Comment thread .github/scripts/validate-registry-paths.sh Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@weslleycapelari
Copy link
Copy Markdown
Owner

@copilot resolve marketplace integrity workflow error:

0s
Run bash .github/scripts/validate-mission-protocol.sh
  bash .github/scripts/validate-mission-protocol.sh
  shell: /usr/bin/bash -e {0}
  env:
    FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
    pythonLocation: /opt/hostedtoolcache/Python/3.13.13/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.13.13/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.13/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.13/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.13/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.13.13/x64/lib
    BASE_SHA: 5005615a06700b787c076a355d2cb40c1f1283ba
    HEAD_SHA: a2935ec767f716b91bdbf8056ba58d4776e94176
MISSION_PROTOCOL|INFO|range|5005615a06700b787c076a355d2cb40c1f1283ba...a2935ec767f716b91bdbf8056ba58d4776e94176
MISSION_PROTOCOL|INFO|changed_files|1
MISSION_PROTOCOL|INFO|non_trivial|true
MISSION_PROTOCOL|INFO|mission_files_changed|0
MISSION_PROTOCOL|FAIL|missing-mission-file|non-trivial-pr-without-mission
MISSION_PROTOCOL|EVIDENCE|trigger_file|.github/scripts/validate-registry-paths.sh
Error: Process completed with exit code 1.

Copilot AI and others added 3 commits May 13, 2026 14:09
Co-authored-by: weslleycapelari <28955078+weslleycapelari@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

@copilot resolve marketplace integrity workflow error:

...

Implemented the mission protocol gate fix in commit 1bf7455 by adding a valid mission file at .github/MISSIONS/copilot-to-copilot-fix-marketplace-integrity-gate-2026-05-13.md (with all required keys) and validating it against the PR range; the mission protocol check now passes locally.

Copilot AI changed the title Fix Bash heredoc parsing in registry path validation script Fix registry path validator parsing and satisfy mission protocol gate May 13, 2026
Copilot AI requested a review from weslleycapelari May 13, 2026 14:14
@weslleycapelari weslleycapelari marked this pull request as ready for review May 13, 2026 14:38
@weslleycapelari
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

@copilot apply changes based on the comments in this thread

I reviewed thread #pullrequestreview-4282339391; it contains the overview plus the already-resolved indentation note, and those changes are already in this branch (d62ff1d, latest 1bf7455). Marketplace Integrity is green on 1bf7455 (run 25804659871). If you want me to apply a different set of comments, share that specific thread link and I’ll update it.

@weslleycapelari weslleycapelari merged commit 56aa384 into main May 13, 2026
2 checks passed
@weslleycapelari weslleycapelari deleted the copilot/fix-syntax-error-validate-registry-paths branch May 13, 2026 15:09
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.

3 participants