Skip to content

docs: engrave music on a page - #796

Merged
claude[bot] merged 1 commit into
mainfrom
claude/draw-music
Sep 22, 2026
Merged

claude[bot] merged 1 commit into
mainfrom
claude/draw-music

Conversation

@lens0021

@lens0021 lens0021 commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by lens0021 · project thread

Score is the fourth extension this site documents and the second of Chart's kind: it wants a program of its own beside the bake. It does not run LilyPond itself — it sends the command to a Shellbox, which is what its own message asks for, since LilyPond has had no safe mode since 2.23.12 and a <score> is a program it will run.

This is the Score half of the original #796. The "let a bake reach more than one service" capability was split into #798, which has since merged; this branch is rebased onto main and is now Score-only, a single commit.

The Shellbox comes from upstream

Wikimedia already publishes one. mediawiki-libs-shellbox builds a score83 flavour — LilyPond from bookworm-backports, Ghostscript, ImageMagick, and the Noto fonts lyrics want — and runs it as the shellbox service in operations/deployment-charts. This takes that image and lets them keep it up to date, rather than wikven maintaining a Dockerfile full of LilyPond.

It is php-fpm alone, so it speaks FastCGI rather than HTTP and upstream puts an httpd in front of it. A services.json entry can name an image to pull and a sidecar to run in the service's own network namespace — which is how the two share a localhost in a pod. One address still reaches the pair.

An entry may also name a probe, and naming one means that path has to answer 200 rather than merely answer. An httpd says 502 on its own while what is behind it is still starting, and /healthz reaches Shellbox through the whole chain, so it is the readier signal.

Two quiet failures, documented

Both send the build down the local path, where a bake has no LilyPond, so the page fills with an error instead of music:

  • The key under ShellboxUrls is score, the service. It is not score-lilypond, which is the route.
  • ShellboxSecretKey is not optional even though MediaWiki lets it be: without it, getUrl() returns null and the command runs locally.

A score that cannot be engraved is published as an error box with the build none the wiser, as a chart was, so score-error-category joins WikvenFailOnCategories.

Checks

  • The bake sends four requests to the Shellbox, and the page comes back with an <svg> and a PNG beside it, both files the build wrote.
  • Broken on purpose: the ShellboxUrls route name, then the missing secret — each sent the work back to the local path with nothing said, which is what the page now warns about.
  • All 28 bake assertions pass, verified end to end in CI: the upstream image pulled, the sidecar attached, /healthz answered, and the two bakes stayed byte-identical.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HnGL1B3zcDSmmc9XBAPcWg

@claude

claude Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

smoke is red on main too, with the same failure → it is flaky, and the re-run is green

Update: the re-run of smoke on this same commit (f88ca55) passed, and the PR is now mergeable_state: clean. So the test is flaky, not deterministically broken — my note below that it would "reproduce rather than flake" was wrong, and the record is corrected here rather than rewritten. The rest of the evidence still stands and is worth keeping, because the flake is real and recurring.


The one red check was smoke, failing in the browser step, not in anything this PR touches:

tests/e2e/citizen.spec.js:168:1 › Citizen's view-source tab is a button a reader can hit
Error: expect(received).toBeGreaterThanOrEqual(expected)
Expected: >= 703.8000000000001
Received:    0
> 195 | expect(box.width).toBeGreaterThanOrEqual(history.width * 0.9);

It hit main the same way, with byte-identical numbers, on both of the commits merged just before this branch was pushed:

