fix: prevent silent partial completion — fail closed, verify pushes, persist logs #1

Merged
rileyseaburg merged 2 commits from fix/silent-partial-completion into main 2026-04-30 06:22:39 +00:00
rileyseaburg commented 2026-04-29 20:40:33 +00:00 (Migrated from github.com)

Problem

Addresses issue #105: the action picked up issues, posted analysis comments, but produced no commits, no pushed branch, and no PR. This made distributed work brittle.

Root cause: The action treated all task failures as successes. Server mode hardcoded exit_code=0 regardless of task status. Push operations were never verified.

Changes

Fail Closed (core fix)

  • poll_task_result — now returns non-zero on failure/timeout/canceled (was always returning 0)
  • handle_issue — checks dispatch+poll results, exits non-zero on failure (was ignoring errors)
  • run_server_review — exits non-zero when dispatch or poll fails (was hardcoding exit_code=0)
  • run_local_review — exits non-zero when codetether binary fails (was swallowing the exit code)
  • apply_fix — uses verified_git_push that confirms the commit landed on remote

Push Verification

  • verified_git_push — pushes, then queries GitHub API to confirm the commit SHA is at the branch tip
  • verify_branch_pushed — checks a branch exists on remote via API
  • verify_commit_on_branch — confirms expected SHA matches remote branch HEAD

Status Comments (user visibility)

  • 🔵 "Picked Up" comment posted immediately when an issue/PR is dispatched
  • ❌ Failure comment with workflow run link posted when tasks fail
  • Step Summary written to $GITHUB_STEP_SUMMARY at every exit path

Log & Artifact Persistence

  • Persistent log file at .codetether-logs/action.log (survives action failure)
  • Artifacts saved: dispatch-response.json, task-result.txt, codetether-output.txt, prompt.txt, pr-diff.patch
  • actions/upload-artifact@v4 step runs if: always() with 14-day retention

New Inputs/Outputs

  • fail_on_error input (default: true) — set false for best-effort mode
  • task_id output — exposes server task ID for downstream use
  • GITHUB_STEP_SUMMARY, GITHUB_RUN_ID, GITHUB_SERVER_URL env vars now passed through

Infrastructure

  • log_info/log_warn/log_error — structured logging to both console and persistent file
  • finalize_run — writes markdown summary, called at every exit path
  • create_pull_request — PR creation helper with retry and duplicate detection
  • github_api_post — POST helper with status check and error logging
  • Fixed \n literals in comment bodies → proper shell newlines
  • .gitignore now excludes .codetether-agent/

Files Changed

File Lines Summary
action.yml +23 New inputs/outputs, env vars, upload-artifact step
action/entrypoint.sh +100/-20 Fail-closed logic in handle_issue + run_server_review
action/lib/common.sh +55 Logging, artifacts, finalize_run
action/lib/github.sh +150 verified_git_push, create_pull_request, API helpers
action/lib/server.sh +35/-15 poll_task_result returns non-zero, cancel handling
action/lib/local.sh +55/-25 Fail-closed in run_local_review, verified push in apply_fix

API-Side Companion Changes Needed

The server-side task dispatch API (/v1/tasks/dispatch) and its workers should also be hardened:

  1. Worker heartbeat: Workers should POST heartbeat updates so the action can distinguish "still working" from "dead worker"
  2. Structured error response: /v1/tasks/dispatch/{id} should include an error_message field (not just status=failed) so the action can surface the actual failure reason
  3. Result artifacts: The task result should include a files_changed list and git_operations array so the action can verify the worker actually made changes
  4. Branch/PR metadata: If the server-side worker creates branches or PRs, that metadata should be in the task response so the action can verify them

Testing

  • All 6 files pass bash -n syntax validation
  • Branch pushed and verified at remote: fix/silent-partial-completion
