Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
set -eu
bun run check
3 changes: 3 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
set -eu
bun run check
28 changes: 28 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Quality

on:
push:
pull_request:

permissions:
contents: read

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- name: Secret scan
uses: trufflesecurity/trufflehog@20652fbbdefffcdaa493a5bf57ab2ac6b1db715b # v3.97.1
with:
version: "3.97.1"
extra_args: --results=verified,unknown
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
- run: bun run check
- name: Actionlint
uses: raven-actions/actionlint@3d39aea434753780c3b3d4a1a31c854b4dbf49d7 # v2
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@
- Source changes and issues: `makekosmos/cortex`

This repository does not accept product source or a duplicate issue tracker.

## Channel contract

[`release-channel.json`](release-channel.json) records the public channel
boundary and delegates installer integrity verification to
`cortex/desktop/scripts/verify-release-channel.mjs`. This repository does not
build, sign, publish, or re-verify installer bytes.

Run `bun run check` before pushing channel-governance changes. Installation
also configures the repository-owned pre-commit and pre-push hooks. The
repository has no third-party package dependencies, so dependency audit is not
applicable; CI instead runs the channel contract, secret scan, and Actionlint.
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "@makekosmos/desktop-release-channel",
"private": true,
"scripts": {
"check:channel": "node scripts/check-channel-contract.mjs",
"check": "bun run check:channel",
"prepare": "git config core.hooksPath .githooks"
},
"packageManager": "bun@1.3.14"
}
19 changes: 19 additions & 0 deletions release-channel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"schemaVersion": 1,
"lifecycle": "active-release-channel",
"owner": "Cortex maintainer",
"sourceRepository": "makekosmos/cortex",
"channelRepository": "makekosmos/desktop",
"artifact": "public Windows installers and updater metadata",
"releaseUnit": "one Kosmos Desktop release",
"assets": {
"installer": "Kosmos-Setup-<version>.exe",
"blockmap": "Kosmos-Setup-<version>.exe.blockmap",
"updater": "latest.yml"
},
"verification": {
"repository": "makekosmos/cortex",
"path": "desktop/scripts/verify-release-channel.mjs",
"command": "bun desktop/scripts/verify-release-channel.mjs"
}
}
40 changes: 40 additions & 0 deletions scripts/check-channel-contract.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";

const manifest = JSON.parse(await readFile("release-channel.json", "utf8"));
const readme = await readFile("README.md", "utf8");

assert.deepEqual(manifest, {
schemaVersion: 1,
lifecycle: "active-release-channel",
owner: "Cortex maintainer",
sourceRepository: "makekosmos/cortex",
channelRepository: "makekosmos/desktop",
artifact: "public Windows installers and updater metadata",
releaseUnit: "one Kosmos Desktop release",
assets: {
installer: "Kosmos-Setup-<version>.exe",
blockmap: "Kosmos-Setup-<version>.exe.blockmap",
updater: "latest.yml",
},
verification: {
repository: "makekosmos/cortex",
path: "desktop/scripts/verify-release-channel.mjs",
command: "bun desktop/scripts/verify-release-channel.mjs",
},
});

for (const marker of [
"Lifecycle: active release channel",
"makekosmos/cortex",
"Owner: Cortex maintainer",
"Artifact: public Windows installers and updater metadata",
"Release unit: one Kosmos Desktop release",
"does not accept product source",
"cortex/desktop/scripts/verify-release-channel.mjs",
"bun run check",
]) {
assert.ok(readme.includes(marker), `README is missing: ${marker}`);
}

console.log("Desktop release-channel contract is valid");
Loading