@rightkit/release 0.6.40 → 0.6.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +110 -11
  2. package/admission-files.mjs +40 -0
  3. package/admission-host.mjs +2 -1
  4. package/app-check.mjs +303 -16
  5. package/app-closure.mjs +6 -4
  6. package/bin/rightkit-gate.mjs +177 -32
  7. package/cargo-contract.mjs +17 -31
  8. package/cargo-license-notices.mjs +129 -19
  9. package/cargo-target-shim.mjs +14 -0
  10. package/carried-cargo.mjs +2 -4
  11. package/cli/right-release.mjs +24 -2
  12. package/cross-targets.mjs +24 -0
  13. package/deterministic-scans.mjs +150 -58
  14. package/development-signing.mjs +25 -2
  15. package/development.mjs +34 -1
  16. package/direct-release-command.mjs +154 -0
  17. package/disk-policy.mjs +16 -0
  18. package/feature-coverage.mjs +134 -0
  19. package/gate-coverage.mjs +38 -0
  20. package/gate-stages.mjs +1 -0
  21. package/ghsa-audit.mjs +95 -0
  22. package/install-app.mjs +33 -5
  23. package/install-channels.mjs +301 -0
  24. package/interactive-session-run.mjs +105 -0
  25. package/legal-contract.mjs +10 -1
  26. package/legion-freeze-consumer.mjs +241 -0
  27. package/linux-publish.mjs +136 -0
  28. package/local-publish.mjs +31 -8
  29. package/nsis-pack.mjs +95 -0
  30. package/nsis-upgrade-template.mjs +93 -0
  31. package/outdated-command.mjs +19 -0
  32. package/ownership-class-rules.mjs +32 -10
  33. package/ownership-mandatory-set.json +23 -0
  34. package/ownership-mandatory-set.mjs +66 -8
  35. package/package-recipe-targets.mjs +54 -19
  36. package/package.json +1 -1
  37. package/payload-root-install.mjs +123 -0
  38. package/plugin-delivery.mjs +141 -0
  39. package/prebuild-gates.mjs +8 -4
  40. package/preflight.mjs +6 -1
  41. package/provision-model-bundle.mjs +172 -0
  42. package/pub-upload.mjs +1 -1
  43. package/publish-local-npm.mjs +34 -9
  44. package/publish-retention.mjs +106 -0
  45. package/publish-update.mjs +15 -8
  46. package/qa-build-features.mjs +24 -15
  47. package/qa-contract.mjs +5 -6
  48. package/qa-control-scan.mjs +14 -0
  49. package/qa-web-pairing.mjs +76 -0
  50. package/r2-s3-multipart.mjs +190 -0
  51. package/r2-verified-upload.mjs +28 -16
  52. package/recipe-build.mjs +53 -3
  53. package/release-checks.mjs +53 -2
  54. package/release-config.mjs +8 -3
  55. package/release-invocation.mjs +12 -2
  56. package/release-pin-floor.mjs +44 -0
  57. package/release-qa-audit.mjs +18 -2
  58. package/release-qa-command.mjs +17 -1
  59. package/release-qa-policy.mjs +30 -3
  60. package/release-switch-cfg.mjs +271 -0
  61. package/release-switch-registry.json +60 -1
  62. package/release-switch-scan.mjs +398 -23
  63. package/release.mjs +97 -6
  64. package/render-views.mjs +141 -0
  65. package/rightkit-registry-resolver.mjs +1 -1
  66. package/rightkit-versions.json +140 -103
  67. package/runtime-artifact-manifest.mjs +9 -0
  68. package/runtime-manifest-refresh.mjs +88 -0
  69. package/rustright-stage.mjs +197 -0
  70. package/scan-digest.mjs +15 -9
  71. package/scan-tool-enrolment.mjs +1 -1
  72. package/security-policy.mjs +196 -0
  73. package/shell-contract.mjs +32 -0
  74. package/snapshot-broker.mjs +8 -1
  75. package/snapshot-check.mjs +58 -0
  76. package/snapshot-request.mjs +25 -2
  77. package/stage-commands.mjs +33 -4
  78. package/stage-receipt.mjs +115 -0
  79. package/stage-sidecar.mjs +188 -17
  80. package/stage-xcframework.mjs +118 -0
  81. package/suite-api.generated.mjs +16 -1
  82. package/unit-gate.mjs +14 -2
  83. package/upload-large.mjs +4 -4
  84. package/upload-release.mjs +6 -0
  85. package/win-package-recipe.mjs +26 -4
package/README.md CHANGED
@@ -30,7 +30,7 @@ Every Right app has absolutely NO access to DevTools; the single exception is Vi
30
30
 
31
31
  ## Shell contract rules (`shell-contract.mjs`, preflight SC-R1..SC-R9)
32
32
 
33
- How an app wires `rightkit-tauri-shell` is checked from committed files alone, before any build. `shell-contract.mjs` exports `SHELL_CONTRACT_RULES` (`{ id, gap, run({ root, files }) }`, findings `{ file, subject, problem, fix }` like the G13-G21 rules); `scripts/preflight.mjs` runs them on any repository with a `tauri.conf.json` and ratchets their findings in `ci/app-check-baseline.json` (the nine rules are the SC-R rows of the table in "The app check") (identity `rule|file|subject`, no line numbers). Run one with `node scripts/preflight.mjs --repo <app dir> --only shell-csp`. Each app is a tracked `tauri.conf.json`; a `tauri.<platform>.conf.json` is merged into it by JSON Merge Patch (arrays replace) and judged as its own target only when its patch restates the checked key.
33
+ How an app wires `rightkit-tauri-shell` is checked from committed files alone, before any build. `shell-contract.mjs` exports `SHELL_CONTRACT_RULES` (`{ id, gap, run({ root, files }) }`, findings `{ file, subject, problem, fix }` like the G13-G21 rules); `scripts/preflight.mjs` runs them on any repository with a `tauri.conf.json` and ratchets their findings in `ci/app-check-baseline.json` (the ten rules are the SC-R rows of the table in "The app check") (identity `rule|file|subject`, no line numbers). Run one with `node scripts/preflight.mjs --repo <app dir> --only shell-csp`. Each app is a tracked `tauri.conf.json`; a `tauri.<platform>.conf.json` is merged into it by JSON Merge Patch (arrays replace) and judged as its own target only when its patch restates the checked key.
34
34
 
35
35
  The module imports node builtins only (preflight runs with no `node_modules`), reads Rust and TSX with a comment- and string-aware scanner instead of a parser (an expression it cannot resolve is skipped, never guessed), and reports a rule that fails on one app as a `rule-error` finding instead of throwing. Its content-devtools Cargo test is a copy of `selectedContentDevtoolsCrate` in `devtools-policy.mjs`; `shell-contract.test.mjs` holds the two together.
36
36
 
@@ -62,8 +62,17 @@ The module imports node builtins only (preflight runs with no `node_modules`), r
62
62
 
63
63
  - `name` (required, unique): environment variable, argument flag, settings key or `VITE_*` name.
64
64
  - `class` (required): `S1`..`S6`. `channel` (required): `env`, `argv`, `settings`, `preference` or `frontend`.