## Problem Addresses issue #105: the action picked up issues, posted analysis comments, but produced no commits, no pushed branch, and no PR. This made distributed work brittle. **Root cause**: The action treated all task failures as successes. Server mode hardcoded `exit_code=0` regardless of task status. Push operations were never verified. ## Changes ### Fail Closed (core fix) - **`poll_task_result`** — now returns non-zero on failure/timeout/canceled (was always returning 0) - **`handle_issue`** — checks dispatch+poll results, exits non-zero on failure (was ignoring errors) - **`run_server_review`** — exits non-zero when dispatch or poll fails (was hardcoding exit_code=0) - **`run_local_review`** — exits non-zero when codetether binary fails (was swallowing the exit code) - **`apply_fix`** — uses `verified_git_push` that confirms the commit landed on remote ### Push Verification - **`verified_git_push`** — pushes, then queries GitHub API to confirm the commit SHA is at the branch tip - **`verify_branch_pushed`** — checks a branch exists on remote via API - **`verify_commit_on_branch`** — confirms expected SHA matches remote branch HEAD ### Status Comments (user visibility) - **🔵 "Picked Up" comment** posted immediately when an issue/PR is dispatched - **❌ Failure comment** with workflow run link posted when tasks fail - **Step Summary** written to `$GITHUB_STEP_SUMMARY` at every exit path ### Log & Artifact Persistence - Persistent log file at `.codetether-logs/action.log` (survives action failure) - Artifacts saved: dispatch-response.json, task-result.txt, codetether-output.txt, prompt.txt, pr-diff.patch - `actions/upload-artifact@v4` step runs `if: always()` with 14-day retention ### New Inputs/Outputs - **`fail_on_error`** input (default: `true`) — set `false` for best-effort mode - **`task_id`** output — exposes server task ID for downstream use - `GITHUB_STEP_SUMMARY`, `GITHUB_RUN_ID`, `GITHUB_SERVER_URL` env vars now passed through ### Infrastructure - **`log_info`/`log_warn`/`log_error`** — structured logging to both console and persistent file - **`finalize_run`** — writes markdown summary, called at every exit path - **`create_pull_request`** — PR creation helper with retry and duplicate detection - **`github_api_post`** — POST helper with status check and error logging - Fixed `\n` literals in comment bodies → proper shell newlines - `.gitignore` now excludes `.codetether-agent/` ## Files Changed | File | Lines | Summary | |------|-------|---------| | `action.yml` | +23 | New inputs/outputs, env vars, upload-artifact step | | `action/entrypoint.sh` | +100/-20 | Fail-closed logic in handle_issue + run_server_review | | `action/lib/common.sh` | +55 | Logging, artifacts, finalize_run | | `action/lib/github.sh` | +150 | verified_git_push, create_pull_request, API helpers | | `action/lib/server.sh` | +35/-15 | poll_task_result returns non-zero, cancel handling | | `action/lib/local.sh` | +55/-25 | Fail-closed in run_local_review, verified push in apply_fix | ## API-Side Companion Changes Needed The server-side task dispatch API (`/v1/tasks/dispatch`) and its workers should also be hardened: 1. **Worker heartbeat**: Workers should POST heartbeat updates so the action can distinguish "still working" from "dead worker" 2. **Structured error response**: `/v1/tasks/dispatch/{id}` should include an `error_message` field (not just `status=failed`) so the action can surface the actual failure reason 3. **Result artifacts**: The task result should include a `files_changed` list and `git_operations` array so the action can verify the worker actually made changes 4. **Branch/PR metadata**: If the server-side worker creates branches or PRs, that metadata should be in the task response so the action can verify them ## Testing - All 6 files pass `bash -n` syntax validation - Branch pushed and verified at remote: `fix/silent-partial-completion`
gemini-code-assist[bot] (Migrated from github.com) reviewed 2026-04-29 20:42:57 +00:00
gemini-code-assist[bot] (Migrated from github.com) left a comment

Code Review

This pull request introduces comprehensive logging, artifact persistence, and "fail closed" logic to the CodeTether GitHub Action. Key changes include the addition of a fail_on_error input, structured logging to both the console and a persistent log file, and automated status comments on GitHub issues and PRs. The action now supports uploading logs as artifacts and generating a detailed job summary. Feedback focuses on improving the robustness of shell script variable assignments when capturing HTTP status codes from curl, specifically to prevent non-numeric values from causing syntax errors or unexpected crashes during integer comparisons.

## Code Review This pull request introduces comprehensive logging, artifact persistence, and "fail closed" logic to the CodeTether GitHub Action. Key changes include the addition of a fail_on_error input, structured logging to both the console and a persistent log file, and automated status comments on GitHub issues and PRs. The action now supports uploading logs as artifacts and generating a detailed job summary. Feedback focuses on improving the robustness of shell script variable assignments when capturing HTTP status codes from curl, specifically to prevent non-numeric values from causing syntax errors or unexpected crashes during integer comparisons.
@ -1,18 +1,25 @@
#!/usr/bin/env bash
gemini-code-assist[bot] (Migrated from github.com) commented 2026-04-29 20:42:57 +00:00

