From 79bb20384a2779f4d8fab44bf78bbbd5c8f06282 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:21:18 +0200 Subject: [PATCH 01/13] test: pin Off-mode independent-intent messaging --- tests/unit/off-mode-docs-consistency.test.mjs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/unit/off-mode-docs-consistency.test.mjs diff --git a/tests/unit/off-mode-docs-consistency.test.mjs b/tests/unit/off-mode-docs-consistency.test.mjs new file mode 100644 index 00000000..474ed0fa --- /dev/null +++ b/tests/unit/off-mode-docs-consistency.test.mjs @@ -0,0 +1,30 @@ +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import test from "node:test"; + +function read(path) { + return readFileSync(new URL(`../../${path}`, import.meta.url), "utf8"); +} + +test("Off-mode user-facing docs preserve the independently authenticated intent exception", () => { + const controlCenter = read( + "authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml", + ); + const configuration = read("references/configuration.md"); + const authorityReadme = read("authority-host/windows/README.md"); + const install = read("INSTALL.md"); + + assert.doesNotMatch(controlCenter, /No Windows Hello prompts\./); + assert.match( + controlCenter, + /Independent lifecycle intent and exact-text human replies still require Windows Hello\./, + ); + + assert.doesNotMatch( + configuration, + /Off[^\n]*never require Windows Hello for github-delivery mutations/i, + ); + assert.match(configuration, /independent(?:ly authenticated)? lifecycle intent/i); + assert.match(authorityReadme, /independent(?:ly authenticated)? lifecycle intent/i); + assert.match(install, /independent(?:ly authenticated)? lifecycle intent/i); +}); From 5f7085a9f7d711568177c39bf460ce800dec97d8 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:26:43 +0200 Subject: [PATCH 02/13] fix: clarify Off-mode independent intent --- references/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/references/configuration.md b/references/configuration.md index 43520aa3..f4430c68 100644 --- a/references/configuration.md +++ b/references/configuration.md @@ -12,7 +12,7 @@ Use this workflow when the user asks to install, set up, show, or change github- Present exactly these user-facing choices: -- **Off** — never require Windows Hello for github-delivery mutations. Normal github-delivery authorization and workflow rules still apply. +- **Off** — ordinary high-assurance writes do not require Windows Hello, but independently authenticated lifecycle intent and exact-text human replies still require the authority host/grant. Normal github-delivery authorization and workflow rules still apply. - **Sensitive actions** — internal value `high-assurance`; require Windows Hello for intrinsically high-assurance and autonomous execution. - **Every GitHub write** — internal value `all`; require Windows Hello for every executed GitHub mutation. @@ -43,7 +43,7 @@ npx github-delivery update --apply Stable GitHub Releases contain a separately verified, self-contained `win-x64` Authority-host asset. Stable setup/update verifies the component's version, tagged source commit, archive digest, bounded extraction, and release-workflow attestation before installation, so users do **not** need the .NET SDK for the managed Authority install/update path. -If the effective mode is `high-assurance` or `all`, `setup` installs or repairs the verified Authority host on supported Windows systems. If the selected mode is `off` and the host has never been installed, setup/update does not install it. Once the host is already installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded. +If the effective mode is `high-assurance` or `all`, `setup` installs or repairs the verified Authority host on supported Windows systems. If the selected mode is `off` and the host has never been installed, setup/update normally does not install it; independently authenticated lifecycle intent and exact-text human replies still need a compatible authority provider before those mutations can execute. Once the host is already installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded. `authority-host/windows/install.ps1` remains the repository/development source-install path. It requires Windows 11 plus the .NET 8 SDK and delegates deployment to the same state-preserving release installer semantics after building locally. From 06cb125bc2f8f7332dff107a578e23ec12f9f0d1 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:28:25 +0200 Subject: [PATCH 03/13] test: require Off-mode intent authority availability --- .../off-mode-authority-availability.test.mjs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/unit/off-mode-authority-availability.test.mjs diff --git a/tests/unit/off-mode-authority-availability.test.mjs b/tests/unit/off-mode-authority-availability.test.mjs new file mode 100644 index 00000000..33e094f3 --- /dev/null +++ b/tests/unit/off-mode-authority-availability.test.mjs @@ -0,0 +1,26 @@ +import assert from "node:assert/strict"; +import test from "node:test"; + +import { planAuthorityHostUpdate } from "../../scripts/lib/authority-host-install.mjs"; + +test("Off mode still provisions the Windows authority host for independently authenticated intent", () => { + assert.deepEqual( + planAuthorityHostUpdate({ + mode: "off", + targetVersion: "0.5.2", + installed: { + supported: true, + configured: false, + installed: false, + legacy: false, + version: null, + }, + }), + { + action: "install", + required: true, + currentVersion: null, + targetVersion: "0.5.2", + }, + ); +}); From 21aa8d9ec67a6ed4e39c127b1495e9bee033d59a Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:29:30 +0200 Subject: [PATCH 04/13] test: target Off-mode setup provisioning --- .../off-mode-authority-availability.test.mjs | 49 ++++++++++++------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/tests/unit/off-mode-authority-availability.test.mjs b/tests/unit/off-mode-authority-availability.test.mjs index 33e094f3..2dec8cd9 100644 --- a/tests/unit/off-mode-authority-availability.test.mjs +++ b/tests/unit/off-mode-authority-availability.test.mjs @@ -1,26 +1,37 @@ import assert from "node:assert/strict"; +import { resolve } from "node:path"; import test from "node:test"; -import { planAuthorityHostUpdate } from "../../scripts/lib/authority-host-install.mjs"; +import { runBootstrapSetup } from "../../scripts/lib/bootstrap-maintenance.mjs"; -test("Off mode still provisions the Windows authority host for independently authenticated intent", () => { - assert.deepEqual( - planAuthorityHostUpdate({ - mode: "off", - targetVersion: "0.5.2", - installed: { - supported: true, - configured: false, - installed: false, - legacy: false, - version: null, +test("setup opts into Authority provisioning even when protection mode is Off", async () => { + const target = resolve("test-fixtures/off-mode-setup"); + let reconcileOptions = null; + + const result = await runBootstrapSetup({ + target, + output: { write() {} }, + dependencies: { + discoverInstallations: () => [{ valid: true, target }], + reconcileStableAuthorityHost: async (options) => { + reconcileOptions = options; + return { + action: "install", + changed: false, + installed: { installed: false }, + }; }, - }), - { - action: "install", - required: true, - currentVersion: null, - targetVersion: "0.5.2", + startInstalledAuthorityHost: async () => ({ + started: false, + reason: "not_installed", + }), + readActivationReceipt: () => ({ + mode: "hooks", + hookTrustVerified: true, + }), }, - ); + }); + + assert.equal(result.status, "ready"); + assert.equal(reconcileOptions?.installWhenDisabled, true); }); From d81b6653c5fc437f9d20a645dea20958b8a16ca3 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:32:28 +0200 Subject: [PATCH 05/13] fix: provision authority during explicit setup --- scripts/lib/bootstrap-maintenance.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib/bootstrap-maintenance.mjs b/scripts/lib/bootstrap-maintenance.mjs index 193ba2d3..51a7c23b 100644 --- a/scripts/lib/bootstrap-maintenance.mjs +++ b/scripts/lib/bootstrap-maintenance.mjs @@ -100,6 +100,7 @@ export async function runBootstrapSetup({ const startAuthority = dependencies.startInstalledAuthorityHost || startInstalledAuthorityHost; const authorityHost = await reconcileAuthority({ scriptPath: join(target, "authority-host", "windows", "install-release.ps1"), + installWhenDisabled: true, }); const authorityUnavailable = authorityHost?.action === "unsupported" && authorityHost?.required === true; From 38b31e405bc92f5b9ff451fe8b4bcb7be4d87446 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:34:14 +0200 Subject: [PATCH 06/13] chore: apply Off-mode consistency fixes --- .github/workflows/off-mode-fix-applicator.yml | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/off-mode-fix-applicator.yml diff --git a/.github/workflows/off-mode-fix-applicator.yml b/.github/workflows/off-mode-fix-applicator.yml new file mode 100644 index 00000000..5ff911a2 --- /dev/null +++ b/.github/workflows/off-mode-fix-applicator.yml @@ -0,0 +1,90 @@ +name: Off-mode fix applicator + +on: + push: + branches: + - fix/off-mode-never-hello + +permissions: + contents: write + +jobs: + apply: + if: github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + ref: fix/off-mode-never-hello + - name: Apply exact reviewed substitutions + shell: bash + run: | + python - <<'PY' + from pathlib import Path + + def replace_once(path, old, new): + p = Path(path) + text = p.read_text(encoding="utf-8") + count = text.count(old) + if count != 1: + raise SystemExit(f"expected one match in {path}, found {count}") + p.write_text(text.replace(old, new, 1), encoding="utf-8") + + replace_once( + "authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml", + "No Windows Hello prompts. GitHub Delivery’s normal mutation policy still applies.", + "Ordinary high-assurance writes skip Hello. Independent lifecycle intent and exact-text human replies still require Windows Hello.", + ) + + replace_once( + "authority-host/windows/README.md", + "In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, Windows Hello is not an additional mutation requirement; the ordinary github-delivery mutation policy still applies.", + "In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, ordinary high-assurance writes do not add a Windows Hello requirement, but independently authenticated lifecycle intent and exact-text human replies still require trusted authority; the ordinary github-delivery mutation policy also remains in force.", + ) + replace_once( + "authority-host/windows/README.md", + "- `off` + no Authority host ever installed: do not download or install the component;\n- `high-assurance` / `all` + missing host: `setup` installs the verified stable component on supported Windows x64;", + "- ordinary stable update with `off` + no Authority host ever installed: do not download or install the component;\n- explicit `setup` provisions the verified stable component even with stored mode `off`, so independently authenticated lifecycle intent and exact-text human replies remain available;\n- `high-assurance` / `all` + missing host: `setup` installs the verified stable component on supported Windows x64;", + ) + + replace_once( + "references/configuration.md", + "If the selected mode is `off` and the host has never been installed, setup/update normally does not install it; independently authenticated lifecycle intent and exact-text human replies still need a compatible authority provider before those mutations can execute. Once the host is already installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded.", + "If the selected mode is `off` and the host has never been installed, routine stable update does not install it. Explicit `npx github-delivery setup` does provision the verified host even in Off mode so independently authenticated lifecycle intent and exact-text human replies remain usable. Once the host is installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded.", + ) + + replace_once( + "INSTALL.md", + "If the effective protection mode is `off` and Authority has never been installed, setup/update does not download or install the component. If Authority is already installed, stable update keeps it aligned even while mode is `off`. A host ahead of stable remains untouched.", + "If the effective protection mode is `off` and Authority has never been installed, routine stable update does not download or install the component. Explicit `npx github-delivery setup` still provisions the verified Authority host so independently authenticated lifecycle intent and exact-text human replies remain available. If Authority is already installed, stable update keeps it aligned even while mode is `off`. A host ahead of stable remains untouched.", + ) + replace_once( + "INSTALL.md", + "On platforms where that bundled host is unsupported, setup completes with `authority_provider_required`: local/read-only workflows remain usable, but protected GitHub writes stay blocked until a compatible authority provider is configured or the user explicitly chooses `authorityMode=off`. `off` is an opt-out, not the default.", + "On platforms where that bundled host is unsupported, setup completes with `authority_provider_required`: local/read-only workflows remain usable, but protected GitHub writes stay blocked until a compatible authority provider is configured. Choosing `authorityMode=off` removes ordinary high-assurance Hello protection, but independently authenticated lifecycle intent and exact-text human replies still require trusted authority. `off` is an opt-out, not the default.", + ) + + replace_once( + "references/setup-prompts.md", + "Disable Windows Hello protection for github-delivery.", + "Set github-delivery's Windows Hello protection mode to Off.", + ) + replace_once( + "references/setup-prompts.md", + "Direct natural language is also valid, for example:\n", + "Direct natural language is also valid. Off disables ordinary high-assurance Hello protection, not independently authenticated lifecycle intent or exact-text human-reply approval. For example:\n", + ) + + replace_once( + "CHANGELOG.md", + "### Added\n\n- Full-review verdicts can now submit GitHub Request changes through the mutation broker, and later passes dismiss our pending Request changes before a new request or a merge-ready comment. GitHub Approve stays off unless the user explicitly asks.\n", + "### Added\n\n- Full-review verdicts can now submit GitHub Request changes through the mutation broker, and later passes dismiss our pending Request changes before a new request or a merge-ready comment. GitHub Approve stays off unless the user explicitly asks.\n\n### Fixed\n\n- Off-mode setup and user-facing guidance now preserve the independently authenticated intent boundary: ordinary high-assurance writes can skip Hello, but lifecycle intent and exact-text human replies still require trusted authority. Explicit `npx github-delivery setup` provisions the verified Windows Authority host even when the stored protection mode is Off; routine stable update remains non-installing when Off has never installed the host.\n", + ) + PY + git diff --check + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git add authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml authority-host/windows/README.md references/configuration.md INSTALL.md references/setup-prompts.md CHANGELOG.md + git commit -m "fix: align Off-mode setup and messaging" + git push origin HEAD:fix/off-mode-never-hello From a78db13a91901a709179e4e2dd4cdb0cc862bca7 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:35:35 +0200 Subject: [PATCH 07/13] test: cover Off-mode setup prompts --- tests/unit/off-mode-docs-consistency.test.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/off-mode-docs-consistency.test.mjs b/tests/unit/off-mode-docs-consistency.test.mjs index 474ed0fa..2dbda04e 100644 --- a/tests/unit/off-mode-docs-consistency.test.mjs +++ b/tests/unit/off-mode-docs-consistency.test.mjs @@ -13,6 +13,7 @@ test("Off-mode user-facing docs preserve the independently authenticated intent const configuration = read("references/configuration.md"); const authorityReadme = read("authority-host/windows/README.md"); const install = read("INSTALL.md"); + const setupPrompts = read("references/setup-prompts.md"); assert.doesNotMatch(controlCenter, /No Windows Hello prompts\./); assert.match( @@ -27,4 +28,6 @@ test("Off-mode user-facing docs preserve the independently authenticated intent assert.match(configuration, /independent(?:ly authenticated)? lifecycle intent/i); assert.match(authorityReadme, /independent(?:ly authenticated)? lifecycle intent/i); assert.match(install, /independent(?:ly authenticated)? lifecycle intent/i); + assert.doesNotMatch(setupPrompts, /Disable Windows Hello protection for github-delivery\./); + assert.match(setupPrompts, /independently authenticated lifecycle intent/i); }); From 7c46e04957861b4644e4fa2051596181c472e5e2 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:37:29 +0200 Subject: [PATCH 08/13] chore: remove temporary fix applicator --- .github/workflows/off-mode-fix-applicator.yml | 90 ------------------- 1 file changed, 90 deletions(-) delete mode 100644 .github/workflows/off-mode-fix-applicator.yml diff --git a/.github/workflows/off-mode-fix-applicator.yml b/.github/workflows/off-mode-fix-applicator.yml deleted file mode 100644 index 5ff911a2..00000000 --- a/.github/workflows/off-mode-fix-applicator.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Off-mode fix applicator - -on: - push: - branches: - - fix/off-mode-never-hello - -permissions: - contents: write - -jobs: - apply: - if: github.actor != 'github-actions[bot]' - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - with: - ref: fix/off-mode-never-hello - - name: Apply exact reviewed substitutions - shell: bash - run: | - python - <<'PY' - from pathlib import Path - - def replace_once(path, old, new): - p = Path(path) - text = p.read_text(encoding="utf-8") - count = text.count(old) - if count != 1: - raise SystemExit(f"expected one match in {path}, found {count}") - p.write_text(text.replace(old, new, 1), encoding="utf-8") - - replace_once( - "authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml", - "No Windows Hello prompts. GitHub Delivery’s normal mutation policy still applies.", - "Ordinary high-assurance writes skip Hello. Independent lifecycle intent and exact-text human replies still require Windows Hello.", - ) - - replace_once( - "authority-host/windows/README.md", - "In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, Windows Hello is not an additional mutation requirement; the ordinary github-delivery mutation policy still applies.", - "In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, ordinary high-assurance writes do not add a Windows Hello requirement, but independently authenticated lifecycle intent and exact-text human replies still require trusted authority; the ordinary github-delivery mutation policy also remains in force.", - ) - replace_once( - "authority-host/windows/README.md", - "- `off` + no Authority host ever installed: do not download or install the component;\n- `high-assurance` / `all` + missing host: `setup` installs the verified stable component on supported Windows x64;", - "- ordinary stable update with `off` + no Authority host ever installed: do not download or install the component;\n- explicit `setup` provisions the verified stable component even with stored mode `off`, so independently authenticated lifecycle intent and exact-text human replies remain available;\n- `high-assurance` / `all` + missing host: `setup` installs the verified stable component on supported Windows x64;", - ) - - replace_once( - "references/configuration.md", - "If the selected mode is `off` and the host has never been installed, setup/update normally does not install it; independently authenticated lifecycle intent and exact-text human replies still need a compatible authority provider before those mutations can execute. Once the host is already installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded.", - "If the selected mode is `off` and the host has never been installed, routine stable update does not install it. Explicit `npx github-delivery setup` does provision the verified host even in Off mode so independently authenticated lifecycle intent and exact-text human replies remain usable. Once the host is installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded.", - ) - - replace_once( - "INSTALL.md", - "If the effective protection mode is `off` and Authority has never been installed, setup/update does not download or install the component. If Authority is already installed, stable update keeps it aligned even while mode is `off`. A host ahead of stable remains untouched.", - "If the effective protection mode is `off` and Authority has never been installed, routine stable update does not download or install the component. Explicit `npx github-delivery setup` still provisions the verified Authority host so independently authenticated lifecycle intent and exact-text human replies remain available. If Authority is already installed, stable update keeps it aligned even while mode is `off`. A host ahead of stable remains untouched.", - ) - replace_once( - "INSTALL.md", - "On platforms where that bundled host is unsupported, setup completes with `authority_provider_required`: local/read-only workflows remain usable, but protected GitHub writes stay blocked until a compatible authority provider is configured or the user explicitly chooses `authorityMode=off`. `off` is an opt-out, not the default.", - "On platforms where that bundled host is unsupported, setup completes with `authority_provider_required`: local/read-only workflows remain usable, but protected GitHub writes stay blocked until a compatible authority provider is configured. Choosing `authorityMode=off` removes ordinary high-assurance Hello protection, but independently authenticated lifecycle intent and exact-text human replies still require trusted authority. `off` is an opt-out, not the default.", - ) - - replace_once( - "references/setup-prompts.md", - "Disable Windows Hello protection for github-delivery.", - "Set github-delivery's Windows Hello protection mode to Off.", - ) - replace_once( - "references/setup-prompts.md", - "Direct natural language is also valid, for example:\n", - "Direct natural language is also valid. Off disables ordinary high-assurance Hello protection, not independently authenticated lifecycle intent or exact-text human-reply approval. For example:\n", - ) - - replace_once( - "CHANGELOG.md", - "### Added\n\n- Full-review verdicts can now submit GitHub Request changes through the mutation broker, and later passes dismiss our pending Request changes before a new request or a merge-ready comment. GitHub Approve stays off unless the user explicitly asks.\n", - "### Added\n\n- Full-review verdicts can now submit GitHub Request changes through the mutation broker, and later passes dismiss our pending Request changes before a new request or a merge-ready comment. GitHub Approve stays off unless the user explicitly asks.\n\n### Fixed\n\n- Off-mode setup and user-facing guidance now preserve the independently authenticated intent boundary: ordinary high-assurance writes can skip Hello, but lifecycle intent and exact-text human replies still require trusted authority. Explicit `npx github-delivery setup` provisions the verified Windows Authority host even when the stored protection mode is Off; routine stable update remains non-installing when Off has never installed the host.\n", - ) - PY - git diff --check - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - git add authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml authority-host/windows/README.md references/configuration.md INSTALL.md references/setup-prompts.md CHANGELOG.md - git commit -m "fix: align Off-mode setup and messaging" - git push origin HEAD:fix/off-mode-never-hello From a13414fe831c1d45ec48dfa174e7b61361007dac Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:38:02 +0200 Subject: [PATCH 09/13] fix: clarify Off-mode authority behavior --- authority-host/windows/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/authority-host/windows/README.md b/authority-host/windows/README.md index c736a8da..82886d07 100644 --- a/authority-host/windows/README.md +++ b/authority-host/windows/README.md @@ -6,7 +6,7 @@ This optional Windows 11 host turns a real local user approval into short-lived - The ECDSA P-256 signing key is persisted by the Microsoft Platform Crypto Provider (TPM-backed when available) and marked non-exportable. - Whether a GitHub write requires this host is controlled by the global `github-delivery` protection mode: `off`, `high-assurance`, or `all`. -- In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, Windows Hello is not an additional mutation requirement; the ordinary github-delivery mutation policy still applies. +- In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, ordinary high-assurance writes do not add a Windows Hello requirement, but independently authenticated lifecycle intent and exact-text human replies still require trusted authority; the ordinary github-delivery mutation policy also remains in force. - One Hello approval can cover a finite, fully rendered batch; each mutation still receives its own exact-scope, short-lived grant. - Human-thread reply grants bind the exact outgoing text. The ordinary exact-text confirmation policy is not waived by Windows Hello or by a temporary branch lease. - Full-review verdict grants bind the exact human-visible verdict when the selected protection mode requires trusted authority. @@ -81,7 +81,8 @@ The root `authority-host-install.json` identifies the active release. `authority Managed lifecycle rules are deliberate: -- `off` + no Authority host ever installed: do not download or install the component; +- ordinary stable update with `off` + no Authority host ever installed: do not download or install the component; +- explicit `setup` provisions the verified stable component even with stored mode `off`, so independently authenticated lifecycle intent and exact-text human replies remain available; - `high-assurance` / `all` + missing host: `setup` installs the verified stable component on supported Windows x64; - an already-installed or legacy host can be repaired/upgraded even if the current mode is `off`; - a versioned host already equal to stable is unchanged; From 606dffa5452f42865f2e75b767dd8ecd961e7b85 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:38:21 +0200 Subject: [PATCH 10/13] docs: distinguish setup from Off-mode update --- references/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/references/configuration.md b/references/configuration.md index f4430c68..a5dc6b06 100644 --- a/references/configuration.md +++ b/references/configuration.md @@ -43,7 +43,7 @@ npx github-delivery update --apply Stable GitHub Releases contain a separately verified, self-contained `win-x64` Authority-host asset. Stable setup/update verifies the component's version, tagged source commit, archive digest, bounded extraction, and release-workflow attestation before installation, so users do **not** need the .NET SDK for the managed Authority install/update path. -If the effective mode is `high-assurance` or `all`, `setup` installs or repairs the verified Authority host on supported Windows systems. If the selected mode is `off` and the host has never been installed, setup/update normally does not install it; independently authenticated lifecycle intent and exact-text human replies still need a compatible authority provider before those mutations can execute. Once the host is already installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded. +If the effective mode is `high-assurance` or `all`, `setup` installs or repairs the verified Authority host on supported Windows systems. If the selected mode is `off` and the host has never been installed, routine stable update does not install it. Explicit `npx github-delivery setup` does provision the verified host even in Off mode so independently authenticated lifecycle intent and exact-text human replies remain usable. Once the host is installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded. `authority-host/windows/install.ps1` remains the repository/development source-install path. It requires Windows 11 plus the .NET 8 SDK and delegates deployment to the same state-preserving release installer semantics after building locally. From 68ad598cc9846ed46f92c1f3c8cb8084dc6b56af Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:38:38 +0200 Subject: [PATCH 11/13] docs: clarify Off-mode setup prompt --- references/setup-prompts.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/references/setup-prompts.md b/references/setup-prompts.md index 17f2d588..bb60c328 100644 --- a/references/setup-prompts.md +++ b/references/setup-prompts.md @@ -15,10 +15,10 @@ Guide me through the installation interactively. Check my environment and explai Show me my current github-delivery settings and let me change them. Show the stored and effective Windows Hello protection mode, explain the available modes, apply only the changes I choose, and verify the resulting configuration. ``` -Direct natural language is also valid, for example: +Direct natural language is also valid. Off disables ordinary high-assurance Hello protection, not independently authenticated lifecycle intent or exact-text human-reply approval. For example: ```text -Disable Windows Hello protection for github-delivery. +Set github-delivery's Windows Hello protection mode to Off. ``` ```text From 865392849d5291d841c3c48f64335e4ffddad6f7 Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:40:19 +0200 Subject: [PATCH 12/13] fix: describe Off-mode intent exception in UI --- .../windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml b/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml index 71f3f978..c72aea0e 100644 --- a/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml +++ b/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml @@ -564,7 +564,7 @@ - From 86bbbd7b5849217991f8a361003258ab6c5dfcdc Mon Sep 17 00:00:00 2001 From: Wibias <37517432+Wibias@users.noreply.github.com> Date: Mon, 24 Aug 2026 19:19:00 +0200 Subject: [PATCH 13/13] fix: make Off disable Windows Hello completely --- .../ControlCenterWindow.xaml | 2 +- authority-host/windows/README.md | 5 +- docs/repository-security.md | 2 +- references/configuration.md | 4 +- references/mutation-modes.md | 6 +- references/setup-prompts.md | 4 +- scripts/lib/bootstrap-maintenance.mjs | 1 - scripts/lib/mutation-execution-context.mjs | 3 - .../unit/authority-mode-enforcement.test.mjs | 145 +----------------- tests/unit/mutation-modes-docs.test.mjs | 4 - .../off-mode-authority-availability.test.mjs | 37 ----- tests/unit/off-mode-docs-consistency.test.mjs | 33 ---- 12 files changed, 14 insertions(+), 232 deletions(-) delete mode 100644 tests/unit/off-mode-authority-availability.test.mjs delete mode 100644 tests/unit/off-mode-docs-consistency.test.mjs diff --git a/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml b/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml index c72aea0e..71f3f978 100644 --- a/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml +++ b/authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml @@ -564,7 +564,7 @@ - diff --git a/authority-host/windows/README.md b/authority-host/windows/README.md index 82886d07..c736a8da 100644 --- a/authority-host/windows/README.md +++ b/authority-host/windows/README.md @@ -6,7 +6,7 @@ This optional Windows 11 host turns a real local user approval into short-lived - The ECDSA P-256 signing key is persisted by the Microsoft Platform Crypto Provider (TPM-backed when available) and marked non-exportable. - Whether a GitHub write requires this host is controlled by the global `github-delivery` protection mode: `off`, `high-assurance`, or `all`. -- In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, ordinary high-assurance writes do not add a Windows Hello requirement, but independently authenticated lifecycle intent and exact-text human replies still require trusted authority; the ordinary github-delivery mutation policy also remains in force. +- In `high-assurance`, intrinsically high-assurance and autonomous execution requests require trusted authority. In `all`, every executed GitHub mutation does. In `off`, Windows Hello is not an additional mutation requirement; the ordinary github-delivery mutation policy still applies. - One Hello approval can cover a finite, fully rendered batch; each mutation still receives its own exact-scope, short-lived grant. - Human-thread reply grants bind the exact outgoing text. The ordinary exact-text confirmation policy is not waived by Windows Hello or by a temporary branch lease. - Full-review verdict grants bind the exact human-visible verdict when the selected protection mode requires trusted authority. @@ -81,8 +81,7 @@ The root `authority-host-install.json` identifies the active release. `authority Managed lifecycle rules are deliberate: -- ordinary stable update with `off` + no Authority host ever installed: do not download or install the component; -- explicit `setup` provisions the verified stable component even with stored mode `off`, so independently authenticated lifecycle intent and exact-text human replies remain available; +- `off` + no Authority host ever installed: do not download or install the component; - `high-assurance` / `all` + missing host: `setup` installs the verified stable component on supported Windows x64; - an already-installed or legacy host can be repaired/upgraded even if the current mode is `off`; - a versioned host already equal to stable is unchanged; diff --git a/docs/repository-security.md b/docs/repository-security.md index 50c4ac26..5f3b492a 100644 --- a/docs/repository-security.md +++ b/docs/repository-security.md @@ -32,7 +32,7 @@ Enable merge commits and disable squash and rebase merges so stacked PR ancestry ## Mutation authority boundary -The broker's legacy `mutationMode`, `explicitInstruction`, and `exactTextConfirmed` request fields remain caller-provided policy assertions. They help a compliant agent avoid accidental writes, but they are not independently authenticated user consent. `authorityMode=off` does not change that: actions that require explicit lifecycle instruction or exact-text confirmation still need a verified host grant at execution. +The broker's legacy `mutationMode`, `explicitInstruction`, and `exactTextConfirmed` request fields remain caller-provided policy assertions. They help a compliant agent avoid accidental writes, but they are not independently authenticated user consent. Legacy Ed25519 `gd1` verification remains available through `GITHUB_DELIVERY_AUTHORITY_PUBLIC_KEY`. New issuers may instead provide a public-only algorithm-agile trust store through `GITHUB_DELIVERY_AUTHORITY_TRUST_STORE`. Invalid supplied grants fail closed instead of falling back to caller assertions. diff --git a/references/configuration.md b/references/configuration.md index a5dc6b06..43520aa3 100644 --- a/references/configuration.md +++ b/references/configuration.md @@ -12,7 +12,7 @@ Use this workflow when the user asks to install, set up, show, or change github- Present exactly these user-facing choices: -- **Off** — ordinary high-assurance writes do not require Windows Hello, but independently authenticated lifecycle intent and exact-text human replies still require the authority host/grant. Normal github-delivery authorization and workflow rules still apply. +- **Off** — never require Windows Hello for github-delivery mutations. Normal github-delivery authorization and workflow rules still apply. - **Sensitive actions** — internal value `high-assurance`; require Windows Hello for intrinsically high-assurance and autonomous execution. - **Every GitHub write** — internal value `all`; require Windows Hello for every executed GitHub mutation. @@ -43,7 +43,7 @@ npx github-delivery update --apply Stable GitHub Releases contain a separately verified, self-contained `win-x64` Authority-host asset. Stable setup/update verifies the component's version, tagged source commit, archive digest, bounded extraction, and release-workflow attestation before installation, so users do **not** need the .NET SDK for the managed Authority install/update path. -If the effective mode is `high-assurance` or `all`, `setup` installs or repairs the verified Authority host on supported Windows systems. If the selected mode is `off` and the host has never been installed, routine stable update does not install it. Explicit `npx github-delivery setup` does provision the verified host even in Off mode so independently authenticated lifecycle intent and exact-text human replies remain usable. Once the host is installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded. +If the effective mode is `high-assurance` or `all`, `setup` installs or repairs the verified Authority host on supported Windows systems. If the selected mode is `off` and the host has never been installed, setup/update does not install it. Once the host is already installed, stable update keeps it aligned with the skill even when the current mode is `off`; a host newer than stable is never automatically downgraded. `authority-host/windows/install.ps1` remains the repository/development source-install path. It requires Windows 11 plus the .NET 8 SDK and delegates deployment to the same state-preserving release installer semantics after building locally. diff --git a/references/mutation-modes.md b/references/mutation-modes.md index 3baf54df..78176de6 100644 --- a/references/mutation-modes.md +++ b/references/mutation-modes.md @@ -37,13 +37,13 @@ The global user setting `authorityMode` has exactly three values: | authorityMode | Extra trusted-authority requirement at execution | |---|---| -| `off` | independent intent (explicit lifecycle instruction and exact-text consent) still required; other high-assurance writes skip Hello | +| `off` | none; explicit compatibility opt-out | | `high-assurance` | autonomous execution and registry actions marked `highAssurance` | | `all` | every executed GitHub mutation | The persistent user config defaults to `high-assurance`. It lives outside the installed skill directory so upgrading the skill cannot overwrite an explicit user choice. `GITHUB_DELIVERY_AUTHORITY_MODE=off|high-assurance|all` may override the persistent value for automation or diagnosis. The legacy `GITHUB_DELIVERY_REQUIRE_TRUSTED_AUTHORITY=1` switch remains supported and maps to the stricter `all` mode. -`off` is an explicit opt-out that skips Windows Hello for high-assurance writes that do **not** require independently authenticated lifecycle intent or exact-text consent. It does not mean “the agent can do anything.” Direct merge instruction, exact-text confirmation for human replies, expected-head checks, ownership checks, idempotency, workflow routing, ship gates, and all other mutation-policy rules remain mandatory. Caller-supplied `explicitInstruction` and `exactTextConfirmed` are never themselves that independent intent. +`off` is an explicit opt-out that means **no Windows Hello / trusted-authority prompt**. It does not mean “the agent can do anything.” Direct merge instruction, exact-text confirmation for human replies, expected-head checks, ownership checks, idempotency, workflow routing, ship gates, and all other mutation-policy rules remain mandatory. Dry-run planning never requires trusted authority. When the selected mode requires authority at `--execute`, the trusted grant must contain `scopeSha256`; a legacy resource-only signature is not enough. @@ -78,7 +78,7 @@ The canonical enabled high-assurance action set is listed below. CI verifies exa - `update_pr_body` -This keeps hostile repository text and model-selected mode inside the request layer. In the default `high-assurance` mode and in `all`, a protected write additionally needs an independently verified grant for the exact effect. An explicit `off` configuration skips that additional trusted-authority requirement for writes that are not independent-intent actions. Independent intent still requires a verified host grant at `--execute`. +This keeps hostile repository text and model-selected mode inside the request layer. In the default `high-assurance` mode and in `all`, a protected write additionally needs an independently verified grant for the exact effect. Only an explicit `off` configuration skips that additional trusted-authority requirement. A human reply always needs exact-text confirmation. When authority protection requires a grant, the grant additionally binds `exactTextSha256` to the exact outgoing body. Caller-supplied `exactTextConfirmed` is never itself trusted provenance. diff --git a/references/setup-prompts.md b/references/setup-prompts.md index bb60c328..17f2d588 100644 --- a/references/setup-prompts.md +++ b/references/setup-prompts.md @@ -15,10 +15,10 @@ Guide me through the installation interactively. Check my environment and explai Show me my current github-delivery settings and let me change them. Show the stored and effective Windows Hello protection mode, explain the available modes, apply only the changes I choose, and verify the resulting configuration. ``` -Direct natural language is also valid. Off disables ordinary high-assurance Hello protection, not independently authenticated lifecycle intent or exact-text human-reply approval. For example: +Direct natural language is also valid, for example: ```text -Set github-delivery's Windows Hello protection mode to Off. +Disable Windows Hello protection for github-delivery. ``` ```text diff --git a/scripts/lib/bootstrap-maintenance.mjs b/scripts/lib/bootstrap-maintenance.mjs index 51a7c23b..193ba2d3 100644 --- a/scripts/lib/bootstrap-maintenance.mjs +++ b/scripts/lib/bootstrap-maintenance.mjs @@ -100,7 +100,6 @@ export async function runBootstrapSetup({ const startAuthority = dependencies.startInstalledAuthorityHost || startInstalledAuthorityHost; const authorityHost = await reconcileAuthority({ scriptPath: join(target, "authority-host", "windows", "install-release.ps1"), - installWhenDisabled: true, }); const authorityUnavailable = authorityHost?.action === "unsupported" && authorityHost?.required === true; diff --git a/scripts/lib/mutation-execution-context.mjs b/scripts/lib/mutation-execution-context.mjs index 72ccf30a..0140af76 100644 --- a/scripts/lib/mutation-execution-context.mjs +++ b/scripts/lib/mutation-execution-context.mjs @@ -13,7 +13,6 @@ import { import { classifyMergeOutcome, readMergeState } from "./merge-outcome.mjs"; import { verifyMergeStackEligibility } from "./merge-stack-policy.mjs"; import { actionDefinition } from "./mutation-action-registry.mjs"; -import { mutationRequiresIndependentIntent } from "./mutation-policy.mjs"; import { boundedSpawnSync } from "./subprocess-policy.mjs"; import { readUserConfig, resolveAuthorityMode } from "./user-config.mjs"; @@ -109,7 +108,6 @@ export function mutationAuthorityOptions({ const modeRequiresAuthority = enforceHighAssurance === true && (authorityMode === "all" || - mutationRequiresIndependentIntent(request) || (authorityMode === "high-assurance" && mutationRequiresTrustedAuthority(request))); @@ -146,7 +144,6 @@ export function mutationAuthorityRequired( }); return ( authorityMode === "all" || - mutationRequiresIndependentIntent(request) || (authorityMode === "high-assurance" && mutationRequiresTrustedAuthority(request)) ); diff --git a/tests/unit/authority-mode-enforcement.test.mjs b/tests/unit/authority-mode-enforcement.test.mjs index 70be6d3b..4db75441 100644 --- a/tests/unit/authority-mode-enforcement.test.mjs +++ b/tests/unit/authority-mode-enforcement.test.mjs @@ -2,11 +2,9 @@ import assert from "node:assert/strict"; import test from "node:test"; import { - executeMutationWithAuthority, mutationAuthorityOptions, mutationAuthorityRequired, } from "../../scripts/lib/mutation-execution-context.mjs"; -import { mutationRequiresIndependentIntent } from "../../scripts/lib/mutation-policy.mjs"; import { executeMutationDocument } from "../../scripts/lib/mutation-document-execution.mjs"; function request(action = "merge_pr", extra = {}) { @@ -22,13 +20,9 @@ function request(action = "merge_pr", extra = {}) { }; } -test("off mode removes the trusted-authority requirement from high-assurance execution that is not independent intent", () => { - const comment = request("post_comment", { - body: "status update", - idempotencyKey: "comment-1", - }); +test("off mode removes the trusted-authority requirement from high-assurance execution", () => { const options = mutationAuthorityOptions({ - request: comment, + request: request(), enforceHighAssurance: true, env: {}, config: { schemaVersion: 1, authorityMode: "off" }, @@ -36,7 +30,7 @@ test("off mode removes the trusted-authority requirement from high-assurance exe assert.equal(options.authorityMode, "off"); assert.equal(options.requireTrustedAuthority, false); assert.equal( - mutationAuthorityRequired(comment, { + mutationAuthorityRequired(request(), { execute: true, env: {}, config: { schemaVersion: 1, authorityMode: "off" }, @@ -45,87 +39,6 @@ test("off mode removes the trusted-authority requirement from high-assurance exe ); }); -test("off mode still requires a trusted grant for explicit lifecycle intent and exact-text consent", () => { - const off = { schemaVersion: 1, authorityMode: "off" }; - const merge = request("merge_pr", { - expectedBase: "main", - expectedBaseOid: "b".repeat(40), - mergeMethod: "merge", - }); - const reply = request("reply_human_thread", { - mutationMode: "review", - exactTextConfirmed: true, - exactTextSha256: "a".repeat(64), - commentId: 77, - body: "Thanks, this is fixed.", - idempotencyKey: "reply-1", - explicitInstruction: false, - }); - - assert.equal(mutationRequiresIndependentIntent(merge), true); - assert.equal(mutationRequiresIndependentIntent(reply), true); - assert.equal(mutationRequiresIndependentIntent(request("post_comment")), false); - - for (const actionRequest of [merge, reply]) { - assert.equal( - mutationAuthorityRequired(actionRequest, { - execute: true, - env: {}, - config: off, - }), - true, - actionRequest.action, - ); - assert.equal( - mutationAuthorityOptions({ - request: actionRequest, - enforceHighAssurance: true, - env: {}, - config: off, - }).requireTrustedAuthority, - true, - actionRequest.action, - ); - } -}); - -test("off-mode execution cannot satisfy independent intent from caller-asserted booleans", () => { - const offEnv = { GITHUB_DELIVERY_AUTHORITY_MODE: "off" }; - for (const actionRequest of [ - request("merge_pr", { - expectedBase: "main", - expectedBaseOid: "b".repeat(40), - mergeMethod: "merge", - }), - request("reply_human_thread", { - mutationMode: "review", - exactTextConfirmed: true, - commentId: 77, - body: "Thanks, this is fixed.", - idempotencyKey: "reply-1", - explicitInstruction: false, - }), - ]) { - let calls = 0; - assert.throws( - () => - executeMutationWithAuthority({ - request: actionRequest, - execute: true, - env: offEnv, - config: { schemaVersion: 1, authorityMode: "off" }, - runner() { - calls += 1; - return { status: 0, stdout: "", stderr: "" }; - }, - }), - /trusted_authority_required/, - actionRequest.action, - ); - assert.equal(calls, 0, actionRequest.action); - } -}); - test("high-assurance mode preserves the intrinsic high-assurance and autonomous boundary", () => { assert.equal( mutationAuthorityRequired(request(), { @@ -195,58 +108,6 @@ test("legacy strict env still forces all mode", () => { assert.equal(options.requireTrustedAuthority, true); }); -test("mutation document prompts in off mode for exact-text human replies", () => { - let authorized = 0; - const result = executeMutationDocument({ - document: request("reply_human_thread", { - mutationMode: "review", - exactTextConfirmed: true, - commentId: 77, - body: "Thanks, this is fixed.", - idempotencyKey: "reply-1", - explicitInstruction: false, - }), - execute: true, - env: { GITHUB_DELIVERY_AUTHORITY_MODE: "off" }, - dependencies: { - planMutationWithAuthority() { - return { kind: "validated" }; - }, - refreshExpectedHeads({ requests }) { - return { requests, refreshed: [] }; - }, - authorizeBatchSync(requests) { - authorized += 1; - return { - batchId: "batch-1", - grants: requests.map((_, operation) => ({ - operation, - token: `gd1.token${operation}.signature`, - })), - }; - }, - attachAuthorityGrants(requests, authorization) { - return { - batchId: authorization.batchId, - requests: requests.map((entry, index) => ({ - ...entry, - authorityGrant: authorization.grants[index].token, - })), - }; - }, - stampAuthorizedReviewVerdicts(batch) { - return batch; - }, - executeMutationWithAuthority({ request: executedRequest }) { - return { action: executedRequest.action, grant: executedRequest.authorityGrant }; - }, - }, - }); - assert.equal(authorized, 1); - assert.equal(result.action, "reply_human_thread"); - assert.equal(result.grant, "gd1.token0.signature"); -}); - test("mutation document does not prompt in off mode even when the action is intrinsically high assurance", () => { let authorized = false; let executed = false; diff --git a/tests/unit/mutation-modes-docs.test.mjs b/tests/unit/mutation-modes-docs.test.mjs index 59adad89..9520eda4 100644 --- a/tests/unit/mutation-modes-docs.test.mjs +++ b/tests/unit/mutation-modes-docs.test.mjs @@ -62,10 +62,6 @@ test("bare full review selects review mode and follows configured authority prot assert.match(reference, /full review PR #32[\s\S]*→ `review`/); assert.match(reference, /full-review workflow[\s\S]*trusted authority is required by the default protection mode/i); assert.match(reference, /When `authorityMode` is explicitly `off`[\s\S]*does not require OS-backed provenance/i); - assert.match( - reference, - /`off`[\s\S]*independent(?:ly authenticated)?(?: lifecycle)? intent[\s\S]*exact-text/i, - ); assert.match(reference, /reports `trusted:false`/); }); diff --git a/tests/unit/off-mode-authority-availability.test.mjs b/tests/unit/off-mode-authority-availability.test.mjs deleted file mode 100644 index 2dec8cd9..00000000 --- a/tests/unit/off-mode-authority-availability.test.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import assert from "node:assert/strict"; -import { resolve } from "node:path"; -import test from "node:test"; - -import { runBootstrapSetup } from "../../scripts/lib/bootstrap-maintenance.mjs"; - -test("setup opts into Authority provisioning even when protection mode is Off", async () => { - const target = resolve("test-fixtures/off-mode-setup"); - let reconcileOptions = null; - - const result = await runBootstrapSetup({ - target, - output: { write() {} }, - dependencies: { - discoverInstallations: () => [{ valid: true, target }], - reconcileStableAuthorityHost: async (options) => { - reconcileOptions = options; - return { - action: "install", - changed: false, - installed: { installed: false }, - }; - }, - startInstalledAuthorityHost: async () => ({ - started: false, - reason: "not_installed", - }), - readActivationReceipt: () => ({ - mode: "hooks", - hookTrustVerified: true, - }), - }, - }); - - assert.equal(result.status, "ready"); - assert.equal(reconcileOptions?.installWhenDisabled, true); -}); diff --git a/tests/unit/off-mode-docs-consistency.test.mjs b/tests/unit/off-mode-docs-consistency.test.mjs deleted file mode 100644 index 2dbda04e..00000000 --- a/tests/unit/off-mode-docs-consistency.test.mjs +++ /dev/null @@ -1,33 +0,0 @@ -import assert from "node:assert/strict"; -import { readFileSync } from "node:fs"; -import test from "node:test"; - -function read(path) { - return readFileSync(new URL(`../../${path}`, import.meta.url), "utf8"); -} - -test("Off-mode user-facing docs preserve the independently authenticated intent exception", () => { - const controlCenter = read( - "authority-host/windows/GitHubDeliveryAuthority/ControlCenterWindow.xaml", - ); - const configuration = read("references/configuration.md"); - const authorityReadme = read("authority-host/windows/README.md"); - const install = read("INSTALL.md"); - const setupPrompts = read("references/setup-prompts.md"); - - assert.doesNotMatch(controlCenter, /No Windows Hello prompts\./); - assert.match( - controlCenter, - /Independent lifecycle intent and exact-text human replies still require Windows Hello\./, - ); - - assert.doesNotMatch( - configuration, - /Off[^\n]*never require Windows Hello for github-delivery mutations/i, - ); - assert.match(configuration, /independent(?:ly authenticated)? lifecycle intent/i); - assert.match(authorityReadme, /independent(?:ly authenticated)? lifecycle intent/i); - assert.match(install, /independent(?:ly authenticated)? lifecycle intent/i); - assert.doesNotMatch(setupPrompts, /Disable Windows Hello protection for github-delivery\./); - assert.match(setupPrompts, /independently authenticated lifecycle intent/i); -});