Skip to content

deck.py 3.0.3: isolate LibreOffice profile per render call (parallel-safe rendering) - #7

Open
claudie-everyfolk wants to merge 1 commit into
mainfrom
deck-render-isolated-profile
Open

deck.py 3.0.3: isolate LibreOffice profile per render call (parallel-safe rendering)#7
claudie-everyfolk wants to merge 1 commit into
mainfrom
deck-render-isolated-profile

Conversation

@claudie-everyfolk

Copy link
Copy Markdown
Collaborator

Problem

deck.py render invoked soffice --headless --convert-to pdf … with no UserInstallation, so every render used LibreOffice's single shared default profile. Two soffice processes launched at once contend on that profile's lock — the second deadlocks/fails. That forces any caller to serialize all rendering, and (more subtly) pushes review architectures away from the cheap pattern hands-on-deck's own SKILL.md prescribes: fan out one review sub-agent per slide. A per-slide fan-out where agents may each render --crop to zoom would otherwise collide on the profile lock.

Fix

Give each render call its own LibreOffice profile, created inside that call's existing tempdir:

prof = (td / "louser").as_uri()
subprocess.run(["soffice", "-env:UserInstallation=%s" % prof, "--headless", "--convert-to", "pdf", …])

Renders are now safe to run concurrently. Trade-off: each call pays a fresh-profile init (~1s) instead of reusing a warm one — cheap next to the parallelism it unlocks, and rendering isn't on a hot path.

Scope

One line + a comment in cmd_render. No change to output, naming (slide-<N>.jpg), DPI, crop/scale, or the patch format. Version bump 3.0.2 → 3.0.3 (patch) in plugin.json + marketplace.json.

Motivated by the capes-v3 review-loop redesign (moving the visual judge to per-slide fan-out), but this is a general correctness/throughput fix for any concurrent deck.py render use.

🤖 Generated with Claude Code

`deck.py render` shelled out to `soffice --headless --convert-to pdf` with no
UserInstallation, so every render used LibreOffice's single shared default
profile. Two renders launched concurrently deadlock/fail on that profile's
lock — which forces callers to serialize all rendering, and pushes them away
from per-slide review fan-out (the cheap pattern).

Give each render call its own profile via
`-env:UserInstallation=<this call's tempdir>/louser`. Renders are now safe to
run in parallel (e.g. one review sub-agent per slide). Costs a fresh-profile
init per call — cheap next to the parallelism it unlocks.

Co-Authored-By: Claude Opus 4.8 (1M context) <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