medium

The use of 2>&1 inside the subshell captures both stdout (the HTTP status code) and stderr (potential curl error messages) into the resp variable. If a network error occurs, resp will contain a string like curl: (6) Could not resolve host..., which will cause a syntax error in the subsequent integer comparison at line 17 ([ "$resp" -ge 200 ]). It is safer to redirect stderr to the log file and provide a default value if curl fails.

  resp=$(curl -sS -o /dev/null -w "%{http_code}" \
    -X POST \
    -H "Authorization: token ${GITHUB_TOKEN}" \
    -H "Accept: application/vnd.github.v3+json" \
    "https://api.github.com/repos/${REPO_FULL_NAME}/issues/${target_number}/comments" \
    -d "$(jq -n --arg body "$body" '{body: $body}')" 2>> "${CODETETHER_LOG_FILE}") || :
  [ -z "$resp" ] && resp="000"
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) The use of `2>&1` inside the subshell captures both stdout (the HTTP status code) and stderr (potential curl error messages) into the `resp` variable. If a network error occurs, `resp` will contain a string like `curl: (6) Could not resolve host...`, which will cause a syntax error in the subsequent integer comparison at line 17 (`[ "$resp" -ge 200 ]`). It is safer to redirect stderr to the log file and provide a default value if curl fails. ```suggestion resp=$(curl -sS -o /dev/null -w "%{http_code}" \ -X POST \ -H "Authorization: token ${GITHUB_TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com/repos/${REPO_FULL_NAME}/issues/${target_number}/comments" \ -d "$(jq -n --arg body "$body" '{body: $body}')" 2>> "${CODETETHER_LOG_FILE}") || : [ -z "$resp" ] && resp="000" ```
gemini-code-assist[bot] (Migrated from github.com) commented 2026-04-29 20:42:57 +00:00

medium

