detect_stack/detect_hooks/query_github functions write variables to
GITHUB_ENV for downstream workflow steps, but the same shell session
needs them as local variables too. Added explicit defaults before the
function calls.
Also removed heredoc expansion fallback syntax (:-) since variables
now have guaranteed defaults set before they're used.
Co-Authored-By: Claude <[email protected]>
All scripts using the pattern AGENT_OUTPUTS=$(cat <<OUTPUTS ... OUTPUTS
were missing the closing ')' for the command substitution. This caused
'unexpected EOF while looking for matching )' errors at runtime.
Fixed 7 files: build-context.sh, watch-checks.sh, triage-issue.sh,
analyze-pr.sh, run-review.sh, run-release.sh, and the 3 write-envelope.sh
files (rust-ci, js-ci, python-ci).
Co-Authored-By: Claude <[email protected]>
Three issues causing all workflow runs to fail:
1. github_token is a reserved name in workflow_call secrets
- Renamed to repo_token across ocr-review, ocr-scan, release, and
check-status workflows. Updated all secrets.repo_token refs.
2. Shell scripts not executable (exit code 126)
- chmod +x all .sh files in .github/actions/
3. pre-commit types_or rejected 'typescript' type tag
- Changed to 'ts' in .pre-commit-config.yaml for eslint and prettier hooks
Co-Authored-By: Claude <[email protected]>
Shell scripts (.sh) were sourcing agent-envelope.sh via the literal
GitHub Actions expression '${{ github.action_path }}', which doesn't get
evaluated by the shell — only in run: blocks in action YAML files.
Fix: Pass AGENT_ACTION_PATH as an environment variable from the action.yml
env block (where the runner evaluates the expression) and reference it as
${AGENT_ACTION_PATH} in shell scripts.
Also fix: date format bug (%Y repeated twice) in agent-envelope.sh
Co-Authored-By: Claude <[email protected]>