Per-repo image_ref setting + default dev image #207

Closed
opened 2026-07-22 11:44:36 +02:00 by dominik.polakovics · 1 comment

What to build

Let each repo choose the dev image its agents run in, per the any-image + injected-tools design: new nullable repos.image_ref end to end (migration, API, repo-settings UI). NULL falls back to a globally configured default dev image. Validation: registry refs pinned by digest (or resolved-and-pinned on save), https registries only. Pull policy: pull-if-missing at spawn with a clear spawn error surfaced to the run when the pull fails. Document the image contract (shell + coreutils + git; the agent layer is always injected via the tools mount, so images need no lab-specific contents).

Acceptance criteria

  • repos.image_ref round-trips schema->API->settings UI; NULL uses the configured default image
  • Refs are digest-pinned on save; non-digest input is resolved and stored pinned
  • Container spawns use the repo image; missing/unpullable image fails the spawn with an actionable error in the UI
  • Image contract documented (docs/ops.md) including the read-only future-imports note
  • Tests cover ref validation, fallback, and spawn wiring

Blocked by

## What to build Let each repo choose the dev image its agents run in, per the any-image + injected-tools design: new nullable `repos.image_ref` end to end (migration, API, repo-settings UI). NULL falls back to a globally configured default dev image. Validation: registry refs pinned by digest (or resolved-and-pinned on save), https registries only. Pull policy: pull-if-missing at spawn with a clear spawn error surfaced to the run when the pull fails. Document the image contract (shell + coreutils + git; the agent layer is always injected via the tools mount, so images need no lab-specific contents). ## Acceptance criteria - [ ] repos.image_ref round-trips schema->API->settings UI; NULL uses the configured default image - [ ] Refs are digest-pinned on save; non-digest input is resolved and stored pinned - [ ] Container spawns use the repo image; missing/unpullable image fails the spawn with an actionable error in the UI - [ ] Image contract documented (docs/ops.md) including the read-only future-imports note - [ ] Tests cover ref validation, fallback, and spawn wiring ## Blocked by - #205
Author
Owner

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: Nullable repos.image_ref choosing the dev image container runs use, falling back to a globally configured default; refs digest-pinned on save; pull-if-missing at spawn with surfaced errors.

The issue body's "What to build" and acceptance-criteria checklist are the authoritative spec (grilled 2026-07-22). This brief adds the interface map and scope fences.

Current behavior:
After #205, container runs use a fixed/globally configured image; repos cannot choose their own. The per-repo settings pattern this should follow is well established (paired sqlite/postgres migrations altering repos, the repo PATCH settings-update surface, a repo-settings UI section using the shared settings layout/form helpers).

Desired behavior:
Per the issue body: repos.image_ref end to end with NULL → global default; https registries only; non-digest refs resolved and stored digest-pinned on save; spawn pulls if missing and a failed pull fails the spawn with an actionable error visible on the run in the UI; the image contract documented (shell + coreutils + git — the agent layer always arrives via the injected tools mount, so images need no lab-specific contents).

Key interfaces:

  • repos.image_ref migration + the repo settings-update PATCH surface + a repo-settings UI field (Agents/runner section is the natural home, next to repos.runner).
  • The global default dev image — server config alongside the other runner-mode configuration from #205.
  • Digest resolution on save: a registry manifest HEAD/GET over https resolving tag → digest; validation errors surface in the settings form like other per-section save errors.
  • The #205 spawn path — consumes the resolved repo image (or default), performs pull-if-missing, and routes pull failures into the run's error surfacing.

Acceptance criteria: the checklist in the issue body.

Out of scope:

  • Runner mechanics, mounts, limits (#205) and tools-image contents (#203).
  • Registry authentication for private dev images — the contract is public/anonymous-pull registries for now; note it in docs if it comes up.
  • The read-only future-imports behavior itself — only the documentation note about it.

Blocked by

(recorded in the issue body: #205)

> *This was generated by AI during triage.* ## Agent Brief **Category:** enhancement **Summary:** Nullable `repos.image_ref` choosing the dev image container runs use, falling back to a globally configured default; refs digest-pinned on save; pull-if-missing at spawn with surfaced errors. The issue body's "What to build" and acceptance-criteria checklist are the authoritative spec (grilled 2026-07-22). This brief adds the interface map and scope fences. **Current behavior:** After #205, container runs use a fixed/globally configured image; repos cannot choose their own. The per-repo settings pattern this should follow is well established (paired sqlite/postgres migrations altering `repos`, the repo PATCH settings-update surface, a repo-settings UI section using the shared settings layout/form helpers). **Desired behavior:** Per the issue body: `repos.image_ref` end to end with NULL → global default; https registries only; non-digest refs resolved and stored digest-pinned on save; spawn pulls if missing and a failed pull fails the spawn with an actionable error visible on the run in the UI; the image contract documented (shell + coreutils + git — the agent layer always arrives via the injected tools mount, so images need no lab-specific contents). **Key interfaces:** - `repos.image_ref` migration + the repo settings-update PATCH surface + a repo-settings UI field (Agents/runner section is the natural home, next to `repos.runner`). - The global default dev image — server config alongside the other runner-mode configuration from #205. - Digest resolution on save: a registry manifest HEAD/GET over https resolving tag → digest; validation errors surface in the settings form like other per-section save errors. - The #205 spawn path — consumes the resolved repo image (or default), performs pull-if-missing, and routes pull failures into the run's error surfacing. **Acceptance criteria:** the checklist in the issue body. **Out of scope:** - Runner mechanics, mounts, limits (#205) and tools-image contents (#203). - Registry authentication for private dev images — the contract is public/anonymous-pull registries for now; note it in docs if it comes up. - The read-only future-imports behavior itself — only the documentation note about it. ## Blocked by (recorded in the issue body: #205)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/coding-lab#207
No description provided.