65
- - S1-S4 need `compiledOut`: `feature:<name>`, `cfg:test`, `cfg:debug_assertions` or, for Swift, `swift:DEBUG` (the read sits inside `#if DEBUG`; the read exists only there). The source walk skips test directories, including Swift bundles named `Tests`, `UITests`, `<App>Tests` and `<App>UITests`. S5 needs `userGesture: true`. S6 needs `valueType` of `bool`, `int` or `enum`.
66
- - `anchor` and `note` are informational. Fixtures: `fixtures/release-switches/` (`app/` is a clean example).
65
+ - S1-S4 need `compiledOut`: `feature:<name>`, `cfg:test`, `cfg:debug_assertions` or, for Swift, `swift:<CONDITION>` (`swift:DEBUG`, `swift:PULSE_QA`: the read sits inside `#if <CONDITION>`; the read exists only there). The source walk skips test directories, including Swift bundles named `Tests`, `UITests`, `<App>Tests` and `<App>UITests`. S5 needs `userGesture: true`. S6 needs `valueType` of `bool`, `int` or `enum`.
66
+ - `swift:<CONDITION>` (#1169) is any Swift compilation condition (`swift:DEBUG`, or the app's own, e.g. `swift:PULSE_QA`), and it is checked, not trusted: every read of the name must sit in a Swift file inside an `#if <CONDITION>` (or `#elseif`) branch that requires it (`A && COND` does; `#else`, `COND || A` and `!COND` do not), and the project must not define the condition for Release (`SWIFT_ACTIVE_COMPILATION_CONDITIONS` in a Release `buildSettings` block of a `project.pbxproj`, a Release or unscoped `.xcconfig` line, or a SwiftPM `.define("X")` not limited to `.when(configuration: .debug)`). A condition a separate QA build adds on the command line is in no project file and passes; the finding is `not-compiled-out`.
67
+ - `anchor` and `note` are informational (except a `releasePresence` anchor, below). Fixtures: `fixtures/release-switches/` (`app/` is a clean example).
68
+ - **Minimal inventory and opt-out (#397).** Every release build reads one inventory (`switches.json`, or the file `releaseSwitches.inventory` names); a missing file fails a non-dry-run release. An app with no source switches commits the smallest valid one, and that is its explicit opt-out: `{ "schema": 1, "app": "<name>", "switches": [] }`. The walk then still refuses any environment read the app source makes, so the empty list is a claim the source proves. Names the operating system or Cargo supply are not selectors and need no entry (below).
69
+ - **OS-provided and Cargo-provided variables (#1045).** The registry's `osProvided` list (`HOME`, `HOMEDRIVE`, `HOMEPATH`, `USERPROFILE`, `APPDATA`, `LOCALAPPDATA`, `PROGRAMDATA`, `ALLUSERSPROFILE`, `PATH`, `PATHEXT`, `SystemRoot`, `SystemDrive`, `windir`, `COMSPEC`, `ProgramFiles`, `ProgramFiles(x86)`, `ProgramW6432`, `TEMP`, `TMP`, `TMPDIR`, `USER`, `USERNAME`, `LOGNAME`, the `XDG_*` base directories) is read by the walk as not-a-switch; an app cannot add to it (that list is a registry change, so a selector cannot be declared "OS provided"), and an app that registers one of these names keeps its entry checked. In a file named `build.rs` the variables Cargo sets for a build script (`OUT_DIR`, `TARGET`, `HOST`, `PROFILE`, `DEBUG`, `OPT_LEVEL`, `NUM_JOBS`, `RUSTC*`, `CARGO_CFG_*`, `CARGO_FEATURE_*`, `DEP_*`, `CARGO_MANIFEST_DIR`, `CARGO_PKG_*`) are exempt as well; `env!`/`option_env!` keep the Cargo-set list.
70
+ - **Builder-supplied build-time constants (#1009).** A value the builder supplies when compiling and that stays in release (a licence public key, a service host) is not a switch. List it under `buildConstants` (a sibling of `switches`): `{ "name": "CUTRIGHT_LICENSE_PUBLIC_KEY_HEX", "channel": "option_env", "buildTimeOnly": true, "note": "..." }`. `channel` is `option_env`, `env` or `vite-define` (a `VITE_*` name); `buildTimeOnly: true` is the required statement that no caller can supply it at run time. The walk accepts a read through `option_env!`/`env!`/`import.meta.env` and refuses any other read of the name (`build-constant-runtime-read`); a name on the deny list cannot be declared a constant, and a constant is not an S1-S4 entry, so its name is not refused in release binaries.
71
+ - **`releaseSwitches.envHelpers` (#937).** Names of macros or functions whose first literal argument is an environment variable (`dev_var!("X")`, `env_string("X")`). A literal first argument counts as a read of that name; a non-literal one is a `dynamic-read`. `fn name(` definitions are not calls.
72
+ - **`releasePresence` (#937).** An S1-S4 entry may add `"releasePresence": { "mechanism": "scrub" | "clear" | "set", "owner": "crate" | "app", "anchor": "<path>:<line>" }` for a name that release code only scrubs, clears or sets (provider keys in an app's scrub list, `ORT_DYLIB_PATH` cleared by `rightkit-onnx`, `WEBVIEW2_*` set by `rightkit-tauri-shell`). The binary layer then lets the name stay in release binaries only if (1) the owner is proven (`owner: crate`: the registry's `presenceOwners` names a crate for that name and mechanism and the resolved cargo tree contains it; `owner: app`: the `anchor` line, within two lines, shows the quoted name inside an `env_remove`/`remove_var`/`scrub`/`clear` call, or a `set_var`/`.env(` call for `set`) and (2) every literal read of the name sits inside an item under `#[cfg(<compiledOut>)]` or a file its parent declares `#[cfg(<compiledOut>)] mod x;` (`cfg!()`, a runtime branch and files that are not Rust do not count). Otherwise the name stays denied, and the findings are `release-presence-unproven` (owner or anchor) and `read-not-gated` (an ungated read). Limits: a `mod` with a path attribute and a read in a macro body are not followed, so they fail closed.
73
+ - **`TAURI_WEBVIEW_AUTOMATION` (#941).** Upstream `tauri-runtime-wry` `create_webview` reads `TAURI_WEBVIEW_AUTOMATION` (WebDriver automation of the webview) outside a debug build. The name is a registry S1 deny name, so no release binary of any app may contain it (`release-switch-names`); an app that carries an unpatched `tauri-runtime-wry` is refused until its runtime no longer honours it. The replacement for HeardRight's vendored `tauri-runtime-wry` patch (the `cfg(debug_assertions)` read and the Windows `Arc` context ownership fix with its regression test) is a change in another repository, so this gate does not end the vendoring by itself.
74
+ - **Dev-build self-check (#397).** `right-release dev` ends by scanning the installed dev binary for the QA control marker (`RIGHTKIT-QA-CONTROL-SERVER-PRESENT`) and any name in `releaseSwitches.devSelfCheck.expectPresent`, the equivalent of ViewRight's retired `--expect-present`: a dev build is built with the QA surface, so a missing string means a renamed or stripped marker the release scan could not see either (`dev-expect-absent`, exit non-zero, `DEV_SELF_CHECK_FAILED`). An app whose dev build has no QA control server writes `"releaseSwitches": { "devSelfCheck": { "optOut": "<reason>" } }`; the reason is printed on every dev build. Applies to the Tauri install kinds on Windows and macOS.
75
+ - **Web QA define (#1480).** One switch for the web side of `qa-native`: the Vite define `__RIGHTKIT_QA__`, true only when `RIGHTKIT_BUILD_MODE=dev` (`rightkitQaDefine()` in `@rightkit/config`; `rightkitViteConfig` already includes it). QA code behind it carries the string `RIGHTKIT-QA-WEB-COMPILED`. The web bundle scan (`assertNoWebBundleMocks`, run before and after packaging, and the Android AAB scan) refuses the marker, `__RIGHTKIT_QA__` and the retired per-app flags `VITE_VIEWRIGHT_BROWSER_QA`, `VITE_RIGHTKIT_BROWSER_QA`, `VITE_RIGHTKIT_QA` and `__RIGHTKIT_MOCK__` in a release bundle; the native binary scan refuses the same names. In the dev lane `qa-web-pairing.mjs` checks the pair: when the dev build command enables `qa-native` and the app declares `releaseSwitches.webQa: true` (it adopted the define), the frontend bundle must carry the marker (`web-qa-missing`); a bundle that carries the marker while `qa-native` is off is refused for every app (`web-qa-unpaired`). The release lane needs no extra assertion: neither half may ship, and both scans already run.
67
76
 
68
77
  #### Non-shipped tooling: `releaseSwitches.nonShipped`
69
78
 
@@ -74,7 +83,9 @@ On desktop (non-iOS) targets the source walk covers the whole app root, so app t
74
83
  ```
75
84
 
76
85
  - It is an exclusion list: any directory not listed is still scanned, so an omission fails safe. `dir` is relative to the app root; `reason` is required and non-empty. iOS is unchanged (it already walks only the Xcode project and the local crates in its cargo tree).
77
- - Every entry is validated before the walk and a bad one fails the release with `inventory-invalid`. Refused: a dir that is missing, not a real directory (a symlink), absolute, escaping the root, or the root itself; an empty `reason`; a dir that contains or sits inside a local crate of the resolved release cargo tree (a crate at the app root protects `src/`), `src-tauri`, or the Tauri `frontendDist` bundle; a dir that contains a `package.json` or sits inside a directory below the root that has one; when the root has a `package.json`, `src/`, `public/` and every existing directory named by the root `index.html` (`src`/`href`), a quoted string in `vite.config.*` (root, publicDir, build input) or `include`/`files` of `tsconfig.json`, plus anything inside or containing them; and any dir holding a path named by `src-tauri/tauri.conf.json` `beforeBuildCommand`/`beforeDevCommand`/`beforeBundleCommand` a root `package.json` `build*` script, or the release recipe's own commands (`targets.<os>.prePackage`, `package`, `postSign`, `packageHook`, the finalizer; followed through `pnpm|npm|yarn run <script>`), because those run during the release build.
86
+ - Every entry is validated before the walk and a bad one fails the release with `inventory-invalid`. Refused: a dir that is missing, not a real directory (a symlink), absolute, escaping the root, or the root itself; an empty `reason`; a dir that contains or sits inside a local crate of the resolved release cargo tree (a crate at the app root protects `src/`), `src-tauri`, or the Tauri `frontendDist` bundle; a dir that contains a `package.json` or sits inside a directory below the root that has one; when the root has a `package.json`, `src/`, `public/` and every existing directory named by the root `index.html` (`src`/`href`), or a quoted string in `vite.config.*` (root, publicDir, build input), plus anything inside or containing them (a directory only `tsconfig.json` `include`/`files` names is judged by the import graph, below); and any dir holding a path named by `src-tauri/tauri.conf.json` `beforeBuildCommand`/`beforeDevCommand`/`beforeBundleCommand` a root `package.json` `build*` script, or the release recipe's own commands (`targets.<os>.prePackage`, `package`, `postSign`, `packageHook`, the finalizer; followed through `pnpm|npm|yarn run <script>`), because those run during the release build.
87
+ - Also refused (#939): a dir that contains or sits inside a path a Cargo build script compiles or watches (the `build.rs` of the app root, `src-tauri` or a local crate of the tree, or the one a `build = "..."` in its `Cargo.toml` names): a string literal given to `include!`/`include_str!`/`include_bytes!` (relative to the script), `cc::Build` `file`/`files`/`include`/`flag("-I...")` or `cargo:rerun-if-changed=` (relative to the crate); and a dir that contains or sits inside a Swift package (`Package.swift`), which is compiled code. A path a script assembles at run time and files a script pulls in with `mod` are not followed.
88
+ - Type-checked tooling (#1070): a directory that only `tsconfig.json` `include`/`files` names (MailRight's `scripts/`, type-checked by `tsc` before the build) is no longer refused for that alone. It is refused when the frontend import graph reaches it: relative imports (`./x`, `../scripts/x.ts`, `import("./x")`, `new URL("./x", import.meta.url)`) followed from the scripts of `index.html`, `src/main.*`, `src/index.*` and the files `vite.config.*` names. Aliased imports (tsconfig `paths`, Vite `alias`) and bare specifiers are not followed.
78
89
  - Not protected: the release code does not otherwise know the frontend source layout. A frontend input that none of the rules above names (for example one referenced only from a nested config, or built by a script not reachable from those commands) is not refused, so list only directories you know never ship.
79
90
 
80
91
  ## Commands
@@ -137,6 +148,9 @@ The rules (`right-release check --list` prints their ids and gaps; `scripts/pref
137
148
  | `switches-inventory` | G20 | a directory with a `right-release.config.json`, read as data (or a legacy `right-release.config.mjs`), and no `switches.json` (or its `releaseSwitches.inventory`) |
138
149
  | `speech-link` | G21 | `import Speech` under `swift/RightKitSwift/Sources` or `Tests` |
139
150
  | `e2e-under-cargo-test` | G22 | `cargo test`, `cargo run` or `cargo nextest` (plain, `rustright cargo`, or the retired `rightkit`) that runs an end-to-end crate in the broker: it holds the compile slot for the whole run |
151
+ | `scratch-checkout` | G23 | compile tier: a script under `scripts/`, `packages/release/` or `ci/` that runs `git clone`, `git worktree add`, a checkout outside the repository, or `git archive` in a file that also runs a build command, unless the repository's `ci/gate.config.json` `scratchCheckoutAllowlist` names the file with an issue link and a reason (rightkit#1221; `ci/consumers` fixtures are exempt) |
152
+ | `trust-policy-exclude` | G24 | a pnpm `trustPolicyExclude` entry for `@rightkit/*` other than the one generated selector `"@rightkit/*"` (a per-version or hand-written entry; `scripts/ci/npm-recipe-consumer.mjs` writes the selector; rightkit#1476) |
153
+ | `commit-citations` | G28 | the commits this push adds (`RK_PUSH_BEFORE..HEAD` in CI, else the merge-base with `origin/main` to the checked commit) each cite an issue (`#N`, `owner/repo#N`), and a commit that changes more than documentation also carries `Contract: <file>#<section>` naming a clause id or heading of a file it holds; `RK_VERIFY_ISSUES=1` also resolves each cited issue through `gh`; never baselineable (rightkit#1268, GATE-CONTRACT GC-T19) |
140
154
  | `suite-key-literal` | C3-04 | the Right Suite licence public key pasted as a byte array, 64 hex digits, base64 or `\x` escapes, or the updater key text outside a `tauri.conf.json`, in a non-test file; take it from the contract's generated constants |
141
155
  | `suite-updater-key` | C3-14 | a `tauri.conf.json` `plugins.updater.pubkey` that is not a copy of a key in `contracts/right-suite-api.v1.json` (missing, a placeholder, another key or an unparseable file); a platform override may leave it to the base config |
142
156
  | `engine-record-store` | C3-05 | a call to `from_record_store` outside `crates/rightkit-license`: the owner binary hands the engine a snapshot through `rightkit_credentials::handoff` instead |
@@ -149,6 +163,7 @@ The rules (`right-release check --list` prints their ids and gaps; `scripts/pref
149
163
  | `devtools-declaration` | SC-R7 | the five sites (release config `devtools: "content-only"`, `devtools-policy.json`, `content-devtools` feature, `build.rs` ACL manifest, `.devtools_policy(ContentOnly)`) disagree once any of the declaration, the feature or the policy is present |
150
164
  | `shell-lifecycle-external` | SC-R8 | `lifecycle_only` / `lifecycle_plugin` beside a `WebviewUrl::External` window; `host_windows()` keeps hardening and the navigation policy |
151
165
  | `legal-receipt-native` | SC-R9 | `<Onboarding>` (`legalMode` not `none`/`notice`) with no `legalReceipt` or a hand-written one, or a `LegalGate` that stamps the acceptance with the webview clock while the app has no `createNativeLegalReceiptPort` |
166
+ | `autostart-owner` | SC-R10 | an app's Rust that writes the HKCU `...\CurrentVersion\Run` key itself, or drives the `auto-launch` crate or `tauri-plugin-autostart` directly, instead of the shell's autostart service (rightkit#1227) |
152
167
  | `release-config-identity` | CA-01 | a `right-release.config.mjs` whose default-exported object declares `schema` but whose top-level `app` or `version` is missing, `undefined`, `null`, empty or not a string (read as text, never run); a value it cannot prove from a string literal or a top-level `const` string in the same file is an UNSUPPORTED finding, not a pass; a JSON config needs strings, or a `$fromJson`/`$fromToml` node whose selected value (resolved from the committed file as `release-config.mjs` does) is a non-empty string |
153
168
  | `pnpm-node-floor` | CA-05 | a workflow job that runs pnpm and sets up a Node below what the pinned pnpm needs (pnpm 11: Node 22.13, `consumer-contracts.json`), or a `.node-version`/`.nvmrc` below it |
154
169
  | `rust-dependency-msrv` | CA-05 | a `Cargo.lock` crates.io entry whose `rust_version` (the pinned crates.io index snapshot in `consumer-contracts.json`) is above the concrete channel of the nearest `rust-toolchain(.toml)`; `stable` and versions the snapshot lacks are not judged |
@@ -198,7 +213,11 @@ else (from a RightKit checkout only) `ci/app-check-baseline.json`. The app's own
198
213
  "added", "sunset" }] }`; the central `{ "known": { "<repo>": [...] } }` shape in an app's file is refused (exit 2). Every app entry needs
199
214
  an issue, an `added` date (YYYY-MM-DD, UTC, not later than today) and a `sunset` that is not before `added` and at most 90 days after
200
215
  it. Past its sunset an entry stops tolerating its finding (the finding fails with `its baseline entry expired`) and is reported as
201
- `EXPIRED`; a listed identity that no finding has any more is `STALE` and fails, so the list only shrinks. A rule the build refuses
216
+ `EXPIRED`; a listed identity that no finding has any more is `STALE` and fails, so the list only shrinks. An entry added since the
217
+ merge-base with `origin/main` (the baseline file, read at that commit, does not list it) must carry `approvedBy` (the person who approved
218
+ the silence; an agent name is refused) and an issue link (`#N`, `owner/repo#N` or a GitHub issue URL), else the check fails it as
219
+ `UNAPPROVED` (rightkit#1251); the central file takes the same entries as `{ "id", "issue", "approvedBy" }` objects beside the older plain
220
+ identity strings. With no `origin/main` the run prints a `NOTE` that growth was not checked. A rule the build refuses
202
221
  whatever a baseline says (`switches-inventory`) fails even when listed.
203
222
 
204
223
  ## Every build tool is a door
@@ -318,7 +337,7 @@ A `sign` entry in `tests.suites` is no longer a step (GATE-CONTRACT GC-A07: no b
318
337
 
319
338
  #### Windows development: `install.kind: "tauri-authenticode"`
320
339
 
321
- The unsigned Windows `tauri` install kind is refused on the Dell. `tauri-authenticode` signs what it installs, in the release's order: `target.build` runs `tauri build --no-bundle` (a build that bundles, or names `--bundles`, is refused), then the bundle marker is patched (before signing), the exe and `install.sidecars` are signed and verified, the carried `tauri bundle --bundles nsis --debug` runs, the installer's payload is checked to embed the signed exe byte for byte, the installer is signed and verified, and only then is it installed and the installed exe verified.
340
+ The unsigned Windows `tauri` install kind is refused on the Dell. `tauri-authenticode` signs what it installs, in the release's order: `target.build` runs `tauri build --no-bundle` (a build that bundles, or names `--bundles`, is refused), then the bundle marker is patched (before signing), the exe and `install.sidecars` are signed and verified, the carried `tauri bundle --bundles nsis` runs (the release profile; there is no `--debug`, GATE-CONTRACT GC-A07), the installer's payload is checked to embed the signed exe byte for byte, the installer is signed and verified, and only then is it installed and the installed exe verified.
322
341
 
323
342
  ```json
324
343
  "install": {
@@ -369,14 +388,39 @@ legal: { cargoNotices: {
369
388
  } }
370
389
  ```
371
390
 
372
- Runs `cargo about generate --locked --fail` through managed Cargo, with declared config, manifest, features & template.
373
- Inputs & output stay inside app root. Missing inputs, unresolved licenses, command failure or empty output fail generation.
391
+ Runs `cargo about generate --frozen --fail` through managed Cargo, with declared config, manifest, features & template.
392
+ `output` and `template` stay inside the app root; `manifestPath` and `config` may climb out of it (`../../engine/Cargo.toml`) while they
393
+ stay inside the repository root. Several workspaces merge into one appendix with `manifests: [{ label, manifestPath, config? }]` (use it
394
+ instead of `manifestPath`): one run per entry, each body in a `<section data-cargo-manifest="label">`. After a successful run the page
395
+ carries `Build provenance: <product> <version>; inputs: <Cargo.lock path> sha256=<hex>; generated-by=right-release license-notices cargo`
396
+ (one `<lock> sha256=<hex>` per distinct lock, the lock nearest above each manifest) before `</body>`, so consumer contract CA-14 binds the
397
+ appendix to its `Cargo.lock`; `productName` and `version` default to the config `app` and the app's `package.json` version.
398
+ Missing inputs, unresolved licenses, command failure or empty output fail generation.
374
399
  `--output` overrides config; `--check` writes nothing & exits 1 when generated bytes differ.
375
400
  `rightkit-legal rust-licenses` delegates to this route.
376
401
 
377
402
  `license-notices binaries` generates notices for declared native binaries; `--receipt` checks staged non-catalog programs
378
403
  against declared coverage. Both routes accept `--config`, `--output` & `--check`.
379
404
 
405
+ ### `security`: CSP and Tauri capability drift (doctor and build, #1136)
406
+
407
+ ```js
408
+ security: {
409
+ csp: { exact: "default-src 'self'; connect-src 'self' https://api.example.com" }, // or { allow: { "connect-src": ["'self'", "https://api.example.com"] }, require?: { ... } }
410
+ capabilities: { dir: "src-tauri/capabilities", expected: { main: { exact: ["core:default", "process:allow-restart"], forbid: ["updater:"] } } },
411
+ }
412
+ ```
413
+
414
+ The `security-policy` row reads `src-tauri/tauri.conf.json` (`app.security.csp`, or Tauri 1's `tauri.security.csp`) and the capability files (`.json` or `.toml`; permissions may be strings or `{ identifier }` objects) and refuses drift: a CSP directive or source outside the approved policy or allow-list, a missing `require`d source, a capability that is not in `expected`, a permission outside `exact`, a missing `require`d permission, a permission under a `forbid` prefix. It writes nothing and runs in the doctor and the build alike.
415
+
416
+ ### `directRelease`: finalize a direct (non-store) release (#1142)
417
+
418
+ `right-release direct-release finalize [--config <file>] [--output-dir <dir>] [--dry-run]` zips each payload (`createPortableArchive`), binds each archive to its SLSA provenance and CycloneDX SBOM (`collectReleaseAsset`), writes `checksums.json`, the release manifest and its detached Azure-signed catalog (`materializeDirectRelease`; the signing host is Windows), renders and validates `install.ps1` (`renderPowerShellBootstrap`, `validatePowerShellBootstrap`, accepting the signer the manifest was just signed with) and writes the bootstrap publication plan (`planBootstrapPublication`). It runs from a clean checkout at HEAD, is a checked, release-tier command, and uploads nothing: the R2 upload of the bootstrap is its own step. The config block is documented at the top of `direct-release-command.mjs` (`product`, `repository`, `minimumBootstrapVersion`, `bootstrapVersion`, `assets[]`, `bootstrap`).
419
+
420
+ ### `modelBundles`: pinned, verified model provisioning (#993)
421
+
422
+ `right-release provision-model [--config <file>] [--id <bundle>] [--dry-run]` fetches each `modelBundles` entry (`{ id, dest, pins: [{ path, sha256, size, url? }], source: { baseUrl } | { r2: { bucket, prefix } } }`) into `dest`: resumable downloads, every file verified against its pin before it is renamed into place, a file already matching its pin is not fetched again, nothing unpinned is fetched. The pins are the bundle's `rightkit-models` catalog pins, copied into the config; an `r2` source is a signed GET with credentials derived in memory from `CLOUDFLARE_API_TOKEN`.
423
+
380
424
  ### Mirroring an artifact (`mirror-root-artifact`)
381
425
 
382
426
  ```js
@@ -422,6 +466,8 @@ app in `notarize.app`. Declare the file in `updater.artifacts` as before. See `d
422
466
  "approvedRunners": [ { "sha256": "<64 hex>", "version": "0.9.0", "platform": "mac", "set_by": "adrian", "since": "2026-10-24" } ] }
423
467
  ```
424
468
 
469
+ **Policy writes target a checkout (#1235).** `qa policy set` and `approve-runner` write `qa-admission-policy.json`, so they take `--repo <RightKit checkout>` (its `packages/release`) or `--dir <directory holding the file>` and refuse without one; a write whose directory is inside `node_modules` or a trusted-gates root (`.rightkit-managed`, `trusted-gates`) is refused, so a pinned gate or an installed package is never modified. `show` still reads the package's own copy.
470
+
425
471
  **Per-stage modes.** An app entry is one mode, or carries `stages: { installed? }` that overrides it for the publication admission (`installed` is upload, publish-update and github; it is the only stage, GATE-CONTRACT GC-A07). `qa policy set --app <app> --stage installed --mode refuse --set-by <name>` writes the stage entry; without `--stage` the app-level mode is written and any `stages` object is dropped.
426
472
 
427
473
  - **`warn` (default; an app with no entry).** A missing or invalid receipt does not block. `build`, `upload`, `publish-update` and `github` print `[right-release] QA warning: ...` to stderr, continue, and record the outcome (below).
@@ -459,11 +505,13 @@ The shipped `bin/darwin/rightkit-swap` is Developer ID signed. CI qualification
459
505
 
460
506
  Development builds (from `@rightkit/ci` `devArtifact`, Developer ID-signed but not notarized) install with `--dev` and exactly one of `--dmg`, `--zip <path.zip>` (extracted with `ditto -x -k`), or `--app <path.app>`: `right-release install-app --dev --zip dev-mac.zip`. `--dev` still requires `codesign --verify --deep --strict`, a Team ID, no Team ID change, and a bundle-id match; it skips only `spctl` and `stapler`, removes `com.apple.quarantine` from the new bundle only, prints `DEV BUILD (not notarized)`, and sets `dev: true` on every JSON event.
461
507
 
462
- ## One fixed path, one identity; release keeps one `.previous`, dev keeps none (every app)
508
+ ## One fixed path, one identity; no install keeps a `.previous` copy (every app)
509
+
510
+ macOS and Windows tie privacy grants (mic, screen, Files and Folders, Removable Volumes, Full Disk Access) to the path an app runs from and to its code identity. So every app, helper and dev or QA binary installs and updates IN PLACE at ONE fixed path under ONE identity; there is no per-version, per-digest, per-pid or per-build install folder or bundle id. NO install, release or dev, keeps a retained rollback copy (Adrian, decision D1 in bogusyogi/rightkit#771, from #348: "when installing dev, old copy must never be backedup"; a user who needs an older build reinstalls it). A release install parks the old copy at `<name>.previous` only while the new one is verified, deletes it on success and renames it back on a failed swap; a dev or QA install parks nothing and a failed dev install leaves the path absent or partial with a clear error. A stale `.previous` an older RightKit left is removed. Nothing ever runs from `.previous` or from a staging copy.
463
511
 
464
- macOS and Windows tie privacy grants (mic, screen, Files and Folders, Removable Volumes, Full Disk Access) to the path an app runs from and to its code identity. So every app, helper and dev or QA binary installs and updates IN PLACE at ONE fixed path under ONE identity; there is no per-version, per-digest, per-pid or per-build install folder or bundle id. A RELEASE install may keep one rollback `<name>.previous` beside the fixed path (rename it back). A DEV or QA install keeps NO old copy of any kind (Adrian, bogusyogi/rightkit#348: "when installing dev, old copy must never be backedup"; reinstall from an older DMG): it replaces the path in place through a short-lived staging name and removes any stale `.previous`, and a failed dev install leaves the path absent or partial with a clear error. Nothing ever runs from `.previous` or from a staging copy.
512
+ **Updater rollback and publisher-key rotation (#961).** Because of D1 the updater has no rollback path of its own: `@rightkit/app-update` boot probation answers `reinstall_required` (guidance `reinstall`) for a version that never acknowledges, and `RightKitUpdate` reports `failed`; neither restores a previous build. An app that needs a failed update to leave the previous build working takes that from the platform instead, as a per-app rule: MSIX (App Installer) and App Store or TestFlight distribution own update install and rollback, so an app distributed that way carries no rollback of its own. Publisher-key rotation is in the updater contract, not in a rollback copy: the suite's accepted minisign keys are the `updaterPublicKeys` list in `contracts/right-suite-api.v1.json` (key id, key, optional `notAfter`), `updaterSigningKeyId` names the one key releases are signed with, `resolveUpdaterTrust` (`github-updater-release.mjs`) refuses a key that is unlisted or past `notAfter`, and `distribution.updaterKeyId` may name another listed key. Rotate in this order: add the new key to the contract, ship a release signed by the old key (so installed apps learn both keys), then change `updaterSigningKeyId` (runbook: `docs/SUITE-TRUST-ROOTS.md` "Updater key rotation"). An app that is not a suite app (Ember) declares one `distribution.updaterPublicKey` and has no rotation list: it rotates by shipping a release signed by the old key whose `tauri.conf.json` carries the new `pubkey`.
465
513
 
466
- - `install-app` (macOS) renames the replaced app to `<App>.app.previous` (never the Trash) for a release install only; `install-app --dev` removes the old app and keeps nothing. `install-app --installer <Setup.exe> --dest <folder> --exe <App.exe> [--payload <file>]... [--payload-manifest <json>]` runs the NSIS installer in place. It NEVER copies or restores the whole install folder, because that folder can hold user data (CodeRight keeps `coderight.db`, its WAL, state and models there). Its backup and rollback are payload-only, from an explicit allowlist: the `--exe` file plus `--payload` entries and a `--payload-manifest` JSON of relative file paths (files, never directories); with no `--payload` it backs up and rolls back nothing. `right-release dev` (mac) installs to `install.destination` (required) with no `.previous` and fails if its designated requirement differs from the installed copy; Windows tauri dev runs the silent installer without copying `<exe>.previous`; a portable dev payload installs as `<installRoot>/current` with no `current.previous` (data beside `current` is never touched); the Windows direct installer installs to `current` with `current.previous`.
514
+ - `install-app` (macOS) parks the replaced app at `<App>.app.previous` (never the Trash) only until the new one verifies, then deletes it; `install-app --dev` removes the old app and keeps nothing. `install-app --installer <Setup.exe> --dest <folder> --exe <App.exe> [--payload <file>]... [--payload-manifest <json>]` runs the NSIS installer in place. It NEVER copies or restores the whole install folder, because that folder can hold user data (CodeRight keeps `coderight.db`, its WAL, state and models there). Its backup and rollback are payload-only, from an explicit allowlist: the `--exe` file plus `--payload` entries and a `--payload-manifest` JSON of relative file paths (files, never directories); with no `--payload` it backs up and rolls back nothing. `right-release dev` (mac) installs to `install.destination` (required) with no `.previous` and fails if its designated requirement differs from the installed copy; Windows tauri dev runs the silent installer without copying `<exe>.previous`; a portable dev payload installs as `<installRoot>/current` with no `current.previous` (data beside `current` is never touched); the Windows direct installer installs to `current` with a transient `current.previous` (deleted on success, renamed back on a failed health check).
467
515
  - `right-release dev` (mac) signs with the same Developer ID Application identity as release (an app that needs a provisioning profile uses a Developer ID profile); Apple Development certificates are refused with `DEV_MAC_SIGNING_DEVELOPER_ID_REQUIRED`.
468
516
  - **Cargo target folders are not stable paths.** The broker's target tree is `<managed>/rightkit-build-control/ws/<hash>/g/<generation>/target/...` and the generation changes; `cargo-guard` uses a hashed `dev-targets/<project>-<hash>` folder. They are build output only, so nothing may run from them. Dev and QA binaries run from a fixed staged path: list them in `development.targets.<platform>.stage` (`[{ source } | { manifestPath, bin, targetTriple?, profile?, name? }]`) and `right-release dev` copies each in place to `<app root>/.rightkit-dev-bin/<triple-or-host>/<name>` (no backup of the old copy); `rightkit-qa` launches from its `.rightkit-qa-bin` stash on every path.
469
517
 
@@ -662,6 +710,22 @@ Rotation order: (1) add the new key to `updaterPublicKeys` in the contract and r
662
710
 
663
711
  NSIS, MSI, `.app.tar.gz` and AppImage bundles all work the same way (any file signed by `sign-updater`). With no sealed installer the installer platform-trust check is skipped (reported in the output); installer-bearing seals still run it. The app side: `plugins.updater.endpoints` is the `latest.json` URL above and `plugins.updater.pubkey` is the suite updater public key (see `@rightkit/app-update` README).
664
712
 
713
+ ## Client update feed for private (R2) apps (#854)
714
+
715
+ A private product (`distribution.provider: "r2-rightapps"`) publishes with `publish-update`: the artifacts go to R2 (`<app>/updates/<os>/current/<file>` for the updater, `<app>/installers/<os>/current/<file>` for the installer) and the signed manifest is POSTed to the admin route (`/v1/admin/apps/releases` for the `update` tier, `/v1/admin/apps/patches` for `patch`) on `https://api.orthiclabs.com` (legacy host `api.spoares.com`). An installed app reads the registered manifest, not R2:
716
+
717
+ | Feed | URL | Who may read it |
718
+ | --- | --- | --- |
719
+ | Update manifest | `GET https://api.orthiclabs.com/v1/apps/{app}/releases/latest.json?platform=darwin\|windows` | the app, with the entitlement the route checks |
720
+ | Patch manifest | `GET https://api.orthiclabs.com/v1/apps/{app}/releases/patches.json?platform=darwin\|windows` | any install (Free installs receive patches); `204` when none |
721
+ | Release status | `GET https://api.orthiclabs.com/v1/apps/{app}/releases/status.json` | public; the latest patch and update versions |
722
+
723
+ The path templates are the Right Suite contract's (`contracts/right-suite-api.v1.json`: `paths.updaterManifest`, `releaseStatus`; `@rightkit/app-update` carries them as `suite-api.generated.ts`). The manifest is Tauri's static-JSON shape: `{ version, notes, pub_date, tier, platforms: { "<os>-<arch>": { signature, url } } }`. `signature` is the minisign signature text `sign-updater` wrote for the artifact (the Tauri updater verifies the downloaded bytes against the `pubkey` in `tauri.conf.json`; a suite app's key is the contract's, see "Updater trust roots"), and `url` is the artifact URL. Integrity data for an installer check is registered with the release: each registered artifact carries `sha256` and `sizeBytes`, and the signed `artifactManifest` repeats them with the R2 key; the updater signature is the bytes' trust root.
724
+
725
+ Authentication of an installed private app: the manifest routes need no secret beyond the entitlement the server checks; the artifact bytes of the update tier come from the gated host `https://rightapps-license-gate.adrdsouza.workers.dev/<app>/<path>`, which takes `Authorization: Bearer <the app's Pro licence token>` (the Ed25519 token `rightkit-license` refreshes; the Worker enforces the `<app>/` key prefix against the token's `app` claim and refuses a non-Pro token). Patch installers are on the public installer base `https://pub-6c73208d46c245a9b4881d5e02f6b618.r2.dev/<path>`.
726
+
727
+ What does not exist yet: a patch whose `updater.artifacts` is empty (an app that ships only an installer, for example a DMG, as Pulse does) registers no manifest, because the registration route (`validateReleaseRegistration` in `@sellright/api`, served by `rightsites`) requires exactly one updater artifact and non-empty `platforms`. `publish-update` therefore still uploads the installers and says so instead of POSTing a body the server rejects; an installer-only feed needs that route changed first.
728
+
665
729
  ## Android (AAB build, Play internal track, dev install)
666
730
 
667
731
  The Android lane is native Kotlin with Gradle plus Rust `.so` libraries per ABI (`docs/design/android-minimum.md` section 4). It follows the same split as the desktop lanes: `build` never uploads, `upload` never builds.
@@ -903,3 +967,38 @@ The release config is `right-release.config.json` (M24, `release-config.mjs`): e
903
967
  `right-release pe digest <file> [--algorithm sha256|sha384|sha512] [--json]` prints the signature-independent PE content digest (Authenticode image hash: CheckSum, certificate table entry and certificate data excluded, so signing, re-signing and timestamping do not change it). `right-release pe imports <file> [--allow dll,...] [--allow-file <path>] [--json]` lists regular and delay-load imports and exits 1 when any is outside the allow list (case-insensitive; a trailing `*` allows a prefix such as `api-ms-win-*`; no allow list refuses every import). SDK: `peContentDigest(bytes)` and `verifyImportClosure(bytes, allowedDlls)` in `pe-content.mjs`.
904
968
 
905
969
  `right-release icons ico|icns --out <file> --frame <PNG>... [--dir <folder>]` packs per-size PNG frames, hand-tuned small ones included, into an ICO (sizes 1..256, PNG-compressed entries) or an ICNS (16, 32, 64, 128, 256, 512, 1024). Frame sizes come from each PNG's IHDR; non-square, duplicate or unsupported sizes are refused. Rendering the PNG frames from a design master stays with the app's design source; the DMG background generator is `generate-dmg-background.py`.
970
+
971
+
972
+ ## Install, packaging and publication contracts (rightkit#690 and the install group)
973
+
974
+ What each piece does and exactly where it stops. Written from code; none of it has been run on a host.
975
+
976
+ **Install relaunch (#690, #1225).** `install-app` relaunches the installed app by its installed path (`open -g -j --env HOME=<home> <dest>/<App>.app`) with `HOME` from the password database (`os.userInfo().homedir`, the getpwuid answer) and `CLAUDE_CONFIG_DIR` removed (`launchEnvironment`), and unregisters (`lsregister -u`) the `--app` build product after the copy. An agent shell in a second Claude profile can no longer hand its profile's folders to the installed app.
977
+
978
+ **Cargo lock (#725).** Every generated Tauri build forwards `-- --locked` to Cargo (macPackage `tauri build`, winPackage `tauri build --no-bundle`, the standalone Windows recipe); the bundle step runs no Cargo.
979
+
980
+ **Absolute managed-target paths (#717).** `winPackage.rawExe` / `installerFile` (or the single `sign.prePackageFiles` / `sign.files` entry) may be an absolute path under a broker-managed root. The recipe stages it to `src-tauri/target/rightkit-managed/<name>` with the existing verified copy-out / copy-back plan (`managed-target-stage.mjs`); any other absolute path, and any `..`, is still refused. In a door split the absolute bound-target path is signed in place.
981
+
982
+ **Runtime manifest refresh (#722).** `sign.runtimeManifests: ["<manifest.json>"]` (macOS: relative to each signed `.app`; Windows: relative to the app root) re-hashes every `files[{path,sha256,bytes}]` row after the nested code / sidecars are re-signed and before the app is sealed (`runtime-manifest-refresh.mjs`); a missing, linked or escaping file refuses. The macOS dev install (`install.runtimeManifests`, else `sign.runtimeManifests`) signs nested items first, refreshes, then seals the app.
983
+
984
+ **ScrapeRight gaps (#753).** `command` sidecars take `sha256` (a file) or a directory `output` with `dest` (every file hashed into the receipt); `remote` takes `latest: { checksums, file? }` (dev stage only: the digest comes from the publisher's https checksum list and is recorded as `latest.resolvedSha256`; a release pins `sha256`) and `extractTree` (a whole archive tree, for example Chrome for Testing, into `dest`); `RIGHT_RELEASE_DOWNLOAD_CACHE` (an absolute folder) is a host-wide content-addressed download cache that every read re-hashes; `cleanup.killProcesses` (macPackage `cleanup.killProcesses`, winPackage `killProcesses`) stops processes whose executable lies inside the listed app-relative folders; `checks` entries may be `{ script, expectOutput?, forbidOutput? }` (plain substrings of the captured stdout); `right-release nsis-template --from <Tauri installer.nsi> --out <file>` derives the in-place-upgrade NSIS template the Windows contract requires and refuses on any anchor it does not find; `runtimeArtifacts` is no longer an accepted config key (nothing read it). pdfium, whisper/ggml and the second ONNX Runtime library (DirectML) were already `native-library` rows and `companions`.
985
+
986
+ **Prebuilt app and payload packaging (#871, #428).** `macPackage.prebuilt: true` runs the target's own `prePackage` command instead of `tauri build` and still applies nested signing, app notarization, the signed DMG and the updater tarball (the Tauri-only keys are refused with it). Windows: `signingContract: "windows-payload-authenticode-before-nsis-v1"` signs every `sign.prePackageFiles` file, runs `package` (for example `right-release nsis-pack --script <x.nsi> --payload <dir> --output <Setup.exe> [--define NAME=VALUE]`), proves each signed file is embedded in each installer, signs the installer, and signs updater artifacts when declared. `right-release session-run [--state-dir <dir>] -- <command...>` runs one command in the signing user's interactive Windows logon session through a one-shot `/IT` task (hidden, `LIMITED`, deleted afterwards).
987
+
988
+ **Exact-root install and scratch root (#816, #428).** `development.targets.<platform>.install: { kind: "payload-root", sourceDirectory, installRoot, entrypoint, stopProcesses? }` installs a verified payload folder into exactly `installRoot`, owns only the files it ships (`.rightkit-payload.json` lists them), keeps no old copy, and removes only files an earlier install of the same payload listed. `appScratchRoot(app)` (`disk-policy.mjs`) is the run-output folder (`<APP>_SCRATCH`, else the disk policy's scratch root + `/<app>`).
989
+
990
+ **Stage receipt (#1039).** `readVerifiedStageReceipt({ root, receiptPath?, target, profile?, mode?, names, kind? })` (exported from `stage-sidecar.mjs`) returns `{ name: { path, sha256 } }` and throws when the receipt is not valid, a row is missing or duplicated, a row was staged with another Cargo profile or the receipt in another build mode (receipts now record `mode`), or the file's bytes differ. `sign.stageReceipt: { receipt?, bind? }` turns on the release guard: immediately before signing it refuses a non-release receipt, any drifted staged file, and any `bind` payload file that is not byte-identical to its row.
991
+
992
+ **Repository-level manifests (#1247).** A `cargo-bin` `manifestPath` may climb out of the app with `..` to a `Cargo.toml` inside the same repository (`.git` ancestor required, real path checked); a manifest outside it, or with no repository root, refuses.
993
+
994
+ **xcframework (#1234).** `right-release stage-xcframework --crate <dir> --targets aarch64-apple-ios,aarch64-apple-ios-sim --headers <dir> --out <Name.xcframework>` builds each target through RustRight's managed Cargo seam (`--locked`, release profile only: there is no dev or debug output) and assembles the xcframework with `xcodebuild -create-xcframework`; it writes `<out>.receipt.json`. Use it as a `development.targets.ios.prepare` or `iosPackage.prepare` step.
995
+
996
+ **Linux private publication (#1230).** `linux-artifacts.json` (per architecture: file, sha256, size, glibc floor) is written by the Linux dev/build route (`linux-artifacts.mjs`). `right-release linux-publish publish --app <slug> --out-dir <dir> --approve <manifest sha256>` uploads the tarballs and the manifest (last) to the private bucket under `<app>/linux/<version>/` with a streamed readback; `--approve` must be the digest of the manifest Adrian named. `linux-publish presign --app --version --arch [--expires <60..86400>]` prints one artifact's time-limited URL with its pinned sha256, size and glibc floor (SigV4 query authentication; credentials derived in memory from the credential store).
997
+
998
+ **Install channels (#1191).** `right-release install-channels --facts <facts.json> --out <dir> [--check]` renders `install.sh`, `install.ps1`, `Casks/<app>.rb`, the winget manifest set and `install-channels.json` (a sha256 per file for the read-back compare) from the facts of a verified release (ADR-0004). Every script pins the immutable `versions/<ver>/` URL and sha256 and refuses before running an installer on a mismatch; macOS and Windows also check the signer.
999
+
1000
+ **Plugin delivery (#1442).** `targets.<platform>.plugin: { dir }` makes the release check that the plugin is valid and its version equals the app's. `install-app ... --plugin-dir <installed plugin folder>` and `right-release plugin-install --app <slug> --plugin-dir <dir>` generate a local marketplace `<app>-installed` from the installed folder, add it to every Claude config root (default, `CLAUDE_CONFIG_DIR`, each profile under `~/ClaudeProfiles`), install or update the plugin with Claude's CLI, and require Claude's recorded version to equal the app's. Codex is not driven (no install contract is evidenced).
1001
+
1002
+ **RustRight staging (#1465).** `right-release rustright-stage [--repo <rustright checkout>] [--scratch <dir>] [--cutover [--apply] [--config-next <file>]]` is the fold of `mac-local-stage.sh` and `xps-stage.ps1`: gate-output proof, RightKit signing, `rustright-install stage` and `approve`, the cutover script, and `rustright-install cutover` only when asked. The elevated root adapter install and Legion enrollment remain Adrian's host step.
1003
+
1004
+ **Publication leaves no copies (#763).** After a verified publish (`upload`, `publish-update`) `retainAfterPublish` keeps the published release and at most `maxReleases - 1` others younger than `maxAgeDays` under `.right-release/{sealed,state}` (defaults 3, 14 days; the `RIGHT_RELEASE_RETAIN_*` variables can only tighten), refuses any release folder holding a `.git` (a repository copy), and fails loudly when what is left exceeds 2 GiB.
@@ -182,6 +182,46 @@ export const FILES_ROWS = Object.freeze([
182
182
  return found;
183
183
  },
184
184
  },
185
+ {
186
+ // A template instance carries a PLACEHOLDER- updater public key and an `.invalid` updater endpoint until the owner copies the suite
187
+ // key in (#1167). Files only, so the doctor and the build name it, before any compile or signing, as one explicit row: a fresh
188
+ // instance is allowed to show exactly this row, and a build never reaches the seal-time signature failure that never said "placeholder".
189
+ id: "updater-placeholder",
190
+ tier: "files",
191
+ needsTarget: false,
192
+ run(ctx) {
193
+ if (ctx.platform !== "win" && ctx.platform !== "mac") return { na: "only the win and mac updaters carry a minisign key" };
194
+ const found = [];
195
+ const where = [];
196
+ const keys = [
197
+ ["release config distribution.updaterPublicKey", ctx.config?.distribution?.updaterPublicKey],
198
+ ["release config distribution.updaterPubkey", ctx.config?.distribution?.updaterPubkey],
199
+ ["target.updater.pubkey", ctx.target?.updater?.pubkey],
200
+ ["target.updater.publicKey", ctx.target?.updater?.publicKey],
201
+ ];
202
+ const endpoints = [];
203
+ for (const dir of new Set([ctx.root, workdirOf(ctx)])) {
204
+ const confPath = path.join(dir, "src-tauri", "tauri.conf.json");
205
+ if (!ctx.exists(confPath)) continue;
206
+ let updater;
207
+ try { updater = JSON.parse(ctx.fs.readFileSync(confPath, "utf8"))?.plugins?.updater; } catch { continue; } // an unreadable file is the frontend-config-readable row's finding
208
+ const label = path.relative(ctx.root, confPath).replaceAll("\\", "/") || "src-tauri/tauri.conf.json";
209
+ keys.push([`${label} plugins.updater.pubkey`, updater?.pubkey]);
210
+ for (const endpoint of asList(updater?.endpoints)) endpoints.push([`${label} plugins.updater.endpoints`, endpoint]);
211
+ where.push(label);
212
+ }
213
+ for (const [label, value] of keys) {
214
+ if (typeof value === "string" && /PLACEHOLDER-/i.test(value)) found.push(`${label} is the placeholder ${JSON.stringify(value.length > 60 ? `${value.slice(0, 60)}...` : value)}: copy the suite updater public key from a shipped app (${where[0] ?? "src-tauri/tauri.conf.json"} plugins.updater.pubkey), or take the app's own key, before any release`);
215
+ }
216
+ for (const [label, value] of endpoints) {
217
+ if (typeof value !== "string") continue;
218
+ let host = "";
219
+ try { host = new URL(value.replace(/\{\{[^}]*\}\}/g, "x")).hostname; } catch { host = ""; }
220
+ if (/\.invalid$/i.test(host)) found.push(`${label} names ${value}, a reserved .invalid host that never resolves: set the real update endpoint before any release`);
221
+ }
222
+ return found;
223
+ },
224
+ },
185
225
  {
186
226
  // publish-update.mjs: the provider the upload takes, for the win and mac releases it uploads (iOS and Android go through their own
187
227
  // lanes, whose providers are app-store-connect and google-play). A config that declares no distribution is refused there too, as
@@ -20,6 +20,7 @@ import { MSIX_SIGNING_CONTRACT } from "./msix-config.mjs";
20
20
 
21
21
  const WINDOWS_PORTABLE_SIGNING_CONTRACT = "windows-raw-exe-authenticode-before-portable-v1";
22
22
  const WINDOWS_NSIS_SIGNING_CONTRACT = "windows-raw-exe-authenticode-before-nsis-v1";
23
+ const WINDOWS_PAYLOAD_SIGNING_CONTRACT = "windows-payload-authenticode-before-nsis-v1";
23
24
  const UPDATER_ENV = ["TAURI_SIGNING_PRIVATE_KEY", "TAURI_SIGNING_PRIVATE_KEY_PASSWORD"];
24
25
  const NOTARY_ENV = ["APPLE_API_KEY_PATH", "APPLE_API_KEY", "APPLE_API_ISSUER"];
25
26
  class CheckStopped extends Error {}
@@ -239,7 +240,7 @@ export const HOST_ROWS = Object.freeze([
239
240
  tier: "host",
240
241
  run(ctx) {
241
242
  const { platform, target } = ctx;
242
- const contracts = [WINDOWS_NSIS_SIGNING_CONTRACT, WINDOWS_PORTABLE_SIGNING_CONTRACT, MSIX_SIGNING_CONTRACT];
243
+ const contracts = [WINDOWS_NSIS_SIGNING_CONTRACT, WINDOWS_PAYLOAD_SIGNING_CONTRACT, WINDOWS_PORTABLE_SIGNING_CONTRACT, MSIX_SIGNING_CONTRACT];
243
244
  if (platform !== "win" || !contracts.includes(target?.signingContract)) return { na: "not a Windows target signed through sign-windows.mjs" };
244
245
  if (ctx.hostPlatform !== "win32") return { notRun: "the Windows signing prerequisites (signtool, Azure Artifact Signing) are probed on the Windows host that signs" };
245
246
  const env = windowsEnv(ctx);