Similar to post_github_comment, capturing stderr into http_code can lead to non-numeric values and crashes in comparisons. Additionally, since set -e is active, a curl failure here will crash the script immediately without a proper error message or summary. Redirecting stderr to the log file and ensuring a default numeric value is more robust.

  http_code=$(curl -sS -o /tmp/codetether-gh-response.json -w "%{http_code}" \
    -X POST \
    -H "Authorization: token ${GITHUB_TOKEN}" \
    -H "Accept: application/vnd.github.v3+json" \
    "https://api.github.com${path}" \
    -d "$payload" 2>> "${CODETETHER_LOG_FILE}") || :
  [ -z "$http_code" ] && http_code="000"
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) Similar to `post_github_comment`, capturing stderr into `http_code` can lead to non-numeric values and crashes in comparisons. Additionally, since `set -e` is active, a curl failure here will crash the script immediately without a proper error message or summary. Redirecting stderr to the log file and ensuring a default numeric value is more robust. ```suggestion http_code=$(curl -sS -o /tmp/codetether-gh-response.json -w "%{http_code}" \ -X POST \ -H "Authorization: token ${GITHUB_TOKEN}" \ -H "Accept: application/vnd.github.v3+json" \ "https://api.github.com${path}" \ -d "$payload" 2>> "${CODETETHER_LOG_FILE}") || : [ -z "$http_code" ] && http_code="000" ```
@ -56,22 +57,32 @@ dispatch_server_task() {
fi
gemini-code-assist[bot] (Migrated from github.com) commented 2026-04-29 20:42:57 +00:00

medium

Capturing stderr via 2>&1 and piping to tee results in http_code containing both the status code and any error messages. This will cause the integer comparison at line 67 to fail. Redirecting stderr directly to the log file ensures the variable only contains the status code, and using $? directly is safer than PIPESTATUS when the pipe is removed.

  http_code=$(curl "${curl_args[@]}" 2>> "${CODETETHER_LOG_FILE}")
  local curl_exit=$?
  [ -z "$http_code" ] && http_code="000"
![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg) Capturing stderr via `2>&1` and piping to `tee` results in `http_code` containing both the status code and any error messages. This will cause the integer comparison at line 67 to fail. Redirecting stderr directly to the log file ensures the variable only contains the status code, and using `$?` directly is safer than `PIPESTATUS` when the pipe is removed. ```suggestion http_code=$(curl "${curl_args[@]}" 2>> "${CODETETHER_LOG_FILE}") local curl_exit=$? [ -z "$http_code" ] && http_code="000" ```
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2026-04-29 20:44:18 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

This PR hardens the CodeTether GitHub Action against “silent partial completion” by failing closed on task failures, persisting diagnostics as artifacts, and verifying that git pushes actually landed on the remote.

Changes:

  • Make server/local execution paths propagate non-zero exit codes on dispatch/poll/agent failures and write step summaries on all exit paths.
  • Add persistent logging + artifact capture under .codetether-logs/ and upload them via actions/upload-artifact@v4 (if: always()).
  • Add GitHub API helpers and verified push logic to confirm a pushed commit is at the remote branch tip.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
action/lib/server.sh Dispatch now logs/persists artifacts; polling returns non-zero on failure/timeout/cancel.
action/lib/local.sh Local execution now fails closed, persists prompt/output, and uses verified push in fix flow.
action/lib/github.sh Adds GitHub API POST helper, PR creation helper, and push verification helpers.
action/lib/common.sh Introduces structured logging, artifact saving, and finalize_run step summary writer.
action/entrypoint.sh Updates issue/review flows to fail closed, post status/failure comments, and always finalize.
action.yml Adds fail_on_error, task_id output, passes env vars, and uploads logs artifact.
.gitignore Ignores .codetether-agent/.

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

## Pull request overview This PR hardens the CodeTether GitHub Action against “silent partial completion” by failing closed on task failures, persisting diagnostics as artifacts, and verifying that git pushes actually landed on the remote. **Changes:** - Make server/local execution paths propagate non-zero exit codes on dispatch/poll/agent failures and write step summaries on all exit paths. - Add persistent logging + artifact capture under `.codetether-logs/` and upload them via `actions/upload-artifact@v4 (if: always())`. - Add GitHub API helpers and verified push logic to confirm a pushed commit is at the remote branch tip. ### Reviewed changes Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | `action/lib/server.sh` | Dispatch now logs/persists artifacts; polling returns non-zero on failure/timeout/cancel. | | `action/lib/local.sh` | Local execution now fails closed, persists prompt/output, and uses verified push in fix flow. | | `action/lib/github.sh` | Adds GitHub API POST helper, PR creation helper, and push verification helpers. | | `action/lib/common.sh` | Introduces structured logging, artifact saving, and `finalize_run` step summary writer. | | `action/entrypoint.sh` | Updates issue/review flows to fail closed, post status/failure comments, and always finalize. | | `action.yml` | Adds `fail_on_error`, `task_id` output, passes env vars, and uploads logs artifact. | | `.gitignore` | Ignores `.codetether-agent/`. | </details> --- 💡 <a href="/rileyseaburg/codetether-action/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@ -146,7 +156,10 @@ runs:
INPUT_AGENT_TYPE: ${{ inputs.agent_type }}
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:17 +00:00

action.yml sets GITHUB_STEP_SUMMARY: ${{ github.step_summary }}. GITHUB_STEP_SUMMARY is already provided by the runner as an environment variable, and github.step_summary is not a standard context value; this risks overwriting the real path with an empty string and preventing summaries from being written. Drop this env mapping and rely on the runner-provided GITHUB_STEP_SUMMARY instead.

`action.yml` sets `GITHUB_STEP_SUMMARY: ${{ github.step_summary }}`. `GITHUB_STEP_SUMMARY` is already provided by the runner as an environment variable, and `github.step_summary` is not a standard context value; this risks overwriting the real path with an empty string and preventing summaries from being written. Drop this env mapping and rely on the runner-provided `GITHUB_STEP_SUMMARY` instead.
@ -68,16 +71,59 @@ ${comment_instructions}
Issue body:
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:16 +00:00

In handle_issue local-mode path, if ! run_local_codetether ...; then local ec=$? captures the status of the ! expression (usually 0) rather than codetether’s real exit code. Capture the exit code from run_local_codetether directly before negation/branching so logs and write_review_output reflect the true failure.

In `handle_issue` local-mode path, `if ! run_local_codetether ...; then local ec=$?` captures the status of the `!` expression (usually 0) rather than codetether’s real exit code. Capture the exit code from `run_local_codetether` directly before negation/branching so logs and `write_review_output` reflect the true failure.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:18 +00:00

finalize_run appends the entire persistent log file into $GITHUB_STEP_SUMMARY. Action logs can get very large (especially with tee), which can exceed GitHub’s step summary size limits and make the summary noisy/unusable. Consider truncating (e.g., last N KB/lines) or linking to the uploaded artifact instead of embedding the full file.

`finalize_run` appends the entire persistent log file into `$GITHUB_STEP_SUMMARY`. Action logs can get very large (especially with `tee`), which can exceed GitHub’s step summary size limits and make the summary noisy/unusable. Consider truncating (e.g., last N KB/lines) or linking to the uploaded artifact instead of embedding the full file.
@ -16,3 +22,4 @@
fi
}
# ── Write multi-line review output to $GITHUB_OUTPUT ─────────────
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:17 +00:00

