Skip to content
quarry View Ticket
Login

View Ticket

ci.pipeline.save answers 500 from both the pipeline editor and the API (G-64)

Closeda6110cdcc5113869e3a877f75e12df3722bf517fCreated 75.2 days agoUpdated 67.9 days ago
Description2026-09-16 18:17:52
Found during Jan's e2e campaign (jva), 2026-09-16, build 0.1.0-beta+4e516ed06124..dd4619ef72b9. Full write-up with numbered entries: https://zeitforge.app/r/jva/dantest-sandbox/doc/trunk/GOTCHAS.md

Repro: on dantest-sandbox, Settings/CI > pipeline editor with path ci/checks.json and a two-step JSON shaped like quarry's ci/quarry.json. action=validate -> 'It compiles'. action=save -> generic Error page. POST /api/v1/r/dantest-sandbox/ci/pipeline {path, content, message} -> {"error":"internal error"}, op time ~90us (fails before doing work). validate:true via the API -> 200 {}. Reproducible. Workaround: commit the file on a branch with fossil and open the landing by hand.

2026-09-16 18:39:59

Triage (zeitgeist): standalone, and the cheapest to diagnose of the eleven.

validate:true answers 200; save answers 500 in ~90us, so it fails before doing any work — an early return on a nil or a missing dependency, not a write gone wrong.

The empty 500 is its own bug: an op that cannot say why is one nobody can work around. The report's workaround (commit the pipeline file by hand) means this blocks the editor, not CI.

2026-09-22 17:17:44

@jva — root cause found, fix on landing af97bbe2.

Reproduced first with a valid pipeline on dantest-sandbox: validate 200, save 500, and the server log says unknown repository "dantest-sandbox". SavePipeline resolved the repository through the --repo flag map, which on the forge holds only quarry itself; every other repository lives in the registry and was never looked up there. So the editor worked for exactly one repository and answered every other with a 500 that said nothing.

Once it lands and deploys I'll say so here — would you re-run your original repro (Settings/CI editor, ci/checks.json, action=save) from your vantage rather than mine? Your workaround of committing the file by hand should no longer be needed. If save now opens a landing for you, this closes; if anything else shows up in the same path I'd rather you find it than I assume.

One note on your triage timing: you measured ~90µs; today it is ~700ms. Same refusal, but the newer build reaches the registry lookup before failing. Diagnosis unchanged.

2026-09-22 17:41:51

Landing af97bbe2 landed and is serving as build 051c5ba8fd99. Measured on production:

POST /api/v1/r/dantest-sandbox/ci/pipeline  (valid pipeline, save)
before:  500 {"error":"internal error"}     log: unknown repository "dantest-sandbox"
after:   200 {"hash":"2e9a18b7…","branch":"ci-edit-probe-…","landing":"3cb61c13…"}

The editor now commits to a fresh branch and opens a landing for a repository that lives in the registry, which is every repository but quarry. Holding this open only until jva re-runs their original editor repro from their seat, as agreed on the sandbox chat; the probe landing above is mine and will be rejected.

2026-09-22 18:12:31

Closing on my own measurement, per dmestas ("close as you see fit"); reopen if your seat disagrees.

Landing af97bbe2, build 051c5ba8fd99, measured on production:

POST /api/v1/r/dantest-sandbox/ci/pipeline  save, valid pipeline
before:  500 {"error":"internal error"}          log: unknown repository "dantest-sandbox"
after:   200 {"hash":"2e9a18b7…","branch":"ci-edit-probe-…","landing":"3cb61c13…"}

The editor commits to a fresh branch and opens a landing on a registry repository — which is every repository but quarry. Cause was SavePipeline resolving through the --repo flag map instead of repoPath; a source-level guard now refuses that lookup anywhere in main.go. The probe landing it opened has been rejected as noise.