run commit branch smoke
35605660336 901f543 main success
35606042296 73c8ddc (#794) main failure — same test, same numbers
35606877813 913d4f6 (#793) main failure — same test, same numbers
35607717340 f88ca55 this PR failure, then success on re-run of the same commit

The pin this branch carries for the skin is the older one — Citizen: v3.22.0, since this branch predates #794's bump to v3.23.0 — and it failed exactly as main did on v3.23.0, so the skin bump was not the trigger either.

What this PR changes is green. From the run's log:

  • 28 of 28 checks passed, 0 failed, 0 skipped — including the new scores check, which asserts the engraving is in the page rather than Score's error box.
  • Two bakes of the same source are byte-identical.
  • 64 of the 65 browser tests passed even on the red run; the one failure was the one above.

Four failures across three different commits, one of which then passed unchanged, is a flake worth fixing on its own rather than re-running past. box.width reads 0 while the same tab's href and icon mask both assert fine, which points at the measurement landing before the skin has finished laying the page actions out — boundingBox() is taken immediately after an attribute assertion, with no wait for a settled layout. That belongs in its own change, not in this diff.


Generated by Claude Code

@claude
claude Bot force-pushed the claude/draw-music branch from 8616083 to 3ac0f7e Compare September 22, 2026 01:03
@claude claude Bot changed the title docs: engrave music on a page, and let a bake reach more than one service docs: engrave music on a page Sep 22, 2026
@claude
claude Bot changed the base branch from main to claude/bake-hosts September 22, 2026 01:03
@claude
claude Bot force-pushed the claude/draw-music branch from 3ac0f7e to a1fb58a Compare September 22, 2026 01:10
lens0021 pushed a commit that referenced this pull request Sep 22, 2026
<!-- ccr-projects-attribution: {"github_login":"lens0021"} -->
_Requested by **lens0021** · [project
thread](https://claude.ai/code/project/chan_01EZp6MxSW4HYd9cdG5YMsLF?thread=cmsg_01EZp6MxSW4HYd9cdG5YMsLF3vYPtZMjxWAZ7gwm8PSJ7P)_

**Before:** `actions/bake` took a single `host-alias`, one name mapped
to one address — enough while Chart's renderer was the only service a
site pointed MediaWiki at during a bake.

**After:** it takes a `hosts` list, a `name=address` to a line, so a
site with a second service gives each one its own line.

```yaml
hosts: |
  host.docker.internal=${{ steps.renderer.outputs.address }}
  some-other-service=${{ steps.other.outputs.address }}
```

## What this is

This is the "let a bake reach more than one service" half of the
original combined change, split out so it stands on its own — it is a
capability of the released `actions/bake`, independent of any one site's
services.

It defaults to `host.docker.internal=host-gateway`, exactly what
`host-alias` defaulted to, so a site with one service sets nothing and
behaves as before. A line without `=` is a name with nowhere to go, and
the action fails loudly rather than baking against a service it cannot
reach.

The input is unreleased — 1.2.0 has not gone out — so no site carries
the old spelling. The two workflows that dogfood the action
(`deploy-docs`, `pr-preview`) move to the new name here; `smoke`
hand-rolls `--add-host` and does not use this input, so it is untouched.

## Split

The Score documentation that motivated this rides on top, in a separate
PR (#796, based on this branch), so each lands as its own release-note
line. Because the repo hides `docs:` from the changelog and surfaces
`feat:`, splitting also puts this capability correctly under
**Features** rather than burying it inside a docs entry.

## Note on the last commit

The `test:` commit on top is the Citizen flake fix from #797, carried
here so this PR — and #796 stacked on it — is green for review. It
becomes a no-op once #797 merges.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01HnGL1B3zcDSmmc9XBAPcWg

---------

Co-authored-by: Claude <noreply@anthropic.com>
Base automatically changed from claude/bake-hosts to main September 22, 2026 04:18
Score is the fourth extension this site documents and the second of
Chart's kind: it wants a program of its own beside the bake. It does not
run LilyPond itself -- it sends the command to a Shellbox, which is what
its own message asks for, since LilyPond has had no safe mode since
2.23.12 and a score is a program it will run.

The Shellbox comes from upstream. Wikimedia builds a score83 flavour of
mediawiki-libs-shellbox -- LilyPond, Ghostscript, ImageMagick, the fonts
lyrics want -- and runs it as the shellbox service in
operations/deployment-charts. This takes that image rather than
maintaining one here. It is php-fpm alone, so a services.json entry can
name an image to pull and a sidecar httpd to run in its network
namespace, the way the two share a localhost in a pod.

A score that cannot be engraved is published as an error box with the
build none the wiser, as a chart was, so score-error-category joins the
categories a build refuses to end in. The page's own claim rests on that.

Building the Scores page needs the bake pointed at two services now, the
renderer and this, which the hosts list makes possible.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HnGL1B3zcDSmmc9XBAPcWg
(cherry picked from commit 9a4233f)
(cherry picked from commit a1fb58a)
@claude
claude Bot force-pushed the claude/draw-music branch from a1fb58a to 8c43066 Compare September 22, 2026 04:19
@github-actions
github-actions Bot temporarily deployed to preview September 22, 2026 04:22 Destroyed
@claude
claude Bot merged commit a6066c4 into main Sep 22, 2026
30 checks passed
@claude
claude Bot deleted the claude/draw-music branch September 22, 2026 04:26

This branch was successfully deployed

No deployments
preview — 8c43066a Deployed Sep 22, 2026 by github-actions[bot]
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.

2 participants