post_github_comment captures curl output with -w "%{http_code}" but also redirects 2>&1 into the same variable and then does numeric comparisons. If curl writes an error message, resp won’t be a pure number and the HTTP check becomes unreliable. Keep stderr separate (or check curl’s exit code) and ensure the variable contains only the status code.

`post_github_comment` captures curl output with `-w "%{http_code}"` but also redirects `2>&1` into the same variable and then does numeric comparisons. If curl writes an error message, `resp` won’t be a pure number and the HTTP check becomes unreliable. Keep stderr separate (or check curl’s exit code) and ensure the variable contains only the status code.
@ -47,0 +88,4 @@
else
log_error "Branch '${branch}' NOT found on remote (HTTP ${ref_response})"
return 1
fi
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:16 +00:00

github_api_post assigns http_code from curl ... -w "%{http_code}" while also redirecting 2>&1 into the same capture; any stderr output will corrupt the code and can break the HTTP range check. Also consider explicitly handling curl non-zero exit (under set -e, a failing curl inside $(...) may exit the script before this function can return 1).

`github_api_post` assigns `http_code` from `curl ... -w "%{http_code}"` while also redirecting `2>&1` into the same capture; any stderr output will corrupt the code and can break the HTTP range check. Also consider explicitly handling curl non-zero exit (under `set -e`, a failing curl inside `$(...)` may exit the script before this function can return 1).
@ -47,0 +160,4 @@
sleep 2
done
log_error "Failed to create PR after ${max_retries} attempts"
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:17 +00:00

verify_commit_on_branch does jq parsing on $response without guarding for empty/non-JSON responses. Since the action runs with set -e, a transient GitHub API failure could cause jq to exit non-zero and abort the entire action instead of returning 1. Handle API failures by validating the response (or using jq -e with || true) and returning a controlled non-zero status.

`verify_commit_on_branch` does `jq` parsing on `$response` without guarding for empty/non-JSON responses. Since the action runs with `set -e`, a transient GitHub API failure could cause `jq` to exit non-zero and abort the entire action instead of returning 1. Handle API failures by validating the response (or using `jq -e` with `|| true`) and returning a controlled non-zero status.
@ -164,39 +179,63 @@ After editing files, run the smallest relevant validation needed to support the
local fix_file
fix_file="$(mktemp)"
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:17 +00:00

In apply_fix, the pattern if ! run_local_codetether ...; then local ec=$? records the exit code of the negated condition (typically 0), not the actual codetether exit code. Run the command without !, capture $? immediately, and branch on the captured value so failures report the real exit status.

