fix: align runtime trust schema and built-in controls

This commit is contained in:
2026-09-06 05:17:27 +09:00
parent 89f4f99622
commit 2cd57a32b2
4 changed files with 17 additions and 2 deletions
@@ -219,7 +219,7 @@
{/if}
</section>
{#if data.workspace.permissions.manage_runtimes}
{#if data.workspace.permissions.manage_runtimes && !runtime.management.built_in}
<section class="runtime-detail-section" aria-labelledby="runtime-trust-heading">
<h2 id="runtime-trust-heading">Workspace trust</h2>
@@ -84,6 +84,10 @@ Deno.test("Runtime detail keeps trust controls owner-only and conflict-safe", as
const reveal = page.indexOf("Reveal public key");
const mutation = page.indexOf('id="runtime-public-key-input"');
assert(ownerGate >= 0, "Runtime trust controls should use manage_runtimes");
assert(
page.includes("!runtime.management.built_in"),
"Runtime trust controls should be hidden for the built-in Runtime",
);
assert(
ownerGate < reveal && ownerGate < mutation,
"owner gate should wrap key controls",