Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| The artifacts service is services/artifacts, the Worker g1t-artifacts, bound as ARTIFACTS by the API, the site and the agents; its live rooms move to it with a Durable Object transfer from g1t-docs-service, and its database, bucket, indexes and queue keep their names. The git store's binding and settings are GITSTORE, its ops scripts gitstore-*, and workflow run artifacts keep their compatible API under run_artifacts modules. The deploy tool puts a Worker that has never deployed before the Workers in its stage that bind to it, and the deploy guide gives the cutover runbook. | 1 | import assert from "node:assert/strict"; |
| 2 | import { test } from "node:test"; | |
| 3 | ||
| 4 | import { diffLines, diffStats } from "./diff.ts"; | |
| 5 | ||
| 6 | test("a line diff keeps what stayed and marks what changed", () => { | |
| 7 | const lines = diffLines("# Title\n\nold line\nkept\n", "# Title\n\nnew line\nkept\nadded\n"); | |
| 8 | assert.deepEqual(lines, [ | |
| 9 | { op: "same", text: "# Title" }, | |
| 10 | { op: "same", text: "" }, | |
| 11 | { op: "del", text: "old line" }, | |
| 12 | { op: "add", text: "new line" }, | |
| 13 | { op: "same", text: "kept" }, | |
| 14 | { op: "add", text: "added" }, | |
| 15 | ]); | |
| 16 | assert.deepEqual(diffStats(lines), { added: 2, removed: 1 }); | |
| 17 | }); | |
| 18 | ||
| 19 | test("from nothing, everything is added", () => { | |
| 20 | assert.deepEqual(diffLines("", "a\nb"), [ | |
| 21 | { op: "add", text: "a" }, | |
| 22 | { op: "add", text: "b" }, | |
| 23 | ]); | |
| 24 | }); |