In `apply_fix`, the pattern `if ! run_local_codetether ...; then local ec=$?` records the exit code of the negated condition (typically 0), not the actual codetether exit code. Run the command without `!`, capture `$?` immediately, and branch on the captured value so failures report the real exit status.
@ -56,22 +57,32 @@ dispatch_server_task() {
fi
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:16 +00:00

response="$(cat /tmp/codetether-response.json)" will cause the whole action to exit under set -e if curl failed before writing the file. Read the file defensively (e.g., cat ... 2>/dev/null || true) and treat missing/empty response as a dispatch failure with a useful REVIEW_TEXT.

`response="$(cat /tmp/codetether-response.json)"` will cause the whole action to exit under `set -e` if curl failed before writing the file. Read the file defensively (e.g., `cat ... 2>/dev/null || true`) and treat missing/empty response as a dispatch failure with a useful `REVIEW_TEXT`.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2026-04-29 20:44:18 +00:00

dispatch_server_task assigns http_code from curl ... 2>&1 | tee ..., which will mix curl stderr/log output into the variable and can make the subsequent numeric HTTP checks unreliable. Capture the HTTP code cleanly (stdout only) and tee stderr separately; also handle curl non-zero exits explicitly (you already compute curl_exit but never use it).

`dispatch_server_task` assigns `http_code` from `curl ... 2>&1 | tee ...`, which will mix curl stderr/log output into the variable and can make the subsequent numeric HTTP checks unreliable. Capture the HTTP code cleanly (stdout only) and tee stderr separately; also handle `curl` non-zero exits explicitly (you already compute `curl_exit` but never use it).
rileyseaburg commented 2026-04-29 20:52:36 +00:00 (Migrated from github.com)

Addressed Review Feedback

Commit: 6590181

All 11 review comments addressed across 2 reviewers (gemini-code-assist, Copilot). Summary of fixes:

curl stderr isolation (6 comments)

All curl calls that used 2>&1 to capture stderr into the same variable as the HTTP status code now redirect stderr to the log file (2>> "${CODETETHER_LOG_FILE}") and default to "000" on empty response. Affected functions:

  • post_github_comment — 2>&1 → 2>> logfile + || : + fallback
  • github_api_post — same pattern
  • verify_branch_pushed — same pattern
  • dispatch_server_task — removed 2>&1 | tee pipe, direct capture with 0

Defensive response handling (2 comments)

  • dispatch_server_task: reads /tmp/codetether-response.json with 2>/dev/null || true, treats empty response as dispatch failure
  • verify_commit_on_branch: jq call wrapped with 2>/dev/null || true to prevent set -e abort on bad JSON

Exit code capture fix (2 comments)

  • handle_issue (entrypoint.sh): changed if ! run_local_codetether ...; then local ec=$? to run_local_codetether; local ec=$?; if [ "$ec" -ne 0 ] — captures the real exit code instead of the negated result
  • apply_fix (local.sh): same fix applied

Step summary log truncation (1 comment)

  • finalize_run: when log exceeds 10 KB, embeds only the last 10 KB with a note about the full artifact instead of dumping the entire file

Remove invalid env mapping (1 comment)

  • action.yml: removed GITHUB_STEP_SUMMARY: ${{ github.step_summary }} — the runner provides this natively; github.step_summary is not a valid context and was overwriting with empty

Tests

  • All 6 shell files pass bash -n syntax validation
  • No test suite exists in this repo
## Addressed Review Feedback Commit: `6590181` All 11 review comments addressed across 2 reviewers (gemini-code-assist, Copilot). Summary of fixes: ### curl stderr isolation (6 comments) All curl calls that used `2>&1` to capture stderr into the same variable as the HTTP status code now redirect stderr to the log file (`2>> "${CODETETHER_LOG_FILE}"`) and default to `"000"` on empty response. Affected functions: - `post_github_comment` — `2>&1` → `2>> logfile` + `|| :` + fallback - `github_api_post` — same pattern - `verify_branch_pushed` — same pattern - `dispatch_server_task` — removed `2>&1 | tee` pipe, direct capture with `0` ### Defensive response handling (2 comments) - `dispatch_server_task`: reads `/tmp/codetether-response.json` with `2>/dev/null || true`, treats empty response as dispatch failure - `verify_commit_on_branch`: `jq` call wrapped with `2>/dev/null || true` to prevent `set -e` abort on bad JSON ### Exit code capture fix (2 comments) - `handle_issue` (entrypoint.sh): changed `if ! run_local_codetether ...; then local ec=$?` to `run_local_codetether; local ec=$?; if [ "$ec" -ne 0 ]` — captures the real exit code instead of the negated result - `apply_fix` (local.sh): same fix applied ### Step summary log truncation (1 comment) - `finalize_run`: when log exceeds 10 KB, embeds only the last 10 KB with a note about the full artifact instead of dumping the entire file ### Remove invalid env mapping (1 comment) - `action.yml`: removed `GITHUB_STEP_SUMMARY: ${{ github.step_summary }}` — the runner provides this natively; `github.step_summary` is not a valid context and was overwriting with empty ### Tests - All 6 shell files pass `bash -n` syntax validation - No test suite exists in this repo
Sign in to join this conversation.
No description provided.