Skip to content

ci: switch workflows to self-hosted local macOS runner - #34

Open
LegalMarc wants to merge 4 commits into
mainfrom
ci/self-hosted-runner
Open

ci: switch workflows to self-hosted local macOS runner#34
LegalMarc wants to merge 4 commits into
mainfrom
ci/self-hosted-runner

Conversation

@LegalMarc

Copy link
Copy Markdown
Owner

Summary

  • Registers this machine as a repo-scoped self-hosted GitHub Actions runner (labels: self-hosted, macOS, ARM64, marcut-local), installed as a persistent launchd service via svc.sh install.
  • Points ci.yml, macos-build-verify.yml, and macos-full-e2e.yml at [self-hosted, marcut-local] instead of GitHub-hosted macos-14.

Per user request to use local runners instead of GitHub-hosted ones. Runner is currently online and verified via the GitHub API.

Note for reviewers: self-hosted runners execute arbitrary code from workflow-triggering events on the host machine. This repo's branch protection (PR + 1 approval + code-owner review, no bypass actors) limits who can trigger that, but worth keeping in mind if the contributor model changes.

Separate from #33 intentionally, so it doesn't block that PR.

🤖 Generated with Claude Code

Marc Mandel and others added 4 commits July 3, 2026 18:01
Registered this machine as a repo-scoped self-hosted GitHub Actions runner
(labels: self-hosted, macOS, ARM64, marcut-local) rather than using
GitHub-hosted macos-14 runners, per user preference. Points all three
workflows (ci.yml, macos-build-verify.yml, macos-full-e2e.yml) at
[self-hosted, marcut-local].

Note: self-hosted runners execute arbitrary code from workflow-triggering
events on this machine. This repo's branch protection (PR + 1 approval +
code-owner review required, no bypass actors) limits triggering to trusted
collaborators, but this is worth keeping in mind if the repo's contributor
model ever changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
actions/setup-python@v5's macOS install path hardcodes /Users/runner for
its hostedtoolcache, which only exists on GitHub-hosted runners (which
literally run as a user named "runner"). On this self-hosted runner
(running as a different user), that step failed immediately with
"mkdir: /Users/runner: Permission denied", regardless of RUNNER_TOOL_CACHE.

Self-hosted runners are expected to bring their own toolchain rather than
relying on ephemeral-runner setup actions. python3.11 is already installed
on this machine (Homebrew) -- both workflows now use it directly instead of
going through actions/setup-python.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
LegalMarc added a commit that referenced this pull request Jul 15, 2026
…URLs (#78)

* fix: don't let //-comment stripping corrupt string values containing URLs

parse_llm_response()'s comment-stripping regex (re.sub(r'(?m)//.*$', '', ...))
matched `//` anywhere on a line, including inside JSON string values. Any LLM-
extracted entity whose text contains "//" -- most commonly a URL like
"https://legal.example" -- had everything from the `//` to end-of-line
stripped, corrupting the JSON and making a genuinely valid response
unparseable.

Root cause of the nightly/tag E2E red streak since 2026-07-10: the fixed
CI test document contains "https://legal.example", which llama3.2:1b
reliably extracts as an entity, so every extraction attempt for that chunk
hit this corruption and failed after retries. Before the A4 fail-closed
hardening (#58, 2026-07-09), the same chunk failure was silently swallowed
and the run still reported success; A4 correctly started failing closed on
it instead of shipping an incompletely-scanned document, which is what
surfaced this as a hard CI failure. Reproduced deterministically outside
CI (isolated local Ollama instance, 15/15 failures before the fix, 15/15
successes after) -- not CI-infra flakiness.

Replaced the naive regex with a string-aware line-comment stripper that
tracks JSON string-literal state (respecting \" escapes) and only treats
`//` as a comment start outside of one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* docs: defer PR #34 (self-hosted runner) with rationale

Not needed for CI green: the nightly/tag E2E red streak that would have
been the reason to revisit it turned out to have a deterministic root
cause unrelated to runner choice (see fix/json-comment-strip-url-corruption).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Marc Mandel <mhm/apps@marclaw.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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