Skip to content

fix(queen): deploy through Railway's own hook, not a pipeline that never worked - #732

Merged
gHashTag merged 1 commit into
mainfrom
fix/queen-deploy-railway-hook
Aug 13, 2026
Merged

gHashTag merged 1 commit into
mainfrom
fix/queen-deploy-railway-hook

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

The pipeline never worked

queen-deploy.yml ran 35 times between 2026-04-01 and 2026-04-03 and succeeded zero times — 32 failures, 3 cancellations, every failure on the same Build and Push to Railway step.

It could not have worked:

defect evidence
pushes an image without authenticating grep -c 'docker login' → 0
project id is a placeholder workflow: 90c3f0c8-…-5e123abc4567 · real: e6dfacdc-3eed-48ae-929b-02e87f07f0aa
test job reads steps.deploy.outputs from another job cross-job step outputs don't resolve
posts ✅ Queen deployed to issue 476 every run including all 32 failures

There is no Queen backend to deploy

  • deploy/Dockerfile.queen runs zig build … queen-backend. build.zig declares 67 steps and none is named that. The nearest is libqueen, which builds the libtrinity-queen C API library for the SwiftUI dashboard — not a server. So /usr/local/bin/queen-backend is never produced.
  • The same Dockerfile copies /zig-linux-x86_64-0.15.2 out of a stage that extracted /zig-x86_64-linux-0.15.1 — different name order and different version. Only the latter exists on ziglang.org (200); the former 404s. That COPY is why the build died every time.
  • src/server_main.zig, the nearest thing to a server, answers every request with one fixed JSON blob, is wired into no build step, binds 127.0.0.1, and says "for fly.io" in its header.

Dockerfile.queen is deliberately left untouched and still broken — that is the backend's problem, not this change's. The brain has no vehicle yet for the same reason: it is Zig and would ship inside that backend.

What this does

Railway builds from its own GitHub hook here, the way woody-weed-bot already ships. The workflow no longer deploys — it proves the artefact builds, and asserts the bundle was actually emitted, because a build that emits nothing still exits 0.

Deployed surface is apps/queen-web and only that.

Two rules restored

  • Runtime entrypoint is no longer sh -c (no-shell-scripts) — this path has no custom container at all.
  • The container carries SOUL.md, as the Queen Trinity Orchestrator Law requires.

That law was impossible to obey: .gitignore:315 ignores *.md and re-included only templates/SOUL.md, so a container's own soul could never be committed without -f. A !**/SOUL.md negation fixes the cause rather than forcing one file past it.

Measured before claiming: 1844 .md on disk against 1803 tracked — the existing !docs/** and !.github/ negations already cover nearly everything, so the gap was narrow, not the whole documentation tree.

Verified, not assumed

queen-web build          exit 0, 253.49 kB JS, 3.80 kB CSS
PORT=7311 npm start      localhost:7311      -> HTTP 200
                         192.168.1.100:7311  -> HTTP 200   (proves the 0.0.0.0 bind)
title served             "Queen UI — Self-Improving Container"

The LAN-address check is the point: a loopback bind is unreachable from outside a container, which is how a Railway service ends up serving 502 while looking healthy locally.

Still needed from a human

Railway CLI is unauthenticated on this machine and railway login is interactive. To finish: log in, point service 0457ebb4-aec3-4aa0-be6e-bcd8ef0d32e7 at this repo with root directory apps/queen-web, and let the hook build.

🤖 Generated with Claude Code

…ver worked

queen-deploy.yml ran 35 times between 2026-04-01 and 2026-04-03 and
succeeded zero times: 32 failures, 3 cancellations, every failure on the
same "Build and Push to Railway" step. It could not have worked. It
pushed an image without ever running `docker login`; it carried the
project id 90c3f0c8-…-5e123abc4567, which is a placeholder rather than
the real e6dfacdc-3eed-48ae-929b-02e87f07f0aa; its `test` job read
`steps.deploy.outputs` from a different job; and on every run it posted
"✅ Queen deployed" to issue 476 — a claim that was never once true.

Railway builds from its own GitHub hook here, the way woody-weed-bot
already ships, so the workflow no longer deploys. It proves the artefact
builds and asserts the bundle was actually emitted, because a build that
emits nothing still exits 0.

What is deployed is apps/queen-web, and only that. The Queen's Zig
backend does not exist as a buildable artefact:

  - deploy/Dockerfile.queen runs `zig build … queen-backend`. build.zig
    declares 67 steps and none is named that. The nearest, `libqueen`,
    builds the libtrinity-queen C API library for the SwiftUI dashboard,
    not a server — so /usr/local/bin/queen-backend is never produced.
  - the same Dockerfile copies /zig-linux-x86_64-0.15.2 out of a stage
    that extracted /zig-x86_64-linux-0.15.1 — different name order and
    different version. Only the latter name exists on ziglang.org; the
    former 404s. That COPY is why the build died every time.
  - src/server_main.zig, the nearest thing to a server, answers every
    request with one fixed JSON blob, is wired into no build step, binds
    127.0.0.1, and says "for fly.io" in its header.

Dockerfile.queen is therefore left untouched and still broken; it is the
backend's problem to fix, not this change's. The brain has no vehicle yet
for the same reason: it is Zig, and it would ship inside that backend.

Two rules were being broken and are now honoured. The runtime entrypoint
is no longer `sh -c` (no-shell-scripts: entrypoints are binaries, and
this path has no custom container at all), and the container carries
SOUL.md as the Queen Trinity Orchestrator Law requires.

That law was impossible to obey. .gitignore:315 ignores *.md and
re-included only templates/SOUL.md, so a container's own soul could never
be committed without -f. A `!**/SOUL.md` negation fixes the cause rather
than forcing this one file past it. Measured before claiming: 1844 .md on
disk against 1803 tracked, so the existing !docs/** and !.github/
negations already cover almost everything — the gap was narrow, not the
whole documentation tree.

Verified rather than assumed: queen-web builds (exit 0, 253 kB JS), and
`PORT=7311 npm start` answers HTTP 200 on the machine's LAN address, not
just localhost — which proves the 0.0.0.0 bind Railway needs, since a
loopback bind is unreachable from outside the container.

---

Королева деплоится через собственный хук Railway, а не через пайплайн,
который не работал ни разу.

Старый queen-deploy.yml запускался 35 раз и не преуспел ни разу: 32
провала и 3 отмены, все на шаге сборки. Он и не мог работать — пуш образа
без docker login, плейсхолдер вместо ID проекта, чтение outputs из чужого
джоба и комментарий «✅ Queen deployed» в issue 476 на каждом провале.

Теперь Railway собирает сам, а workflow только доказывает, что артефакт
собирается. Выкатывается apps/queen-web и только он: Zig-бэкенда королевы
не существует как собираемого артефакта — шага queen-backend нет среди 67
шагов build.zig, а Dockerfile копирует несуществующий каталог Zig.

Проверено замером: сборка exit 0, старт отвечает HTTP 200 на сетевом
адресе машины, что доказывает бинд 0.0.0.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gHashTag
gHashTag force-pushed the fix/queen-deploy-railway-hook branch from d87c622 to 34a2953 Compare August 13, 2026 11:09
@gHashTag
gHashTag merged commit 2f68a3e into main Aug 13, 2026
28 of 44 checks passed
@gHashTag
gHashTag deleted the fix/queen-deploy-railway-hook branch August 13, 2026 11:50
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