Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

feat(ok): adopt GPL-3.0-or-later + contributor CLA bridge gate (#1601)

Nick Gomez35ab7b9860de
diff --git a/.changeset/gplv3-license-adoption.md b/.changeset/gplv3-license-adoption.md
new file mode 100644
index 000000000..9c35bdf06
--- /dev/null
+++ b/.changeset/gplv3-license-adoption.md
@@ -0,0 +1,6 @@
+---
+"@inkeep/open-knowledge": minor
+"@inkeep/open-knowledge-desktop": minor
+---
+
+Adopt GPL-3.0-or-later. Open Knowledge is now licensed under the GNU General Public License v3.0 or later: every package declares the `license` field, the GPLv3 LICENSE text ships in the npm tarball and the desktop app bundle, `ok --version` prints the standard GPL notice (copyright, free software, no warranty), and the desktop About panel carries the same notice.
diff --git a/.github/scripts/bridge-public-pr-to-monorepo.mjs b/.github/scripts/bridge-public-pr-to-monorepo.mjs
index 9c584e4e8..3546f6e63 100644
--- a/.github/scripts/bridge-public-pr-to-monorepo.mjs
+++ b/.github/scripts/bridge-public-pr-to-monorepo.mjs
@@ -4,11 +4,17 @@ import { tmpdir } from 'node:os';
import path from 'node:path';
import { pathToFileURL } from 'node:url';
+import { applyClaGate } from './cla-gate.mjs';
+
// Keep the public PR bridge copies code-shape aligned. They ship to
// separate public repos through Copybara, so they cannot import shared code.
// Sibling bridge copies:
// - public/agents/.github/scripts/bridge-public-pr-to-monorepo.mjs
// - public/agents-optional-local-dev/.github/scripts/bridge-public-pr-to-monorepo.mjs
+// The Open Knowledge copy additionally imports a co-located `cla-gate.mjs` for
+// contributor-CLA enforcement — an OK-only divergence. That module ships to the
+// same repo via Copybara, so the import resolves on the mirror; the "no shared
+// code" rule still holds (no module is shared ACROSS the three repos).
const BRIDGE_COMMENT_MARKER = '<!-- monorepo-pr-bridge -->';
// Strip x-access-token credentials from any string that might end up in an
@@ -59,7 +65,9 @@ async function githubRequest({
const text = await response.text();
if (!response.ok) {
- throw new Error(`${method} ${requestPath} failed (${response.status}): ${text}`);
+ const error = new Error(`${method} ${requestPath} failed (${response.status}): ${text}`);
+ error.status = response.status;
+ throw error;
}
// .patch and .diff return raw text, not JSON. All other accept types
@@ -444,6 +452,86 @@ async function ensureDraftState({ token, pullRequest, shouldBeDraft }) {
});
}
+// Read the `license/cla` combined-status state on a commit (cla-assistant posts
+// it on the public PR head). Returns null when the context is absent.
+//
+// `?per_page=100` raises the embedded-statuses ceiling from GitHub's default of
+// 30 to the documented max. The combined-status array holds the latest status
+// per context, so a commit would need >100 distinct status contexts before
+// `license/cla` could fall off the first page — at which point the gate would
+// read null and fail closed (a false hold), never falsely release. The sibling
+// `upsertIssueComment` paginates the same way.
+async function readCommitClaStatus({ token, repo, sha, request = githubRequest }) {
+ const result = await request({
+ token,
+ path: `/repos/${repo}/commits/${sha}/status?per_page=100`,
+ });
+ const cla = (result.statuses ?? []).find((s) => s.context === 'license/cla');
+ return cla ? cla.state : null;
+}
+
+// Check org membership for a public-PR author. GitHub returns 204 for a member
+// and 404 for a non-member (or a membership this token cannot see). Real errors
+// — a 403 when the bridge App lacks `members:read`, or a 5xx — propagate so
+// `applyClaGate` fails closed rather than treating an outage as "not a member".
+async function checkOrgMembership({ token, org, login, request = githubRequest }) {
+ try {
+ await request({ token, path: `/orgs/${org}/members/${encodeURIComponent(login)}` });
+ return true;
+ } catch (error) {
+ if (error?.status === 404) {
+ return false;
+ }
+ throw error;
+ }
+}
+
+// Post a commit status — used for the bridge's own `cla/verified` context on the
+// internal PR head, the signal the agents-private branch ruleset requires.
+async function postCommitStatus({ token, repo, sha, state, context, description, request = githubRequest }) {
+ await request({
+ token,
+ method: 'POST',
+ path: `/repos/${repo}/statuses/${sha}`,
+ body: { state, context, description },
+ });
+}
+
+// Build the GitHub adapter `applyClaGate` consumes. Extracted so the wiring —
+// which token/repo each call uses, and the `cla/verified` context the
+// agents-private ruleset requires — is testable in isolation rather than buried
+// in `syncPublicPr`. `request` is injectable for hermetic tests; production
+// uses the module's `githubRequest`.
+function createClaGateGh({
+ publicToken,
+ publicRepo,
+ internalToken,
+ internalRepo,
+ request = githubRequest,
+}) {
+ // Membership is checked against the org that owns the internal repo (inkeep),
+ // on the internal App token — the only credential that can carry
+ // `members:read`. The public Actions token cannot read org membership.
+ const org = internalRepo.split('/')[0];
+ return {
+ readClaStatus: (pr) =>
+ readCommitClaStatus({ token: publicToken, repo: publicRepo, sha: pr.head.sha, request }),
+ isOrgMember: (login) => checkOrgMembership({ token: internalToken, org, login, request }),
+ setDraft: (pr, shouldBeDraft) =>
+ ensureDraftState({ token: internalToken, pullRequest: pr, shouldBeDraft }),
+ setVerifiedStatus: (pr, state, description) =>
+ postCommitStatus({
+ token: internalToken,
+ repo: internalRepo,
+ sha: pr.head.sha,
+ state,
+ context: 'cla/verified',
+ description,
+ request,
+ }),
+ };
+}
+
async function syncPublicPr() {
const publicToken = requireEnv('PUBLIC_TOKEN');
const internalToken = requireEnv('INTERNAL_TOKEN');
@@ -700,11 +788,6 @@ async function syncPublicPr() {
path: `/repos/${internalRepo}/pulls/${internalPr.number}`,
body: { title, body },
});
- await ensureDraftState({
- token: internalToken,
- pullRequest: internalPr,
- shouldBeDraft: publicPr.draft,
- });
} else {
internalPr = await githubRequest({
token: internalToken,
@@ -720,6 +803,17 @@ async function syncPublicPr() {
});
}
+ // Enforce the contributor CLA. cla-assistant posts `license/cla` on the public
+ // PR, but the bridge re-commits under a new SHA here, so that status can't gate
+ // the internal PR directly. Hold the internal PR (draft + a failing
+ // `cla/verified` status) until signed, re-checked on every sync. This also
+ // takes over draft-state mirroring: shouldBeDraft = publicPr.draft || gated.
+ await applyClaGate({
+ gh: createClaGateGh({ publicToken, publicRepo, internalToken, internalRepo }),
+ publicPr,
+ internalPr,
+ });
+
await upsertIssueComment({
token: publicToken,
repo: publicRepo,
@@ -834,4 +928,12 @@ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
});
}
-export { buildInternalPrBody, buildPublicComment, prefixPatchPaths };
+export {
+ buildInternalPrBody,
+ buildPublicComment,
+ checkOrgMembership,
+ createClaGateGh,
+ postCommitStatus,
+ prefixPatchPaths,
+ readCommitClaStatus,
+};
diff --git a/.github/scripts/bridge-public-pr-to-monorepo.test.mjs b/.github/scripts/bridge-public-pr-to-monorepo.test.mjs
new file mode 100644
index 000000000..cc15c1519
--- /dev/null
+++ b/.github/scripts/bridge-public-pr-to-monorepo.test.mjs
@@ -0,0 +1,148 @@
+import { describe, expect, test } from "bun:test";
+import {
+ checkOrgMembership,
+ createClaGateGh,
+ postCommitStatus,
+ readCommitClaStatus,
+} from "./bridge-public-pr-to-monorepo.mjs";
+
+// A fake `githubRequest`: records every call and returns the queued response.
+// The bridge's GitHub adapters are the only seam where the `license/cla` and
+// `cla/verified` context strings (the gate's enforcement surface) live, so the
+// tests assert the request shape at that boundary, not internal call counts.
+const fakeRequest = (response) => {
+ const calls = [];
+ const request = async (args) => {
+ calls.push(args);
+ return response;
+ };
+ return { request, calls };
+};
+
+describe("readCommitClaStatus", () => {
+ test("extracts the license/cla state from the combined status", async () => {
+ const { request } = fakeRequest({
+ statuses: [
+ { context: "ci/build", state: "success" },
+ { context: "license/cla", state: "success" },
+ ],
+ });
+ expect(await readCommitClaStatus({ token: "t", repo: "o/r", sha: "abc", request })).toBe(
+ "success",
+ );
+ });
+
+ test("returns null when the license/cla context is absent", async () => {
+ const { request } = fakeRequest({ statuses: [{ context: "ci/build", state: "failure" }] });
+ expect(await readCommitClaStatus({ token: "t", repo: "o/r", sha: "abc", request })).toBeNull();
+ });
+
+ test("returns null for an empty status set", async () => {
+ const { request } = fakeRequest({ statuses: [] });
+ expect(await readCommitClaStatus({ token: "t", repo: "o/r", sha: "abc", request })).toBeNull();
+ });
+
+ test("requests the combined status with per_page=100 so license/cla can't fall off page 1", async () => {
+ const { request, calls } = fakeRequest({ statuses: [] });
+ await readCommitClaStatus({ token: "t", repo: "owner/repo", sha: "deadbeef", request });
+ expect(calls).toHaveLength(1);
+ expect(calls[0].path).toBe("/repos/owner/repo/commits/deadbeef/status?per_page=100");
+ });
+});
+
+describe("postCommitStatus", () => {
+ test("POSTs the given state/context/description to the commit's statuses endpoint", async () => {
+ const { request, calls } = fakeRequest(undefined);
+ await postCommitStatus({
+ token: "t",
+ repo: "owner/repo",
+ sha: "abc123",
+ state: "failure",
+ context: "cla/verified",
+ description: "held",
+ request,
+ });
+ expect(calls).toHaveLength(1);
+ expect(calls[0]).toMatchObject({
+ method: "POST",
+ path: "/repos/owner/repo/statuses/abc123",
+ body: { state: "failure", context: "cla/verified", description: "held" },
+ });
+ });
+});
+
+describe("checkOrgMembership", () => {
+ test("returns true on a 204 (member)", async () => {
+ const { request, calls } = fakeRequest(null);
+ expect(
+ await checkOrgMembership({ token: "t", org: "inkeep", login: "octocat", request }),
+ ).toBe(true);
+ expect(calls[0].path).toBe("/orgs/inkeep/members/octocat");
+ });
+
+ test("returns false on a 404 (non-member)", async () => {
+ const request = async () => {
+ const error = new Error("not found (404)");
+ error.status = 404;
+ throw error;
+ };
+ expect(
+ await checkOrgMembership({ token: "t", org: "inkeep", login: "outsider", request }),
+ ).toBe(false);
+ });
+
+ test("propagates non-404 errors so the gate fails closed", async () => {
+ const request = async () => {
+ const error = new Error("forbidden (403)");
+ error.status = 403;
+ throw error;
+ };
+ await expect(
+ checkOrgMembership({ token: "t", org: "inkeep", login: "x", request }),
+ ).rejects.toThrow(/403/);
+ });
+});
+
+describe("createClaGateGh", () => {
+ const deps = {
+ publicToken: "public-token",
+ publicRepo: "inkeep/open-knowledge-legacy",
+ internalToken: "internal-token",
+ internalRepo: "inkeep/agents-private",
+ };
+
+ test("readClaStatus reads license/cla from the public PR head, on the public token", async () => {
+ const { request, calls } = fakeRequest({
+ statuses: [{ context: "license/cla", state: "pending" }],
+ });
+ const gh = createClaGateGh({ ...deps, request });
+ const state = await gh.readClaStatus({ head: { sha: "public-head" } });
+ expect(state).toBe("pending");
+ expect(calls[0].token).toBe("public-token");
+ expect(calls[0].path).toBe(
+ "/repos/inkeep/open-knowledge-legacy/commits/public-head/status?per_page=100",
+ );
+ });
+
+ test("setVerifiedStatus posts the cla/verified context to the internal PR head", async () => {
+ const { request, calls } = fakeRequest(undefined);
+ const gh = createClaGateGh({ ...deps, request });
+ await gh.setVerifiedStatus({ head: { sha: "internal-head" } }, "failure", "needs signature");
+ expect(calls).toHaveLength(1);
+ expect(calls[0].token).toBe("internal-token");
+ expect(calls[0].path).toBe("/repos/inkeep/agents-private/statuses/internal-head");
+ expect(calls[0].body).toEqual({
+ state: "failure",
+ context: "cla/verified",
+ description: "needs signature",
+ });
+ });
+
+ test("isOrgMember checks the internal repo's org on the internal token", async () => {
+ const { request, calls } = fakeRequest(null);
+ const gh = createClaGateGh({ ...deps, request });
+ expect(await gh.isOrgMember("octocat")).toBe(true);
+ expect(calls[0].token).toBe("internal-token");
+ expect(calls[0].path).toBe("/orgs/inkeep/members/octocat");
+ });
+});
diff --git a/.github/scripts/cla-gate.mjs b/.github/scripts/cla-gate.mjs
new file mode 100644
index 000000000..1120801be
--- /dev/null
+++ b/.github/scripts/cla-gate.mjs
@@ -0,0 +1,130 @@
+// Contributor-CLA gate for the public-PR bridge.
+//
+// cla-assistant posts a `license/cla` commit status on the PUBLIC pull request.
+// The bridge re-commits that PR into agents-private under a fresh SHA, so the
+// public status cannot serve as a required check on the internal PR. This module
+// turns the public signal into a hold/release decision the bridge enforces by
+// holding the internal PR as a draft plus a `cla/verified` status until signed.
+//
+// Exemption is derived, not listed: Inkeep employees are released by live
+// `inkeep` org membership (resolved in `applyClaGate` through the injected
+// adapter), so there is no employee roster to keep in sync with the team. Only
+// the bots that open or sync PRs — which can't sign and aren't org members —
+// stay explicit here.
+//
+// Fail-closed: only a confirmed signature (`license/cla` === "success"), org
+// membership, or a listed bot releases the hold. A missing, pending, failing, or
+// errored status — or a membership/status read that threw — holds the PR.
+
+// Bot actors that open or sync PRs and cannot sign a CLA. Humans are NOT listed
+// here — their exemption comes from live org membership. Keep this in sync with
+// the bots whitelisted on the cla-assistant dashboard.
+export const BOT_ALLOWLIST = [
+ "inkeep-oss-sync[bot]",
+ "inkeep-internal-ci[bot]",
+ "copilot-swe-agent[bot]",
+];
+
+// GitHub logins are case-insensitive.
+export function isBot(login, bots = BOT_ALLOWLIST) {
+ if (!login) return false;
+ const lower = login.toLowerCase();
+ return bots.some((entry) => entry.toLowerCase() === lower);
+}
+
+/**
+ * Decide whether the bridged internal PR must be held for an unsigned CLA, given
+ * an already-resolved exemption (the author is a listed bot or an org member).
+ *
+ * @param {object} input
+ * @param {string|null|undefined} input.claStatus `license/cla` combined-status state
+ * ("success" | "pending" | "failure" | "error"), or null/undefined when absent.
+ * @param {boolean} [input.exempt] True when the author is exempt from signing.
+ * @returns {{ gated: boolean, reason: "exempt" | "cla-signed" | "cla-unsigned" | "cla-errored" | "cla-pending" }}
+ */
+export function evaluateClaGate({ claStatus, exempt = false }) {
+ if (exempt) {
+ return { gated: false, reason: "exempt" };
+ }
+ if (claStatus === "success") {
+ return { gated: false, reason: "cla-signed" };
+ }
+ if (claStatus === "failure") {
+ return { gated: true, reason: "cla-unsigned" };
+ }
+ // `error` is the check itself erroring (cla-assistant infra), distinct from a
+ // contributor not signing — cla-assistant reports unsigned as `pending`. Both
+ // hold the PR, but the surfaced message must not tell a signed contributor to
+ // "sign the CLA" during an outage.
+ if (claStatus === "error") {
+ return { gated: true, reason: "cla-errored" };
+ }
+ return { gated: true, reason: "cla-pending" };
+}
+
+// Human-readable description attached to the `cla/verified` commit status.
+function describeReason(reason) {
+ switch (reason) {
+ case "cla-signed":
+ return "CLA signed.";
+ case "exempt":
+ return "Author is an Inkeep org member or an allowlisted bot; no CLA required.";
+ case "cla-unsigned":
+ return "CLA not signed. Sign the CLA on the public pull request.";
+ case "cla-errored":
+ return "CLA check errored on the public pull request; holding until it can be confirmed.";
+ case "cla-read-error":
+ return "Could not verify CLA status; holding the PR until it can be confirmed.";
+ default:
+ return "Awaiting CLA signature on the public pull request.";
+ }
+}
+
+/**
+ * Enforce the CLA gate on a bridged internal PR: resolve the author's exemption
+ * (a listed bot, or a live `inkeep` org member), and for everyone else read the
+ * public PR's `license/cla` status — then hold the internal PR (draft plus a
+ * failing `cla/verified` status) until the contributor has signed. Runs on every
+ * bridge sync, so a later unsigned head re-blocks a previously-released PR.
+ *
+ * Fail-closed: if the membership or status read throws, the PR is held. The
+ * draft/status writes are intentionally outside the catch — if those fail, the
+ * bridge should surface the error rather than silently leave the PR in an
+ * unknown state.
+ *
+ * @param {object} input
+ * @param {object} input.gh Injected GitHub adapter (the bridge supplies the real
+ * one; tests supply a fake):
+ * - isOrgMember(login) => Promise<boolean> true when the login is an Inkeep org member
+ * - readClaStatus(publicPr) => Promise<string|null> the `license/cla` state
+ * - setDraft(internalPr, shouldBeDraft) => Promise<void>
+ * - setVerifiedStatus(internalPr, state, description) => Promise<void> posts `cla/verified`
+ * @param {object} input.publicPr Public PR: { user: { login }, draft, head: { sha } }.
+ * @param {object} input.internalPr Internal PR: { head: { sha } }.
+ * @returns {Promise<{ gated: boolean, reason: string }>} reason is one of
+ * evaluateClaGate's reasons, or "cla-read-error" when a read threw.
+ */
+export async function applyClaGate({ gh, publicPr, internalPr }) {
+ const author = publicPr?.user?.login;
+ let gate;
+ try {
+ let exempt = isBot(author);
+ if (!exempt && author) {
+ exempt = await gh.isOrgMember(author);
+ }
+ // An exempt author never needs the public CLA status, so skip the read.
+ const claStatus = exempt ? null : await gh.readClaStatus(publicPr);
+ gate = evaluateClaGate({ claStatus, exempt });
+ } catch {
+ gate = { gated: true, reason: "cla-read-error" };
+ }
+
+ const shouldBeDraft = Boolean(publicPr?.draft) || gate.gated;
+ await gh.setDraft(internalPr, shouldBeDraft);
+ await gh.setVerifiedStatus(
+ internalPr,
+ gate.gated ? "failure" : "success",
+ describeReason(gate.reason),
+ );
+ return gate;
+}
diff --git a/.github/scripts/cla-gate.test.mjs b/.github/scripts/cla-gate.test.mjs
new file mode 100644
index 000000000..8fd961338
--- /dev/null
+++ b/.github/scripts/cla-gate.test.mjs
@@ -0,0 +1,179 @@
+import { describe, expect, test } from "bun:test";
+import { applyClaGate, BOT_ALLOWLIST, evaluateClaGate, isBot } from "./cla-gate.mjs";
+
+describe("evaluateClaGate", () => {
+ test("an exempt author is released regardless of status", () => {
+ for (const claStatus of ["failure", "pending", "error", null, undefined]) {
+ expect(evaluateClaGate({ claStatus, exempt: true })).toEqual({
+ gated: false,
+ reason: "exempt",
+ });
+ }
+ });
+
+ test("a signed non-exempt author is released", () => {
+ expect(evaluateClaGate({ claStatus: "success" })).toEqual({
+ gated: false,
+ reason: "cla-signed",
+ });
+ });
+
+ test("an unsigned (failure) non-exempt author is gated", () => {
+ expect(evaluateClaGate({ claStatus: "failure" })).toEqual({
+ gated: true,
+ reason: "cla-unsigned",
+ });
+ });
+
+ test("absent or pending status fails closed", () => {
+ for (const claStatus of [null, undefined, "pending"]) {
+ expect(evaluateClaGate({ claStatus })).toEqual({ gated: true, reason: "cla-pending" });
+ }
+ });
+
+ test("errored status fails closed with a distinct infra-error reason", () => {
+ expect(evaluateClaGate({ claStatus: "error" })).toEqual({ gated: true, reason: "cla-errored" });
+ });
+
+ test("failure (unsigned) and error (infra) are distinct reasons", () => {
+ expect(evaluateClaGate({ claStatus: "failure" }).reason).toBe("cla-unsigned");
+ expect(evaluateClaGate({ claStatus: "error" }).reason).toBe("cla-errored");
+ });
+});
+
+describe("isBot", () => {
+ test("matches listed bots case-insensitively", () => {
+ expect(isBot("inkeep-oss-sync[bot]")).toBe(true);
+ expect(isBot("Copilot-SWE-Agent[bot]")).toBe(true);
+ });
+
+ test("non-bots and empty logins are not bots", () => {
+ expect(isBot("outsider")).toBe(false);
+ expect(isBot(null)).toBe(false);
+ expect(isBot(undefined)).toBe(false);
+ });
+
+ test("the published BOT_ALLOWLIST holds only bot actors, no humans", () => {
+ expect(BOT_ALLOWLIST.length).toBeGreaterThan(0);
+ expect(BOT_ALLOWLIST.every((login) => login.endsWith("[bot]"))).toBe(true);
+ });
+});
+
+describe("applyClaGate", () => {
+ const fakeGh = (
+ claStatus,
+ { isMember = false, throwOnRead = false, throwOnMembership = false } = {},
+ ) => {
+ const recorded = {
+ draft: undefined,
+ status: undefined,
+ description: undefined,
+ reads: 0,
+ memberChecks: 0,
+ };
+ return {
+ recorded,
+ isOrgMember: async () => {
+ recorded.memberChecks += 1;
+ if (throwOnMembership) throw new Error("membership api unavailable");
+ return isMember;
+ },
+ readClaStatus: async () => {
+ recorded.reads += 1;
+ if (throwOnRead) throw new Error("status api unavailable");
+ return claStatus;
+ },
+ setDraft: async (_pr, shouldBeDraft) => {
+ recorded.draft = shouldBeDraft;
+ },
+ setVerifiedStatus: async (_pr, state, description) => {
+ recorded.status = state;
+ recorded.description = description;
+ },
+ };
+ };
+ const publicPr = (login, draft = false) => ({ user: { login }, draft, head: { sha: "public-sha" } });
+ const internalPr = { head: { sha: "internal-sha" } };
+
+ test("unsigned non-member external PR is held draft with a failing cla/verified status", async () => {
+ const gh = fakeGh("failure");
+ const gate = await applyClaGate({ gh, publicPr: publicPr("outsider"), internalPr });
+ expect(gh.recorded.draft).toBe(true);
+ expect(gh.recorded.status).toBe("failure");
+ expect(gate).toMatchObject({ gated: true, reason: "cla-unsigned" });
+ });
+
+ test("signed non-member external PR is set ready with a success status", async () => {
+ const gh = fakeGh("success");
+ const gate = await applyClaGate({ gh, publicPr: publicPr("outsider"), internalPr });
+ expect(gh.recorded.draft).toBe(false);
+ expect(gh.recorded.status).toBe("success");
+ expect(gate.gated).toBe(false);
+ });
+
+ test("an org member is released without reading the CLA status", async () => {
+ const gh = fakeGh(null, { isMember: true });
+ const gate = await applyClaGate({ gh, publicPr: publicPr("employee"), internalPr });
+ expect(gate).toMatchObject({ gated: false, reason: "exempt" });
+ expect(gh.recorded.reads).toBe(0);
+ expect(gh.recorded.draft).toBe(false);
+ expect(gh.recorded.status).toBe("success");
+ });
+
+ test("a listed bot is released without any membership or status read", async () => {
+ const gh = fakeGh(null);
+ const gate = await applyClaGate({ gh, publicPr: publicPr("inkeep-oss-sync[bot]"), internalPr });
+ expect(gate).toMatchObject({ gated: false, reason: "exempt" });
+ expect(gh.recorded.memberChecks).toBe(0);
+ expect(gh.recorded.reads).toBe(0);
+ });
+
+ test("a membership read failure fails closed", async () => {
+ const gh = fakeGh("success", { throwOnMembership: true });
+ const gate = await applyClaGate({ gh, publicPr: publicPr("outsider"), internalPr });
+ expect(gate.reason).toBe("cla-read-error");
+ expect(gh.recorded.draft).toBe(true);
+ expect(gh.recorded.status).toBe("failure");
+ });
+
+ test("a status read failure fails closed", async () => {
+ const gh = fakeGh(null, { throwOnRead: true });
+ const gate = await applyClaGate({ gh, publicPr: publicPr("outsider"), internalPr });
+ expect(gate.reason).toBe("cla-read-error");
+ expect(gh.recorded.draft).toBe(true);
+ expect(gh.recorded.status).toBe("failure");
+ });
+
+ test("an errored CLA check is held but not told to 'sign the CLA'", async () => {
+ const gh = fakeGh("error");
+ const gate = await applyClaGate({ gh, publicPr: publicPr("outsider"), internalPr });
+ expect(gate.reason).toBe("cla-errored");
+ expect(gh.recorded.draft).toBe(true);
+ expect(gh.recorded.description).not.toMatch(/sign the cla/i);
+ });
+
+ test("re-sync after a new unsigned head re-blocks a released PR", async () => {
+ const signed = fakeGh("success");
+ await applyClaGate({ gh: signed, publicPr: publicPr("outsider"), internalPr });
+ expect(signed.recorded.draft).toBe(false);
+
+ const reUnsigned = fakeGh("failure");
+ await applyClaGate({ gh: reUnsigned, publicPr: publicPr("outsider"), internalPr });
+ expect(reUnsigned.recorded.draft).toBe(true);
+ expect(reUnsigned.recorded.status).toBe("failure");
+ });
+
+ test("a signed PR that is itself a draft upstream stays draft, with success status", async () => {
+ const gh = fakeGh("success");
+ await applyClaGate({ gh, publicPr: publicPr("outsider", true), internalPr });
+ expect(gh.recorded.draft).toBe(true);
+ expect(gh.recorded.status).toBe("success");
+ });
+
+ test("a missing author is gated (no bot or member match, fails closed on status)", async () => {
+ const gh = fakeGh(null);
+ const gate = await applyClaGate({ gh, publicPr: { draft: false, head: { sha: "s" } }, internalPr });
+ expect(gate.gated).toBe(true);
+ expect(gh.recorded.memberChecks).toBe(0);
+ });
+});
diff --git a/CLA.md b/CLA.md
new file mode 100644
index 000000000..e95acadb7
--- /dev/null
+++ b/CLA.md
@@ -0,0 +1,31 @@
+> Based on the Apache Individual Contributor License Agreement (ICLA) V2.2, with Inkeep, Inc. as the grantee. It is a copyright and patent **license**, not an assignment, so you keep full ownership of your contributions. The license-grant and representation clauses (sections 1 to 8) are the verbatim Apache text; the Foundation's nonprofit-specific covenant and the paper contact-form fields are omitted.
+
+# Inkeep Individual Contributor License Agreement
+
+Thank you for your interest in Open Knowledge and other open source projects of Inkeep, Inc. ("Inkeep"). In order to clarify the intellectual property license granted with Contributions from any person or entity, Inkeep must have a Contributor License Agreement ("Agreement") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Inkeep and its users; it does not change your rights to use your own Contributions for any other purpose.
+
+You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Inkeep. Except for the license granted herein to Inkeep and recipients of software distributed by Inkeep, You reserve all right, title, and interest in and to Your Contributions.
+
+**1. Definitions.**
+
+"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with Inkeep. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to Inkeep for inclusion in, or documentation of, any of the products owned or managed by Inkeep (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to Inkeep or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Inkeep for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
+
+**2. Grant of Copyright License.** Subject to the terms and conditions of this Agreement, You hereby grant to Inkeep and to recipients of software distributed by Inkeep a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
+
+**3. Grant of Patent License.** Subject to the terms and conditions of this Agreement, You hereby grant to Inkeep and to recipients of software distributed by Inkeep a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that Your Contribution, or the Work to which You have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
+
+**4.** You represent that You are legally entitled to grant the above license. If Your employer(s) has rights to intellectual property that You create that includes Your Contributions, You represent that You have received permission to make Contributions on behalf of that employer, that Your employer has waived such rights for Your Contributions to Inkeep, or that Your employer has executed a separate Corporate Contributor License Agreement with Inkeep.
+
+**5.** You represent that each of Your Contributions is Your original creation (see Section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which You are personally aware and which are associated with any part of Your Contributions.
+
+**6.** You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
+
+**7.** Should You wish to submit work that is not Your original creation, You may submit it to Inkeep separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which You are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
+
+**8.** You agree to notify Inkeep of any facts or circumstances of which You become aware that would make these representations inaccurate in any respect.
+
+---
+
+**How to sign.** Open a pull request on the public repository. The CLA-assistant bot will comment with a link to sign this Agreement — a one-time, roughly 30-second authenticated click recorded against your GitHub identity that covers all of your future contributions. Inkeep employees and project bots are allowlisted and are not prompted.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a0401bb2f..dfd170db0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -88,3 +88,7 @@ If a maintainer needs to push fixes to your PR during review, they may either as
## Public Export Boundary
Only source code, public docs, and build or development scripts are exported here. Internal planning notes, reports, specs, and agent workspace files are intentionally not part of the public mirror.
+
+## License
+
+Open Knowledge is licensed under the [GNU General Public License v3.0 or later](./LICENSE) (`GPL-3.0-or-later`). By submitting a contribution, you agree that it is licensed under the same terms.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000..f288702d2
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/README.md b/README.md
index 1377227f4..fa8fc1cfb 100644
--- a/README.md
+++ b/README.md
@@ -59,3 +59,7 @@ bun run typecheck
bun run test
bun run build
```
+
+## License
+
+Open Knowledge is licensed under the [GNU General Public License v3.0 or later](./LICENSE) (`GPL-3.0-or-later`).
diff --git a/docs/package.json b/docs/package.json
index 3af3b243d..61a6b0f25 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -1,6 +1,7 @@
{
"name": "@inkeep/open-knowledge-docs",
"version": "0.0.1",
+ "license": "GPL-3.0-or-later",
"private": true,
"type": "module",
"packageManager": "[email protected]",
diff --git a/knip.config.ts b/knip.config.ts
index 4067db00f..4e618aae7 100644
--- a/knip.config.ts
+++ b/knip.config.ts
@@ -37,8 +37,12 @@ export default {
'biome-plugins/__fixtures__/**': ['files'],
'scripts/compute-next-beta.mjs': ['files'],
'scripts/compute-next-beta.test.mjs': ['files'],
+ 'scripts/check-license-fields.test.mjs': ['files'],
'scripts/bun-install-ci.test.mjs': ['files'],
'scripts/promote-stable-token.test.mjs': ['files'],
+ '.github/scripts/cla-gate.test.mjs': ['files'],
+ '.github/scripts/cla-gate.mjs': ['exports'],
+ '.github/scripts/bridge-public-pr-to-monorepo.test.mjs': ['files'],
'docs/src/lib/share-splash.ts': ['exports', 'types'],
'packages/app/src/components/PublishToGitHubDialog.tsx': ['types'],
'packages/app/src/components/ShareButton.tsx': ['types'],
diff --git a/package.json b/package.json
index 06a3f1969..e6b288412 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,6 @@
{
"name": "open-knowledge",
+ "license": "GPL-3.0-or-later",
"private": true,
"type": "module",
"packageManager": "[email protected]",
@@ -29,7 +30,7 @@
"lint:oxlint": "oxlint --max-warnings 0 .",
"format": "bun run lint:biome --write --unsafe",
"check": "bun run lint && turbo run typecheck test",
- "check:full:parallel": "bash scripts/check-husky-prepare-guard.sh && bash scripts/check-knip-clean.sh && bash scripts/check-notices-clean.sh && bash scripts/check-schema-snapshot-clean.sh && bash scripts/check-instructions-drift.sh && bash scripts/check-i18n-drift.sh && bash scripts/check-no-major-changeset.sh && bun run lint && bun test scripts/ && turbo run typecheck test test:dom test:integration test:conversion test:fidelity test:perf:regression:unit test:health:unit test:health test:e2e test:visual test:perf test:a11y --concurrency=100% --output-logs=errors-only",
+ "check:full:parallel": "bash scripts/check-husky-prepare-guard.sh && bash scripts/check-knip-clean.sh && bash scripts/check-notices-clean.sh && bash scripts/check-schema-snapshot-clean.sh && bash scripts/check-instructions-drift.sh && bash scripts/check-i18n-drift.sh && bash scripts/check-no-major-changeset.sh && bun run lint && bun test scripts/ && bun test --cwd .github/scripts && turbo run typecheck test test:dom test:integration test:conversion test:fidelity test:perf:regression:unit test:health:unit test:health test:e2e test:visual test:perf test:a11y --concurrency=100% --output-logs=errors-only",
"tier1": "bun run check",
"tier2": "bun run tier1 && turbo run test:perf:regression:unit test:health:unit test:health test:e2e",
"tier3": "STRESS_FIDELITY=1 bun run tier2",
diff --git a/packages/app/package.json b/packages/app/package.json
index 243223ffa..fec02e2ba 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -1,6 +1,7 @@
{
"name": "@inkeep/open-knowledge-app",
"version": "0.9.1",
+ "license": "GPL-3.0-or-later",
"private": true,
"type": "module",
"scripts": {
diff --git a/packages/app/scripts/measure-fuzz.sh b/packages/app/scripts/measure-fuzz.sh
index e9f929316..926d873b4 100755
--- a/packages/app/scripts/measure-fuzz.sh
+++ b/packages/app/scripts/measure-fuzz.sh
@@ -49,7 +49,7 @@
# "seedCount": 500,
# "seedsFailed": 23,
# "rate": 0.046, // seedsFailed / seedCount
-# "invokedBy": "nick", // $USER or CI identifier
+# "invokedBy": "ci-user", // $USER or CI identifier
# "context": "pre-PR-218 baseline",
# "failingSeeds":[1776559905522],
# "durationMs": 8912000,
diff --git a/packages/app/src/editor/awareness-user.test.ts b/packages/app/src/editor/awareness-user.test.ts
index e5fc572ec..8a2c09fe9 100644
--- a/packages/app/src/editor/awareness-user.test.ts
+++ b/packages/app/src/editor/awareness-user.test.ts
@@ -16,7 +16,7 @@ const identity: Identity = {
const gitConfigPrincipal: Principal = {
id: 'principal-git-1',
- display_name: 'miles-kt-inkeep',
+ display_name: 'ada-kt-lovelace',
display_email: '[email protected]',
source: 'git-config',
created_at: '2026-04-27T00:00:00.000Z',
@@ -54,7 +54,7 @@ describe('buildAwarenessUser — state (b): principal.source === "git-config"',
test('publishes polished display_name, deterministic color, principalId', () => {
const user = buildAwarenessUser({ principal: gitConfigPrincipal, identity });
expect(user.type).toBe('human');
- expect(user.name).toBe('Miles Kt Inkeep');
+ expect(user.name).toBe('Ada Kt Lovelace');
expect(user.color).toBe(colorFromSeed(gitConfigPrincipal.id, HUMAN_COLORS));
expect(user.coeditor).toBe('cursor');
expect(user.tabId).toBe('tab-uuid-abc');
@@ -63,10 +63,10 @@ describe('buildAwarenessUser — state (b): principal.source === "git-config"',
test('passes already-spaced names through formatPresenceLabel unchanged', () => {
const user = buildAwarenessUser({
- principal: { ...gitConfigPrincipal, display_name: 'Miles Kaming-Thanassi' },
+ principal: { ...gitConfigPrincipal, display_name: 'Ada Lovelace-King' },
identity,
});
- expect(user.name).toBe('Miles Kaming-Thanassi');
+ expect(user.name).toBe('Ada Lovelace-King');
});
test('color is deterministic — same principal id always maps to the same palette entry', () => {
diff --git a/packages/app/src/editor/awareness-user.ts b/packages/app/src/editor/awareness-user.ts
index 6e7baeae4..7b5555877 100644
--- a/packages/app/src/editor/awareness-user.ts
+++ b/packages/app/src/editor/awareness-user.ts
@@ -35,7 +35,7 @@ interface BuildAwarenessUserInput {
* branch; `coeditor` is preserved across every branch.
*
* `formatPresenceLabel` polishes Unix-style git-config names like
- * `miles-kt-inkeep` → `Miles Kt Inkeep` so the cursor label, tooltip, and
+ * `ada-kt-lovelace` → `Ada Kt Lovelace` so the cursor label, tooltip, and
* any future name-rendering surface stay consistent with the avatar's
* `computeInitials` polish — single transform at the publish boundary
* instead of per-consumer divergence.
diff --git a/packages/app/src/editor/clipboard/clipboard-sanitize.test.ts b/packages/app/src/editor/clipboard/clipboard-sanitize.test.ts
index c9854fdc7..fff801fee 100644
--- a/packages/app/src/editor/clipboard/clipboard-sanitize.test.ts
+++ b/packages/app/src/editor/clipboard/clipboard-sanitize.test.ts
@@ -37,7 +37,7 @@ describe('isSafeWalkerUrl — allowlist URL classifier', () => {
test('passes the standard navigation schemes', () => {
expect(isSafeWalkerUrl('http://example.com')).toBe(true);
expect(isSafeWalkerUrl('https://example.com')).toBe(true);
- expect(isSafeWalkerUrl('mailto:[email protected]')).toBe(true);
+ expect(isSafeWalkerUrl('mailto:[email protected]')).toBe(true);
expect(isSafeWalkerUrl('tel:+15555555555')).toBe(true);
expect(isSafeWalkerUrl('ftp://example.com')).toBe(true);
expect(isSafeWalkerUrl('sms:+15555555555')).toBe(true);
diff --git a/packages/app/tests/integration/presence-multi-tab.test.ts b/packages/app/tests/integration/presence-multi-tab.test.ts
index f8aa28b79..de706909c 100644
--- a/packages/app/tests/integration/presence-multi-tab.test.ts
+++ b/packages/app/tests/integration/presence-multi-tab.test.ts
@@ -57,7 +57,7 @@ describe('presence dedupe — same principalId', () => {
clientA.provider.awareness?.setLocalStateField('user', {
type: 'human' as const,
- name: 'Miles Kaming-Thanassi',
+ name: 'Ada Lovelace-King',
color: '#f0ece3',
coeditor: 'standalone',
tabId: 'tab-a',
@@ -65,7 +65,7 @@ describe('presence dedupe — same principalId', () => {
});
clientB.provider.awareness?.setLocalStateField('user', {
type: 'human' as const,
- name: 'Miles Kaming-Thanassi',
+ name: 'Ada Lovelace-King',
color: '#f0ece3',
coeditor: 'standalone',
tabId: 'tab-b',
@@ -211,7 +211,7 @@ describe('presence dedupe — different principalIds', () => {
});
clientB.provider.awareness?.setLocalStateField('user', {
type: 'human' as const,
- name: 'Nick D',
+ name: 'Ada D',
color: '#dce8fa',
coeditor: 'standalone',
tabId: 'tab-b',
@@ -265,7 +265,7 @@ describe('awareness payload shape under each principal-resolution state', () =>
try {
clientA.provider.awareness?.setLocalStateField('user', {
type: 'human' as const,
- name: 'Miles Kaming-Thanassi',
+ name: 'Ada Lovelace-King',
color: '#f0ece3',
coeditor: 'cursor',
tabId: 'tab-state-b',
diff --git a/packages/app/tests/stress/paste-fidelity.e2e.ts b/packages/app/tests/stress/paste-fidelity.e2e.ts
index dc85a2fcb..a6415f2dc 100644
--- a/packages/app/tests/stress/paste-fidelity.e2e.ts
+++ b/packages/app/tests/stress/paste-fidelity.e2e.ts
@@ -475,7 +475,7 @@ test.describe('Vendor HTML fixtures → structured content through Branch D', ()
test('QA-039 Slack fixture strips c-message_kit__* / c-timestamp classes', async ({ page }) => {
await pasteWithMimes(page, {
- 'text/plain': 'Hey team — can we ship the clipboard feature this week? @nick thoughts?',
+ 'text/plain': 'Hey team — can we ship the clipboard feature this week? @ada thoughts?',
'text/html': fixture('slack-sample.html'),
});
await expect(async () => {
@@ -506,13 +506,13 @@ test.describe('Vendor HTML fixtures → structured content through Branch D', ()
page,
}) => {
await pasteWithMimes(page, {
- 'text/plain': "This references abc123 and CC's @nickgomez.\nSee also issue #42.",
+ 'text/plain': "This references abc123 and CC's @octocat.\nSee also issue #42.",
'text/html': fixture('github-comment-sample.html'),
});
await expect(async () => {
const content = await getYText(page);
expect(content).toContain('abc123');
- expect(content).toContain('nickgomez');
+ expect(content).toContain('octocat');
expect(content).not.toContain('data-hovercard');
expect(content).not.toContain('class="commit-link"');
}).toPass({ timeout: 5_000 });
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 82c38d740..55e7b0e54 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,6 +1,7 @@
{
"name": "@inkeep/open-knowledge",
"version": "0.9.1",
+ "license": "GPL-3.0-or-later",
"private": false,
"type": "module",
"repository": {
@@ -34,8 +35,9 @@
"build:app": "cp -r ../app/dist dist/public",
"build:skill-asset": "bun ../server/scripts/build-skill-bundles.ts && mkdir -p dist/assets/skills && cp -R ../server/dist/assets/skills/discovery ../server/dist/assets/skills/project dist/assets/skills/ && if [ -d ../server/dist/assets/skills/packs ]; then cp -R ../server/dist/assets/skills/packs dist/assets/skills/; fi",
"build:notices": "mkdir -p dist && cp ../../THIRD_PARTY_NOTICES.md dist/THIRD_PARTY_NOTICES.md",
+ "build:license": "mkdir -p dist && cp ../../LICENSE dist/LICENSE",
"build:schema": "bun --conditions=development scripts/build-config-schema.mjs",
- "build:assets": "bun run build:app && bun run build:skill-asset && bun run build:notices && bun run build:schema",
+ "build:assets": "bun run build:app && bun run build:skill-asset && bun run build:notices && bun run build:license && bun run build:schema",
"build": "bun run build:cli && bun run build:assets",
"postinstall": "node scripts/postinstall.mjs",
"test": "bun run build:schema && bun test",
diff --git a/packages/cli/src/cli.test.ts b/packages/cli/src/cli.test.ts
index 69210f8ad..0b9c78582 100644
--- a/packages/cli/src/cli.test.ts
+++ b/packages/cli/src/cli.test.ts
@@ -35,3 +35,29 @@ describe('CLI argv parsing', () => {
expect(stdout.startsWith('[')).toBe(true);
}, 30_000);
});
+
+describe('CLI --version notice', () => {
+ test('--version emits the version plus the GPL copyright / free-software / no-warranty trio', () => {
+ const result = Bun.spawnSync({
+ cmd: [
+ 'bun',
+ '--conditions=development',
+ '-e',
+ `
+ process.argv = [process.execPath, process.cwd() + '/src/cli.ts', '--version'];
+ await import('./src/cli.ts');
+ `,
+ ],
+ cwd: CLI_PACKAGE_ROOT,
+ env: { ...process.env, NO_COLOR: '1' },
+ });
+
+ const stdout = result.stdout.toString();
+
+ expect(result.exitCode).toBe(0);
+ expect(stdout).toMatch(/Copyright \(C\) \d{4} Inkeep, Inc\./);
+ expect(stdout).toContain('GPL-3.0-or-later');
+ expect(stdout).toMatch(/free software/i);
+ expect(stdout).toMatch(/NO WARRANTY/);
+ }, 30_000);
+});
diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts
index 83a97128b..e207e8b39 100644
--- a/packages/cli/src/cli.ts
+++ b/packages/cli/src/cli.ts
@@ -37,6 +37,7 @@ import { syncCommand } from './commands/sync.ts';
import { uiCommand } from './commands/ui.ts';
import { PACKAGE_VERSION } from './constants.ts';
import { loadConfig } from './index.ts';
+import { buildVersionNotice } from './version-notice.ts';
const program = new Command();
@@ -54,7 +55,7 @@ export function getCliLogger(): PinoLoggerInstance | undefined {
program
.name('open-knowledge')
.description('Local-first knowledge base with CRDT collaboration')
- .version(PACKAGE_VERSION)
+ .version(buildVersionNotice(PACKAGE_VERSION))
.option('--cwd <path>', 'Working directory')
.option('--log-level <level>', 'Log level', 'info')
.option('--no-color', 'Disable color output')
diff --git a/packages/cli/src/version-notice.test.ts b/packages/cli/src/version-notice.test.ts
new file mode 100644
index 000000000..b42fce6c0
--- /dev/null
+++ b/packages/cli/src/version-notice.test.ts
@@ -0,0 +1,13 @@
+import { describe, expect, test } from 'bun:test';
+import { buildVersionNotice } from './version-notice.ts';
+
+describe('buildVersionNotice', () => {
+ test('leads with the version, then the copyright / free-software / no-warranty trio', () => {
+ const notice = buildVersionNotice('1.2.3');
+ expect(notice.split('\n')[0]).toBe('1.2.3');
+ expect(notice).toMatch(/Copyright \(C\) \d{4} Inkeep, Inc\./);
+ expect(notice).toContain('GPL-3.0-or-later');
+ expect(notice).toMatch(/free software/i);
+ expect(notice).toMatch(/NO WARRANTY/);
+ });
+});
diff --git a/packages/cli/src/version-notice.ts b/packages/cli/src/version-notice.ts
new file mode 100644
index 000000000..e5580bf1c
--- /dev/null
+++ b/packages/cli/src/version-notice.ts
@@ -0,0 +1,9 @@
+export function buildVersionNotice(version: string): string {
+ return [
+ version,
+ 'Copyright (C) 2026 Inkeep, Inc.',
+ 'License GPL-3.0-or-later: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.',
+ 'This is free software: you are free to change and redistribute it.',
+ 'There is NO WARRANTY, to the extent permitted by law.',
+ ].join('\n');
+}
diff --git a/packages/core/package.json b/packages/core/package.json
index bf7e7b736..885cdabaf 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,7 @@
{
"name": "@inkeep/open-knowledge-core",
"version": "0.9.1",
+ "license": "GPL-3.0-or-later",
"private": true,
"type": "module",
"exports": {
diff --git a/packages/core/src/markdown/rehype-plugins/fixtures/github-comment-sample.html b/packages/core/src/markdown/rehype-plugins/fixtures/github-comment-sample.html
index 6e22ea7c8..908656720 100644
--- a/packages/core/src/markdown/rehype-plugins/fixtures/github-comment-sample.html
+++ b/packages/core/src/markdown/rehype-plugins/fixtures/github-comment-sample.html
@@ -1,2 +1,2 @@
-<p dir="auto">This references <a href="https://github.com/owner/repo/commit/abc123def456" data-hovercard-type="commit" data-hovercard-url="/owner/repo/commit/abc123def456/hovercard" class="commit-link"><tt>abc123</tt></a> and CC's <a href="/nickgomez" class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/nickgomez/hovercard">@nickgomez</a>.</p>
+<p dir="auto">This references <a href="https://github.com/owner/repo/commit/abc123def456" data-hovercard-type="commit" data-hovercard-url="/owner/repo/commit/abc123def456/hovercard" class="commit-link"><tt>abc123</tt></a> and CC's <a href="/octocat" class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/octocat/hovercard">@octocat</a>.</p>
<p dir="auto">See also issue <a href="https://github.com/owner/repo/issues/42" class="issue-link" data-hovercard-type="issue" data-hovercard-url="/owner/repo/issues/42/hovercard">#42</a>.</p>
diff --git a/packages/core/src/markdown/rehype-plugins/fixtures/gsheets-sample.html b/packages/core/src/markdown/rehype-plugins/fixtures/gsheets-sample.html
index f3c9a8c6c..921729370 100644
--- a/packages/core/src/markdown/rehype-plugins/fixtures/gsheets-sample.html
+++ b/packages/core/src/markdown/rehype-plugins/fixtures/gsheets-sample.html
@@ -1 +1 @@
-<meta charset='utf-8'><google-sheets-html-origin><style type="text/css"><!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--></style><table xmlns="http://www.w3.org/1999/xhtml" cellspacing="0" cellpadding="0" dir="ltr" border="1" style="table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none"><colgroup><col width="100"/><col width="100"/><col width="100"/></colgroup><tbody><tr style="height:21px;"><td data-sheets-value='{"1":2,"2":"Name"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-weight:bold;">Name</td><td data-sheets-value='{"1":2,"2":"Role"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-weight:bold;">Role</td><td data-sheets-value='{"1":2,"2":"Team"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-weight:bold;">Team</td></tr><tr style="height:21px;"><td data-sheets-value='{"1":2,"2":"Nick"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;">Nick</td><td data-sheets-value='{"1":2,"2":"CTO"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;">CTO</td><td data-sheets-value='{"1":2,"2":"Inkeep"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;">Inkeep</td></tr></tbody></table></google-sheets-html-origin>
+<meta charset='utf-8'><google-sheets-html-origin><style type="text/css"><!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}--></style><table xmlns="http://www.w3.org/1999/xhtml" cellspacing="0" cellpadding="0" dir="ltr" border="1" style="table-layout:fixed;font-size:10pt;font-family:Arial;width:0px;border-collapse:collapse;border:none"><colgroup><col width="100"/><col width="100"/><col width="100"/></colgroup><tbody><tr style="height:21px;"><td data-sheets-value='{"1":2,"2":"Name"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-weight:bold;">Name</td><td data-sheets-value='{"1":2,"2":"Role"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-weight:bold;">Role</td><td data-sheets-value='{"1":2,"2":"Team"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;font-weight:bold;">Team</td></tr><tr style="height:21px;"><td data-sheets-value='{"1":2,"2":"Ada"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;">Ada</td><td data-sheets-value='{"1":2,"2":"CTO"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;">CTO</td><td data-sheets-value='{"1":2,"2":"Inkeep"}' style="overflow:hidden;padding:2px 3px 2px 3px;vertical-align:bottom;">Inkeep</td></tr></tbody></table></google-sheets-html-origin>
diff --git a/packages/core/src/markdown/rehype-plugins/fixtures/slack-sample.html b/packages/core/src/markdown/rehype-plugins/fixtures/slack-sample.html
index 045a579fd..14537275a 100644
--- a/packages/core/src/markdown/rehype-plugins/fixtures/slack-sample.html
+++ b/packages/core/src/markdown/rehype-plugins/fixtures/slack-sample.html
@@ -1 +1 @@
-<div class="c-message_kit__gutter"><div class="c-message_kit__gutter__right" role="presentation"><div class="c-message_kit__blocks c-message_kit__blocks--rich_text" data-qa="message-text"><div class="c-message__message_blocks c-message__message_blocks--rich_text"><div class="p-block_kit_renderer" data-qa="block-kit-renderer"><div class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"><div class="p-rich_text_block" dir="auto"><div class="p-rich_text_section">Hey team — can we ship the clipboard feature this week? <span class="c-mrkdwn__br"></span><span class="c-member_slug--link">@nick</span> thoughts?</div></div></div></div></div></div><span class="c-timestamp">11:24 AM</span></div></div>
+<div class="c-message_kit__gutter"><div class="c-message_kit__gutter__right" role="presentation"><div class="c-message_kit__blocks c-message_kit__blocks--rich_text" data-qa="message-text"><div class="c-message__message_blocks c-message__message_blocks--rich_text"><div class="p-block_kit_renderer" data-qa="block-kit-renderer"><div class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"><div class="p-rich_text_block" dir="auto"><div class="p-rich_text_section">Hey team — can we ship the clipboard feature this week? <span class="c-mrkdwn__br"></span><span class="c-member_slug--link">@ada</span> thoughts?</div></div></div></div></div></div><span class="c-timestamp">11:24 AM</span></div></div>
diff --git a/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.test.ts b/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.test.ts
index e036f6586..4d2c28bc4 100644
--- a/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.test.ts
+++ b/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.test.ts
@@ -38,7 +38,7 @@ describe('rehypeStripGithubHovercard', () => {
const serialized = JSON.stringify(mdast);
expect(serialized).toContain('github.com/owner/repo/commit/abc123def456');
expect(serialized).toContain('abc123');
- expect(serialized).toContain('@nickgomez');
+ expect(serialized).toContain('@octocat');
expect(serialized).toContain('#42');
});
diff --git a/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.test.ts b/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.test.ts
index 9f547a591..8beadadd4 100644
--- a/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.test.ts
+++ b/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.test.ts
@@ -36,7 +36,7 @@ describe('rehypeStripGsheetsWrapper', () => {
const serialized = JSON.stringify(mdast);
expect(serialized).toContain('Name');
expect(serialized).toContain('Role');
- expect(serialized).toContain('Nick');
+ expect(serialized).toContain('Ada');
expect(serialized).toContain('CTO');
});
diff --git a/packages/core/src/markdown/rehype-plugins/strip-slack-classes.test.ts b/packages/core/src/markdown/rehype-plugins/strip-slack-classes.test.ts
index 637768c4e..e1909e1d0 100644
--- a/packages/core/src/markdown/rehype-plugins/strip-slack-classes.test.ts
+++ b/packages/core/src/markdown/rehype-plugins/strip-slack-classes.test.ts
@@ -16,7 +16,7 @@ describe('rehypeStripSlackClasses', () => {
});
const serialized = JSON.stringify(mdast);
expect(serialized).toContain('ship the clipboard feature');
- expect(serialized).toContain('@nick');
+ expect(serialized).toContain('@ada');
expect(serialized).toContain('thoughts');
});
diff --git a/packages/core/src/schemas/api/_envelope.test.ts b/packages/core/src/schemas/api/_envelope.test.ts
index 3ddec0cab..5e831ca3a 100644
--- a/packages/core/src/schemas/api/_envelope.test.ts
+++ b/packages/core/src/schemas/api/_envelope.test.ts
@@ -11,7 +11,7 @@ import {
const validPrincipal = {
id: 'principal-abc123',
- display_name: 'Miles Kaming-Thanassi',
+ display_name: 'Ada Lovelace-King',
display_email: '[email protected]',
source: 'git-config' as const,
created_at: '2026-04-27T00:00:00.000Z',
@@ -23,7 +23,7 @@ describe('PrincipalSuccessSchema', () => {
expect(result.success).toBe(true);
if (result.success) {
expect(result.data.id).toBe('principal-abc123');
- expect(result.data.display_name).toBe('Miles Kaming-Thanassi');
+ expect(result.data.display_name).toBe('Ada Lovelace-King');
expect(result.data.source).toBe('git-config');
}
});
diff --git a/packages/core/src/utils/identity.test.ts b/packages/core/src/utils/identity.test.ts
index 7f291fb52..c91f5e1f6 100644
--- a/packages/core/src/utils/identity.test.ts
+++ b/packages/core/src/utils/identity.test.ts
@@ -84,12 +84,12 @@ describe('colorFromSeed', () => {
});
describe('computeInitials', () => {
- test('hyphenated Unix username: miles-kt-inkeep → MK', () => {
- expect(computeInitials('miles-kt-inkeep')).toBe('MK');
+ test('hyphenated Unix username: ada-kt-lovelace → AK', () => {
+ expect(computeInitials('ada-kt-lovelace')).toBe('AK');
});
- test('full name with hyphenated surname: Miles Kaming-Thanassi → MK', () => {
- expect(computeInitials('Miles Kaming-Thanassi')).toBe('MK');
+ test('full name with hyphenated surname: Ada Lovelace-King → AL', () => {
+ expect(computeInitials('Ada Lovelace-King')).toBe('AL');
});
test('single word: Miles → MI', () => {
@@ -112,14 +112,14 @@ describe('computeInitials', () => {
});
test('result is always at most 2 characters', () => {
- for (const name of ['Miles Kaming-Thanassi', 'miles-kt-inkeep', 'MilesKT', 'A B C D E']) {
+ for (const name of ['Ada Lovelace-King', 'ada-kt-lovelace', 'MilesKT', 'A B C D E']) {
expect(computeInitials(name).length).toBeLessThanOrEqual(2);
}
});
test('result is always uppercase', () => {
- expect(computeInitials('miles-kt-inkeep')).toBe(
- computeInitials('miles-kt-inkeep').toUpperCase(),
+ expect(computeInitials('ada-kt-lovelace')).toBe(
+ computeInitials('ada-kt-lovelace').toUpperCase(),
);
expect(computeInitials('john bird')).toBe('JB');
});
diff --git a/packages/desktop/electron-builder.yml b/packages/desktop/electron-builder.yml
index 425ffeea1..3770584c8 100644
--- a/packages/desktop/electron-builder.yml
+++ b/packages/desktop/electron-builder.yml
@@ -66,6 +66,12 @@ extraResources:
# placed by electron-builder automatically and cover Electron + Chromium.
- from: "../cli/dist/THIRD_PARTY_NOTICES.md"
to: "THIRD_PARTY_NOTICES.md"
+ # The project's own GPLv3 license text at the Resources root, alongside the
+ # third-party notices, so the About panel and license reviewers can find it.
+ # electron-builder places Electron's own LICENSE separately; that covers
+ # Electron + Chromium only, not Open Knowledge itself.
+ - from: "../../LICENSE"
+ to: "LICENSE"
# The bundled CLI (`cli/dist/cli.mjs`) keeps `@napi-rs/keyring` EXTERNAL
# (tsdown `neverBundle` — it ships a native .node binary). At runtime its ESM
# resolver walks its OWN tree (`cli/dist` → `cli` → `Resources` → …) and
diff --git a/packages/desktop/package.json b/packages/desktop/package.json
index 37156e2fa..5d6191a94 100644
--- a/packages/desktop/package.json
+++ b/packages/desktop/package.json
@@ -2,6 +2,7 @@
"name": "@inkeep/open-knowledge-desktop",
"productName": "Open Knowledge",
"version": "0.9.1",
+ "license": "GPL-3.0-or-later",
"private": true,
"type": "module",
"main": "out/main/index.js",
diff --git a/packages/desktop/src/main/about-panel.test.ts b/packages/desktop/src/main/about-panel.test.ts
new file mode 100644
index 000000000..9b89df83a
--- /dev/null
+++ b/packages/desktop/src/main/about-panel.test.ts
@@ -0,0 +1,12 @@
+import { describe, expect, test } from 'bun:test';
+import { buildAboutPanelOptions } from './about-panel.ts';
+
+describe('buildAboutPanelOptions', () => {
+ test('carries the version, copyright, GPL license, and no-warranty notice', () => {
+ const opts = buildAboutPanelOptions('9.9.9');
+ expect(opts.applicationVersion).toBe('9.9.9');
+ expect(opts.copyright).toMatch(/Copyright \(C\) \d{4} Inkeep, Inc\./);
+ expect(opts.copyright).toContain('GPL-3.0-or-later');
+ expect(opts.copyright).toMatch(/NO WARRANTY/);
+ });
+});
diff --git a/packages/desktop/src/main/about-panel.ts b/packages/desktop/src/main/about-panel.ts
new file mode 100644
index 000000000..b4383b42b
--- /dev/null
+++ b/packages/desktop/src/main/about-panel.ts
@@ -0,0 +1,13 @@
+import type { AboutPanelOptionsOptions } from 'electron';
+
+export function buildAboutPanelOptions(version: string): AboutPanelOptionsOptions {
+ return {
+ applicationName: 'Open Knowledge',
+ applicationVersion: version,
+ copyright: [
+ 'Copyright (C) 2026 Inkeep, Inc.',
+ 'License GPL-3.0-or-later. Free software with ABSOLUTELY NO WARRANTY.',
+ 'Full license: see LICENSE in the app Resources.',
+ ].join('\n'),
+ };
+}
diff --git a/packages/desktop/src/main/index.ts b/packages/desktop/src/main/index.ts
index 29e9819d8..95aef972f 100644
--- a/packages/desktop/src/main/index.ts
+++ b/packages/desktop/src/main/index.ts
@@ -80,6 +80,7 @@ import type {
} from '../shared/ipc-channels.ts';
import { createHandler } from '../shared/ipc-handler.ts';
import { registerPendingDelivery, sendToRenderer } from '../shared/ipc-send.ts';
+import { buildAboutPanelOptions } from './about-panel.ts';
import { appendOkIgnoreSync } from './append-okignore.ts';
import { openAssetSafely, revealAssetSafely } from './asset-allowlist.ts';
import { popAssetMenu } from './asset-menu.ts';
@@ -2190,6 +2191,8 @@ function bootPrimaryInstance(): void {
app
.whenReady()
.then(async () => {
+ app.setAboutPanelOptions(buildAboutPanelOptions(app.getVersion()));
+
const gitOutcome = await ensureGitAvailable({
assertGitAvailable,
showMessageBox: async (opts) =>
diff --git a/packages/desktop/tests/unit/electron-builder-cli-pkgjson.test.ts b/packages/desktop/tests/unit/electron-builder-cli-pkgjson.test.ts
index 7ead33037..e48418b5f 100644
--- a/packages/desktop/tests/unit/electron-builder-cli-pkgjson.test.ts
+++ b/packages/desktop/tests/unit/electron-builder-cli-pkgjson.test.ts
@@ -34,3 +34,26 @@ describe('electron-builder.yml ships cli/package.json next to cli/dist', () => {
expect(existsSync(cliPkgJson)).toBe(true);
});
});
+
+describe('electron-builder.yml ships the project GPLv3 LICENSE', () => {
+ test('extraResources declares a from: ../../LICENSE -> to: LICENSE rule', () => {
+ const yml = readFileSync(builderYml, 'utf8');
+ const config = parse(yml) as {
+ extraResources?: Array<{ from?: unknown; to?: unknown }>;
+ };
+ const rule = (config.extraResources ?? []).find(
+ (r) => r.from === '../../LICENSE' && r.to === 'LICENSE',
+ );
+ expect(
+ rule,
+ "electron-builder.yml extraResources must stage the project's GPLv3 LICENSE into the " +
+ 'packaged .app Resources root so the conveyed desktop app carries its own license text ' +
+ "(electron-builder's auto-placed LICENSE covers Electron/Chromium only).",
+ ).toBeDefined();
+ });
+
+ test('the source LICENSE exists at build time', () => {
+ const okRootLicense = resolve(desktopRoot, '..', '..', 'LICENSE');
+ expect(existsSync(okRootLicense)).toBe(true);
+ });
+});
diff --git a/packages/plugin/package.json b/packages/plugin/package.json
index bb47cd464..502815a04 100644
--- a/packages/plugin/package.json
+++ b/packages/plugin/package.json
@@ -1,5 +1,6 @@
{
"name": "@inkeep/open-knowledge-plugin",
"version": "0.3.1",
+ "license": "GPL-3.0-or-later",
"private": true
}
diff --git a/packages/server/package.json b/packages/server/package.json
index 16469d3e5..d114b533d 100644
--- a/packages/server/package.json
+++ b/packages/server/package.json
@@ -1,6 +1,7 @@
{
"name": "@inkeep/open-knowledge-server",
"version": "0.9.1",
+ "license": "GPL-3.0-or-later",
"private": true,
"type": "module",
"exports": {
diff --git a/packages/server/src/rename-log.test.ts b/packages/server/src/rename-log.test.ts
index 5944a9b7c..c3da2e25b 100644
--- a/packages/server/src/rename-log.test.ts
+++ b/packages/server/src/rename-log.test.ts
@@ -461,9 +461,9 @@ describe('rename-log read primitives (shadow-repo backed)', () => {
let realShadowDir: string;
const writer: WriterIdentity = {
- id: 'human-nick',
- name: 'Nick',
- email: '[email protected]',
+ id: 'human-ada',
+ name: 'Ada',
+ email: '[email protected]',
};
async function checkpointSha(branch = 'main'): Promise<string> {
@@ -1028,9 +1028,9 @@ describe('gcRenameLog (US-008 reachability + rebuild)', () => {
let shadow: import('./shadow-repo.ts').ShadowHandle;
let contentRoot: string;
const writer: WriterIdentity = {
- id: 'human-nick',
- name: 'Nick',
- email: '[email protected]',
+ id: 'human-ada',
+ name: 'Ada',
+ email: '[email protected]',
};
beforeEach(async () => {
diff --git a/packages/server/src/shadow-branch-gc.test.ts b/packages/server/src/shadow-branch-gc.test.ts
index 7fa820c9b..7339e0246 100644
--- a/packages/server/src/shadow-branch-gc.test.ts
+++ b/packages/server/src/shadow-branch-gc.test.ts
@@ -18,9 +18,9 @@ afterEach(async () => {
});
const writer: WriterIdentity = {
- id: 'principal-nick',
- name: 'Nick',
- email: '[email protected]',
+ id: 'principal-ada',
+ name: 'Ada',
+ email: '[email protected]',
};
describe('gcShadowBranches', () => {
diff --git a/packages/server/src/shadow-repo.test.ts b/packages/server/src/shadow-repo.test.ts
index 31f778570..8f964035e 100644
--- a/packages/server/src/shadow-repo.test.ts
+++ b/packages/server/src/shadow-repo.test.ts
@@ -172,9 +172,9 @@ describe('commitWip', () => {
let contentDir: string;
const writer: WriterIdentity = {
- id: 'human-nick',
- name: 'Nick Gomez',
- email: '[email protected]',
+ id: 'human-ada',
+ name: 'Ada Lovelace',
+ email: '[email protected]',
};
beforeEach(async () => {
@@ -249,7 +249,7 @@ describe('commitWip', () => {
const agentSha = await commitWip(shadow, agent, 'content/docs', 'WIP: agent edit');
const sg = shadowGit(shadow);
- const humanRef = (await sg.raw('rev-parse', 'refs/wip/main/human-nick')).trim();
+ const humanRef = (await sg.raw('rev-parse', 'refs/wip/main/human-ada')).trim();
const agentRef = (await sg.raw('rev-parse', 'refs/wip/main/agent-cursor')).trim();
expect(humanRef).toBe(humanSha);
@@ -270,8 +270,8 @@ describe('commitWip', () => {
);
const sg = shadowGit(shadow);
- const mainRef = (await sg.raw('rev-parse', 'refs/wip/main/human-nick')).trim();
- const featureRef = (await sg.raw('rev-parse', 'refs/wip/feature/xyz/human-nick')).trim();
+ const mainRef = (await sg.raw('rev-parse', 'refs/wip/main/human-ada')).trim();
+ const featureRef = (await sg.raw('rev-parse', 'refs/wip/feature/xyz/human-ada')).trim();
expect(mainRef).toBe(mainSha);
expect(featureRef).toBe(featureSha);
@@ -516,9 +516,9 @@ describe('saveVersion', () => {
let contentDir: string;
const human: WriterIdentity = {
- id: 'human-nick',
- name: 'Nick Gomez',
- email: '[email protected]',
+ id: 'human-ada',
+ name: 'Ada Lovelace',
+ email: '[email protected]',
};
const agent: WriterIdentity = {
@@ -563,14 +563,14 @@ describe('saveVersion', () => {
await commitWip(shadow, human, 'content/docs', 'WIP: edit');
const sg = shadowGit(shadow);
- const wipBefore = (await sg.raw('rev-parse', 'refs/wip/main/human-nick')).trim();
+ const wipBefore = (await sg.raw('rev-parse', 'refs/wip/main/human-ada')).trim();
expect(wipBefore).toHaveLength(40);
await saveVersion(shadow, 'content/docs', [human]);
let wipExists = true;
try {
- await sg.raw('rev-parse', 'refs/wip/main/human-nick');
+ await sg.raw('rev-parse', 'refs/wip/main/human-ada');
} catch {
wipExists = false;
}
@@ -712,8 +712,8 @@ describe('saveInMemoryCheckpoint (bridge-correctness SPEC §6 R7a)', () => {
test('does NOT touch refs/wip/* — distinct from saveVersion', async () => {
const writer: WriterIdentity = {
- id: 'human-nick',
- name: 'Nick',
+ id: 'human-ada',
+ name: 'Ada',
};
const contentDir = resolve(projectRoot, 'content/docs');
@@ -721,7 +721,7 @@ describe('saveInMemoryCheckpoint (bridge-correctness SPEC §6 R7a)', () => {
await commitWip(shadow, writer, 'content/docs', 'WIP: setup');
const sg = shadowGit(shadow);
- const wipShaBefore = (await sg.raw('rev-parse', 'refs/wip/main/human-nick')).trim();
+ const wipShaBefore = (await sg.raw('rev-parse', 'refs/wip/main/human-ada')).trim();
await saveInMemoryCheckpoint(shadow, 'content/docs', {
kind: 'bridge-merge-loss',
@@ -731,7 +731,7 @@ describe('saveInMemoryCheckpoint (bridge-correctness SPEC §6 R7a)', () => {
metadata: { lostSubstrings: ['foo'] },
});
- const wipShaAfter = (await sg.raw('rev-parse', 'refs/wip/main/human-nick')).trim();
+ const wipShaAfter = (await sg.raw('rev-parse', 'refs/wip/main/human-ada')).trim();
expect(wipShaAfter).toBe(wipShaBefore); // unchanged
});
diff --git a/packages/server/src/timeline-query.test.ts b/packages/server/src/timeline-query.test.ts
index e353541b9..afbfc1c44 100644
--- a/packages/server/src/timeline-query.test.ts
+++ b/packages/server/src/timeline-query.test.ts
@@ -55,9 +55,9 @@ async function setup() {
}
const human: WriterIdentity = {
- id: 'human-nick',
- name: 'Nick Gomez',
- email: '[email protected]',
+ id: 'human-ada',
+ name: 'Ada Lovelace',
+ email: '[email protected]',
};
const agent: WriterIdentity = {