fix(api,ops): transactional adopt, admin gate without a flash, and a digest path to deploys

The self-context adopt runs read-modify-write inside one transaction,
the admin shell renders nothing until the role is confirmed, and the
json-body helper merges Headers instances correctly. The compose image
reference accepts a pinned digest through an env var, and a promote
script resolves the published digest, verifies its signature and hands
the operator the exact pinning call — the documented path away from a
moving latest tag.
This commit is contained in:
Marc-André Bombeck committed 2026-06-11 11:45:58 +02:00
1 parent 599b7e8c99
commit f13aa684f9
12 files changed
+876 -79

No files matched your search

+9 -1
View File
@@ -141,7 +141,15 @@ function withJsonBody(
): RequestInit {
const merged: RequestInit = { ...init, method };
if (body !== undefined) {
merged.headers = { "Content-Type": "application/json", ...init?.headers };
// `HeadersInit` is a union — a plain object spreads fine, but a
// `Headers` instance (or entries array) has no enumerable own
// properties, so `{ ...init.headers }` silently dropped every
// caller header. `new Headers(...)` normalises all three shapes.
const headers = new Headers(init?.headers);
if (!headers.has("Content-Type")) {
headers.set("Content-Type", "application/json");
}
merged.headers = headers;
merged.body = JSON.stringify(body);
}
return merged;