Repository navigation
fix(documents): a hung LibreOffice can't block a worker; CI runs on the self-hosted runner - #27
Merged
Merged
Conversation
All workflows use runs-on: self-hosted. The apt steps in CI only run on Linux; on a macOS runner, ffmpeg, tesseract and poppler come from Homebrew instead, and the LibreOffice tests skip. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JifG4FUAcs7EFGrcotkEDz
adeelahmad
force-pushed
the
claude/self-hosted-runner-3c1oos
branch
from
October 2, 2026 13:17
721aff1 to
61993d1
Compare
… token Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JifG4FUAcs7EFGrcotkEDz
6 of 8 tasks
- pre-commit ran the frontend lint and Prettier hooks once per batch of files, in parallel, though each run checks the whole app (about 3 minutes on the Mac); they now run once - setup-node saved pnpm's store to GitHub's cache after every job (130 MB, 9 minutes over a home uplink); the store already stays on the runner's disk, so the cache is now used on GitHub's runners only - setup-uv kept uv's cache in the job's temp folder, emptied after every job; on the self-hosted runner it now lives in the tool cache Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JifG4FUAcs7EFGrcotkEDz
This was referenced Oct 2, 2026
soffice starts soffice.bin, which kept the output pipes open: on a timeout, the worker killed soffice and then waited on the pipes forever, and soffice.bin outlived the conversion. Converters now run in a process group of their own that is killed on timeout and after every run. Reading a .doc on the command line gets the same timeout and a profile of its own, so it no longer waits on (or disturbs) a LibreOffice the user has open. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JifG4FUAcs7EFGrcotkEDz
adeelahmad
marked this pull request as ready for review
October 2, 2026 14:15
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: every job ran on GitHub's
ubuntu-latestrunners, which use paid Actions minutes. Each push to a pull request also ran CI twice, once forpushand once forpull_request.After: every job on main (CI ×3, pre-commit, PR title, release ×2) runs on
runs-on: self-hosted, which is Adeel's Mac runner. CI and pre-commit now:mainand on pull requests, and a newer push cancels the older run;GITHUB_TOKEN.macOS support in CI
runner.os == 'Linux'.Speed on the self-hosted runner
The first pre-commit job on the Mac took 18 minutes. The causes and fixes:
setup-nodeuploaded a 130 MB pnpm store to GitHub's cache after every job, which took 9 minutes over a home uplink. It now caches only on GitHub's runners, since the store stays on the Mac's disk.pass_filenames: true. pre-commit therefore ran each whole-app command once per batch of files, in parallel, which took about 3 minutes. They now run once.setup-uvkept uv's cache in the job's temp folder, which is deleted after each job. On self-hosted runners it now lives in the runner's tool cache.LibreOffice can no longer hang a worker (
app/domain/convert.py)sofficestartssoffice.bin, which keeps the output pipes open. On a timeout,subprocess.runkilledsofficeand then waited on those pipes forever, andsoffice.binoutlived the conversion..docfrom the command line (ingest.read_doc) gets the same timeout and its own LibreOffice profile.test_run_kills_what_the_converter_started. It fails without the change and passes with it.Motivation and Context
The repository is running out of GitHub Actions minutes.
The Mac needs the following for these jobs:
ghCLI.Not yet covered: the packaging PRs (#11 Synology, #12 Cloudron, #13 QNAP) still say
ubuntu-latest. They will be switched in a follow-up after they merge. If the runner is offline, jobs wait in the queue.Types of changes
Checklist:
🤖 Generated with Claude Code
https://claude.ai/code/session_01JifG4FUAcs7EFGrcotkEDz