Skip to content

Bump evidence action pin past EVI-11 (pipe-drain fix)#580

Merged
sunnypurewal merged 3 commits into
mainfrom
fix-evidence-action-pin
May 25, 2026
Merged

Bump evidence action pin past EVI-11 (pipe-drain fix)#580
sunnypurewal merged 3 commits into
mainfrom
fix-evidence-action-pin

Conversation

@riddim-developer-bot

Copy link
Copy Markdown
Contributor

Why

PR #579 pinned RiddimSoftware/evidence@fc65484 to get past EVI-7's capture-pr argument wiring. That pin is still missing EVI-11 (#41), which fixed a pipe-buffer deadlock in CommandRunner.swift. Diagnosed during local-first validation of the cyclomatic-complexity pilot — the pre-EVI-11 CLI hung at 12+ minutes post-compile on local runs.

What the bug was

The pre-EVI-11 ProcessCommandRunner.run(_:_:workingDirectory:environment:) created pipes for the child process's stdout/stderr, then called process.waitUntilExit(), then read the pipes. macOS pipe buffer is 16-64 KB; xcodebuild emits megabytes during a build. The buffer fills mid-build, xcodebuild's writer thread blocks waiting for a drain, no one drains until after the wait — classic textbook deadlock. .app files appear on disk (the build steps themselves succeed) but xcodebuild can never exit.

EVI-11 fixed it with readabilityHandler-based concurrent draining. Verified locally: pre-fix binary hung at 12+ minutes on a build that the post-fix binary completes in ~1 minute.

CI happens to mask this because the action's ${cli} ${args[@]} invocation has a downstream shell pipe that drains the stdout transitively. Local invocations (no downstream pipe) hit the deadlock directly.

What changed

Bump RiddimSoftware/evidence@fc65484f400ec8bc0ded78a70fb54ed32f7dfa6dRiddimSoftware/evidence@e76e7991b7eda56857080e46fd84ec6ebb642161 (current evidence/main, post-EVI-11). The inline workflow comment is updated to explain the second pin requirement so future maintainers know why this isn't @v0.

Trade-offs not taken

  • Did not move the v0 tag in RiddimSoftware/evidence. That's the right long-term fix (so we can return to @v0), but it would silently affect every consumer. Pinning here is reversible and contained.
  • Did not change the local CLI invocation. Local runs were also affected, but the fix lives in the upstream evidence repo, not in any consuming workflow.

Test plan

  • actionlint .github/workflows/evidence-regression.yml — clean.
  • Local CLI run with a binary rebuilt from e76e7991b7eda56857080e46fd84ec6ebb642161 of evidence — used the same pipeline to validate the fix worked (the pipeline now produces evidence end-to-end where the prior CLI hung).
  • After this merges, the canonical dispatch is unchanged:
    gh workflow run evidence-regression.yml -R RiddimSoftware/epac --ref main \
      -f plan_path=.evidence/regression-parliament-calendar.json \
      -f pr_number=542 \
      -f before_sha=9ba487ca2fdb2ecfa4fe722d0c353944284bc9ff \
      -f after_sha=79e3b0bc2904dcc69e53975142deb4283f5f8c6d \
      -f linear_issue_id=EPAC-1997 \
      -f output_subdir=pilot-cyclomatic-complexity
    

Reviewer-Boundary: review-only

…r' to plan

The first attempt to dispatch evidence-regression.yml against the
cyclomatic pilot failed with "Missing required option --repo." after
the action invoked the evidence CLI as bare `evidence capture-pr`.
Root cause: the `v0` tag in RiddimSoftware/evidence was created before
EVI-7 (#39) wired the capture-pr argument translation into action.yml.
At @v0, the action's case statement has no `capture-pr)` branch, so it
runs the CLI without `--repo`, `--pr`, `--plan`, `--output`, etc.

Pinning to a SHA past EVI-7 (fc65484f400ec8bc0ded78a70fb54ed32f7dfa6d,
the head of evidence/main as of this commit) restores the wiring. This
is a temporary fix — the right long-term move is to fast-forward the
`v0` tag in RiddimSoftware/evidence, after which we can move back to
`@v0` for cross-repo consistency.

The second issue was the plan itself: regression-parliament-calendar.json
omitted the `pr` field, which the CLI requires even when --pr is passed
as an override. Added `pr: 542` as the conventional placeholder (the
cyclomatic-project trigger PR). The CLI's --pr flag and the workflow's
pr_number input still override at dispatch time, so this value only
affects metadata in manifest.json when no override is supplied.

Local capture-pr against project-boundary SHAs (9ba487c79e3b0b)
is currently running to validate the plan end-to-end before the next
CI dispatch.
The prior pin (fc65484) was past EVI-7's capture-pr argument wiring
but predated EVI-11 (#41), which fixed a pipe-buffer deadlock in
CommandRunner.swift. The pre-EVI-11 CLI read xcodebuild's stdout
pipe only AFTER process.waitUntilExit() — but xcodebuild emits
megabytes of output during a build, the OS pipe buffer is 16-64 KB,
and xcodebuild's writer thread blocks on a full pipe forever
because no one is draining. The .app gets built (file-system writes
don't depend on pipe state), but the process never exits.

This affected local runs of evidence/.build/release/evidence built
from any commit between EVI-8 and EVI-11. Verified during local
diagnosis: a CLI built from fc65484 hung at 12+ minutes post-build;
a CLI rebuilt from e76e799 has the concurrent readabilityHandler
draining and completes builds normally.

CI was masking this same deadlock by luck-of-the-shell — the
action's `${cli} ${args[@]}` invocation has a downstream pipe that
keeps the stdout drained transitively. Local invocations (no
downstream pipe) hit the deadlock directly. Pinning past EVI-11
gives both CI and any future local runs the fix.

Long-term fix is still to move the `v0` tag in RiddimSoftware/evidence
past current main so we can return to `@v0`.
# Conflicts:
#	.github/workflows/evidence-regression.yml
@riddim-developer-bot

Copy link
Copy Markdown
Contributor Author

Resolved conflict with origin/main (merge commit 434e6af).

Conflict source. PR #579 landed first and pinned .github/workflows/evidence-regression.yml to RiddimSoftware/evidence@fc65484 (past EVI-7). This PR bumps the same uses: further to @e76e7991 (past EVI-11). Both PRs also added "pr": 542 to .evidence/regression-parliament-calendar.json; #579's version landed on main, so that file has no net diff here.

Resolution. Took HEAD's side of the workflow conflict — that's the explicit intent of this PR. The merged comment block explains both pin requirements (EVI-7 wiring + EVI-11 pipe drain) so future maintainers know why this isn't @v0 yet.

Net diff vs main (verified post-merge):

Verification.

  • actionlint .github/workflows/evidence-regression.yml — clean.
  • git diff origin/main -- .github/workflows/evidence-regression.yml .evidence/regression-parliament-calendar.json — only the workflow pin/comment remains, as expected.

No review comments to address.

@sunnypurewal
sunnypurewal merged commit 85b608d into main May 25, 2026
4 checks passed
@sunnypurewal
sunnypurewal deleted the fix-evidence-action-pin branch May 25, 2026 13:05
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.

1 participant