docs: Darkwing row 113 round 1 packet (#1607)

Ledger skips T3 reasoning summaries and reads issue pages with a
10-page ceiling. Candidate manifest, patch against cc48b124f, mutants
(both killed) and a passing full gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 11:25:55 -05:00
co-authored by Claude Opus 5.5
parent 2b8abe11ac
commit d6ea568312
59 changed files with 5606 additions and 0 deletions
+123
View File
@@ -0,0 +1,123 @@
# Row 113 (#1607) round 1: the ledger skips T3 reasoning summaries and reads issue pages
Brief: docs/plans/2026-10-14_ledger-reasoning-and-issue-pages.md. Five owned files, no schema change, no live service.
BASE: cc48b124f17caf712eab1a68a25ca52fa3727d55 (the row 112 landing). HEAD is now 5b86abe47, which changes only docs/plans/QUEUE.md and docs/plans/queue.json after BASE, so no manifest path moved.
Candidate: build.patch against BASE. candidate-manifest.sha256 lists the five files. I applied the patch to a fresh `git archive cc48b124f` export and every digest matched.
## What changed
### T3 reasoning summaries
packages/ledger/src/t3.mjs. In the message loop, right after the line that drops messages outside counted threads:
```
if (m.role === 'reasoning' && typeof m.message_id === 'string' && m.message_id.startsWith('reasoning:')) { excluded.reasoningMessages++; continue; }
```
The skip comes before the role, text, `created_at` and header checks, so a summary can't refuse a run or change a count. `t3.excluded` gains `reasoningMessages` beside `importedThreads` and `deletedThreads`. Role `reasoning` with any other id falls through to the role check and still refuses as an unknown role, and so does `system` or any other role.
### Issue pages
packages/ledger/src/ledger.mjs. The old `readIssues` body becomes `readIssuePage(root, range, page, tool)`. It sends the same query with `page=N`, applies the same record checks, and also refuses a page with more than 50 rows. Every refusal from it now names the page with "on page N". The error text rules haven't changed: the reason comes from the exit status or a missing tool (ENOENT), never from stderr or the body.
`readIssues` loops over pages 1 to 10:
- An issue number already seen refuses with exit 2, "duplicate issue number on page N; rerun the report". This also covers a duplicate inside one page, which the old code refused too.
- The first page with fewer than 50 rows ends the read. It returns `{ issues, pages }`, with pull requests filtered out as before.
- A full page 10 refuses with exit 2: "page 10 is full, so the 10-page ceiling was reached and totals may be incomplete. Narrow --since or use --no-issues".
`formatTable` prints one more line after the T3 line. It's `Issues: N pages read from Gitea`, `Issues: 1 page read from Gitea` for one, or `Issues: not read (--no-issues)`.
packages/ledger/src/cli.mjs. `readIssues` now returns an object, so cli.mjs has to unpack it. It also sets `report.issueSource` to `{ read: true, pages }` or `{ read: false }`, which is what `formatTable` and the JSON read. The brief allows cli.mjs "only if the coverage line or excluded counts print there". The page count is that coverage line, and these three changed lines are all of cli.mjs.
### README
packages/ledger/README.md:
- The T3 section has a "Reasoning summaries" bullet. It says what T3 stores since 2026-10-13, that a `reasoning` row with a `reasoning:` id counts nowhere, and that the reader skips it before the text, `created_at` and header checks. `t3.excluded` gives the three counts. The refusal list now says role `reasoning` with an id that doesn't start `reasoning:` still refuses.
- "Gitea calls and missing evidence" describes the page loop, the 10-page ceiling, the 50-per-page check, the duplicate refusal, the failed page that names the page but not its output, and the `Issues:` line and `issueSource`. "one-call boundary", "not hidden pagination" and "first page" are gone.
- "Queue issue calls" said "the metric call" and "at most 12 calls". It now says metric pages, and at most 21 calls: up to 10 metric pages, 1 open-list call and up to 10 lookups.
`unslop-check` is clean on the README.
## Scope notes
1. The brief says the report "shows how many were skipped next to the imported and deleted thread counts". Those two counts are JSON-only (`t3.excluded`), and the text table doesn't print them, so `reasoningMessages` is JSON-only too. I didn't add a text line for excluded counts, since that would change output the brief didn't ask about.
2. `reasoningMessages` counts summaries in counted threads at any date, like the thread counts, which aren't date-bound either. The message query reads every message in a counted thread, so the skip happens before the date filter. The README says "at any date".
3. The more-than-50 check per page is new. Gitea caps a page at 50, so it can't fire on real data. Without it, a 51-row page would count as full and the loop would read past it.
4. A known limit, out of the brief's scope: the duplicate check catches rows that shift down a page during the read, such as a new issue at the top. An issue that leaves the result set mid-read would shift rows up and skip one, and nothing catches that. Updates can't cause it, because `updated_at` only grows and the query is updated-since. Only a deleted issue can.
5. `queue-checks.mjs` has its own "metric page" detail text and `OPEN_LIMIT`. Both are out of scope by the brief and unchanged.
## Tests
packages/ledger/tests/ledger.test.mjs goes from 78 to 86 tests, all offline. The fake `gitea-api.sh` now reads `page` from the URL. With `ISSUE_PAGES` it serves page N of a JSON array of pages, and `[]` past the end. With `API_FAIL` it fails, and with `FAIL_PAGE` set too it fails only on that page. The T3 `addMessage` helper takes an optional id.
The old "a full page refuses" test is replaced by these:
| Test | Checks |
|---|---|
| issue pages of 50, 50 and 7 read 107 issues in 3 pages (:146) | 107 closed, `issueSource { read: true, pages: 3 }`, three calls with page=1, 2 and 3, the text line `Issues: 3 pages read from Gitea` |
| one short page reads 1 page; --no-issues reads none and says so (:156) | `Issues: 1 page read from Gitea`. With `--no-issues`, `issueSource { read: false }` and `Issues: not read (--no-issues)` |
| a short page 10 is read; a full page 10 refuses at the ceiling (:162) | 9 full pages and 1 row give 10 pages and 451 issues. 11 full pages exit 2 with "page 10 is full, so the 10-page ceiling was reached" after exactly 10 calls |
| an issue number on two pages refuses (:171) | exit 2, "duplicate issue number on page 2" |
| a failing page 2 refuses the whole read without its stderr (:176) | exit 2, "credential or Gitea request failure on page 2", no stderr text, 2 calls |
| page 2 with a malformed record refuses (:182) | exit 2, "invalid Gitea issue records on page 2" |
| page 2 with more than 50 rows refuses (:182) | the same message |
T3:
- The role table gains "role reasoning without the reasoning: id prefix" (:380). It uses id `x-1` and expects "T3 message x-1 in thread t-alice has an unknown role", without the message text. The table's existing `system` row still passes.
- New test "T3: a reasoning summary is skipped before any check and counted as excluded" (:388). It adds a `reasoning:summary:1` row with null text and `created_at` "yesterday", either of which refuses a counted row. The run exits 0, `t3.excluded` is `{ importedThreads: 1, deletedThreads: 1, reasoningMessages: 1 }`, and `seats`, `pi`, `issues`, `totals`, `t3.seats`, `t3.unmapped` and `t3.diagnostic` match the run without it. A second summary, in another thread, carries a conflicting seat header and `#7`. That gives `reasoningMessages: 2` with the same counts again.
- The existing excluded assertion now expects `reasoningMessages: 0`.
## Mutants
mutants.py in this packet. Each mutant swaps one exact line, runs the whole ledger suite (`node --test tests/*.test.mjs` in packages/ledger), and puts the file back from its `.orig` copy. Both report `restored=True`. The run was 16:18:06-16:18:51Z, with the slot from Sage. mutants-run.log has the summary, and mutants/ has the full logs.
| Mutant | Change | Ledger suite | Result |
|---|---|---|---|
| m1 | t3.mjs skips every role `reasoning` row, with no id prefix check | 85 pass, 1 fail | killed |
| m2 | ledger.mjs returns after page 1 | 80 pass, 6 fail | killed |
m1 fails only "T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text", at :386, where the run exits 0 instead of 1. m2 fails the 50/50/7, ceiling, duplicate, failing page 2, malformed page 2 and 51-row page 2 tests. The one-page and `--no-issues` test passes under m2, as it should, since a one-page read is the same either way.
## Gate
gate.sh in this packet. It ran on the candidate with the slot from Sage, 16:18:51-16:24:27Z, on BASE cc48b124f with `DOCKER_HOST` unset and docker 29.7.2. It runs every package's node suite and every scripts/test-*.sh. GATE_PASSED, exit 0. gate-run.log has the summary, and gate/ has one log per step. The worktree still matched the manifest after the run.
| Step | Passed | Failed |
|---|---|---|
| bus | 148 | 0 |
| business | 67 | 0 |
| cli | 184 | 0 |
| control-board | 124 | 0 |
| conversation | 182 | 0 |
| discord | 178 | 0 |
| harness | 80 | 0 |
| ledger | 86 | 0 |
| mosaic | 69 | 0 |
| queue | 156 | 0 |
| runs | 43 | 0 |
| seat | 120 (0 skipped) | 0 |
| tasks | 92 | 0 |
| webui | 108 | 0 |
| scripts | auth 15, conductor 17, config 24, discord 66, extension-package 18, foundation 44, queue 28 (node 156), release 14, task 98 | 0 |
Ledger goes from 78 to 86. Every other count matches the row 112 gate.
The real bwrap tester case ran and passed. It did not skip. From gate/pkg-seat.log:77:
```
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (267.061637ms)
```
None of #258, #261, #262 or #263 came back. The release step made `wt_default` at 16:23:39Z with no containers, and I removed it at 16:24:30Z.
### An earlier run
run1/ holds a full mutant run (16:10:43-16:11:27Z) and a full gate (16:11:31-16:17:08Z) on an earlier candidate. That candidate differs from this one in one README word. "Queue issue calls" said the metric pages don't have an issue "in it", and it now says "on them". Every result in run1/ matches the tables above. I reran both on the final candidate so the evidence names its digests. The first run's `wt_default` was removed at 16:17:14Z.
## Going live
Nothing to do. No live service runs the ledger, so there are no Mos notices and no restart. After landing, Sage reruns the week from 2026-10-04 to 2026-10-10 without `--no-issues` or `--no-t3`.
@@ -0,0 +1,339 @@
diff --git a/packages/ledger/README.md b/packages/ledger/README.md
index 483c981e5..5fc4b1b65 100644
--- a/packages/ledger/README.md
+++ b/packages/ledger/README.md
@@ -105,7 +105,13 @@ isn't writable refuses when SQLite needs them.
- **Excluded.** Imported threads (id prefix `import:`) are partial copies of
Claude Code sessions, not T3 traffic; every T3 event marked `historyImport`
sits in one today. Deleted threads don't count; archived threads do.
- `t3.excluded` gives both thread counts.
+- **Reasoning summaries.** Since 2026-10-13, T3 stores reasoning summaries
+ as messages with role `reasoning` and an id starting `reasoning:summary:`.
+ A message in a counted thread with role `reasoning` and an id starting
+ `reasoning:` counts nowhere. The reader skips it before the text,
+ `created_at` and header checks, so its content can't refuse or change a
+ run. `t3.excluded` gives the imported and deleted thread counts and the
+ skipped reasoning messages, at any date.
- **Blind spot.** Threads in other T3 projects are not counted, even if they
worked on this repository. Live, there is a project at `/home/jwoltje` and
a deleted one at `/mnt/storage/src`.
@@ -123,7 +129,8 @@ These refuse the report with exit 1, and the ones about the database name
lock past the timeout); a symlink at `~/.t3`, `~/.t3/userdata` or
`state.sqlite` (with `--t3-db`, the file or its directory); a missing table or
column the counts need; no project or more than one for this root; a message
-in a counted thread with a role other than `user` or `assistant`, non-text
+in a counted thread with a role other than `user` or `assistant` (role
+`reasoning` with an id that doesn't start `reasoning:` included), non-text
content, or a `created_at` that doesn't parse; a header conflict. A missing Pi
directory means no Pi seats ran here; a missing T3 database means the path or
T3 changed, so it refuses instead of counting zero. Error messages name ids
@@ -193,21 +200,21 @@ text and the JSON.
### Queue issue calls
-The metric call can't answer "is this issue closed", because an issue nobody
-touched this week isn't in it. So the queue checks have their own budget, per
+The metric pages can't answer "is this issue closed", because an issue nobody
+touched this week isn't on them. So the queue checks have their own budget, per
plan 8.10:
| Calls | Purpose |
|---|---|
| 1 | `state=open`, issues only, limit 50, one page. A full page may be short. Issues missing from it are looked up, so it makes the run `incomplete` only while some issue a row closes has no known state (lead decision 40). |
-| up to 10 | `GET issues/N` for each issue in some row's `closes` that is neither on the open list nor closed on the metric page. Beyond 10, the issue's state is unknown, "over the lookup budget". |
+| up to 10 | `GET issues/N` for each issue in some row's `closes` that is neither on the open list nor closed on a metric page. Beyond 10, the issue's state is unknown, "over the lookup budget". |
-With the metric call that is at most 12 calls. `--no-issues` makes none and
+With up to 10 metric pages that is at most 21 calls. `--no-issues` makes none and
prints `queue issue checks: not run`. Closed needs positive evidence: an
-entry on the metric page with state `closed` and a `closed_at`, or a lookup
+entry on a metric page with state `closed` and a `closed_at`, or a lookup
returning a closed issue that isn't a pull request. A failed lookup, a 404, a
pull request or a mismatched number leaves the issue unknown. A failed or
-malformed open-list call exits 2, like the metric call. Each queue call runs
+malformed open-list call exits 2, like a metric page. Each queue call runs
under `timeout -s KILL 60`, which kills the helper and its curl together.
### Weekly routine
@@ -232,11 +239,20 @@ violations, or every violation remediated that day.
## Gitea calls and missing evidence
The metric client requests issues updated since the start date, all states,
-first page, limit 50. This includes issues closed in range, even if later updated. Gitea caps
-responses at 50; a full page fails rather than silently reporting partial totals.
-Use a narrower range or `--no-issues`, not hidden pagination. A commit-linked
-issue not returned by the updated-since query still has a row, with unknown
-metadata. This is the cost of the brief's one-call boundary.
+limit 50. This includes issues closed in range, even if later updated, so
+`--until` can't narrow it. Gitea caps a page at 50. The client reads pages 1,
+2, 3 and on, and stops at the first page with fewer than 50 issues. It reads
+at most 10 pages, so a run makes up to 10 metric calls. A full page 10 exits 2
+and says the 10-page ceiling was reached, rather than report partial totals;
+narrow `--since` or use `--no-issues`. Every page gets the same record checks,
+and a page with more than 50 issues refuses. An issue number seen on two
+pages exits 2, because an update during the read can move an issue onto the
+next page; rerun the report. A failed page refuses the whole read and names
+the page, never its stderr or response body. The text report prints
+`Issues: N pages read from Gitea` (`1 page` for one), and the JSON has
+`issueSource: { read: true, pages: N }`, or
+`{ read: false }` with `--no-issues`. A commit-linked issue not returned by the
+updated-since query still has a row, with unknown metadata.
Exit 0 means a report was computed. Exit 1 means bad arguments, a queue.json
the validator refuses, or unreadable git, session or T3 evidence. Malformed JSONL, including a partially written last line,
diff --git a/packages/ledger/src/cli.mjs b/packages/ledger/src/cli.mjs
index a261b8cdc..5534a3c4d 100644
--- a/packages/ledger/src/cli.mjs
+++ b/packages/ledger/src/cli.mjs
@@ -46,9 +46,9 @@ export async function main(args, root = path.resolve(path.dirname(fileURLToPath(
// default without requiring installation or reading auth material here.
const priorPath = process.env.PATH;
process.env.PATH = `${priorPath ?? ''}${path.delimiter}${path.join(root, 'scripts')}`;
- let issues, states = null;
+ let issues = null, pages, states = null;
try {
- issues = noIssues ? null : readIssues(root, range);
+ if (!noIssues) ({ issues, pages } = readIssues(root, range));
if (queue && !noIssues) states = issueStates(root, queue.rows, issues);
}
finally { if (priorPath === undefined) delete process.env.PATH; else process.env.PATH = priorPath; }
@@ -56,6 +56,7 @@ export async function main(args, root = path.resolve(path.dirname(fileURLToPath(
const t3 = noT3 ? null : await readT3(root, range, t3Db === undefined ? { dbPath: defaultT3Path(), isDefault: true } : { dbPath: t3Db, isDefault: false });
const sessions = mergeSources(await readSessions(root, range), t3);
const report = summarize(range, commits, issues, sessions);
+ report.issueSource = noIssues ? { read: false } : { read: true, pages };
report.queue = queue ? queueChecks(queue, { issues: states, seats: readSeatsDir(), exempt, range }) : { checked: false };
// The queue section prints above the weekly table.
console.log(json ? JSON.stringify(report, null, 2) : [...formatQueue(report.queue), formatTable(report)].join('\n'));
diff --git a/packages/ledger/src/ledger.mjs b/packages/ledger/src/ledger.mjs
index 3669d1cc5..cd14d2a04 100644
--- a/packages/ledger/src/ledger.mjs
+++ b/packages/ledger/src/ledger.mjs
@@ -44,29 +44,45 @@ export function readCommits(root, range) {
});
}
-export function readIssues(root, range, tool = 'gitea-api.sh') {
+// Gitea returns at most 50 issues a page. A page with fewer ends the read.
+const PAGE_SIZE = 50, PAGE_CEILING = 10;
+function readIssuePage(root, range, page, tool) {
let output;
try {
// Updated-since includes closes in range. No until filter: later updates must
- // not hide a close in range. One page only, as required by the brief.
- output = execFileSync(tool, ['GET', `repos/mosaicstack/stack/issues?state=all&type=issues&since=${encodeURIComponent(new Date(range.start).toISOString())}&limit=50&page=1`],
+ // not hide a close in range.
+ output = execFileSync(tool, ['GET', `repos/mosaicstack/stack/issues?state=all&type=issues&since=${encodeURIComponent(new Date(range.start).toISOString())}&limit=${PAGE_SIZE}&page=${page}`],
{ cwd: root, encoding: 'utf8', timeout: 60000, maxBuffer: 16 * 1024 * 1024, stdio: ['ignore', 'pipe', 'pipe'] });
} catch (error) {
// Never echo an arbitrary API response or stderr that might contain secrets.
const reason = error.status === 3 ? 'credentials missing, unreadable, or invalid' :
error.code === 'ENOENT' ? 'gitea-api.sh unavailable' : 'credential or Gitea request failure';
- throw new SourceError(`Issues unavailable: ${reason}; use --no-issues for unknown issue metrics`, 2);
+ throw new SourceError(`Issues unavailable: ${reason} on page ${page}; use --no-issues for unknown issue metrics`, 2);
}
let issues;
- try { issues = JSON.parse(output); } catch { throw new SourceError('Issues unavailable: invalid Gitea JSON', 2); }
- if (!Array.isArray(issues) || issues.some(i => !i || !Number.isSafeInteger(i.number) || i.number < 1 ||
+ try { issues = JSON.parse(output); } catch { throw new SourceError(`Issues unavailable: invalid Gitea JSON on page ${page}`, 2); }
+ if (!Array.isArray(issues) || issues.length > PAGE_SIZE || issues.some(i => !i || !Number.isSafeInteger(i.number) || i.number < 1 ||
typeof i.title !== 'string' || !Number.isFinite(Date.parse(i.created_at)) ||
!(i.closed_at === null || Number.isFinite(Date.parse(i.closed_at))))) {
- throw new SourceError('Issues unavailable: invalid Gitea issue records', 2);
+ throw new SourceError(`Issues unavailable: invalid Gitea issue records on page ${page}`, 2);
+ }
+ return issues;
+}
+// Reads pages 1, 2, 3 and on until one has fewer than 50 issues, at most 10.
+// A full page 10 refuses: the totals would be partial. So does a number seen
+// twice, since an update during the read can move an issue to the next page.
+export function readIssues(root, range, tool = 'gitea-api.sh') {
+ const issues = [], seen = new Set();
+ for (let page = 1; page <= PAGE_CEILING; page++) {
+ const rows = readIssuePage(root, range, page, tool);
+ for (const issue of rows) {
+ if (seen.has(issue.number)) throw new SourceError(`Issues unavailable: duplicate issue number on page ${page}; rerun the report`, 2);
+ seen.add(issue.number);
+ issues.push(issue);
+ }
+ if (rows.length < PAGE_SIZE) return { issues: issues.filter(i => !i.pull_request), pages: page };
}
- if (issues.length >= 50) throw new SourceError('Issues unavailable: full 50-row page may be incomplete; one-call limit forbids pagination. Narrow --since or use --no-issues', 2);
- if (new Set(issues.map(i => i.number)).size !== issues.length) throw new SourceError('Issues unavailable: duplicate issue numbers', 2);
- return issues.filter(i => !i.pull_request);
+ throw new SourceError(`Issues unavailable: page ${PAGE_CEILING} is full, so the ${PAGE_CEILING}-page ceiling was reached and totals may be incomplete. Narrow --since or use --no-issues`, 2);
}
export function messageText(content) {
@@ -222,9 +238,14 @@ export function formatTable(report) {
decimal(r.hoursOpen), r.commits, r.followUps, r.seats.join(', ')].join(' | ')),
'', 'Seat | Board | Agent | Human',
...report.seats.map(r => [clean(r.seat), r.board, r.agent, r.human].join(' | ')),
- ...t3Line(report.t3),
+ ...t3Line(report.t3), ...issueLine(report.issueSource),
'', totalsLine(report.totals)].join('\n');
}
+// How many issue pages the report read, so a short read can't pass unseen.
+function issueLine(source) {
+ if (!source) return [];
+ return [source.read ? `Issues: ${source.pages} ${source.pages === 1 ? 'page' : 'pages'} read from Gitea` : 'Issues: not read (--no-issues)'];
+}
// One line when T3 was skipped or read from somewhere other than the default.
function t3Line(t3) {
if (!t3) return [];
diff --git a/packages/ledger/src/t3.mjs b/packages/ledger/src/t3.mjs
index fc9da14ee..d4425f03d 100644
--- a/packages/ledger/src/t3.mjs
+++ b/packages/ledger/src/t3.mjs
@@ -79,7 +79,7 @@ function query(db, root, range, seats) {
throw new SourceError(`T3 has ${projects.length ? 'more than one project' : 'no project'} for ${root}; a project opened through a symlink does not match; ${SKIP}`);
}
const projectId = projects[0].project_id;
- const threads = new Map(), excluded = { importedThreads: 0, deletedThreads: 0 };
+ const threads = new Map(), excluded = { importedThreads: 0, deletedThreads: 0, reasoningMessages: 0 };
for (const t of db.prepare('select thread_id, title, archived_at, deleted_at from projection_threads where project_id = ?').all(projectId)) {
if (typeof t.thread_id !== 'string' || typeof t.title !== 'string') throw new SourceError('T3 thread with a non-text id or title');
if (t.thread_id.startsWith('import:')) { excluded.importedThreads++; continue; }
@@ -93,6 +93,9 @@ function query(db, root, range, seats) {
for (const m of messages) {
const thread = threads.get(m.thread_id);
if (!thread) continue;
+ // T3 stores reasoning summaries as messages since 2026-10-13. They are
+ // skipped before any check, so their content can't refuse or change a run.
+ if (m.role === 'reasoning' && typeof m.message_id === 'string' && m.message_id.startsWith('reasoning:')) { excluded.reasoningMessages++; continue; }
const where = `T3 message ${clean(m.message_id)} in thread ${clean(m.thread_id)}`;
if (m.role !== 'user' && m.role !== 'assistant') throw new SourceError(`${where} has an unknown role`);
if (typeof m.text !== 'string') throw new SourceError(`${where} has non-text content`);
diff --git a/packages/ledger/tests/ledger.test.mjs b/packages/ledger/tests/ledger.test.mjs
index ee48246db..5bd7f42aa 100644
--- a/packages/ledger/tests/ledger.test.mjs
+++ b/packages/ledger/tests/ledger.test.mjs
@@ -37,8 +37,7 @@ function t3db(file, { root, projects, threads = [], messages = [], after = [], k
db.close();
}
let messageId = 0;
-function addMessage(db, { thread, text, role = 'user', at = '2026-09-08T12:00:00Z', origin = 'app' }) {
- const id = `m${++messageId}`;
+function addMessage(db, { thread, text, role = 'user', at = '2026-09-08T12:00:00Z', origin = 'app', id = `m${++messageId}` }) {
db.prepare('insert into projection_thread_messages values (?, ?, ?, ?, ?)').run(id, thread, role, text, at);
if (origin !== 'none') db.prepare('insert into orchestration_events (stream_id, event_type, payload_json, metadata_json) values (?, ?, ?, ?)')
.run(thread, 'thread.message-sent', JSON.stringify({ messageId: id, threadId: thread, role, text }), JSON.stringify({ origin: origin === 'app' ? { appVersion: '0.0.0' } : {} }));
@@ -66,7 +65,15 @@ function fixture(t) {
cpSync(source, path.join(root, 'packages/ledger/src'), { recursive: true });
// The queue section imports the queue validator and the seat registry.
for (const pkg of ['queue', 'seat']) cpSync(path.join(source, '../..', pkg, 'src'), path.join(root, 'packages', pkg, 'src'), { recursive: true });
- const api = put('bin/gitea-api.sh', '#!/usr/bin/env node\nconst fs=require("fs"); fs.appendFileSync(process.env.CALLS,JSON.stringify(process.argv.slice(2))+"\\n"); if(process.env.API_FAIL){console.error("secret must not escape");process.exit(Number(process.env.API_FAIL));} process.stdout.write(fs.readFileSync(process.env.ISSUES,"utf8"));\n');
+ // The fake serves ISSUES for every page, or page N of the ISSUE_PAGES array
+ // (an empty page past its end). API_FAIL fails every call, or only FAIL_PAGE.
+ const api = put('bin/gitea-api.sh', `#!/usr/bin/env node
+const fs = require('fs'), args = process.argv.slice(2), page = Number(new URL(args[1], 'http://x/').searchParams.get('page'));
+fs.appendFileSync(process.env.CALLS, JSON.stringify(args) + '\\n');
+if (process.env.API_FAIL && (!process.env.FAIL_PAGE || Number(process.env.FAIL_PAGE) === page)) { console.error('secret must not escape'); process.exit(Number(process.env.API_FAIL)); }
+if (process.env.ISSUE_PAGES) process.stdout.write(JSON.stringify(JSON.parse(fs.readFileSync(process.env.ISSUE_PAGES, 'utf8'))[page - 1] ?? []));
+else process.stdout.write(fs.readFileSync(process.env.ISSUES, 'utf8'));
+`);
execFileSync('chmod', ['+x', api]);
put('issues.json', JSON.stringify(fixtureIssues)); put('calls.jsonl', '');
const entry = (text, timestamp = '2026-09-08T12:00:00Z') => ({ type: 'message', timestamp, message: { role: 'user', content: [{ type: 'text', text }] } });
@@ -128,9 +135,55 @@ test('unique commits but per-issue links count multiple tags once each', t => {
const f = fixture(t); f.commit('both #1 #2 #2'); const r = JSON.parse(f.run(['--json']).stdout);
assert.equal(r.totals.commits, 4); assert.deepEqual(r.issues.map(x => x.commits), [2, 3]);
});
-test('page cap refuses rather than silently undercounting', t => {
- const f = fixture(t); f.put('issues.json', JSON.stringify(Array.from({ length: 50 }, (_, i) => ({ ...fixtureIssues[0], number: i + 1 }))));
- const result = f.run(); assert.equal(result.status, 2); assert.match(result.stderr, /full 50-row page/); assert.equal(result.stdout, '');
+// Issue pages. Each issue closes in range, so issuesClosed counts every one read.
+const closedIssue = number => ({ number, title: `Issue ${number}`, created_at: '2026-09-06T00:00:00Z', closed_at: '2026-09-07T00:00:00Z' });
+const issuePages = sizes => { let next = 0; return sizes.map(n => Array.from({ length: n }, () => closedIssue(++next))); };
+function paged(t, pages) {
+ const f = fixture(t), file = f.put('pages.json', JSON.stringify(pages));
+ const calls = () => readFileSync(path.join(f.root, 'calls.jsonl'), 'utf8').trim().split('\n').filter(Boolean).map(l => JSON.parse(l)[1]);
+ return { ...f, run: (args = [], env = {}) => f.run(args, { ISSUE_PAGES: file, ...env }), calls };
+}
+test('issue pages of 50, 50 and 7 read 107 issues in 3 pages', t => {
+ const f = paged(t, issuePages([50, 50, 7]));
+ const result = f.run(['--json']); assert.equal(result.status, 0, result.stderr);
+ const r = JSON.parse(result.stdout);
+ assert.equal(r.totals.issuesClosed, 107); assert.deepEqual(r.issueSource, { read: true, pages: 3 });
+ const calls = f.calls(); assert.equal(calls.length, 3);
+ calls.forEach((call, i) => assert.match(call, new RegExp(`^repos/mosaicstack/stack/issues\\?state=all&type=issues&since=2026-09-06T00%3A00%3A00.000Z&limit=50&page=${i + 1}$`)));
+ const text = f.run(); assert.equal(text.status, 0, text.stderr);
+ assert.match(text.stdout, /^Issues: 3 pages read from Gitea$/m); assert.match(text.stdout, /issues closed 107 /);
+});
+test('one short page reads 1 page; --no-issues reads none and says so', t => {
+ const f = fixture(t), one = f.run();
+ assert.equal(one.status, 0, one.stderr); assert.match(one.stdout, /^Issues: 1 page read from Gitea$/m);
+ assert.deepEqual(JSON.parse(f.run(['--no-issues', '--json']).stdout).issueSource, { read: false });
+ assert.match(f.run(['--no-issues']).stdout, /^Issues: not read \(--no-issues\)$/m);
+});
+test('a short page 10 is read; a full page 10 refuses at the ceiling', t => {
+ const last = paged(t, issuePages([...Array(9).fill(50), 1]));
+ const ok = last.run(['--json']); assert.equal(ok.status, 0, ok.stderr);
+ assert.deepEqual(JSON.parse(ok.stdout).issueSource, { read: true, pages: 10 }); assert.equal(JSON.parse(ok.stdout).totals.issuesClosed, 451);
+ const f = paged(t, issuePages(Array(11).fill(50)));
+ const result = f.run(); assert.equal(result.status, 2); assert.equal(result.stdout, '');
+ assert.match(result.stderr, /page 10 is full, so the 10-page ceiling was reached/);
+ assert.equal(f.calls().length, 10);
+});
+test('an issue number on two pages refuses', t => {
+ const pages = issuePages([50, 7]); pages[1][3] = closedIssue(50);
+ const f = paged(t, pages), result = f.run();
+ assert.equal(result.status, 2); assert.equal(result.stdout, ''); assert.match(result.stderr, /duplicate issue number on page 2/);
+});
+test('a failing page 2 refuses the whole read without its stderr', t => {
+ const f = paged(t, issuePages([50, 50, 7])), result = f.run([], { API_FAIL: '1', FAIL_PAGE: '2' });
+ assert.equal(result.status, 2); assert.equal(result.stdout, '');
+ assert.match(result.stderr, /credential or Gitea request failure on page 2/); assert.doesNotMatch(result.stderr, /secret must/);
+ assert.equal(f.calls().length, 2);
+});
+for (const [name, bad] of [['a malformed record', { number: 'x' }], ['more than 50 rows', null]]) test(`page 2 with ${name} refuses`, t => {
+ const pages = issuePages([50, 7]);
+ if (bad) pages[1][0] = bad; else pages[1] = issuePages([101])[0].slice(50);
+ const result = paged(t, pages).run(); assert.equal(result.status, 2); assert.equal(result.stdout, '');
+ assert.match(result.stderr, /invalid Gitea issue records on page 2/);
});
for (const payload of ['not JSON', '{}', '[{"number":1}]']) test(`bad API payload ${payload} refuses`, t => {
const f = fixture(t); f.put('issues.json', payload); const r = f.run(); assert.equal(r.status, 2); assert.equal(r.stdout, '');
@@ -254,7 +307,7 @@ test('T3: seat, archived, unmapped and Researcher threads count; imported, delet
]);
assert.deepEqual(r.t3.unmapped, { board: 0, agent: 1, human: 2, threads: [
{ id: T5, title: 'Discord Bot', archived: false }, { id: T3, title: 'Sagebrush', archived: false }] });
- assert.deepEqual(r.t3.excluded, { importedThreads: 1, deletedThreads: 1 });
+ assert.deepEqual(r.t3.excluded, { importedThreads: 1, deletedThreads: 1, reasoningMessages: 0 });
// The free-text header counts as human; only the diagnostic shows it was sent through the API.
assert.deepEqual(r.t3.diagnostic, { humanSentThroughApi: 1, humanWithoutEvent: 0 });
assert.equal(r.totals.humanMessagesPerClosedIssue, 6);
@@ -324,6 +377,7 @@ for (const [name, after, pattern] of [
});
for (const [name, message, pattern] of [
['an unknown role', { role: 'system' }, /T3 message m\d+ in thread t-alice has an unknown role/],
+ ['role reasoning without the reasoning: id prefix', { role: 'reasoning', id: 'x-1' }, /T3 message x-1 in thread t-alice has an unknown role/],
['non-text content', { text: null }, /has non-text content/],
['an unparseable created_at', { at: 'yesterday' }, /has an invalid created_at/],
]) test(`T3: a counted row with ${name} exits 1 without its text`, t => {
@@ -331,6 +385,25 @@ for (const [name, message, pattern] of [
f.write({ messages: [...f.messages, { thread: T1, text: 'secret words', ...message }] });
const r = f.run(['--t3-db', f.db]); assert.equal(r.status, 1); assert.match(r.stderr, pattern); assert.doesNotMatch(r.stderr, /secret/);
});
+test('T3: a reasoning summary is skipped before any check and counted as excluded', t => {
+ const f = t3Fixture(t); f.write();
+ const before = JSON.parse(f.run(['--json', '--t3-db', f.db]).stdout);
+ const same = after => {
+ for (const key of ['seats', 'pi', 'issues', 'totals']) assert.deepEqual(after[key], before[key]);
+ assert.deepEqual([after.t3.seats, after.t3.unmapped, after.t3.diagnostic], [before.t3.seats, before.t3.unmapped, before.t3.diagnostic]);
+ };
+ // Null text and a bad created_at would each refuse a counted row.
+ const summary = { thread: T1, role: 'reasoning', id: 'reasoning:summary:1', text: null, at: 'yesterday', origin: 'none' };
+ f.write({ messages: [...f.messages, summary] });
+ let r = f.run(['--json', '--t3-db', f.db]); assert.equal(r.status, 0, r.stderr);
+ assert.deepEqual(JSON.parse(r.stdout).t3.excluded, { importedThreads: 1, deletedThreads: 1, reasoningMessages: 1 });
+ same(JSON.parse(r.stdout));
+ // So would a header conflict, and a #N mention would add an issue seat.
+ f.write({ messages: [...f.messages, summary, { thread: T2, role: 'reasoning', id: 'reasoning:summary:2', text: `${header('sage', 'alice', T2)}\n#7`, origin: 'none' }] });
+ r = f.run(['--json', '--t3-db', f.db]); assert.equal(r.status, 0, r.stderr);
+ assert.equal(JSON.parse(r.stdout).t3.excluded.reasoningMessages, 2);
+ same(JSON.parse(r.stdout));
+});
test('T3: a missing orchestration_events makes the diagnostic unknown and keeps the counts', t => {
const f = t3Fixture(t); f.write();
const before = JSON.parse(f.run(['--json', '--t3-db', f.db]).stdout);
@@ -0,0 +1,5 @@
4d10a3d612580e407f816fa8da87104b68919fc8f6c2f7ef5bf29e28066bc52a packages/ledger/README.md
e8658323fdf5293d409c16655b879306824dc841dcfb0bee5b785fbf36b7ba99 packages/ledger/src/cli.mjs
c6c16e0c349ca7efa6b8dbb9fbd9824ddcab8d8890fa581fdc2a38a6b80c09e9 packages/ledger/src/ledger.mjs
3ba19cb784e37893b6e15d78bdb27d30f1591fcd14535e1397b5b341431b43ec packages/ledger/src/t3.mjs
0bafd2b21da7e08dcb7d786931602e1d503eebd7155b52f2d7e4fb253ae65b59 packages/ledger/tests/ledger.test.mjs
@@ -0,0 +1,25 @@
base cc48b124f DOCKER_HOST=unset docker=29.7.2 start 16:18:51
pkg-bus rc=0 16:18:51-16:18:55 ℹ pass 148 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 4144.963406
pkg-business rc=0 16:18:55-16:18:57 ℹ pass 67 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 1797.527264
pkg-cli rc=0 16:18:57-16:19:15 ℹ pass 184 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 17782.645119
pkg-control-board rc=0 16:19:15-16:19:16 ℹ pass 124 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 595.656309
pkg-conversation rc=0 16:19:16-16:20:03 ℹ pass 182 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 47167.950215
pkg-discord rc=0 16:20:03-16:20:05 ℹ pass 178 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 2583.800946
pkg-harness rc=0 16:20:05-16:20:17 ℹ pass 80 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 11165.016879
pkg-ledger rc=0 16:20:17-16:20:39 ℹ pass 86 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 22068.01287
pkg-mosaic rc=0 16:20:39-16:20:41 ℹ pass 69 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 2092.39883
pkg-queue rc=0 16:20:41-16:21:10 ℹ pass 156 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 28952.143808
pkg-runs rc=0 16:21:10-16:21:11 ℹ pass 43 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 730.433593
pkg-seat rc=0 16:21:11-16:21:15 ℹ pass 120 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 4850.455593
pkg-tasks rc=0 16:21:15-16:21:21 ℹ pass 92 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 5474.370436
pkg-webui rc=0 16:21:21-16:22:16 ℹ pass 108 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 55151.295176
script-auth rc=0 16:22:16-16:22:17 | selftest: 15 passed, 0 failed
script-conductor rc=0 16:22:17-16:22:22 | selftest: 17 passed, 0 failed
script-config rc=0 16:22:22-16:22:24 | selftest: 24 passed, 0 failed
script-discord rc=0 16:22:24-16:22:30 | discord suite: 66 passed, 0 failed
script-extension-package rc=0 16:22:30-16:22:32 | extension package selftest: 18 passed, 0 failed
script-foundation rc=0 16:22:32-16:23:08 | selftest: 44 passed, 0 failed
script-queue rc=0 16:23:08-16:23:38 ℹ pass 156 ℹ fail 0 | queue suite: 28 passed, 0 failed
script-release rc=0 16:23:38-16:23:52 | selftest: 14 passed, 0 failed
script-task rc=0 16:23:52-16:24:27 | selftest: 98 passed, 0 failed
GATE_PASSED 16:24:27
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
set -o pipefail
# Darkwing gate, row 113 (#1607), candidate in the r113 worktree on base cc48b124f.
# Every package's node suite, then every scripts/test-*.sh, sequential, each
# teed to its own log; stops at the first failure.
G=$HOME/darkwing-scratch/r113/wt
OUT=$HOME/darkwing-scratch/r113/gate
export TMPDIR=$HOME/darkwing-scratch/r113/tmp
mkdir -p "$OUT" "$TMPDIR"
cd "$G" || exit 9
[ -e "$G/node_modules" ] || { echo "STOP no node_modules in $G"; exit 8; }
echo "base $(git rev-parse --short HEAD) DOCKER_HOST=${DOCKER_HOST:-unset} docker=$(docker info --format '{{.ServerVersion}}' 2>/dev/null || echo none) start $(date -u +%H:%M:%S)"
run() { local name="$1" dir="$2" cmd="$3" t0; t0=$(date -u +%H:%M:%S)
(cd "$G/$dir" && bash -c "$cmd") 2>&1 | tee "$OUT/$name.log" > /dev/null; local rc=$?
echo "$name rc=$rc $t0-$(date -u +%H:%M:%S) $(grep -E '^ℹ (pass|fail|skipped) [0-9]+' "$OUT/$name.log" | tr '\n' ' ') | $(tail -n1 "$OUT/$name.log")"
[ $rc -eq 0 ] || { echo "STOP $name"; exit $rc; }; }
for d in packages/*/; do p=$(basename "$d"); [ -d "$d/tests" ] || continue
run "pkg-$p" "packages/$p" 'node --test tests/*.test.mjs'; done
for s in scripts/test-*.sh; do n=$(basename "$s" .sh); run "script-${n#test-}" . "bash $s"; done
echo "GATE_PASSED $(date -u +%H:%M:%S)"
@@ -0,0 +1,156 @@
✔ agents: a held role with nothing on the bus is idle; a role session gets the claim rows unchanged (146.23647ms)
✔ agents: working counts what the holder received and has not read; routed alone is not working (254.019581ms)
✔ agents: input needed is the role's open decisions routed to the human, gated first, then oldest (342.174922ms)
✔ agents: working wins over waiting, and Input needed still shows (182.838348ms)
✔ agents: a new holder doesn't inherit what the last one left unread; decisions stay with the role (222.213349ms)
✔ agents: state reads only its own business, even for a run name both use (197.786505ms)
✔ agents: a message the holder released unread is stranded; the next holder gets nothing and cannot read it (211.814579ms)
✔ agents: a message the holder read is not stranded; one the current holder has not read is not listed (207.638045ms)
✔ agents: stranded is oldest first and capped at 50 for a role (887.344741ms)
✔ agents: stranded is per role and per business (313.7532ms)
✔ agents: a message routed to a held role and not yet received is not stranded (114.418617ms)
✔ launch identity is stamped, payload identity is refused and stale holder cannot send (189.518379ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (287.371453ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (285.534644ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (197.389147ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (187.285094ms)
✔ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (271.325791ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (183.396903ms)
✔ task action subjects and linked decision trail are complete and ordered (195.587417ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (146.912525ms)
✔ business isolation includes inherited object names and cross-business message references (213.170095ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (276.031989ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (141.955991ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (211.043437ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (124.651616ms)
✔ both arbiters require human resolution when their cross-role route is themselves (203.531846ms)
✔ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (133.667358ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (2.671007ms)
✔ credentials gives human and reader sessions service, account, role, date and state, and nothing else (92.622668ms)
✔ credentials refuses a role session and any argument (207.779296ms)
✔ credentials reads the status on each request, and a broker without one lists none (234.519362ms)
✔ the broker process answers credentials without a token, path or variable in its output, log or store (177.324848ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (4.328867ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (2.611885ms)
✔ expiry refuses use and env references never become client data (0.730436ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (1.877171ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.435977ms)
✔ roles lists open decisions routed to a role, and never the human inbox (245.879676ms)
✔ recent lists closed decisions of every route, newest close first, with how each closed (302.857793ms)
✔ recent gives the closing event as closed when the decision was seen first (293.660192ms)
✔ recent stops at RECENT rows (812.274036ms)
✔ every row is what trail already gives the same session for that id (313.677858ms)
✔ a role session can't list decisions, so it can't read another role's open decisions (418.195251ms)
✔ decisions is a read: one business, strict arguments, nothing written (355.603795ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (129.329052ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (178.25358ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (157.845566ms)
✔ endLaunch leaves a claim another run took alone (189.125867ms)
✔ refuse records action.refused against the caller with the code only (136.857029ms)
✔ launches off refuses role.launch with launch-revoked until launches on (198.416508ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (277.732057ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (3.119417ms)
✔ process reader gets own kernel identity without exposing environment values (0.712675ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (1.093608ms)
✔ real pid 1 remains inspectable when its environment is protected (0.323476ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (225.724531ms)
✔ missing and foreign-business citations refuse and roll back message and grant (192.504583ms)
✔ cross-role sends still need a matching resolved decision and consume it once (256.597005ms)
✔ messages pages all human messages newest first without writes; read state is history (2667.368389ms)
✔ messages refuses role callers, invalid paging and cursors outside this human feed (249.388111ms)
✔ views messages passes only its paging arguments through (0.240026ms)
✔ messages isolates businesses even with a valid foreign cursor (151.523245ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (226.40204ms)
✔ startup token refusal returns safe code without value or partial listening broker (37.93981ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (176.518997ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (182.494767ms)
✔ trusted host registers later launches; socket clients never have a registration verb (193.2478ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (35.238027ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (178.482493ms)
✔ a reply is listed for human and reader sessions, and its delivery rows are unchanged (264.478047ms)
✔ the reply still reaches the human message.receive (mosaic talk) after the Console showed it (209.277454ms)
✔ a message with no reply gives an empty list (175.988634ms)
✔ replies come oldest first and stop at REPLIES (778.985734ms)
✔ an id that names no message in the business refuses message-not-found, and the refusal is recorded (309.571148ms)
✔ strict arguments; a role session gets human-required (429.819757ms)
✔ views passes replies through as one call with the id (0.21326ms)
✔ requirements returns the committed list to a holding role session, and no one else (234.607561ms)
✔ the PM's prd.approve with no task, when no id fits, reaches the human's Inbox (169.423427ms)
✔ the PM's non-blocking role.revoke with no task reaches the human's Inbox (182.390767ms)
✔ a push is recorded as the action.allowed for git.push.working on the task, and only the host records one (275.094962ms)
✔ review.request names the latest pushed commit and sends the reviewer a REVIEW-REQUEST (262.999718ms)
✔ review.request says which run holds the reviewer role, or null, and a null request waits for a claim (306.600763ms)
✔ review.request refuses a commit that isn't the latest push, a non-reviewer and a role without the action (396.943122ms)
✔ reviewFetch answers only the addressed reviewer, for the request it cites (233.784555ms)
✔ review.verdict answers one request once, to the role that asked (337.13999ms)
✔ task.close on a pushed task needs an approve verdict for the latest push (408.914927ms)
✔ a refusal the host decided is filed on the task it names, and only a task ref counts (238.244305ms)
✔ v3b prototype refusals, views and append-only mutations (1143.105897ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (300.79637ms)
✔ another run cannot consume an approval; a failed check leaves it usable (237.19972ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (170.480573ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (341.368058ms)
✔ class drift gated to cross-role refuses before consumption (242.231589ms)
✔ class drift cross-role to gated refuses before consumption (246.660276ms)
✔ class drift gated to within-role refuses before consumption (244.41927ms)
✔ class drift cross-role to within-role refuses before consumption (272.666691ms)
✔ class drift within-role to gated refuses before consumption (220.948324ms)
✔ class drift within-role to cross-role refuses before consumption (187.303299ms)
✔ message.send consumes approval and prevents a later send or authorize (217.965773ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (240.125062ms)
✔ a business that never switched launches reads allowed with no time and no event (172.210899ms)
✔ launches revoked and then restored read allowed, with the restore time and event id (157.063038ms)
✔ a task closed on the tracker leaves the open list, and total counts the open ones (171.523276ms)
✔ a tombstone is not open (151.319078ms)
✔ the open list stops at the cap and says so; total still counts every open task (147.378644ms)
✔ a role and a reader session read state; arguments, and an unbound cap, refuse (154.030295ms)
✔ a human session reads the same state, with the same cap (163.831863ms)
✔ reading state writes nothing: every table keeps its row count (157.005348ms)
✔ creates private WAL store and excludes a second writer until explicit close (153.142121ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (204.697801ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (199.036521ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (188.36052ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (112.046084ms)
✔ async transactions refuse before invoking their function (105.69464ms)
✔ the session default fits under the reply cap and pages to the end with next (295.387597ms)
✔ the short form: no description, assignees by role, every listed key (268.565945ms)
✔ each filter, alone and together, and total counts every match (325.790189ms)
✔ task_ref reads one task in full, as the whole board has it (304.380098ms)
✔ no arguments is the read the Console and mosaic make, unchanged (267.540388ms)
✔ an unknown argument or a bad value refuses invalid-request (893.618847ms)
✔ tasks rows carry priority and requirement for every session that reads tasks (336.347951ms)
✔ the read model rebuilds from the ledger: a reopened bus and each trail give the same values (339.938062ms)
✔ an empty business and one with snapshots but no task.created read cleanly (133.571499ms)
✔ recordTask keeps sync reads and a role write apart (194.032572ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (115.273637ms)
✔ a bad entry refuses the whole record (124.871433ms)
✔ taskView reads the projection for one business (118.16325ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (257.473126ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (409.753771ms)
✔ without an adapter the server refuses every task verb (243.809455ms)
✔ the runtime refuses an invalid adapter and closes a valid one (218.409539ms)
✔ the process loads the S3 adapter from plain-data trackers (261.470248ms)
✔ the tester binds only when the business sets bus.tester to exactly true (846.096401ms)
✔ a business may not name a role tester, so the tester address is never a role (263.509927ms)
✔ every verb outside the tester list refuses tester-refused and is recorded against the tester (527.454683ms)
✔ a tester message is from tester, starts [mos test], and writes no human.input or authority (221.119889ms)
✔ a role answers a tester only in reply to a tester message, and the answer never reaches the human (231.452862ms)
✔ the tester reads the human views a reader reads (125.246324ms)
✔ tester proof binds its own CLI, start time and nonce, refuses a managed run and allows an agent (1.157327ms)
✔ neither CLI's nonce proves the other: each proof is bound to its own CLI and nonce variable (0.357392ms)
✔ testerNonce reads only the tester's variable and gives null on any read error (0.197882ms)
✔ an envelope carries exactly one of cap, human and tester; no tester authenticator refuses (54.253121ms)
✔ tester-cli.mjs binds through the runtime when the switch is on, and refuses off or under a run marker (725.471971ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (177.066099ms)
✔ two wire claims serialize; a lost reply never automatically retries (174.189137ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (123.518335ms)
✔ client preserves UTF-8 when a response divides a multibyte character (12.230045ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (135.295859ms)
ℹ tests 148
ℹ suites 0
ℹ pass 148
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4144.963406
@@ -0,0 +1,75 @@
✔ config directory and file path follow MOSAIC_CONFIG (1.190535ms)
✔ the fixture business validates and comes back frozen (3.542186ms)
✔ two instances may share a definition (1.12973ms)
✔ top-level refusals (3.786489ms)
✔ arbiters and projects (5.446422ms)
✔ role instances (2.723895ms)
✔ Vikunja bots (5.808997ms)
✔ a role without Vikunja takes no tracker block (2.076394ms)
✔ credential references match the definition's services (2.399388ms)
✔ launch (7.654281ms)
✔ loadBusiness: file checks (1.704533ms)
✔ loadBusiness: not a regular file (39.026876ms)
✔ loading writes nothing (1.016534ms)
✔ names that are Object.prototype properties don't count as declared (2.515974ms)
✔ the shipped example refuses as written and validates once filled in (0.502565ms)
✔ the role file loads and resolves through loadBusiness (4.568517ms)
✔ the shipped file is exactly decision 104's list (0.674527ms)
✔ the resolved record matches decision 104, so a widened file fails (1.489106ms)
✔ message.send is within role and every other action is gated (1.117162ms)
✔ a business grant of a gated action through limits does not widen the role (1.141573ms)
✔ a launch block whose by is the chief-of-staff instance is refused (1.400198ms)
✔ the instance takes no credential references and no tracker (2.36108ms)
✔ usage errors exit 4 (265.74256ms)
✔ validate: a good business exits 0 and prints instance digests (68.80396ms)
✔ validate: project files (305.753704ms)
✔ validate: missing files and a broken system config (229.802578ms)
✔ validate: credential reference problems exit 2 and name each one (65.287687ms)
✔ validate: a token file inside the repository is refused (66.746012ms)
✔ validate: role definitions come from MOSAIC_ROLES_DIR (183.529591ms)
✔ resolve: prints one instance's record (186.318694ms)
✔ resolve: refusals (357.397648ms)
✔ parse: exactly one of file or env, plus the service's date (2.846532ms)
✔ check: a good file has no problems (0.721111ms)
✔ check never opens the file: a write-only token passes (0.392126ms)
✔ check: file problems (1.019069ms)
✔ check: token files can't live in the repository or dataRoot, even through a linked directory (1.034691ms)
✔ check: dates and environment references (0.486034ms)
✔ path and load (1.930114ms)
✔ refusals (1.032083ms)
✔ systemVars flattens the validated config (1.920161ms)
✔ precedence: system, business, project, project role, agent (4.38676ms)
✔ limits narrow the definition and never widen it (2.23746ms)
✔ role.launch stays within-role only for the instance the launch block names (4.322647ms)
✔ limits.authority without role.launch leaves the launcher with no launch block (1.528354ms)
✔ limits.authority narrows cross-role actions too (0.901637ms)
✔ classify (1.009811ms)
✔ the record carries what the broker and launcher need (0.843685ms)
✔ digest: key order doesn't matter, any value change does (5.281272ms)
✔ refusals (2.034675ms)
✔ the four shipped version 2 roles load (2.574874ms)
✔ shipped role scopes match addendum B section 2 and the SR runbook (0.815313ms)
✔ shipped authority follows the note's table (0.445952ms)
✔ version 1 files keep loading with no authority (0.887694ms)
✔ the conductor policy isn't a role (0.230046ms)
✔ a missing role file is exit 4, a symbolic link too (0.434255ms)
✔ version 2 refusals (1.366814ms)
✔ authority: closed vocabulary, no gated-only action, no overlap (2.077109ms)
✔ credentials: Gitea scopes (0.85747ms)
✔ credentials: Vikunja scopes are a group-to-verbs map from the grantable list (0.981349ms)
✔ credentials: services (0.561201ms)
✔ contract: a non-empty regular Markdown file beside the role file (0.594573ms)
✔ every key names known layers and a merge rule (1.087761ms)
✔ unknown keys and wrong layers refuse (0.939958ms)
✔ types (2.370843ms)
✔ merge: defaults, then the most specific layer wins (0.339041ms)
✔ merge: limits only narrow, and provenance lists each source (0.37708ms)
✔ merge doesn't change its inputs (0.179536ms)
ℹ tests 67
ℹ suites 0
ℹ pass 67
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1797.527264
@@ -0,0 +1,194 @@
✔ every screen and overlay fits 120x36, 80x24 and the narrow layout, row for row (1322.18887ms)
✔ width counts terminal cells: wide CJK and emoji 2, U+FE0F after a one-cell base 1, marks 0 (70.789658ms)
✔ broker text is shown, never interpreted: no raw control character or bidi override reaches the terminal (172.260826ms)
✔ NO_COLOR: no escape codes, except reverse video on the selected row (228.789299ms)
✔ 1-9 shows the decide flow's own lines and question; only y resolves (210.054789ms)
✔ the app shows the same decide text as mosaic decide (117.645851ms)
✔ any key but y or Y at the question answers No; nothing is sent (2200.105934ms)
✔ below 40x10 the question is hidden, so every key answers it No, y included (Filbert R3) (455.504723ms)
✔ under 40 columns a tall terminal shows the too-small screen even where the decide box would fit; y sends nothing (Filbert N10) (1390.593769ms)
✔ a hidden decide box names the way out, and the status line under it does not promise y (Filbert N12) (136.462862ms)
✔ a throw while answering the question goes to crash, sends nothing and leaves no job pending (139.401747ms)
✔ type-ahead never answers the question: a paste, keys typed before it is drawn, keys inside askMs (780.310053ms)
✔ quitting at the question answers No and sends nothing, armed or not (201.81891ms)
✔ a timer tick reads nothing under an overlay, never answers the question, and keeps a resolved status (123.909702ms)
✔ a long question is cut inside the question; the action, target, choice and prompt stay (Dewey B1) (133.107074ms)
✔ a decide box too big for the terminal says so, and every key answers it No, y included (Dewey B1, round 3) (850.339399ms)
✔ at every size the decide box shows each line y depends on, or says it is hidden (8163.771442ms)
✔ outcome unknown: the CLI's sentence, no retry, then the trail or a re-read (145.598686ms)
✔ refused and failed reads keep the last list, marked stale; a refused decide says refused (113.703533ms)
✔ help or a detail box cut to fit keeps its last line, Esc included (Dewey) (56.759567ms)
✔ keys: views, moving, trail of a selection, the command line, help and quit (235.135475ms)
✔ one option: the status line says Press 1, not 1-1 (96.922402ms)
✔ no business: the app says so and :business picks one (50.527293ms)
✔ mosaic with no argument: exit 3 in an agent run, exit 4 with the usage off a terminal, the app on one (1.828426ms)
✔ scripts/mosaic with no argument reaches the app entry; the seat usage it printed before has not drifted (169.832006ms)
✔ strings to keep exactly live once, in the decide flow and the transport; the app does not restate them (0.43933ms)
✔ decide with --note still asks; a No sends nothing (50.961813ms)
✔ the app's business comes from a live bus host only (0.966251ms)
✔ runApp leaves the terminal as it found it on q, end of input, SIGTERM, SIGINT, SIGHUP and an error, the first frame's included (6.220367ms)
✔ draw is pure: same state, same frame (0.720382ms)
✔ inbox lists only decisions routed to the human, with what approving authorizes and how to decide (146.706708ms)
✔ decide resolves by id prefix with --yes, and the trail shows it in broker order with the task to follow (123.669075ms)
✔ decide refuses without a terminal or --yes, on an unknown option and on a short reference (126.665951ms)
✔ decide prints a declining choice as declining (148.713213ms)
✔ an unknown outcome is reported once and never resent (233.970035ms)
✔ a decision closed before the answer arrives exits 2 and points at its trail (101.452877ms)
✔ a prefix that matches two open decisions exits 2 and resolves neither (233.65173ms)
✔ without --business a command uses the live host's business, and a stale host.json is not a host (126.508105ms)
✔ every human command refuses inside an agent run before it touches the bus (370.215858ms)
✔ usage errors exit 4; no business and no host is a usage error (150.26038ms)
✔ agents and tasks print through the broker (149.72206ms)
✔ notify.json: missing, loose, malformed and extra keys refuse; a binding or null passes (1.213593ms)
✔ bootConfig builds the broker's boot message for one business, with no trackers key when no project names one (54.615125ms)
✔ trackers come from the tracker.* variables of the one project that names a tracker project (84.82464ms)
✔ with two projects, the one that sets tracker.project supplies the tracker and the other is no conflict (37.809821ms)
✔ two projects that each name a tracker project refuse, since the boot shape holds one (33.389451ms)
✔ a business without tracker.baseUrl gets no trackers entry (30.400187ms)
✔ an unknown business and a broken system config refuse with exit 3 (62.363086ms)
✔ follow prints an unsolicited message after plain talk returned (202.35268ms)
✔ talk --follow continues after reply and prints a later unsolicited message (180.372138ms)
✔ inbox lists all unread human messages under decisions, does not deliver or read them (3807.006579ms)
✔ follow refuses agent context and bad arguments (166.686405ms)
✔ follow Ctrl-C wakes the poll sleep and removes its handler; transport errors also clean up (110.732733ms)
✔ plain talk leaves the process SIGINT handlers unchanged (128.707076ms)
✔ empty views say so (1.092105ms)
✔ the trail keeps the broker's order and names a decision's task without its rows (1.355293ms)
✔ tasks print the tracker fields the snapshot carries (0.23016ms)
✔ the review loop: the coder pushes and asks, the reviewer fetches and approves, and the task's trail holds each step (813.727274ms)
✔ refusals: no action, non-fast-forward, an unknown commit or request, and a push for another task moves only that task's ref (1068.998298ms)
✔ the size cap refuses a push before any byte (307.581306ms)
✔ a fetch over the cap refuses before any byte reaches the reviewer (526.159414ms)
✔ the socket refuses a request with no capability, an unknown one, and a bad request line (808.510961ms)
✔ a rigged clone runs nothing: hooks, fsmonitor, a filter, a gitlink and a symlinked .git/config leave no marker (917.812246ms)
✔ an identity with no role, or of another business, refuses not-a-role and moves no ref (390.671868ms)
✔ a review of a project the business no longer has refuses unknown-project (353.180655ms)
✔ past maxActive connections the socket refuses git-busy, and a hung-up connection frees its slot (422.756658ms)
✔ close() answers host-closing to a connection still sending its request line (326.73735ms)
✔ a bundle that trickles in refuses body-timeout at its deadline and frees its slot (736.717368ms)
✔ a reviewer gone before its bundle was sent is filed fetch-aborted, not as the host's fault (575.278513ms)
✔ a reviewer that hangs up the moment it has the whole bundle was served, not aborted (633.923793ms)
✔ send: a close after every byte left is served; one that fails a queued write is fetch-aborted (42.409841ms)
✔ a bundle with no bytes for bodyIdle refuses body-timeout long before its deadline (561.491584ms)
✔ send: a close once the loop is past its last chunk is served, and a failed write there is fetch-aborted (23.840468ms)
✔ letGo waits for an answer to leave for at most its cap, then destroys the socket (301.272378ms)
✔ a record that fails and can't be undone refuses rollback-failed, which the host logs (428.304193ms)
✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (998.865395ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (374.516765ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (281.173685ms)
✔ two bus starts racing for one data root leave one host running; the other refuses that a host already runs (565.934927ms)
✔ a host takes over a host.lock its dead host left, and puts back a live claim that replaced it meanwhile (1.202011ms)
✔ a host.lock that goes between the check and the read is tried again; one that can't be parsed still refuses as unreadable (0.716868ms)
✔ a live host's lock stays, however old the file is (0.608399ms)
✔ a host.lock left by a host killed with SIGKILL doesn't stop the next bus start (809.328797ms)
✔ while a host boots, a reader sees no host: the human commands still ask for --business, stop and status find none (192.915856ms)
✔ a host started before host.lock existed, holding only host.json, still refuses a second start, which leaves no lock (26.84768ms)
✔ a broker fork that throws leaves no host.lock and no host.json (35.100988ms)
✔ a broker send that throws leaves no host.lock and no host.json (28.409322ms)
✔ a broker that misses its boot wait leaves no host.lock and no host.json (30.858023ms)
✔ a notifier fork that throws stops the broker and leaves no host.lock and no host.json (320.27954ms)
✔ a notifier send that throws stops the broker and leaves no host.lock and no host.json (397.072047ms)
✔ a boot reply with no reader for the business refuses with exit 3 naming it, before the notifier starts, and leaves no host.lock and no live broker (221.27502ms)
✔ a boot reply with no reader for the business refuses with exit 3 naming it, with no notifier, and leaves no host.lock and no live broker (171.260349ms)
✔ a host.json that can't be written stops both children and leaves no host.lock (250.70775ms)
✔ an error event on the broker before it replies fails the start at once, and leaves no host.lock and no live child (29.706146ms)
✔ an error event on the notifier before it replies fails the start at once, and leaves no host.lock and no live child (132.532792ms)
✔ an error event on the broker while the notifier starts fails the start once the notifier replies (260.798451ms)
✔ an error event on the broker once the host is up stops the host with exit 1, and leaves no host.lock and no host.json (273.982176ms)
✔ an error event on the notifier once the host is up stops the host with exit 1, and leaves no host.lock and no host.json (347.41548ms)
✔ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (1166.717029ms)
✔ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (283.575815ms)
✔ a broker reply with no request waiting breaks the channel and the host exits 1 (156.459698ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (202.403737ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (173.869867ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (133.849387ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (185.654592ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (129.934839ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (184.93604ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (26.553458ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.76454ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (243.624383ms)
✔ bus start refuses with exit 3 without a notifier config (112.575124ms)
✔ bus start runs until bus stop; status reports it while it runs (696.629299ms)
✔ bus-service.sh renders the unit and installs it into a given directory (52.125859ms)
✔ bus-service.sh pins the claude binary, refuses one the unit can't carry, and renders without one (64.322715ms)
✔ bus-service.sh refuses a directory pin and keeps a symlink default unresolved (12.925305ms)
✔ bus-service.sh refuses a default claude without the execute bit, or in a PATH dir with a space (8.242489ms)
✔ bus start --pm: the PM runs under its own PID namespace, registered, with a manifest (1422.452348ms)
✔ the PM launches a coder through its launch tool; the coder answers; refusals name their code (831.166865ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or kept and logged (2070.620887ms)
✔ a project clone that can't be made refuses checkout-failed, from --pm and from a session, with no run and no clone left (226.923969ms)
✔ a runner that stops at once ends its launch with the runner's reason (258.015704ms)
✔ a Claude Code launch with no session credential refuses before it starts (173.081929ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (239.8123ms)
✔ a runner killed from the host ends its launch as killed, not failed (500.795713ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (188.278614ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1490.522094ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (769.698253ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3666.119647ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (115.483821ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (138.826398ms)
✔ a launch client that never closes its side doesn't hold the host's close (136.879307ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1259.657607ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.5118ms)
✔ zoned uses the IANA zone across DST (23.581422ms)
✔ each open blocking decision is DM'd once, across polls and a restart; non-blocking ones are not (159.146231ms)
✔ two blocking decisions get two DMs with different nonces (131.464135ms)
✔ the digest nonce differs per business and per day and fits Discord's 25 characters (0.298942ms)
✔ a failed DM is journaled, backs off, and is retried until it lands (117.099916ms)
✔ five definite refusals stop a DM: one gave-up line, one log line, and a restart keeps the count (147.114671ms)
✔ 429s, 5xx-style unknowns and refusals without a status never count toward the limit (238.247497ms)
✔ a crash between the fifth refusal and its gave-up line: the next poll appends it and sends nothing (106.064881ms)
✔ polled every POLL_MS against a permanent 403, a DM is sent at 0, 30, 60, 90 and 120 min and gives up only then (297.624306ms)
✔ a restart after the second refusal does not send before that refusal's 30 min are up (412.480747ms)
✔ the digest goes at 08:00 Chicago once a day, with blocking ones marked as DM'd (178.263699ms)
✔ a late start with no digest for the day sends one at once; an empty inbox gets one line (156.049552ms)
✔ an inbox read failure is logged and the next poll retries (0.668197ms)
✔ no Discord id reaches the journal or the log (114.311551ms)
✔ the journal: a torn tail is copied out and truncated, so an append after it reopens cleanly (26.071713ms)
✔ the journal: a crash between the copy and the truncate leaves a tail the next open repairs (46.834765ms)
✔ the journal: a whole file that is one torn line truncates to empty (26.519066ms)
✔ the journal: a malformed complete line refuses and leaves the file and any torn tail alone (2.413521ms)
✔ the journal: a loose file mode, a loose directory or a symlinked journal refuses (0.635198ms)
✔ the journal: a line with a wrong type refuses with exit 3 and names the field (1.83531ms)
✔ the journal: a symlinked directory refuses and says it is a link (0.319517ms)
✔ the journal: a dangling directory link, a parent that is a file and a journal that is a directory each refuse with exit 3 (0.450939ms)
✔ the journal: an append after the file was swapped for a symlink refuses and writes nothing through it (0.341671ms)
✔ the journal: a directory it cannot write or create refuses with exit 3 and names the path (0.428901ms)
✔ digest content stays within Discord's 2000 characters (0.254687ms)
✔ runLoop never overlaps ticks and stops after the one in flight (110.529603ms)
✔ shared copy: npm ci, pushed reachability, readonly/existing copy, webui delegation (520.294942ms)
✔ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (433.354646ms)
✔ bus unit copy/pm pins, install refuses all busy states and failed reads, drop-in refusal (518.216033ms)
✔ missing package manifest refuses before npm; npm failure removes the unpublished temp copy (328.795943ms)
✔ real pinned install loads bus and Console; same-copy mosaic talk passes proof, other trees refuse (3880.414803ms)
✔ bus status reads effective copy/pm/drop-ins without writes; check refuses an overridden ExecStart (464.189748ms)
✔ drop-ins in either override field and malformed metadata refuse; uninstall also checks --no-reload (191.922745ms)
✔ install never shows a template name on systemd 261; template drop-ins still refuse (176.006674ms)
✔ unlisted instance drop-in is found in another unit lookup directory; path discovery errors refuse (175.270875ms)
✔ talk --tester sends a [mos test] message as tester from inside an agent and prints the role's reply (166.198491ms)
✔ talk --tester refuses text without the [mos test] prefix before any call (104.846009ms)
✔ the read verbs take --tester inside an agent, and the trail shows the tester as the sender (119.169565ms)
✔ decide, stop and launches take no --tester (134.289353ms)
✔ the tester transport runs tester-cli.mjs, and the tester's refusals exit 3 (0.488183ms)
✔ with no stand-in transport, --tester runs tester-cli.mjs on the data root's socket (0.982419ms)
task.close {} answered: invalid-request; fake saw 18 requests, first GET /info 200, GET /projects/1 200, GET /projects/1/views 200
task.close on a missing task answered: task-not-found; it made GET /tasks/999 404
✔ bootConfig trackers reach the S3 adapter in the real broker child, which goes ready against a fake Vikunja (420.58263ms)
✔ the transport writes {business, verb, args} to the child and reads its JSON (57.002813ms)
✔ a bus code on stderr becomes the exit code; garbage and timeouts are outcome problems (2163.983828ms)
✔ busExit and refuseInsideAgent (0.470915ms)
✔ talk sends a REQUEST, prints and reads everything that arrives, and stops at the reply (224.790556ms)
✔ talk --wait 0 only sends; no reply within --wait exits 1 and says where it will show (1127.890241ms)
✔ a late reply the Console has listed still reaches the next talk (2295.120713ms)
✔ talk, stop and launches off/on refuse inside an agent run; bad arguments are usage errors (110.844904ms)
✔ launches off and on go to the broker and change the business's launch state (382.053364ms)
✔ launches list reads sessions.json and marks a stale entry; stop reports it and refuses a non-runner (186.053098ms)
ℹ tests 184
ℹ suites 0
ℹ pass 184
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 17782.645119
@@ -0,0 +1,132 @@
✔ explicit request, Seen, ordinary completion and a new request have distinct attention states (3.417671ms)
✔ attention convention ignores reasoning/quoted examples and permits leading blank lines (0.220224ms)
✔ completed smoke replies and ordinary questions are idle, not human blockers (0.704687ms)
✔ only an explicit first-line input request makes a finished reply waiting (0.144883ms)
✔ tool activity, user text, errors and unfinished turns override attention text (0.151649ms)
✔ STOP access failure is unknown, not absence, under a non-root identity (33.000725ms)
✔ connector Task never inherits Discord routing envelopes; ordinary Task still uses user text (2.491494ms)
✔ connector discovery keeps only safe identity; rejects modes, mismatches, links and traversal (1.23663ms)
✔ canonical owner identity and STOP are independent; no tmux fallback or forged registration (5.677273ms)
✔ connector reply refusal precedes forged live tmux registration; ordinary agent still sends (0.538004ms)
✔ server rescans connector discovery and refuses HTTP reply without transport (31.65828ms)
✔ connector session links and linked directories are not read (1.111109ms)
✔ newer live matching launch marks old activity, preserves history/attention/attribution, then clears on new activity (3.244893ms)
✔ CLI print uses the relaunch notice instead of old current preview (55.140787ms)
✔ connector owner and fixed task never inherit a native relaunch notice (2.340271ms)
✔ equality, stale/unknown/offline, mismatched registration and unknown activity do not assert relaunch (1.001128ms)
✔ loadConfig: missing file throws ConfigError (1.330632ms)
✔ loadConfig: invalid JSON throws ConfigError (0.255681ms)
✔ loadConfig: missing dataRoot throws ConfigError (0.190563ms)
✔ loadConfig: relative dataRoot throws ConfigError (0.187299ms)
✔ loadConfig: valid config returns dataRoot (0.572187ms)
✔ findNewestSession: picks the newest by mtime among two files (0.407643ms)
✔ findNewestSession: finds files in nested subdirectories (0.266961ms)
✔ findNewestSession: returns null for a missing dir (0.118198ms)
✔ readSession: extracts fields, collapses/truncates text, counts a truncated final line (0.582939ms)
✔ readSession: model and provider follow the latest model_change entry or assistant turn; null when the log names neither; scanAgent carries them (1.109909ms)
✔ readSession: lastError carries the assistant errorMessage only when the last assistant turn errored (0.444562ms)
✔ findNewestSession/scan: never read sibling auth or secrets next to a sessions dir (0.994903ms)
✔ deriveState: full state table (0.15578ms)
✔ rule: newest entry is an assistant message with a tool call, after a question-looking text, is working (0.279127ms)
✔ rule: newest entry is a tool result with no assistant text after it is working (0.275705ms)
✔ rule: a finished ordinary turn is idle, even if it says your move (0.246894ms)
✔ task: the first user message of the session, from text blocks (0.238531ms)
✔ task: a plain-string user content is accepted, whitespace collapsed and long text capped (0.252591ms)
✔ task: no user message in the log means null (shown as unknown), never a guess (0.245015ms)
✔ workspace: the live tmux pane path wins; the session cwd is the fallback; neither means null (0.350079ms)
✔ activeProject: basename of the nearest .git directory or .git file above the workspace; none means null (0.494508ms)
✔ scan: the written record carries task, workspace and activeProject (0.481075ms)
✔ registration: overrides task, project and workspace; every source says registration; registered carries the launch fields; the grouping column is untouched (0.527821ms)
✔ registration: empty task and null project/workspace leave the derived values in place; registered is still non-null (0.331283ms)
✔ registration: a record whose pid is gone is stale; derived values win, sources say derived, registered stays with alive false; a pid the probe cannot decide is not stale; pidAlive itself (0.88035ms)
✔ registration: no registration leaves the Gate A fields exactly as before, and registered is null (0.377698ms)
✔ loadRegistrations: a missing seatsDir gives empty lists (0.150921ms)
✔ loadRegistrations: one good record, one malformed JSON, one with an unknown field; a stray file under seatsDir is ignored (0.677704ms)
✔ matchRegistration: matches by sessionsDir, and by realpath through a symlink; sessionsDir null never matches; same seat name with a different sessionsDir does not match (fleet vs repo darkwing) (0.320272ms)
✔ scan: writes the registration override to disk; index.json carries registered and registrationErrors (1.131524ms)
✔ scan: a relative seatsDir throws ConfigError; an omitted seatsDir behaves as before (0.22617ms)
✔ scanAgent: waitingOnYou is true for waiting/error and false otherwise (0.429775ms)
✔ scanAgent: ageSeconds is computed from the injected now (0.250388ms)
✔ scanAgent: sessionFile null and state idle when sessions dir is empty but alive (0.146519ms)
✔ discoverRepoAgents: finds agents with a sessions dir, skips those without, sorted by name (0.307596ms)
✔ discoverFleetAgents: finds agents with a sessions dir, sorted by name, fleet tmux fields (0.340632ms)
✔ scan: writes per-agent files and index.json, rerun overwrites, no leftover tmp files (0.770853ms)
✔ scan: relative boardDir throws ConfigError (0.087044ms)
✔ CLI: scan with assume-alive liveness exits 0, prints board summary, writes board files (54.127138ms)
✔ CLI: missing config exits 2 with a refused: message (52.013572ms)
✔ CLI: unknown command exits 2 (46.137913ms)
✔ CLI: unknown --liveness value exits 2 (45.905683ms)
✔ panesRunPi: true when any trimmed line equals 'pi' (0.201795ms)
✔ panesRunPi: false for bash-only, claude, empty, or node-pi-style lines (0.075815ms)
✔ tmuxIsAlive: a pane running pi is alive (0.163529ms)
✔ tmuxIsAlive: session exists but pi has exited is not alive (0.065768ms)
✔ tmuxIsAlive: no such tmux session is not alive (0.053341ms)
✔ tmuxIsAlive: tmux could not be run at all is unknown (null), never assumed alive (0.060002ms)
✔ tmuxIsAlive: passes -L <socket> only when a socket is given (0.086169ms)
✔ parsePanes: one pane per line, command and optional tab-separated path (0.072756ms)
✔ tmuxInspect: reports the path of the pane running pi, not of a shell pane (0.073095ms)
✔ tmuxInspect: no pi pane, no session, or no tmux gives no workspace and the matching liveness (0.085404ms)
✔ loadSeen: missing file returns {} (0.129565ms)
✔ loadSeen: invalid JSON throws ConfigError (0.171524ms)
✔ loadSeen: a JSON array throws ConfigError (0.141111ms)
✔ loadSeen: a non-string value throws ConfigError (0.154229ms)
✔ markSeen: seen true adds the key and writes seen.json mode 0600, no leftover tmp files (0.297293ms)
✔ markSeen: seen false deletes the key (0.252026ms)
✔ markSeen: missing, empty, or non-string fields throw ConfigError (0.214839ms)
✔ markSeen: project containing '/' throws ConfigError (0.120645ms)
✔ markSeen: non-boolean seen throws ConfigError (0.112096ms)
✔ scanAgent: a seen mark matching the waiting session's lastTimestamp clears waitingOnYou (0.269598ms)
✔ scanAgent: a stale mark (agent wrote something newer) is not seen and waitingOnYou is true (0.221798ms)
✔ scanAgent: a working session with a matching mark is not seen (marks only apply to waiting/error) (0.287724ms)
✔ scanAgent: an error-state session with a matching mark is seen (0.355123ms)
✔ scan: index.seen and waitingOnYou reflect seen.json, which scan never rewrites or deletes (0.597152ms)
✔ scan: a corrupt seen.json makes scan throw ConfigError (fail closed) (0.186846ms)
✔ taskSetBy: a registered task carries the record's setter; a record without the field (pre-#1511) reads unknown; the value is not copied into registered (0.615716ms)
✔ taskSetBy: null whenever the task shown is not the registered one: no registration, an empty registered task, a stale registration; the field is always present (0.54307ms)
✔ taskSetBy: scan() reads the field from disk through the seat package (bounded there), writes it to the per-agent record and index, and an invalid on-disk value is a registrationError, never a row value (1.262865ms)
✔ isLoopbackHost: recognizes loopback hosts (1.185952ms)
✔ isLoopbackHost: rejects non-loopback hosts (4.160052ms)
✔ startServer: refuses a non-loopback host with ConfigError, never opens a socket (2.855988ms)
✔ startServer: serves page, healthz, and a rescanning /api/board (31.548717ms)
✔ startServer: a seatsDir registration overrides the row and index.registered reflects it (5.328323ms)
✔ startServer: /api/board returns 500 JSON with an error field when scan throws (2.169779ms)
✔ CLI: serve refuses a non-loopback host with exit 2 and a refused: message (51.556315ms)
✔ CLI: serve rejects a non-numeric --port with exit 2 (49.534578ms)
✔ CLI: scan still works after the async cli refactor (50.137137ms)
✔ CLI: live serve prints its URL and answers /healthz (59.35052ms)
✔ page.html: esc() escapes every HTML-significant character (0.634985ms)
✔ POST /api/seen marks a row; GET /api/board still shows it seen; seen:false clears it (7.838909ms)
✔ POST /api/seen without a JSON content-type returns 400 and does not write a mark (2.870656ms)
✔ POST /api/seen with invalid JSON returns 400 (1.442813ms)
✔ POST /api/seen with a body over 4096 bytes returns 400 (or resets the connection) and writes no mark (1.851864ms)
✔ POST /api/seen with a missing agent returns 400 (1.217707ms)
✔ POST /api/board returns 405; PUT /api/seen returns 405 (1.613282ms)
✔ CLI: scan --print marks a seen row with 's' and the summary line ends with 'N seen)' (51.556139ms)
✔ page.html: seenControl() escapes rec.project/agent/lastActivity, and the POST uses a JSON content-type (0.299349ms)
✔ page.html: has a collapsed Seen section that lists seen rows with the shared row builder (0.258056ms)
✔ page.html: each project has a Hide seen checkbox (default on) beside Hide offline, with a hidden-count note (0.153578ms)
✔ page.html: a project header reads "N of N" only while a checkbox hides rows (0.173093ms)
✔ page.html: every row shows Task and Active project, derived or the word unknown, with the workspace in the detail (0.292182ms)
✔ page.html: task and active project cells show their source via sourceTag(); the detail has a Registered row via registeredText(); SOURCE_LABEL maps registration to registered; every dynamic value in sourceTag/fromSource/registeredText is escaped (0.549533ms)
✔ POST /api/reply: runs agent-send.sh with -s from the registration, -S <host>:control-board, -m text plus the fixed trailer, no -L on the default socket, MOSAIC_TMUX_SOCKET stripped; answers delivered with the exit code and both streams (25.126018ms)
✔ POST /api/reply: a registration with a tmux socket adds -L <socket> (24.544941ms)
✔ POST /api/reply: a non-zero tool exit is a 200 with delivered false, the exit code and the stderr verbatim (25.348842ms)
✔ POST /api/reply: refusals before the tool runs: empty or blank or long text 400, unknown row 404, no registration 409, stale registration 409, no tmux session 409, bad JSON 400; the tool is never called (13.690637ms)
✔ POST /api/reply: a missing agent-send.sh is a 500 with the path in the error, not a crash (4.539337ms)
✔ replyToRow: DEFAULT_AGENT_SEND is the repository's tools/tmux/agent-send.sh and it is executable (0.138756ms)
✔ page.html: the reply box appears only where canReply() holds (live registration with a tmux session), the detail has a Reply row, the submit posts JSON to /api/reply, receipts and drafts survive a refresh, and every receipt value is escaped (0.564989ms)
✔ startServer: /api/board carries taskSetBy from a live registration and null for the derived rows (2.198245ms)
✔ page.html: the task cell and detail show who set a registered task via setByTag()/setByText(), both escaped, only from rec.taskSetBy; the reply gate does not read it (0.278277ms)
✔ Host/Origin guard: GET /api/board and POST /api/reply refuse a foreign Host, a wrong port and a cross-origin Origin with 403 JSON, before any scan or send, and never send CORS headers (7.583638ms)
✔ Host/Origin guard: loopback names on this port are accepted, with or without a same-origin Origin (28.805394ms)
✔ conversation routes (F16): a foreign Host, a wrong port and a cross-origin Origin get 403 before the reader runs, with no CORS headers (5.456491ms)
✔ every refusal code the reader can raise has an HTTP status (0.940159ms)
✔ conversation routes: catalogue, first page, next page and follow over HTTP; refusals map to 4xx with their code; nothing is written (45.971489ms)
ℹ tests 124
ℹ suites 0
ℹ pass 124
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 595.656309
@@ -0,0 +1,190 @@
✔ W1: two processes acquire the same pair at once; exactly one claim (216.009323ms)
✔ W1: two writers publish the same revision at once: one wins, the other gets null, the winner's record stays (30.359191ms)
✔ W1: a revision name appears only after its bytes are synced; before that, only a temp file exists (18.036313ms)
✔ W2: acquire while a claim is reserved or active refuses already-active (355.009673ms)
✔ W3: acquire while stopping, uncertain, or stopped without proof refuses unsafe-replacement (361.978814ms)
✔ W4: same session with another seat tuple, and the reverse, both refuse; a loser on the seat key closes it no-unit (243.643924ms)
✔ W4: a hard link of one session under another seat is the same session: the second controller refuses already-active and launches nothing (187.824896ms)
✔ W4: a copy of one session under another seat is the same session: the second controller refuses already-active and launches nothing (196.408837ms)
✔ W4: a session header ID that changes after construction refuses target; nothing is claimed or launched (2.53246ms)
✔ W5: SIGKILL between every publication barrier of acquire and transition; restart never finds two holders or a lost claim (9730.109129ms)
✔ W5: SIGKILL between every publication barrier of release; restart finishes or holds the release (31304.844869ms)
✔ W6: controller killed mid-turn while the engine lives; restart is uncertain, no launch, prompts refuse (252.086685ms)
✔ W12: a live owner paused with SIGSTOP; a second controller refuses already-active and changes nothing (137.488089ms)
✔ W13: crash after the engine spawns, before active; restart finds the live unit: uncertain, no second spawn, force stop only (407.027093ms)
✔ W14: crash after reservation, before the spawn marker: stopped with a no-unit observation; the pair is free (269.191593ms)
✔ W20: crash after the spawn marker, scope collected; uncertain in both runs, the marker is copied, no launch until a boot proof (343.202723ms)
✔ W15: crash between the two keys during release; restart finishes it under the same claim ID (115.427444ms)
✔ W7: recorded boot ID differs on the same machine: stopped with a boot proof; open tool calls become uncertain (179.52771ms)
✔ W8: resume after a proven stop with the same pins: new claim ID, generation +1, same conversation, branch and leaf (255.566592ms)
✔ W9: resume with a changed binary, argv digest, branch or leaf is refused and the claim is unchanged (875.517296ms)
✔ W11: the controller writes no session file; only the fake engine's own appends appear (190.420711ms)
✔ W16: a highest revision that won't parse holds the pair uncertain; the older stopped revision is not reused (95.640143ms)
✔ W17: a claim root copied from another host refuses foreign-host and promotes nothing (75.407671ms)
✔ G1: a session path or claim root under .pi/state, ~/.claude, the data root or a registration refuses at construction (3.379307ms)
✔ G2: a symlink inside the fixture root to a live session file is refused by the real-path check (1.054691ms)
✔ G3: a fixture path swapped for a live path after construction is refused at bind (1.791714ms)
✔ no shim from this file's tests is left running for the after hook (4.822464ms)
✔ K1: force stop kills a tool child that called setsid; stopped with a verified proof (578.199347ms)
✔ K2: K1 on the process-group fallback ends uncertain, never stopped (412.261471ms)
✔ K3: SIGTERM acknowledged while a member lives: stopping until the kill phase, never stopped from TERM (573.247238ms)
✔ K4: two engines; force stop one; the other survives by independent observation (2757.09308ms)
✔ K5: a stop during a tool call leaves the effect uncertain, and it is shown (474.029517ms)
✔ K12: a member forking in a loop: the freeze stops it, enumeration is complete, populated 0 after cgroup.kill (585.388173ms)
✔ K13: a member writing its pid into another cgroup is refused by the namespace; the kill is complete (480.241392ms)
✔ K15: the shim gone, engine/cgroup.events unreadable, or the engine cgroup missing: evidence unavailable, not empty; uncertain (5212.619511ms)
✔ K10: controller killed between the TERM and kill phases: restart checks the invocation ID and re-runs from TERM for the same stop (807.208058ms)
✔ K11: controller killed after the confirmation is recorded, before TERM: restart checks the invocation ID and re-runs from TERM for the same stop (573.099502ms)
✔ K14: a unit with the recorded name but another invocation ID: evidence unavailable, no signals, uncertain (436.210463ms)
✔ K6: recover without proof, without confirmation, or with changed pins is refused (759.14896ms)
✔ K7: recover after proof, then launch: new claim and execution, generation +1, same leaf; the cancelled prompt is not replayed (372.813687ms)
✔ K8: an engine that loads another leaf on resume is refused before admission; it stays claimed until a proven stop (475.197048ms)
✔ K9: an interrupt that never settles stays uncertain; force stop stays available; takeover is refused while fenced (3324.686077ms)
✔ K16: a claim from another machine ID refuses foreign-host; no boot proof is issued (45.006827ms)
✔ K17: two launcher calls with one eligibility record: one launch, the other refuses, no second engine (350.750374ms)
✔ K18: the leaf changes after eligibility: launch refused; the reservation stays until released with proof (380.172572ms)
✔ K19: a scope launched with only the engine environment still reaches the user manager; the engine sees no other names (93.763149ms)
✔ R1: after a proven force stop the controller releases the scope; the shim and the unit are gone (432.780974ms)
✔ R2: close releases the scope of a binding proven stopped, once, when the stop's own release hasn't run (489.070168ms)
✔ R3: no release after an unavailable stop or an unverified proof: the scope and its shim stay as evidence (1118.34888ms)
✔ E1: a natural engine exit with no member left: an engine-exit stop, stopped on a proof naming the engine, and the scope released (427.416694ms)
✔ E2: an engine exit with a tool child alive: the stop ends uncertain and nothing is released; a force stop then ends it (2464.180403ms)
✔ E3: an engine exit and a force stop take one escalation slot, in either order (993.423687ms)
✔ E4: a shim that doesn't answer: the engine-exit stop misses its deadline, ends uncertain and frees the slot (869.765028ms)
✔ E5: an engine exit after a force stop ended uncertain starts no engine-exit stop; the force stop stays current (2565.449342ms)
✔ E6: the engine-exit observation refuses a reaped process that isn't the recorded engine: another PID or start ticks (310.195994ms)
✔ R5: the harness finds a running shim and reaps it, and never signals a shim outside a mosaic-chat- scope (Filbert N1 and N2 on #1533) (385.819678ms)
✔ R6: releaseCohort releases nothing while the engine runs, for another invocation ID, or for a cohort without a scope (125.506134ms)
✔ R7: controller killed after the claim is stopped, before the release: the restart releases the scope (2621.748886ms)
✔ R8: controller killed between the two keys' stopped revisions: the restart releases the scope (454.04501ms)
✔ R9: a release that ended unavailable is tried again on a confirmed recover, not a refused one (508.202018ms)
✔ R10: close releases and signals nothing for a stopped binding whose proof no longer verifies (Filbert N3 on #1536) (408.301574ms)
✔ R11: close({ killEngine: true }) after a proven stop sends no signal to the recorded engine PID; a restart releases nothing more (2504.35319ms)
✔ R12: a restart onto a claim stopped on a boot proof releases nothing, though its scope is listed (363.426184ms)
✔ no shim from this file's tests is left running for the after hook (5.832545ms)
✔ S1: `/goal x`, with leading spaces or a tab, refuses text-policy at admission; zero engine bytes (210.371246ms)
✔ S2: every prefix pinned Pi interprets is refused, from the list the code uses; the rest reach the engine exactly (201.001871ms)
✔ S3: `/goal` on the second line is pinned from the source: Pi checks only index 0, so it is admitted and sent exactly (196.034084ms)
✔ S4: a `/` left in the composer is cleared when control transfers and returns; the next submit sends only the new text (265.412173ms)
✔ S5: an observer terminal gets a paste then Enter, as send-message.sh does: not admitted: controller, nothing sent (189.411399ms)
✔ S6: a mediated-shaped registration (no tmux) passed to the board's replyToRow: 409 no tmux session; exec never runs (0.486108ms)
✔ S7: ESC, bracketed-paste markers and U+2028/U+2029 travel as one JSON string; the engine receives the exact text in one record (194.09156ms)
✔ P3: a Pi confirm, select, input or editor dialog is shown disabled with a reason and never answered (297.415403ms)
✔ E1: send, ack, user, toolCall, toolResult, final answer: shown once, no refresh, draft and reading position kept (205.61743ms)
✔ E2: U+2028, U+2029 inside JSON strings and CRLF line ends each parse as one record, on the splitter and through the controller (191.5006ms)
✔ E3: a multipart final, two blocks, null request correlation and duplicate delivery (206.324951ms)
✔ E4: a page read after message_end but before its entry is persisted: marker at the seam, re-read after run-settled, each message once (213.824748ms)
✔ E4: a gap or a new epoch also reconciles; nothing is concatenated across a gap (10.885963ms)
✔ E5: an unknown native event gives no client event; evidence records its type and bytes; the terminal count goes up (218.665112ms)
✔ E6: a tool result delayed across a pause and a reconnect is reconciled without a manual refresh (224.424038ms)
✔ E7: the terminal renders the same stream as the library client, as observer and then as controller, and submits only as controller (259.611745ms)
✔ terminal: engine control characters are made visible; a lost connection refuses submit (211.150317ms)
✔ terminal: outcome unknown is shown as such, with no resend offer, and nothing is resent (0.379796ms)
✔ terminal: text after Enter in the same input chunk starts the next message; it never joins the one submitted (0.305313ms)
✔ terminal: a paste-start marker split right after its ESC still opens the paste; the Enter inside it never submits (0.293052ms)
✔ terminal: Ctrl-T then Enter in one chunk is judged after the takeover, as if typed one key at a time (Filbert F2, #1507) (0.473736ms)
✔ terminal: input held behind Ctrl-T waits for that takeover while an earlier action is still pending (Darkwing T1 on #1522) (30.161384ms)
✔ terminal: a hold inside held input holds again, and once it is drained later input and Ctrl-C still reach the terminal (Darkwing note 1 on #1522) (0.469093ms)
✔ terminal: an action that throws still releases the input held behind it, in order, then rethrows (4.787949ms)
✔ terminal: after an action throws, later input still runs; input() puts the error in the status line (Filbert N1 on #1522) (0.431372ms)
✔ terminal: input() reports an error when it happens, so it never overwrites a later status; held input's promise doesn't carry the holder's error (Filbert N4 on #1522) (0.342669ms)
✔ terminal: invisible and bidi characters are made visible; head, status and notice lines stay one line (0.117106ms)
✔ every record these fixtures produced is a valid CHAT-01 record (E5: no record fails the schema) (217.941588ms)
✔ H1: two takeovers with the same expected generation: one wins, +1; the other refuses generation (251.800911ms)
✔ H2: the old controller's prompt after a takeover commits is refused with zero engine bytes (290.597096ms)
✔ H3: a takeover while a prompt holds the dispatch lock: written under the old actor, or refused; never both (777.468752ms)
✔ H4: self-takeover is refused (196.93365ms)
✔ H9: Interrupt racing a prompt's dispatch: before the write, dispatch-refused and no-turn; after, §3 rules (427.645248ms)
✔ H10: Interrupt and force stop together: one stop chain, force stop supersedes (1042.408695ms)
✔ H10: an overlap during the pause before the abort: no abort, the stop ends uncertain (242.123622ms)
✔ H10: a no-turn Interrupt lifts only its own fence; admission stays closed under force stop, overlap or revocation (612.659374ms)
✔ H11: the controller disconnects mid-turn: work continues, the claim is unchanged, control stays put (274.016216ms)
✔ H12: an exact retry after reconnecting to the same incarnation returns the same receipt; one dispatch (193.003148ms)
✔ H13: a retry with the same request ID and different text is refused (181.932782ms)
✔ H14: late stdout from the old engine after a replacement is dropped by incarnation, counted, never rendered (566.666651ms)
✔ H15: a revoked connection's command is refused; the revocation fence holds (298.719811ms)
✔ H16: a second controller for the same session refuses already-active; the first is untouched (207.528183ms)
✔ H10: a second force stop while the first escalation runs refuses fenced; one escalation, and the claim records only the first stop's phases (857.740684ms)
✔ a force stop whose fence throws leaves no escalation flag behind, so the next force stop runs (Darkwing F2, #1507) (379.001341ms)
✔ H17: a confirmation reused, answered from another connection, or used after the stop changed is refused (772.333293ms)
✔ H18: two prompts before any native output: the second refuses busy; one engine write (206.714428ms)
✔ H19: the pipe fails mid-line under a large prompt: delivery-unknown transport-unknown, poisoned, no later write (349.934375ms)
✔ H19: the link itself never writes again after an unknown outcome, whoever calls it (0.589206ms)
✔ H19: the controller dies mid-write of a large line: after restart the outcome is unknown and nothing is resent (663.910582ms)
✔ H20: the line is written but the ack is lost when the controller dies: orphan, outcome unknown, nothing resent (554.094157ms)
✔ H21: a retry of the exact request with the old token after a crash is stale-incarnation; no second write (702.951648ms)
✔ H22: after H21 and a valid recovery, a new request with the new token is admitted (2939.693855ms)
✔ H23: requests pending at a restart are not resent; each shows outcome unknown (643.867159ms)
✔ no shim from this file's tests is left running for the after hook (4.210321ms)
✔ a plain conversation: catalogue row, one page, CHAT-01 records (5.906546ms)
✔ native entries map to blocks: tools, thinking, bash, notices, ids that do not fit (1.620979ms)
✔ F1: a malformed line is an unavailable part at its position, and reading continues (1.652219ms)
✔ F1: a missing parent stops the history with a notice that names the unreadable lines (2.550733ms)
✔ F1: an unreadable fork is never merged into another branch's history (1.422073ms)
✔ F1: a follow stays on its branch when the next entry's parent is unreadable (1.990332ms)
✔ F1: a file whose entries are all unreadable shows a notice per line (0.771271ms)
✔ F2: a truncated trailing line marks the view incomplete, not an error (1.271736ms)
✔ pagination: 100 parts, then the rest; parts concatenate to the whole branch (3.63937ms)
✔ F3: a replaced file (new inode) refuses old cursors with reconcile (5.023988ms)
✔ F4: a same-inode rewrite of the prefix refuses old cursors with reconcile (5.754344ms)
✔ F5: growth between pages keeps the epoch and the page stops at the pinned length (5.569219ms)
✔ F6: unknown, foreign and expired cursors refuse and leave the cursor usable (7.090424ms)
✔ F7: a symlinked file and a symlinked directory component are refused, never opened (8.327628ms)
✔ F8: a file swapped for a symlink after the catalogue is refused (1.79216ms)
✔ F9: registrations never add or redirect a root (1.710142ms)
✔ F10: a header cwd naming another project is refused (4.137791ms)
✔ F11: parentSession renders with a marker and the parent is never opened (0.771949ms)
✔ F12: two leaves: the default leaf is shown and the other branch reads alone (4.237962ms)
✔ F12: a follow refuses when an appended duplicate id changes the branch's earlier parts (2.061748ms)
✔ F12: a second root (Pi's resetLeaf) starts its own branch (1.426623ms)
✔ F13: compaction is a marker in place, then the retained content (0.777181ms)
✔ F14: long strings split into fragments and parts, reassemble exactly, and pages respect the byte cap (517.494328ms)
✔ fragments never cut a surrogate pair and keep an empty string (4.680166ms)
✔ F15: a Claude seat is an unsupported-harness placeholder whose directory is never read (1.423165ms)
✔ unknown conversations, empty files and non-Pi files refuse (2.256213ms)
✔ an unreadable file or root inside the roots is refused per row, not a failed catalogue (1.07633ms)
✔ a seat directory without search permission refuses that root, not the catalogue (1.887198ms)
✔ every page and cursor is a valid CHAT-01 record (785.760594ms)
✔ the engine pin holds for the installed package (1.733838ms)
✔ pinned Pi, sealed and without credentials, answers the controller's commands with the shapes the fake models (273.175995ms)
✔ sealed, pinned Pi ignores a trusted project's .pi resources; --approve past the seal would load them, and checkSeal refuses it (Filbert F2 on #1522) (514.422805ms)
✔ pinned Pi appends thinking_level_change at start when the branch lacks one, so the leaf moves (K8 then fails closed) (263.158646ms)
✔ N25: ordinary Interrupt reconciles; a non-empty queue_update in the window is O5 (481.710196ms)
✔ N1: an extension's follow-up queued after the fence is cleared before any abort; O5, Unknown (416.97659ms)
✔ N1: a follow-up queued before the fence is O5 at once; the Interrupt refuses fenced (223.502198ms)
✔ N2: with abort first, the fake runs the external item (the ordering guard has teeth) (22.106113ms)
✔ N3: the fence lands in preflight, preflight errors, no run: failed, No run, uncertain (344.825536ms)
✔ N4: the ack arrives after the first abort and a run starts: clear and abort again; Interrupted (200.215221ms)
✔ N5: an input handler takes the prompt: ack, no run, delivery-unknown handled-without-run (290.452532ms)
✔ N6: an extension queues between clear_queue and abort: O5 and O6, Unknown (480.807574ms)
✔ N7: clear_queue times out: no abort, nativeQueue unknown, force stop still ends it (1905.260715ms)
✔ N7: clear_queue answers an error: no abort, nativeQueue unknown, the link not poisoned (176.209313ms)
✔ N8: an extension prompt starts a run during Mosaic preflight; the losing settle is O3 (282.8431ms)
✔ N9: a run that started before the fence and ends aborted: failed interrupted, Interrupted (196.959749ms)
✔ N9: decision 34: a run that ends aborted with no stop in progress: aborted-without-stop, uncertain, outcome unknown (246.465366ms)
✔ N9: an aborted that lands after the fence but before any abort is written: aborted-without-stop, Unknown (403.602011ms)
✔ N10: fake conformance (30.943445ms)
✔ N11: the run fails before any user message_start: delivery-unknown ack-without-start, never failed (434.629366ms)
✔ N12: input that starts a run after the final empty clear is O1 and not part of the stop's proof (275.358804ms)
✔ N13: agent_start with no slot held is O1; a later prompt refuses with zero engine bytes (286.275968ms)
✔ N14: the run completes while clear_queue is in flight: finished, Completed first, uncertain (412.942198ms)
✔ N14: the run completes after the abort is written, before Pi applies it: finished, never relabelled (374.691692ms)
✔ N15: the fence lands in preflight, then an input handler takes it: handled-without-run, No run (375.167192ms)
✔ N16: Interrupt with no slot and no run refuses no-turn: no stop, no bytes, admission open (205.773346ms)
✔ N17: the run fails on its own during the exchange: failed, Failed on its own (349.031789ms)
✔ N18: no final assistant message_end, or a lost line: working stays working; before working, transport-unknown (744.663117ms)
✔ N19: a losing extension prompt settles inside the Mosaic run before its user message: O3, run-overlap (548.09603ms)
✔ N20: an extension triggerTurn during Mosaic preflight starts first; while streaming it queues with no signal (517.319445ms)
✔ N21: a losing settle after the receipt settled finished is O2; the receipt stays finished (232.265309ms)
✔ N22: an agent-level custom message is dropped by the clear with no signal; evidence names the seal (217.027931ms)
✔ N23: a nextTurn message survives clear and abort and attaches to the next prompt, with no signal (170.785524ms)
✔ N24: the seal is an allow-list: --extension, a missing --no-* flag, a second --mode or --session, a session or output flag, or a stray word refuses unsealed-engine; no engine starts (194.874698ms)
✔ N24b: the seal covers the engine command and environment: config can't name either, the env is built from names, and a mutated command is refused at bind (207.198665ms)
ℹ tests 182
ℹ suites 0
ℹ pass 182
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 47167.950215
@@ -0,0 +1,186 @@
✔ approvals: a request is validated before anything is posted; the rendering shows names and never ids (3.037427ms)
✔ approvals: the ledger is appended and folded into open requests with bind and approval states (1.655907ms)
✔ approvals: a reply approves only when it points at a request, says exactly approve, and comes from a listed approver once (0.542252ms)
✔ approvals: a button approves only on its own request message with the matching custom id (0.466201ms)
✔ approvals flow: a turn that opened a request posts the message with the button, records it, binds it, and both approvers approve (17.20143ms)
✔ approvals flow: a non-approver, a repeat, a wrong custom id and a service refusal each get their fixed line and a drop entry (10.174965ms)
✔ approvals flow: an invalid request from the model, a refused post, and no api client are recorded and post nothing (8.030565ms)
✔ approvals flow: start retries a bind and an approval left as unknown, under their original keys (1.936919ms)
✔ authorize: open channel, listed user (2.067356ms)
✔ authorize: wrong guild (0.185031ms)
✔ authorize: no guild (DM) (0.159657ms)
✔ authorize: unlisted channel (0.189047ms)
✔ authorize: unknown channel, no info (0.264355ms)
✔ authorize: thread of listed parent (0.172357ms)
✔ authorize: thread of unlisted parent (0.181215ms)
✔ authorize: text channel that is not a thread and not listed (0.132773ms)
✔ authorize: unlisted user (0.204606ms)
✔ authorize: no author (0.261239ms)
✔ authorize: bot author (listed id, bot flag) (0.239018ms)
✔ authorize: system author (0.122547ms)
✔ authorize: the bot itself (0.14553ms)
✔ authorize: webhook (0.091682ms)
✔ authorize: mention channel without mention (0.699948ms)
✔ authorize: mention channel with bot mention (0.142721ms)
✔ authorize: mention channel with @everyone only (0.100848ms)
✔ authorize: mention channel mentioning someone else (0.078014ms)
✔ authorize: mention channel, content says @bot but mentions empty (0.112235ms)
✔ authorize: private thread under mention channel, mentioned (0.32585ms)
✔ authorize: private thread under mention channel, not mentioned (0.085407ms)
✔ authorize: thread in another guild per channel info (0.078034ms)
✔ authorize: not an object (0.066762ms)
✔ authorize: no id (0.067433ms)
✔ authorize: oversize content is accepted and flagged (0.072211ms)
✔ authorize: exactly the limit is not oversize (0.067605ms)
✔ authorize: a user's channel allowlist drops them outside it, threads count as the parent, others are unaffected (0.475834ms)
✔ authorize: order puts wrong guild before user, and user before channel (no channel lookup for strangers) (0.144326ms)
✔ binding: a complete binding validates and is frozen (2.62034ms)
✔ binding: unknown key, missing field, wrong type refuse with exit 2 (1.222944ms)
✔ binding: empty allowlists refuse (0.443606ms)
✔ binding: a user's channel allowlist must be non-empty, listed and unique; absent means every listed channel (1.194218ms)
✔ reloadDiff: reloadable keys are summarised by id; every fixed key refuses with exit 2 (1.678098ms)
✔ binding: dmRecipient is optional, a snowflake, one of the listed users, and a fixed key (1.180898ms)
✔ binding: file must be 0600, regular, not a symlink (1.901971ms)
✔ binding: token file mode, symlink, emptiness and shape are checked; token never appears in errors (1.100716ms)
✔ cli: check refuses a non-0600 token file with exit 2 before any network use (84.373111ms)
✔ context files: absolute paths, traversal, symlinks and out-of-repo targets refuse; in-repo files resolve (1.942026ms)
✔ cli: check refuses a missing context file and a missing binding with exit 2; usage is exit 4 (303.458914ms)
✔ cli: reload validates the file first (exit 2), then needs a live owner (exit 1); usage is exit 4 (194.065104ms)
✔ cli: run refuses when STOP is present, before any network use (118.654599ms)
✔ binding: tools is optional, validated strictly, a fixed key for reload, and its roots are resolved against the data root (1.699631ms)
✔ binding: a git key is validated at load and reaches the extension whole, and only on a writable root (1.126646ms)
✔ delivery: an accepted message is in the inbox before the turn, the reply is chunked with one nonce per chunk, and the turn record is write-once (20.235734ms)
✔ delivery: refused and unknown outcomes are journaled; a later chunk is not sent after a failure (17.564564ms)
✔ delivery: restart with an unknown entry re-sends the same nonce once and reconciles before accepting traffic (1.450289ms)
✔ delivery: an unknown entry older than the dedupe window is marked refused, not re-sent; a still-unknown one refuses start (1.10962ms)
✔ delivery: repeated unknown reconciliations never refresh the dedupe window; the original intent time decides (1.221568ms)
✔ turn: a failed engine turn posts the fixed line, never model output, and writes a failed record (2.400587ms)
✔ turn: a second message during a turn is held by the engine, both get their own reply and record (33.38015ms)
✔ turn: a thread under a listed channel is answered in the thread; an unknown thread is looked up once (2.98189ms)
✔ drop: an unlisted user gets silence and one drop line; no inbox entry, no REST call, no engine call (0.766199ms)
✔ drop: an oversize message is accepted into the inbox, answered with the fixed line and journaled as a drop (0.773583ms)
✔ restart: an inbox with three ids and a replay of the same three produces zero turns (41.45611ms)
✔ stop: STOP present refuses start; STOP written while running refuses new turns and the current one finishes (31.573609ms)
✔ ceiling: the ceiling plus one is refused and journaled; one fixed line per UTC day; a new day accepts again (5.344388ms)
✔ ceiling: a burst arriving while turns are still running cannot queue past the ceiling (3.751677ms)
✔ ceiling: a turn interrupted by a crash still counts after restart; admissions are durable (1.28535ms)
✔ ceiling: the daily notice survives a same-day restart; one delivery attempt in total, even when the first attempt crashed mid-flight (2.914751ms)
✔ duplicate: the same event delivered twice while the thread lookup is held yields one prompt, one admission and one reply (2.259795ms)
✔ journal: no token-shaped string and no model output on the drop path reaches disk (0.453561ms)
✔ receipt: an admitted message gets one eyes reaction on the inbound message; drops and refusals get none; a failed reaction is recorded and does not fail the turn (2.064153ms)
✔ receipt: Discord refusing the reaction leaves the turn intact and records ok false (1.849067ms)
✔ reload: a new user is silent before and answered after; a removed channel goes silent; a lower ceiling applies at once (2.477514ms)
✔ reload: a fixed key refuses with exit 2 and the old binding stays in force (1.950098ms)
✔ tools: with a tools binding the turn record lists every read and its outcome; without one the field is null (3.648009ms)
✔ context: the Discord block names the server, channels and modes, and states the rules from Q15 and Q16 (2.330954ms)
✔ context: with tools the block names the roots, keeps file content as data, and says to state refusals plainly (0.74163ms)
✔ context: a writable root adds the write rules and says a write is real only once Jason commits (1.724703ms)
✔ context: the envelope is one bracketed line then the text; names cannot break the line (1.097838ms)
✔ context: a git root swaps the terminal-commit line for the git verbs, and a vault root adds the id protocol (1.441288ms)
✔ context: assembleContext concatenates files in launcher format and appends the block; sha256 is stable (1.294242ms)
✔ context: splitReply keeps paragraphs together under the limit and splits long ones at lines, spaces, then hard (0.755683ms)
✔ engine: buildPiArgs carries the fixed flags, engine settings, session dir and prompt file (2.560194ms)
✔ engine: with tools, buildPiArgs turns pi's own tools off, loads the extension explicitly and allowlists exactly our three (0.410111ms)
✔ engine: a run with tool turns settles once, on the answer, with every tool call in the result (45.023274ms)
✔ engine: a run that ends on a tool-only turn fails the prompt as empty; a retried run settles on the real end (30.748075ms)
✔ engine: one prompt, one turn, text and usage come back (26.666607ms)
✔ engine: a prompt while streaming is held until pi settles, then sent as its own run, and answered in order (328.986899ms)
✔ engine: a held prompt that times out before pi settles fails on its own and is never sent (238.147874ms)
✔ engine: timeout sends abort and fails only that turn; the process stays (113.466684ms)
✔ engine: tool events from a run that outlived its timeout never land in the next prompt's record (226.246645ms)
✔ engine: a prompt after a turn that timed out before its agent_start waits for pi to settle instead of being refused (125.650247ms)
✔ engine: when pi has not started a timed-out turn by the end of the abort grace, the engine stops pi and fails held prompts (213.977235ms)
✔ engine: a timed-out turn pi starts only after the grace never answers a later prompt (614.378734ms)
✔ engine: late events of a run past its grace, before pi exits, answer nothing and nothing more is sent (early prompt response) (1.546684ms)
✔ engine: late events of a run past its grace, before pi exits, answer nothing and nothing more is sent (late prompt response) (0.587201ms)
✔ engine: a timed-out run pi did start outlives the grace; the next prompt goes out when it ends (428.170145ms)
✔ engine: a malformed JSONL line fails the turn, not the process (22.009196ms)
✔ engine: a turn that ends in error rejects with the error code; process exit fails pending turns (44.672361ms)
✔ gateway: hello -> identify with intents, ready, heartbeat with jitter, ack (2.197549ms)
✔ gateway: missed ack closes the socket and resumes with the last sequence (1.567777ms)
✔ gateway: op 7 reconnect resumes; op 9 non-resumable re-identifies (0.450401ms)
✔ gateway: op 9 resumable resumes (0.462277ms)
✔ gateway: close 4014 is fatal, reports the missing intent, never reconnects (0.790871ms)
✔ gateway: 4004 and 4013 are fatal too; 1006 reconnects with identify when no session (0.500829ms)
✔ gateway: close() is final and unparseable frames are ignored (0.390797ms)
✔ git: config validation is strict, needs write: true, a work tree and a private token file (57.306869ms)
✔ git: the child environment drops every host git config, names one helper, and carries the token path only for origin (35.422921ms)
✔ git: status reports the branch, ahead/behind and changed paths, and refuses off the named branch or mid-merge (60.459783ms)
✔ git: parseStatus reads porcelain v2 including renames and conflicts (0.280751ms)
✔ git: a commit stages exactly the named files, carries the seat author and the requester trailer, and pushes at once (69.975457ms)
✔ git: commit refusals: message, paths, requester, nothing to commit, and an index that already holds other work (76.387359ms)
✔ git: a commit whose push fails is still a commit, says so, and the next commit's push carries both (D6) (81.507969ms)
✔ git: pull is fast-forward only; a diverged origin or dirty local files refuse with nothing merged (186.348897ms)
✔ git: push pushes the named branch only and reports up to date (63.454493ms)
✔ git: no token value or token path ever reaches a git argument list; outputs are masked and capped (83.815828ms)
✔ git: the credential helper answers get over https from a private file and nothing else (188.836588ms)
✔ git: the vault protocol validates before a commit, honours another owner's lock, reserves ids, and locks around writes (699.091394ms)
✔ lock: the claim is exclusive; a second start against a live owner refuses (4.65721ms)
✔ lock: a stale lock (dead owner, reused pid, or record without start) refuses run and is never signaled; only unlock clears it (64.600198ms)
✔ lock: an incomplete claim (directory without owner record) is busy and refuses run; unlock clears it (0.71978ms)
✔ lock: an owner record that exists but cannot be read is invalid: never signaled, never removed, never claimed over (2.321968ms)
✔ lock: legacy upgrade; a live connector holding a {pid, start} record is unknown, unlock refuses and nothing changes; after it exits, unlock clears it (30.322736ms)
✔ lock: a live pid whose record carries a malformed or noncanonical start or boot string is unknown, not a mismatch; nothing signals, removes, or claims over it (282.717301ms)
✔ lock: identity syntax; only canonical unsigned decimal start ticks and lowercase boot uuids are identities (0.379769ms)
✔ lock: a process whose start marker or boot id cannot be read refuses to claim (19.991358ms)
✔ lock: a live pid whose identity cannot be read right now is unknown: never signaled, never removed, never claimed over (0.983474ms)
✔ lock: four processes racing for the same binding; exactly one claims it and the others refuse (36.580656ms)
✔ lock: stale handoff; concurrent starts over a stale lock all refuse, nothing reclaims, one unlock then exactly one live owner (126.180421ms)
✔ lock: four-party schedule; claims landing inside an unlock's gap never survive, one unlock leaves no owner and no residue (76.166553ms)
✔ notices: a kind is recorded per UTC day and found again (0.470162ms)
✔ notify: the DM channel opens once, every send carries the nonce, and only the message id comes back (4.705788ms)
✔ notify: refusals and unknowns surface as RestOutcome without ids; a refused send reopens the channel next time (2.087081ms)
✔ notify: no dmRecipient, a non-0600 binding or token, or a missing binding refuse before any network use (1.495239ms)
✔ recover: nothing to do is clean; a lock whose owner is gone or that has no record is cleared and STOP ends up absent (44.022864ms)
✔ recover: an operator STOP refuses with exit 3 and is never removed, whatever the lock says (34.623299ms)
✔ recover: a brake written during the unlock wins; STOP stays with both lines and the start is refused (26.602561ms)
✔ recover: a held binding refuses with exit 3 and writes no STOP: live owner, alive pid without verifiable identity, unreadable record (69.712108ms)
✔ cli: recover exits 0 when ready, 3 behind a brake or a held binding, and run's own STOP refusal is 3 (603.615333ms)
✔ rest: createMessage sends nonce, enforce_nonce, empty allowed_mentions and a soft reply reference (3.056024ms)
✔ rest: 429 waits retry_after and retries; 4xx is refused; 5xx and socket errors are unknown (3.53564ms)
✔ rest: content and nonce limits are enforced locally; typing never throws (1.075164ms)
✔ rest: react PUTs the encoded emoji on the inbound message for @me; 2xx is true, anything else is false and never throws (0.927703ms)
✔ rest: createDm posts the recipient and resolves the channel id; 4xx refused, 5xx unknown, bad id never sent (0.764232ms)
✔ setspark config: a bare https or loopback origin, a private key file, a principal (5.14836ms)
✔ setspark config: reaches the tools config and the binding as a fixed key (2.881322ms)
✔ setspark config: the binding's key survives resolveToolRoots and the engine's JSON hand-off to the extension (1.567365ms)
✔ setspark config: approvers come from the binding's users, never from the binding's setspark key (1.674519ms)
✔ setspark verbs: required_approvers go out as discord ids from names and come back as names (15.924057ms)
✔ setspark verbs: no Discord user id reaches tool text, whatever shape the service returns it in (6.843011ms)
✔ setspark contract: a decision made with names opens a request the connector accepts; names stored by an old record still refuse (4.933543ms)
✔ setspark keys: read per call, one printable token per file, rotation without a restart (2.34119ms)
✔ setspark idempotency keys: principal, turn id, call index; connector keys name a step (0.383767ms)
✔ setspark http core: json in and out, bearer header, idempotency header, fixed user agent, no key anywhere else (1.74808ms)
✔ setspark http core: error bodies become fixed refusals with code and the 409 fields; server text is data, cut (1007.968687ms)
✔ setspark verbs: a setspark key enables the eight verbs and no counters (0.46545ms)
✔ setspark verbs: writes carry the turn's key and the asserted requester, reads carry no key, and the api key never appears in text or details (5.811593ms)
✔ setspark verbs: no turn refuses every write before any request; bad arguments refuse before any request; reads still work (1.194021ms)
✔ setspark verbs: renderRecord caps long output and hides the accepted snapshot (0.198462ms)
✔ setspark api: bind, add_approval (button and reply) and get use integer request ids and the connector's keys (2.210057ms)
✔ tools: config refuses a missing, symlinked, dotted, non-directory or duplicate root and bad limits (3.868766ms)
✔ tools: every escape is refused with a fixed reason and nothing outside the root is read (3.854702ms)
✔ tools: happy paths list, read a window, and search case-insensitively; dotfiles and symlinks never appear (4.826025ms)
✔ tools: the tool set renders text for the model, records details for the journal, and enforces the per-run budget (3.536519ms)
✔ tools: listing and search caps hold (11.065615ms)
✔ tools: credential shapes are caught; ordinary prose and ids are not (0.948955ms)
✔ tools: the read uses the checked file itself; a symlink, a swapped file, a FIFO, a grown file or a hard link at read time is refused (4.719109ms)
✔ tools: an unreadable file under the root is skipped by search and refused by read (1.041873ms)
✔ tools: config accepts write: true only as a boolean, and enables the write tools only then (0.846099ms)
✔ tools: every write outside the fence is refused before any byte lands, and no temp file remains (4.412574ms)
✔ tools: write_file leaves the exact bytes, edit_file replaces one exact match, and the set renders the change as uncommitted (1.915733ms)
✔ tools: a target that changed between the check and the rename is refused and the temp file is removed (1.164075ms)
✔ web: config takes an https or loopback-http SearXNG base url and a bounded fetch cap (2.703323ms)
✔ web: address rules refuse every private, loopback, link-local, mapped and multicast form (1.921057ms)
✔ web: web_fetch refuses bad urls, private hosts, rebinding names, non-https redirects, too many hops, error status, non-text bodies, and times out (1023.68442ms)
✔ web: web_fetch returns html as text with the title, follows an https redirect, keeps plain text and json, and cuts at the cap (4.206776ms)
✔ web: html to text drops scripts, styles and comments, decodes entities and keeps block breaks (0.222085ms)
✔ web: web_search asks the instance for json, returns at most ten clean results, and refuses a bad query, a down instance or an unusable answer (2.550935ms)
✔ web: the tool set enables the web tools only with a web key, counts them in the budget, and records url, status and hits (2.233266ms)
ℹ tests 178
ℹ suites 0
ℹ pass 178
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2583.800946
@@ -0,0 +1,88 @@
✔ sessionModel: agent vars win, then the system's execution settings (9.416065ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (4.502321ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (3.49083ms)
✔ the prompt's built-in tools line is the harness's own names, as the manifest lists them (10.710252ms)
✔ the prompt names the project clones in the workspace, and none when there are none (8.739786ms)
✔ the prompt explains the review loop to a role with push_working, and reviews to one with fetch_review (6.799627ms)
✔ a bundle is written once: an existing file refuses (1.533388ms)
✔ a path with a single quote can't go into the hook command (2.085826ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (127.70801ms)
✔ a missing or wrong policy, or a bad event, exits 2 (90.923193ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1090.953417ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (743.763072ms)
✔ claude: the hook alone blocks a path outside the workspace (435.284216ms)
✔ claude: a second turn resumes the first turn's session (739.546078ms)
✔ claude adapter: --restricted is always passed (5.407259ms)
✔ claude adapter: MOSAIC_CLAUDE_BIN wins over PATH and must be an absolute executable (16.865695ms)
✔ claude adapter: a directory pin exits 2 before it runs; a pin with a space runs (5.566595ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (699.061816ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.369295ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (2.947475ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.656184ms)
✔ file tool paths must resolve inside the workspace (1.309531ms)
✔ pi's own path normalisation can't be used to step out (0.934842ms)
✔ a symlink inside the workspace that points out is outside (0.772346ms)
✔ a dangling symlink is refused at any depth, in both harnesses (3.246135ms)
✔ read is checked under every spelling pi's read would open, in both harnesses (15.507954ms)
✔ other spellings cover directories, dangling links and pi's cwd (5.376084ms)
✔ a relative path climbs from the workspace's real path, in both harnesses (7.073045ms)
✔ claude path fields per tool (0.906873ms)
✔ glob patterns stay inside the workspace (0.646156ms)
✔ a path that can't be checked is blocked (0.36715ms)
✔ fetch_review's have lists the working refs before origin's, and no more than HAVE_MAX (216.111832ms)
✔ fetch_review's have orders the working refs newest first within each clone, one clone after another (136.219616ms)
✔ a runner git past its time: SIGTERM reaches its process group, and SIGKILL follows after the grace period (1809.540395ms)
✔ once a signalled runner git has closed, its group gets SIGKILL, so a process that ignored SIGTERM dies too (302.609643ms)
✔ initialize, ping and tools/list (48.266255ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (34.008681ms)
✔ replies are compact JSON; over the cap a tool error names the size and the cap (40.656274ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (35.866741ms)
✔ a missing argument is a usage error (28.6614ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (376.614166ms)
✔ pi: a reply over the cap is a tool error naming the size and the cap; list_tasks asks for open tasks (312.588648ms)
✔ pi: a write through a dangling symlink is blocked, and nothing appears outside (316.270469ms)
✔ pi: a read is refused when pi would open another spelling outside (306.35043ms)
✔ pi: a relative path climbs from the real path of a workspace behind a symlink (311.156023ms)
✔ pi: a relative path climbs from the real path of a dataRoot behind a symlink (312.984608ms)
✔ pi: a missing extension refuses before any model call (5.547111ms)
✔ pi: an extension without its configuration fails pi's start (248.402336ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.330569ms)
✔ turnRequest names the sender, class, reply and decision (0.214773ms)
✔ turnRequest says a tester's message is a test and never Jason's instruction (0.246325ms)
✔ turnRequest shows the message's own sent time, a day old as well as new (0.154656ms)
✔ stateBlock names the launch state with its time and event, and the open tasks with the cap (0.254737ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (262.974472ms)
✔ launches revoked and then restored: the turn's block reads allowed and gives the restore time (261.596103ms)
✔ a task closed on the tracker is missing from the next turn's open list (219.79141ms)
✔ a message read a day after it was sent shows the time it was sent (176.432453ms)
✔ a failed state read fails the turn: no adapter runs, the sender hears why, the message is read (123.619612ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (98.11751ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (443.538714ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1300.329416ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (150.773417ms)
✔ founder credentials stop before the claim (20) (176.597102ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (202.96215ms)
✔ the launch ending under a running session exits 22 (147.044567ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (247.569741ms)
✔ a broker that is down at the claim exits 23, not 21 (89.654761ms)
✔ no capability, or a malformed one, on stdin exits 2 (193.655229ms)
✔ a missing or malformed policy exits 2 before the claim (121.192293ms)
✔ the PM gets launch, its task verbs and the reads (7.565464ms)
✔ list_requirements reads the requirement ids, for a task.create holder with a tracker (6.367376ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (1.402618ms)
✔ a coder with a tracker gets its own task tools and no task_reassign (1.246345ms)
✔ launch only when the business's launch block names the instance as launcher (1.307903ms)
✔ an action outside the instance's authority has no tool (1.08892ms)
✔ the review loop: push_working and request_review for the coder, fetch_review and review_verdict for the reviewer, none for the PM (4.29703ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (7.82273ms)
✔ list_tasks takes the broker's filters and pages; get_task takes a task_ref (2.241939ms)
✔ callTool sends list_tasks done false unless the session names done; other tools as given (2.284692ms)
✔ replyText: compact JSON up to the cap, an error naming the size and the cap over it (0.625072ms)
ℹ tests 80
ℹ suites 0
ℹ pass 80
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 11165.016879
@@ -0,0 +1,94 @@
✔ a raw token file, with or without one trailing newline, reaches curl only through the config stream (110.096075ms)
✔ the raw path accepts nothing else, and refuses before curl runs (345.295652ms)
✔ the file checks still apply on the raw path: mode, symlink, missing, directory (250.966203ms)
✔ the raw path base URL has no override (61.931055ms)
✔ the JSON path is unchanged, and JSON never falls through to the raw path (224.266625ms)
✔ a file that changes between the two reads refuses before curl runs, with or without a body (679.717628ms)
✔ the token reaches no child environment, even with an inherited CFG or SHELLOPTS=allexport (647.911461ms)
✔ real helper GET HTTP 200 preserves exit 0 without credentials (13.666803ms)
✔ real helper POST HTTP 201 preserves exit 0 without credentials (9.718645ms)
✔ real helper GET HTTP 403 preserves exit 1 without credentials (8.190658ms)
✔ fixture git subjects only, follow-ups and three session kinds (159.200802ms)
✔ text and JSON carry same numbers, open and truncated title (216.467689ms)
✔ missing credentials exit 2, no-issues never calls API and shows unknown (191.427649ms)
✔ empty range gives no rows and zero totals (159.303473ms)
✔ inclusive UTC dates, first-line preamble only, role and seat boundaries (156.155245ms)
✔ close-only issue included, even median, missing metadata stays unknown (141.427877ms)
✔ unique commits but per-issue links count multiple tags once each (148.264458ms)
✔ issue pages of 50, 50 and 7 read 107 issues in 3 pages (306.387532ms)
✔ one short page reads 1 page; --no-issues reads none and says so (236.012423ms)
✔ a short page 10 is read; a full page 10 refuses at the ceiling (669.69804ms)
✔ an issue number on two pages refuses (152.738909ms)
✔ a failing page 2 refuses the whole read without its stderr (150.134454ms)
✔ page 2 with a malformed record refuses (152.586302ms)
✔ page 2 with more than 50 rows refuses (164.80232ms)
✔ bad API payload not JSON refuses (162.436031ms)
✔ bad API payload {} refuses (150.007419ms)
✔ bad API payload [{"number":1}] refuses (151.198811ms)
✔ partial or malformed session log refuses with location, not content (154.571471ms)
✔ a U+2028 or U+2029 inside a session string is one line, not a malformed record (143.833529ms)
✔ no sessions is an empty table; symlink source refuses (206.906105ms)
✔ reads only refactor even when another branch is checked out (146.895061ms)
✔ invalid dates, reverse dates and duplicate options refuse (126.738361ms)
✔ T3 agent assignments do not count as human in Table 2 (147.123927ms)
✔ preamble parsing and issue number boundaries (0.429334ms)
✔ T3 header: agent, or board from control-board; anything short of the full header is human (0.133669ms)
✔ no closed issues with human messages means undefined ratio, not invented zero (0.184266ms)
✔ T3: seat, archived, unmapped and Researcher threads count; imported, deleted and other-project threads do not (474.924376ms)
✔ T3: the default path is read from HOME and prints no path line; --no-t3 says so (683.98402ms)
✔ T3: a HOME with no database exits 1 and names --no-t3 (132.179403ms)
✔ T3: a file that is not a database exits 1 and names --no-t3 (129.3583ms)
✔ T3: a seat thread renamed to another seat exits 1 naming thread, title and roles (365.063711ms)
✔ T3: an unmapped thread addressed as a seat exits 1 (380.629374ms)
✔ T3: a header to another thread id is not cross-checked (370.775123ms)
✔ T3: no project, or two, for this root exits 1 (949.03183ms)
✔ T3: a removed column exits 1 and names it (239.633013ms)
✔ T3: a missing table exits 1 and names it (242.136422ms)
✔ T3: a counted row with an unknown role exits 1 without its text (386.721319ms)
✔ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (394.162858ms)
✔ T3: a counted row with non-text content exits 1 without its text (405.043336ms)
✔ T3: a counted row with an unparseable created_at exits 1 without its text (391.937084ms)
✔ T3: a reasoning summary is skipped before any check and counted as excluded (1064.077846ms)
✔ T3: a missing orchestration_events makes the diagnostic unknown and keeps the counts (669.97634ms)
✔ T3: a human message with no event counts in humanWithoutEvent (369.202889ms)
✔ T3: an unparseable event makes the diagnostic unknown and keeps the counts (689.189951ms)
✔ T3: an event with no string messageId makes the diagnostic unknown and keeps the counts (714.664358ms)
✔ T3: an error that is not from SQLite is rethrown, not reported as a database failure (317.206038ms)
✔ T3: a symlink at ~/.t3 exits 1 (129.429864ms)
✔ T3: a symlink at ~/.t3/userdata exits 1 (134.199537ms)
✔ T3: a symlink at ~/.t3/userdata/state.sqlite exits 1 (127.022483ms)
✔ T3: with --t3-db, a symlinked file or directory exits 1 (437.484037ms)
✔ T3 WAL: the newest message only in -wal, writer attached, is counted (380.78014ms)
✔ T3 WAL: stopped cleanly, counts are correct and the main file is unchanged (372.062987ms)
✔ T3 WAL: -wal without -shm in a writable directory is read (409.590193ms)
✔ T3 WAL: -wal without -shm in a read-only directory exits 1 (404.44914ms)
✔ T3 WAL: stopped cleanly in a read-only directory exits 1 (416.111886ms)
✔ T3: a lock held past the 5 s busy timeout exits 1 and names --no-t3 (5435.955975ms)
✔ a done row whose closing issue is open is a violation; a row that is not done is not (1.758365ms)
✔ an issue several rows close is expected closed only once all of them are done (0.480423ms)
✔ closure needs positive evidence: unknown is undecided, and so is a skipped or short issue check (0.363435ms)
✔ each owner of an in-progress or in-review row gets one liveness class (7.318907ms)
✔ a required row not done after 14 days is a violation; a legacy row uses genesis as its lower bound (0.359986ms)
✔ an ISO requiredSince, as `set required` writes it, ages from its UTC day; one that does not parse is a violation (0.212073ms)
✔ the text section always ends in a count and a result, and never prints a full pass (0.313397ms)
✔ pidAlive: a running pid is present, an exited one is gone, and EPERM still means present (23.925263ms)
✔ issue states: open list first, then the metric page, then at most 10 lookups (262.443054ms)
✔ a full open list: lookups settle what it leaves out, and only an unsettled issue keeps it undecided (339.246864ms)
✔ the open list refuses on a failed call or a bad record, and never echoes the helper (158.021555ms)
✔ a helper call past the deadline is killed with its child, and the call reports it (2007.281008ms)
✔ readQueue loads queue.json through the queue validator and refuses anything else (128.524251ms)
✔ protected changes list every in-range entry that changes a required or parked row (425.112376ms)
✔ the CLI prints the queue section above the weekly table and under a queue key in --json (509.597967ms)
✔ a queue with nothing wrong prints 0 violations and a reduced pass, never a full pass (222.425527ms)
✔ --no-issues makes no call and leaves the issue checks undecided; --no-queue skips the section (301.324313ms)
✔ the CLI refuses a bad queue before any call, and a failed open list with exit 2 (281.641099ms)
✔ --unsupported-runtime repeats once per seat and takes a seat name (326.334427ms)
✔ an unreadable config makes every owner invalid instead of passing them (189.623516ms)
ℹ tests 86
ℹ suites 0
ℹ pass 86
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 22068.01287
@@ -0,0 +1,77 @@
✔ pure resolution selects current default or explicit enrolled account (1.909765ms)
✔ scope is explicit, bounded and never inferred (1.696433ms)
✔ fork pin is preserved against default change, override, missing account and revocation (0.733963ms)
✔ unenrolled account/provider, missing harness, model expansion and native model ceiling refuse (0.789871ms)
✔ only explicit synthetic credential forms and internal fixture stores admitted (5.475854ms)
✔ two concurrent workspaces of the same agent publish distinct complete private generations (62.740124ms)
✔ same execution ID is exclusively claimed and cannot overwrite a published generation (33.557098ms)
✔ failed generation after-auth preserves prior files, records failure and refuses blind same-ID retry (46.510105ms)
✔ failed generation before-publish preserves prior files, records failure and refuses blind same-ID retry (58.213018ms)
✔ credential lock contention refuses without duplicate side effects (11.700435ms)
✔ symlinked pre-existing final target is refused and never followed (27.062034ms)
✔ invalid registry cannot resolve; no fallback to supplied partial entries (0.294165ms)
✔ post-publication failure records uncertainty, preserves complete generation and prevents replay (28.031639ms)
✔ expired credentials refresh under transaction and subsequent generation reuses rotation (83.731964ms)
✔ refresh failure retains prior generation and store state (65.761059ms)
✔ refresh timeout retains prior generation and store state (145.098877ms)
✔ refresh malformed retains prior generation and store state (67.213991ms)
✔ concurrent refresh on same account refuses contention while unrelated account proceeds (223.154513ms)
✔ invalid refresh options refuse before burning claim (31.215424ms)
✔ fixed fake process rotates both OAuth fields without mutating caller input (26.026853ms)
✔ concurrent isolated processes preserve separate provider credentials (25.549256ms)
✔ fake failure is refused with fixed diagnostics (21.331265ms)
✔ fake malformed is refused with fixed diagnostics (25.561798ms)
✔ fake timeout is refused with fixed diagnostics (103.832879ms)
✔ fake unchanged is refused with fixed diagnostics (23.229583ms)
✔ caller executable/environment injection is rejected before spawning (0.265402ms)
✔ valid fixture tree validates and lists without secrets (64.37565ms)
✔ unknown-field refuses (0.358276ms)
✔ invalid-id refuses uppercase and traversal shapes (0.264161ms)
✔ plain-http baseUrl requires allowInsecureTransport (0.352275ms)
✔ native provider rejects allowInsecureTransport (0.138264ms)
✔ unsupported credential type and kind refuse (0.15212ms)
✔ account provider-path mismatch refuses (0.640316ms)
✔ profile account refs must be provider/account shaped (0.230574ms)
✔ seat selection accepts fork pin field, validates account refs (0.211053ms)
✔ harness manifest id must equal executable (gate 1) (0.202027ms)
✔ CLI validate: duplicate provider id across files refuses (27.69375ms)
✔ CLI validate: missing referenced provider/account refuse (32.484667ms)
✔ CLI validate: broken JSON refuses without secret echo (25.73429ms)
✔ CLI usage errors exit 2 (55.987168ms)
✔ credential.json sibling presence does not break validation and is never read (62.035651ms)
✔ D1 missing, empty and structurally empty roots refuse, no list projection (168.898944ms)
✔ D1 required directory auth cannot be absent (50.745089ms)
✔ D1 required directory auth/providers cannot be absent (50.14902ms)
✔ D1 required directory auth/accounts cannot be absent (59.970527ms)
✔ D1 required directory auth/settings cannot be absent (62.984015ms)
✔ D1 required directory harnesses cannot be absent (63.428539ms)
✔ D1 root file and unreadable metadata refuse (112.593275ms)
✔ D2 no symlink traversal at auth/providers/openai-codex.json (54.346537ms)
✔ D2 no symlink traversal at auth/accounts/openai-codex/homelab-openai (52.01959ms)
✔ D2 no symlink traversal at auth/providers (49.767615ms)
✔ D2 no symlink traversal at auth (54.480191ms)
✔ D2 root and ancestor symlinks and lexical traversal refuse (160.941121ms)
✔ private filesystem modes enforced for root (50.103897ms)
✔ private filesystem modes enforced for auth (52.849578ms)
✔ private filesystem modes enforced for auth/providers/openai-codex.json (56.123191ms)
✔ private filesystem modes enforced for auth/accounts/openai-codex/homelab-openai/account.json (63.016834ms)
✔ D3 numeric version 1 only across all record kinds (1.201115ms)
✔ D4 nested unknown keys and missing per-kind required fields refuse (56.491284ms)
✔ D5 unenrolled default refuses even when account exists (66.015647ms)
✔ D6 provider/account credential type must match (66.298571ms)
✔ D7 every harness endpoint enforces HTTP opt-in and shape (0.464909ms)
✔ D8 URLs reject embedded credentials and unsupported protocols without echo (166.407382ms)
✔ D9 malformed JSON diagnostics contain no content excerpt (59.367352ms)
✔ D10 missing metadata is missing-path, not invalid-json (62.537119ms)
✔ D10 library returns no partial entries on any invalid record (73.49327ms)
✔ null/scalar/array metadata refuses without stack or echo (240.814931ms)
✔ credential sibling is never opened, even when an unreadable symlink (31.939283ms)
✔ oversized metadata refuses before parsing (56.924228ms)
ℹ tests 69
ℹ suites 0
ℹ pass 69
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2092.39883
@@ -0,0 +1,166 @@
✔ F1: an ordinary commit after update-ref is refused until step 8; then it commits and the queue stays at C (1197.239017ms)
✔ F1: a plain `commit -e` whose guard ran before update-ref fails at its own HEAD update (993.623551ms)
ℹ git commit -e: index.lock free during the editor
✔ F1: a `commit -e -- path` whose guard ran before update-ref fails at its own HEAD update (972.695361ms)
ℹ git commit -e -- src.txt: index.lock held during the editor
✔ F1: step 8 with index.lock held exits 3, and ordinary commits stay refused until the printed command runs (1056.958971ms)
✔ F1: HEAD moving after the step-7 guard check and before update-ref: refused, nothing published (993.97101ms)
✔ F1: H is recorded before the canary, so HEAD moving during the step-1 canary is refused at step 7 (996.378939ms)
✔ F1: a queue commit landing after H is recorded: step 1 says HEAD moved, not the guard (1414.143657ms)
✔ F1: a queue commit landing between the HEAD check and the canary: the failed clean run is reported as HEAD moved (934.350855ms)
✔ F1: a shared-index change during the procedure is not committed (1060.768252ms)
✔ F1: a queue path staged after update-ref: step 8 stops and touches nothing (1062.950712ms)
✔ F1: a missing or a different hook refuses (707.254667ms)
✔ F1: same bytes without the exec bit, a symlinked hook, and core.hooksPath in the local or global scope each refuse before update-ref (1132.823458ms)
✔ F1: the canary refuses a hook that git would not run (623.700574ms)
✔ F1: the guard deactivated after step 1 is refused at the step-7 recheck (931.62099ms)
✔ bootstrap: implementation-only HEAD, the guard, genesis, the --genesis commit, then an extending commit (960.533515ms)
✔ bootstrap: --genesis with a base present, no base without --genesis, an op before the first commit, a changed map, another branch (998.564104ms)
✔ bootstrap: the archived tests and validator run outside any repository (1018.152039ms)
✔ general: an unrelated staged file stays staged, and the committed blobs are the snapshot bytes (846.575787ms)
✔ general: a queue write after the snapshot is not committed (1287.991007ms)
✔ general: a snapshot whose log does not extend the base refuses (966.709708ms)
✔ general: install-hook privilege, repair of a same-bytes hook, and its refusals (151.659673ms)
✔ general: environment overrides, a linked worktree and usage (602.216086ms)
✔ general: a queue path staged before the run refuses at step 1 (676.744993ms)
✔ general: HEAD's queue tests failing in the archive refuse (846.377897ms)
✔ genesis document serializes deterministically and replays (3.785693ms)
✔ a hand edit that stays valid JSON fails replay; a formatting-only edit fails re-serialization (2.234135ms)
✔ a tampered result, receipt or viewSha fails replay (1.948448ms)
✔ op ids: 8 to 72 characters for callers, 80 in the log for .outcome entries (0.146522ms)
✔ add: defaults for an ordinary seat, privileged extras, refusals (3.529338ms)
✔ matrix: queued→briefed privileged; briefed→in-progress owner with after satisfied (4.663025ms)
✔ matrix: release, review round, changes requested and waiting-on-jason (15.548011ms)
✔ matrix J5: in-review→done by the gate owner with evidence naming the current round (9.416487ms)
✔ review issue, lead decision 23: none refuses, one is used, several need --issue, later rounds keep it (19.415173ms)
✔ the row schema refuses a round with a null issue, and the A1 review shape (P2) (2.33519ms)
✔ matrix R1: every state × target × actor class matches 8.7, gate owner jason or not, required or not (1385.340814ms)
✔ matrix: blocked keeps the claim and returns only to previousState (4.109501ms)
✔ matrix J4: parking is Jason's, refused while required; unpark returns to queued (2.574986ms)
✔ field edits: who may change what (4.765612ms)
✔ set issues keeps a logged narrowing of closes (N10) (2.881517ms)
✔ text the table shows refuses \ and <, everywhere it enters (N8) (1.797864ms)
✔ every accepted text renders to nine cells on every row (N8) (21.934303ms)
✔ genesis: the map refuses an owner among its row's reviewers; replay doesn't (2026-10-04) (0.509061ms)
✔ times and dates must be calendar values, not just the shape (2026-10-04) (1.741163ms)
✔ replay holds every op id to the caller's rule (N11) (5.202981ms)
✔ note: owner, listed reviewer or privileged; empty clears (1.187203ms)
✔ assign moves the claim with the owner; done clears it (2.522595ms)
✔ render is byte-stable and escapes pipes (0.46183ms)
✔ view classification: current, genuine stale, edited stale marker, changed current body, markers (0.572166ms)
✔ next: resume, then review, then start, then wait, then nothing; lowest id first (17.221948ms)
✔ canonical args make a retry's identity independent of list order (0.294471ms)
✔ manifests, headings and blob ids (0.435232ms)
✔ the migration map: one queue-map block, exact keys (0.539983ms)
✔ every call but `queue` reaches the seat CLI exactly as before A2 (524.972862ms)
✔ no argument reaches the app entry in packages/cli, and only that call (62.009567ms)
✔ `queue` reaches the queue CLI with the rest of the arguments (167.568591ms)
✔ the pre-A2 fixture is the script A2 changed (0.305073ms)
✔ an old privileged add with no gate owner still replays through loadDoc, and gets jason (5.333333ms)
✔ a non-privileged add gets jason through the replay path and can't name a gate owner (2.101328ms)
✔ the CLI refuses a privileged add without --gate-owner, for jason and sage, and writes nothing (293.442948ms)
✔ the CLI add with --gate-owner carries the named owner and records a log entry (259.702148ms)
✔ the CLI add by a non-privileged seat gets jason and can't name a gate owner (297.719924ms)
✔ a retried sage add recorded with no gate owner answers (already recorded at rev N) and writes nothing (254.397712ms)
✔ acquire publishes the record by link; release removes only its own lock (12.119259ms)
✔ a kill between the temp write and the link leaves no lock (57.520919ms)
✔ a short or failed temp write refuses and leaves no lock and no temp (9.818365ms)
✔ a link error other than EEXIST refuses (9.552205ms)
✔ an error after the link releases the lock: unreadable gate, failing temp stat (28.681117ms)
✔ a release that fails on a gate path is reported, never a stack trace (P1) (37.808375ms)
✔ a paused holder: another writer waits 10 s, then refuses naming it live (10098.553853ms)
✔ two concurrent unlockers: the second refuses on the gate (32.67139ms)
✔ a writer publishing during an unlock, lock first: unlock sees it live and refuses (11.014822ms)
✔ a writer publishing during an unlock, gate first: the writer releases and refuses (16.130947ms)
✔ a gate swapped while held is left in place and reported, on success and on refusal (N1) (15.264184ms)
✔ a reused pid within one boot is mismatch; unlock removes the lock and never signals the process (18.521113ms)
✔ the same pid and start on a different boot is mismatch (0.435531ms)
✔ a foreign host is unknown whatever the local pid says; unlock refuses (70.270116ms)
✔ unreadable /proc: classification is unknown and acquire refuses (0.678142ms)
✔ invalid records: empty, unparsable, wrong keys, bad start or boot (0.181835ms)
✔ a stale gate blocks writers; --check-gate says mismatch for a reused pid (12.750196ms)
✔ a delayed release by a dead owner, after unlock and a new owner: the inode check keeps the new lock (20.724304ms)
✔ release checks the inode too: a byte-identical lock file with a new inode is left in place (12.98962ms)
✔ unlock refuses a live, unknown or invalid lock, and does nothing without one (49.65633ms)
✔ the migration map validates and renders the golden genesis table (3.070065ms)
✔ the marked QUEUE.md holds every row and parked item between its markers (1.168754ms)
✔ map-check reports each kind of drift (4.627027ms)
✔ a request posts once as the requester; a retry sends nothing (762.893356ms)
✔ each transport answer maps to posted, failed or uncertain (8.9 step 3) (4245.8313ms)
✔ the pre-send checks: GET user must name the requester, under the deadline (1522.950672ms)
✔ the lead's request refuses a token for login sage (955.041915ms)
✔ the credential file: the seat's own, 0600, no symlink, never the shared default (864.252031ms)
✔ an unresolved request blocks a new request, a new round, waiting-on-jason and done (2313.891554ms)
✔ a same-op retry after a kill sends nothing, even with a stale view (2907.708625ms)
✔ a held lock at the outcome exits 3 and names what the transport said (695.020243ms)
✔ late outcomes: after an abandon, and after a resolve with the same or another id (2442.705238ms)
✔ resolve checks the comment: issue, markers, round, candidate and author (1657.354793ms)
✔ the lead resolves a seat's request: the comment's author is the requester, fetched with the lead's token (713.26448ms)
✔ validateRow checks a request round's shape, which every replayed entry must keep (514.567072ms)
✔ request, changes, a new candidate, approval: every round pinned; no review files (1732.812624ms)
✔ a row with no reviewers opens a round that posts nothing (1161.64297ms)
✔ verify-commit: a prospective tree must hold exactly the candidate's paths (1300.028288ms)
✔ semantics: v1 entries replay as before; review entries need v2 (687.294338ms)
✔ set reviewers refuses the row's owner (2026-09-28) (353.266194ms)
✔ the owner records no verdict, even as a listed reviewer (487.132893ms)
✔ a request comment over the length limit is not sent (548.743912ms)
✔ a late POST on a closed row leaves a conflict nothing can resolve, and resolve asks nothing (619.7026ms)
✔ a Jason-gated row reaches waiting-on-jason only on every reviewer's approval (2394.387646ms)
✔ genesis: refusals before anything is written (418.484777ms)
✔ genesis: the map must be committed, well formed, with committed briefs and seats (573.552565ms)
✔ genesis: markers, a stray witness, once only; a retry returns the receipt (551.967981ms)
✔ genesis: a file holding genesis alone with no witness is confirmed by sync or a retry (378.057655ms)
✔ canonical checks: worktree, second clone, detached HEAD, wrong branch, GIT_DIR, foreign code; a symlink works (592.044058ms)
✔ --by that differs from MOSAIC_AGENT_NAME warns on stderr and logs nothing more (N12) (755.521371ms)
✔ op ids: missing, too long, reserved; a retry answers; another payload refuses (695.951377ms)
✔ a retried add returns the id it first allocated, after reassignment and after done (884.654254ms)
✔ Rocko's S4 schedule: a lost result, another writer, then the retry opens no second round (648.606084ms)
✔ the review issue and the evidence round through the CLI (lead decision 23, 8.7) (1237.864331ms)
✔ claims and add defaults through the CLI; candidates are manifests or reachable commits (837.067362ms)
✔ add, set reviewers and assign refuse the row's owner as a reviewer (530.114844ms)
✔ the working-brief check: a changed working copy refuses the start and flags next (663.468483ms)
✔ next: resume first, then nothing for an idle seat; needs a seat (325.267763ms)
✔ view stale: new ops and verify refuse naming the unshown op; retries answer; reads warn; render fixes (686.438181ms)
✔ view unknown: a hand edit, an old marker over an edited body, missing or duplicate markers (1127.617611ms)
✔ a hand edit to queue.json refuses every verb, reads included (569.25836ms)
✔ verify and render --check leave bytes and mtimes unchanged (423.256027ms)
✔ render is byte-stable across runs and repositories (290.689442ms)
✔ snapshot and verify --snapshot (715.788522ms)
✔ usage errors exit 4 (531.688166ms)
✔ a short write, ENOSPC or a file fsync failure: nothing visible, temp removed (309.557105ms)
✔ a rename failure: nothing visible, temp removed (185.063385ms)
✔ a directory fsync failure: uncertain, exit 3, no receipt; the tail refuses new ops; a retry confirms (231.312435ms)
✔ a directory fsync failure, then sync names the op (397.527347ms)
✔ a witness write failure: uncertain, durable, exit 3; the view is untouched (255.363885ms)
✔ the .git fsync after the witness rename fails: uncertain, exit 3, the witness says so (191.201294ms)
✔ confirming a tail fsyncs queue.json and docs/plans before the witness; either failure changes nothing (216.47692ms)
✔ the docs/plans fsync after the view rename fails: the op stands, the view is written, a warning says so (152.597947ms)
✔ a lock swapped while held is left in place and reported, on a receipt and on a refusal (201.088332ms)
✔ a lock that cannot be released after an op is reported, on a receipt and on a refusal (207.935019ms)
✔ unlock prints a swapped gate's warning on stderr, the result on stdout (151.53703ms)
✔ a view write that fails keeps the op and reports a stale view (177.88551ms)
✔ SIGKILL before the rename: nothing recorded; the retry removes the leftover temp (669.46584ms)
✔ SIGKILL after the rename, before the witness: the tail refuses new ops and sync names the op (690.569836ms)
✔ SIGKILL after the witness, before the view: the stale refusal names the op (618.249926ms)
✔ SIGKILL after the view, before the receipt: the retry returns the receipt (654.47123ms)
✔ git checkout between steps 1 and 7: step 7 refuses and nothing is written (232.274444ms)
✔ git stash restoring an older valid pair: history lost; accept-history needs privilege, a reason and --yes (1079.766093ms)
✔ a deleted witness: refused after the locked recheck; accept-history records it absent (368.872375ms)
✔ a header edit during a write: the op stands, the view write is skipped with a warning (216.244016ms)
✔ a reader paused between the witness and the file while a writer finishes: no lost-history report (207.993803ms)
✔ rows: every row as show prints it, in list order; writes nothing; same notes and refusals as list (240.155776ms)
✔ file-then-witness order forced by a hook: the locked recheck prevents a false report (200.953839ms)
✔ a writer paused before and after the witness rename: readers see a tail, then a match (221.582822ms)
✔ a true rollback is reported only after the locked recheck; a held lock names its holder instead (586.034204ms)
✔ an accept-history in progress: an unlocked reader waits on the lock and never reports lost history (586.454093ms)
✔ the platform check refuses other filesystems (132.523018ms)
✔ tmpfs passes only a test layer that allows it (N5) (211.042533ms)
✔ unlock keeps a multi-line lock record on stdout (P3) (229.949208ms)
ℹ tests 156
ℹ suites 0
ℹ pass 156
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 28952.143808
@@ -0,0 +1,51 @@
✔ isRunId accepts the run id shape and nothing else (0.828643ms)
✔ a missing data root or runs directory lists nothing (1.225774ms)
✔ runs as a regular file lists nothing, as before (0.473267ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.646961ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (1.598634ms)
✔ readRunRecord returns documents and artifacts in directory order (0.85388ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.570287ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.54219ms)
✔ readRunDocument reads only the three run documents (0.428524ms)
✔ a link inside the data root is followed (0.800216ms)
✔ a data root that is itself a link is trusted as configured (0.546049ms)
✔ a run directory linked out of the data root is never read (0.566256ms)
✔ a document linked out of the data root reads as null (0.749116ms)
✔ a runs directory linked out of the data root refuses (0.506198ms)
✔ a relative link that climbs out of the data root refuses (0.343634ms)
✔ a sibling whose name starts with the data root's name is outside it (0.399894ms)
✔ a link loop refuses instead of reading as missing (0.526478ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.358983ms)
✔ an unreadable run directory refuses instead of reading as missing (0.42908ms)
✔ a link to the data root's parent is outside it (0.318051ms)
✔ listRunIds sorts whatever order the directory returns (0.630314ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.406722ms)
✔ the readers write nothing (1.733716ms)
✔ no pointer is null (1.465289ms)
✔ the pointer release.sh writes reads back (0.954869ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (1.472786ms)
✔ a pointer that is a directory refuses with exit 4 (0.462778ms)
✔ a state file linked out of the data root refuses (0.776371ms)
✔ a state directory linked out of the data root refuses (0.462176ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.391458ms)
✔ a missing log is empty (0.304261ms)
✔ the log reads oldest first and counts malformed lines (0.804124ms)
✔ last must be a positive integer (0.379981ms)
✔ the state readers write nothing (0.669479ms)
✔ list prints each run in the established format (62.666706ms)
✔ list prints a damaged result.json as unknown and keeps listing the runs after it (57.335774ms)
✔ list prints each result field that isn't a string as unknown or - (60.665688ms)
✔ show prints the run in the established format (60.114516ms)
✔ show of a missing run and an invalid id exit 4 as before (95.875893ms)
✔ list and show refuse a runs directory linked out of the data root (122.387337ms)
✔ show refuses a run linked out of the data root; list reports it unknown (121.642742ms)
✔ list shows an r- name that isn't a valid run id, as before (63.046948ms)
✔ show refuses an invalid id before reading the config (36.33446ms)
ℹ tests 43
ℹ suites 0
ℹ pass 43
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 730.433593
@@ -0,0 +1,132 @@
✔ a first launch clones the root at its branch, with the root's path as origin (36.669701ms)
✔ the clone is not at its place until git clone has finished (21.849213ms)
✔ a later launch fast-forwards a clean clone after a commit to the root, then finds it current (66.639934ms)
✔ a clone ahead of the root keeps its commits and counts as current (44.452865ms)
▶ a dirty clone, one on another branch and one diverged are kept as they are
✔ a modified file (40.007603ms)
✔ an untracked file (32.563561ms)
✔ a staged file (32.33488ms)
✔ another branch (32.748681ms)
✔ a detached HEAD (34.412616ms)
✔ a diverged branch (44.604566ms)
✔ a dirty clone, one on another branch and one diverged are kept as they are (217.850889ms)
▶ a clone with user.name or user.email in its config is kept, and git runs nothing in it
✔ user.name (29.419964ms)
✔ user.email (27.117263ms)
✔ a clone with user.name or user.email in its config is kept, and git runs nothing in it (56.952788ms)
✔ a commit git can't read after the fast-forward is null (50.561138ms)
✔ a new clone whose commit can't be read refuses the launch and leaves nothing behind (20.23673ms)
▶ a clone the session rigged is kept, and git runs nothing and writes nothing outside it
✔ core.fsmonitor (33.911321ms)
✔ core.hooksPath (36.33634ms)
✔ a hook file (32.964247ms)
✔ include.path (35.404474ms)
✔ includeIf (35.903109ms)
✔ a filter driver (34.230629ms)
✔ origin moved (32.627641ms)
✔ a second origin url (34.084851ms)
✔ the origin url twice, both the root (37.669605ms)
✔ an ext:: origin (36.507162ms)
✔ a branch tracking another remote (34.529045ms)
✔ a branch merging a tag (34.594029ms)
✔ a fetch line onto local branches (34.518722ms)
✔ no origin (34.130525ms)
✔ a config file over the size cap (31.16385ms)
✔ config a symlink to /dev/zero (34.342252ms)
✔ the clone a symlink to the bait (29.763037ms)
✔ the clone a file (29.073862ms)
✔ the clone a plain directory (29.104522ms)
✔ .git a gitdir: file (33.807171ms)
✔ .git a symlink (29.01378ms)
✔ .git/logs a symlink (29.743733ms)
✔ .git/refs/heads a symlink (31.606382ms)
✔ .git/objects a symlink (29.783009ms)
✔ a reflog hard-linked to a file outside (29.727133ms)
✔ HEAD a fifo (31.113186ms)
✔ a commondir file (30.055303ms)
✔ an alternates file (30.142525ms)
✔ a gitlink staged, no .gitmodules (42.343157ms)
✔ a gitlink and .gitmodules staged (52.190582ms)
✔ a gitlink to a repository with its own gitlink (53.702903ms)
✔ a gitlink and .gitmodules committed (48.034927ms)
✔ a gitlink and submodule.active in config (47.829166ms)
✔ a .git/modules with no gitlink (35.024629ms)
✔ a clone the session rigged is kept, and git runs nothing and writes nothing outside it (1199.242917ms)
▶ a root that can't be cloned refuses with the project id and leaves nothing behind
✔ missing (10.096884ms)
✔ not a repository (9.595955ms)
✔ a plain directory inside another repository (15.132059ms)
✔ unreadable (9.990975ms)
✔ on no branch (11.755021ms)
✔ missing an object (15.419813ms)
✔ a root that can't be cloned refuses with the project id and leaves nothing behind (72.802291ms)
✔ a clone whose root is on no branch, or gone, is kept and named (29.986647ms)
✔ no credential or forge remote of the root reaches a clone (53.400842ms)
✔ every project in the business file gets its own clone at its own branch (42.166802ms)
✔ a clone past its time gets SIGTERM and refuses the launch, with nothing left in the workspace (513.941023ms)
✔ a clone that ignores SIGTERM gets SIGKILL once the grace period is over (1018.352462ms)
✔ a timeout signals git's process group, so a process git started dies with it (513.395806ms)
✔ once a signalled git has closed, its group gets SIGKILL, so a process that ignored SIGTERM dies too (514.167905ms)
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.600754ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (8.552004ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.319908ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.664238ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.058087ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1771.394664ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2482.010899ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (267.061637ms)
✔ resolveSeat: by name under --repo resolves the repo layout (1.840827ms)
✔ resolveSeat: by path resolves the fleet layout (0.456218ms)
✔ resolveSeat: refusals for missing dir, missing launch.sh, non-executable launch.sh, invalid name, and unknown layout (0.904111ms)
✔ tmuxContext: outside tmux, default socket, custom socket, and exec failure (0.871928ms)
✔ makeRegistration produces a record that validates; each shape violation throws SeatError (0.883497ms)
✔ writeRegistration/readRegistration: round trip, permissions, absence, and malformed records (1.456614ms)
✔ updateTask: changes task, taskSetBy and updatedAt only, and refuses appropriately (1.185463ms)
✔ CLI launch: registers, execs the fake launch script, and passes args through (27.953275ms)
✔ CLI launch: --harness lands in the record (26.737811ms)
✔ CLI launch: the launch script's own exit code passes through (26.883253ms)
✔ CLI launch: relaunching a seat rewrites the one registration record (56.986937ms)
✔ CLI launch: omitting --task records an empty string, not null (27.563244ms)
✔ CLI seat task: updates only the task after a launch, and refuses on an unlaunched seat (81.876552ms)
✔ CLI refusals: no args, unknown flag, missing config, already-registered env, and exec failure (130.687022ms)
✔ samePath: equal paths, symlinked dirs, distinct dirs, and non-strings (0.406226ms)
✔ resolveSetBy: explicit --by wins over the environment; absent or empty environment gives unknown; invalid explicit or environment values refuse with exit 4 (0.578341ms)
✔ validateRegistration/readRegistration: taskSetBy is optional; a record without it (written before #1511) still loads unchanged; an invalid one is refused; the version does not change (0.698793ms)
✔ updateTask: records setBy, preserves startedAt and every unrelated field, upgrades an old record in place only when the task is set, and replaces a previous attribution (0.855579ms)
✔ CLI seat task: --by beats MOSAIC_AGENT_NAME, the environment beats nothing, empty environment is unknown, invalid --by or environment refuses with exit 4 and leaves the record byte for byte (259.962171ms)
✔ family: exactly one launch.max key in the model name, else null (0.672119ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.675131ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.249812ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.445014ms)
✔ session file and launch log: 0600, the session file written once (1.010908ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.108341ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.197499ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (0.98315ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (349.795301ms)
✔ workRef and validBranch take only what a ref name can hold (1.652613ms)
✔ a push lands as the task's work ref, a fast-forward lands after it, and main is the root's (146.852822ms)
✔ a rewritten branch refuses non-fast-forward and the work ref stays (120.231974ms)
✔ a branch with no history in common with main refuses unrelated-history (69.299515ms)
✔ a bundle that needs commits the working repository lacks refuses missing-prerequisite (40.132947ms)
✔ main is fetched from the root again before each push, so a clone of a newer root pushes (141.889842ms)
✔ a root moved back after the clone leaves the push's base unknown: missing-prerequisite (102.41725ms)
✔ a commit with a broken object refuses invalid-bundle, and only because fsck is on (89.163827ms)
✔ only a v2 bundle with the named branch is read (44.236989ms)
✔ a branch named main, or named for another task, moves only this task's work ref (97.73508ms)
✔ a record that throws moves the work ref back, or removes a new one (143.974852ms)
✔ a work ref that can't go back refuses rollback-failed, naming the ref and the commit (423.384501ms)
✔ a root that can't be read refuses root-unreadable (27.772711ms)
✔ a git past its time gets SIGTERM, leaves no ref lock, and the next push lands (2166.299571ms)
✔ a git that ignores SIGTERM gets SIGKILL once the grace period is over (1027.822721ms)
✔ a working repository path that isn't a directory refuses (24.617234ms)
✔ review bundles a pushed commit as refs/mosaic/review, leaving out what the reviewer has (112.47775ms)
✔ review of a project with no working repository refuses unknown-commit (13.056346ms)
✔ the runner's git tools hold the host's limits and branch rule (1.128279ms)
ℹ tests 120
ℹ suites 0
ℹ pass 120
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4850.455593
@@ -0,0 +1,100 @@
✔ the boot config is checked before anything starts (86.213618ms)
✔ a business with no tracker entry refuses task verbs (134.121126ms)
✔ credential.expiring and .expired are recorded once per instance (251.602185ms)
✔ a token file that changes on disk records credential.changed (122.826901ms)
✔ autostart polls, reconciles and retries a startup the tracker was down for (151.081179ms)
✔ a refusal a restart must clear is not retried by the poll (107.629119ms)
✔ a poll that fires while two are queued is dropped (108.582415ms)
✔ close waits for a running verb and refuses one that has not started (269.047543ms)
✔ the bundled Vikunja is the pinned upstream image the runbook names (0.719574ms)
✔ every published port is on 127.0.0.1, and no secret is in the file (0.263582ms)
✔ the committed table loads frozen; its verbs are the broker task verbs (1.359013ms)
✔ a write names a verb the table has as its own key, not one it inherits (0.45688ms)
✔ the schema refuses any other shape (2.531165ms)
✔ the Field table in the slice 1 plan names the verbs each field is written by (0.56056ms)
✔ each verb refuses, asks for a decision and writes as the table and the role files say (1361.348814ms)
✔ the list holds the PRD's requirement ids, in its order, at its version (4.59868ms)
✔ the committed list loads frozen (0.48718ms)
✔ the schema refuses any other shape (2.948007ms)
✔ the fake answers each route with the statuses and shapes Vikunja v2.7.0 sent (398.16828ms)
✔ the project list holds recorded project objects in the recorded list envelope (107.421455ms)
✔ the recorded task bodies pass the checks S3 applies to every read (0.43322ms)
✔ the client works against the fake over real HTTP with the platform fetch (248.515462ms)
✔ a correct install starts, and the first reconcile records tasks that already exist (111.120713ms)
✔ verbs refuse while a business is starting and after startup refused it (156.615191ms)
✔ startup refuses a token that can do more than its role needs (426.510351ms)
✔ startup refuses an unsupported version and flags an untested one (324.879437ms)
✔ startup refuses a board that the runbook did not install (474.910133ms)
✔ startup refuses a project the sync bot cannot read (95.729549ms)
✔ startup refuses a configured label the pm bot cannot see (94.260454ms)
✔ startup refuses an expired credential and a missing sync credential (203.274674ms)
✔ an unreachable tracker refuses with tracker-unavailable (90.386602ms)
✔ an edit in the UI is recorded once, with the fields that changed (231.538569ms)
✔ a move between open buckets is seen on the board, though updated does not change (190.727638ms)
✔ a person's comment is counted and a bot's is not (298.399073ms)
✔ the hourly reconcile catches a comment through comment_count (227.486304ms)
✔ a task closed in the UI leaves the open view with its done bucket (483.66677ms)
✔ a task that leaves the board is recorded as deleted, moved or out of reach (298.157982ms)
✔ a poll that read before a verb wrote does not overwrite the verb (171.564619ms)
✔ a tracker fault during a tick is reported and the next tick catches up (152.238876ms)
✔ a malformed answer refuses the tick with tracker-shape (136.77856ms)
✔ no token value reaches the database, the log or a refusal (295.240672ms)
✔ the first look at a task counts only comments inside the window (162.900997ms)
✔ with descendants off the adapter reads no project list and no child, as in v0 (137.780509ms)
✔ a three-level tree is read per project, and a project outside it is not (137.266567ms)
✔ a watch-only child keeps the business ready, and a failed child read refuses as transient (232.628641ms)
✔ a root without the installed buckets refuses with descendants on (115.314203ms)
✔ the project list refuses without read_all, and skips archived projects and saved filters (223.315939ms)
✔ descendants must be true or false (94.819341ms)
✔ a move inside the tree is a moved tombstone plus a snapshot under the new ref (200.519712ms)
✔ a child made after startup joins the tree at the next reconcile (194.17519ms)
✔ a child that leaves the tree has its tasks recorded missing, and the ledger keeps their history (159.472351ms)
✔ a child deleted or hidden between reconciles drops out at the next tick, and the root still refuses (186.575723ms)
✔ a reconcile that fails keeps the previous tree (158.734873ms)
✔ a closed task the cursor missed takes its own project's done bucket (114.156205ms)
✔ closed tasks read at startup take their own project's done bucket (91.578611ms)
✔ a closed task the cursor returns takes its own project's done bucket (132.056586ms)
✔ a task moved out of a child that leaves the tree at the same time is moved, not no-access (127.747098ms)
✔ a task in a bucket outside the five keeps its raw bucket id (132.793046ms)
✔ bucket 0 on a watch-only task never becomes a bucket or a state (208.163424ms)
✔ a child whose kanban view is deleted still refuses the tick, and the reconcile reads it watch-only (134.07817ms)
✔ a child dropped at a tick comes back at the next reconcile once the bot reads it again (137.502658ms)
✔ task.create needs a recorded human request and a requirement id (215.298682ms)
✔ task.create takes only an approved requirement id (238.010949ms)
✔ task.create cites the request a received message carries, not the message's id (192.240654ms)
✔ only labels named in the business file can be written (243.386284ms)
✔ task.schedule sets and clears a due date and relations (334.787416ms)
✔ assign and reassign move the role bots and record task.assigned (361.509002ms)
✔ task.update.assigned is for the assignee and records task.state (324.007278ms)
✔ a wrong expected digest records task.conflict and writes nothing (183.849876ms)
✔ a cross-role verb needs a resolved decision, used once (243.699841ms)
✔ task.close needs a verdict; after it every verb refuses with task-done (244.348073ms)
✔ a task with pushed work closes only citing an approve verdict for its latest push, and a refusal writes nothing (281.185151ms)
✔ a lost answer is settled by a re-read and never retried (171.818031ms)
✔ a create whose answer is lost is reported uncertain, and the poll finds the task (115.372766ms)
✔ a task the sync bot cannot read refuses and records nothing (91.480706ms)
✔ verbs and polls for one business run one at a time (165.587433ms)
✔ a due date with milliseconds is written to the second (161.260954ms)
✔ every write landed and the final read failed: the verb succeeds and records what it wrote (107.798766ms)
✔ some writes landed and the final read failed: write-uncertain, and nothing is recorded (81.68315ms)
✔ a create whose final read fails succeeds and records task.created (89.005871ms)
✔ an edit between the last write and the final read shows as external on the next poll (108.20087ms)
✔ task.created is recorded when a later label write fails (87.942485ms)
✔ every verb acts in an installed child, on the child's own board (256.308247ms)
✔ task.create refuses a project outside the tree, a watch-only one and one that is not an id (157.985907ms)
✔ with descendants off, task.create takes only the root project (90.044876ms)
✔ a verb on a watch-only task, or a relation to one, refuses with project-not-installed (110.698883ms)
✔ a related task is read before authority: in another project than its ref names, task-moved; missing, task-not-found (163.37039ms)
✔ a task moved to another project of the tree refuses its old ref with task-moved and takes its new one (98.631649ms)
✔ a verb and a create in the child record the final read of the child's board (92.419355ms)
✔ a create in the child whose final read fails records the child's todo bucket (101.639829ms)
✔ a lost answer in the child is settled by a re-read of the child's board (131.794565ms)
✔ every related task is read before authority, not only the first (138.058291ms)
ℹ tests 92
ℹ suites 0
ℹ pass 92
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 5474.370436
@@ -0,0 +1,117 @@
✔ the Board: held roles with no machine sessions, a claim with no address, the toggle kept across a reload, and Message addressed to the role (7199.212255ms)
✔ a redirect answer on a Board read, a bus read, a conversation read, a board POST, a module read and a send signs the page out: one line, nothing stale, no further reads (6825.295404ms)
✔ browser edge states: loading, empty, malformed, stale, hostile/long values, in-flight reply and appearance fallback (3837.750047ms)
Rendered contrast: {"failures":[],"count":330,"lowest":4.504658476260286}
✔ served Console browser: real board fixtures, keyboard, drafts, receipts, themes, 320px and failures (3717.131482ms)
✔ the README says a refused field table names the file or the key at fault, never a path (1.295649ms)
✔ S5 pages in a browser: real broker rows, inert text, Copy, routes, failures, layout and no writes (8766.054556ms)
✔ bus routes serve the four reads from the reader view, unescaped JSON for the page to escape (1104.920515ms)
✔ decisions route serves the roles and recent lists from the reader view (2407.977697ms)
✔ credentials route serves the broker credential status from the reader view (215.516022ms)
✔ replies route serves the replies to one message from the reader view (902.187535ms)
✔ bus routes are GET-only, have no write verb, and keep the same-origin checks (94.236147ms)
✔ bus refusals map to statuses and never carry a path or a stack (44.268219ms)
✔ humanCall speaks the human transport protocol without blocking the server (1741.506487ms)
✔ busReader takes --business, else the live bus host, else refuses (358.647231ms)
✔ humanCall kills a transport that runs past its timeout (532.719058ms)
✔ serve refuses a --business value that is not a business id (290.208392ms)
✔ conversation view: full history, collapsed tools, hidden thinking, inert hostile content, malformed and reconcile markers (4249.172986ms)
✔ conversation view: a fork keeps the open branch, says so, and opens the new one on request (4244.181922ms)
✔ conversation view: a newer session with no readable history keeps the marker (2678.969062ms)
✔ conversation view: seats without history say so and offer no reply (1998.013576ms)
✔ Discord row through real board/WebUI: independent brake/liveness, no Reply, literal content (3850.968377ms)
✔ return flow through the conversation view: send, tool call, delayed result, peer message, exact long answers, relaunch (54753.150108ms)
✔ messages HTTP read pages and preserves metadata; bad arguments refuse before a read; other reads unchanged (1160.540956ms)
✔ Console Messages lists late unsolicited messages on polling with sender class time read state and trail; nav count includes beyond the page; reads never deliver (9907.834912ms)
✔ Messages nav count polls on Tasks and Board and clears on a Board refusal; messages 403 refuses local pages (2942.694024ms)
✔ copy writes the Console paths at the full id, read-only, and leaves an existing copy alone (2350.251403ms)
✔ copy refuses a commit off refactor, an unknown one, a worktree and a bad copies directory (2304.852597ms)
✔ copy writes nothing when an archived path is missing at the commit (3600.817445ms)
✔ a copy that loses the rename race leaves no read-only temp directory behind (883.583497ms)
✔ a copy whose rename fails with no target refuses, writes no copy and leaves no temp directory (944.283686ms)
✔ a copy that meets a target holding files says exists: and moves nothing into it (490.524111ms)
✔ a copy that meets an empty target directory replaces it by rename, not by moving into it (614.428853ms)
✔ serve runs from a copy: /healthz 200, the config check, roles and RELEASE from the copy, the queue from --checkout (1056.663324ms)
✔ serve refuses a --checkout that is not an absolute directory path (286.144801ms)
✔ consoleReads runs the queue read under queueRoot and reads RELEASE under root (64.035213ms)
✔ preview options are all three or none, and each is checked (7.833597ms)
✔ the CLI refuses a partial or invalid preview flag set at start (1979.485819ms)
✔ the CLI with all three flags serves the preview mode (210.214236ms)
✔ a request for the public name needs the header equal to the user id, else 401 and nothing read (20.176287ms)
✔ the header name matches without regard to case, and the value compare is exact (3.021917ms)
✔ the public name with the header reads the bus views, and the Host and Origin are checked first (23.466992ms)
✔ in preview mode every write answers 403 read-only, from the public name and loopback, and reaches nothing (8.901105ms)
✔ loopback requests are unchanged in preview mode, and the bus views work with the board down (3.732347ms)
✔ a proxy that rewrites Host to the loopback port gets 403 on its first request, whatever the user (13.396018ms)
✔ a repeated Host is 400 before any other check, in preview mode and without it (5.873067ms)
✔ without the preview flags the public name is refused and writes still reach the board (3.781712ms)
✔ redactor: config, dataRoot, any absolute path, Discord ids and the JSON parser quote (2.139278ms)
✔ credential state from the date alone, as the bus states it (0.266672ms)
✔ queue: rows, one row, ids and methods, notes; no path or id from a row (1834.403482ms)
✔ queue: a refused read fails closed with the store's text, redacted (1790.258769ms)
✔ queue: a store that fails to load, or a child that dies, gives a fixed message with no path or stack (3887.303392ms)
✔ business: names, vars on the allowlist, authority, credential metadata only (13.487404ms)
✔ business: missing or invalid file refuses with the module's text, redacted (27.637237ms)
✔ business without --business: the live bus host, else no-bus-host; no system config: not-configured (14.887094ms)
✔ settings: release, board, loopback address, notifier binding name only (604.539893ms)
✔ task fields: the committed table with no reads configured, GET only; a bad table refuses with no path (49.575371ms)
✔ both presentations replace old activity with relaunch notice, label retained history, then resume after new activity (4141.866813ms)
✔ reported return flow and relative Age: reply sent from the inspector, then the new answer appears there without manual refresh (22123.641872ms)
✔ the send box: held roles, the draft and caret across a refresh, each receipt, one POST per Send, and the trail link; the board Reply on a 4xx and a 5xx (7192.158058ms)
✔ a sent receipt lists its replies as the page refreshes, oldest first and capped, and marks none delivered or read (13405.278861ms)
✔ startServer takes send only as a function and only with the preview mode (5.264103ms)
✔ the CLI refuses --send without the preview flags, and without a configured bus (349.991895ms)
✔ the CLI with --send and a configured bus sends through the human transport and logs one line (207.30151ms)
✔ without --send the route is read-only like every other write, and config says no send (7.324726ms)
✔ with --send every other write is still 403 read-only, and nothing reaches the board or bus (4.927371ms)
✔ config says send only on the public name with --send on (1.578233ms)
✔ a send without the signed-in user is 401 and is neither sent nor logged, loopback included (3.245531ms)
✔ each request check refuses before anything is sent, and logs the refusal without the body (11.745693ms)
✔ a send passes exactly to, body and in_reply_to, answers the id, and logs it (2.274311ms)
✔ a crafted role name cannot forge a log line (1.608065ms)
✔ a bus refusal is not sent, with its status; an outcome the bus could not confirm is unknown and never retried (5.639698ms)
✔ through the human transport the request is exactly the business, message.send and the keys (73.086701ms)
✔ against a real broker: the message is written once as a human send, and its refusals map (637.653431ms)
✔ loopback host and board origin fail closed (8.277415ms)
✔ real board fixture passes through WebUI; assets and isolated seen/reply work (234.559848ms)
✔ proxy preserves exact request bytes, status and receipt, rejects forms and malformed JSON, never follows redirect (73.342702ms)
✔ unreachable board reports URL; CLI rejects unsupported options (641.441007ms)
✔ render prints the unit without the preview flags (19.566484ms)
✔ render carries every serve flag, the preview set included (11.871262ms)
✔ a partial preview set is refused (44.895159ms)
✔ a value the unit cannot carry is refused, for every flag (609.626792ms)
✔ the rendered unit names none of the human proof agent markers and sets no agent variable (52.276783ms)
✔ install into --dir with --no-reload writes the file whole, then reports unchanged (187.695142ms)
✔ install without --no-reload runs daemon-reload and nothing that starts the unit (49.2773ms)
✔ uninstall refuses while the unit is running, with or without --no-reload, and removes it once it is not (325.399341ms)
✔ status prints the unit state and GET /healthz on the installed port (380.138968ms)
✔ usage: an unknown verb or flag, and start or enable, exit 4 (61.525831ms)
✔ without --send, render is the template with its placeholders filled, byte for byte (38.393176ms)
✔ render --send with the preview set ends ExecStart with --send and changes nothing else (50.426435ms)
✔ --send without the whole preview set is refused and writes nothing (112.888326ms)
✔ install --send into --dir with --no-reload writes the sending unit, and status says whether it sends (386.547458ms)
✔ uninstall and status take no --send (47.475519ms)
✔ install refuses while the unit is running, in any state but inactive or failed, and changes nothing (590.749071ms)
✔ when the state read fails, install and uninstall refuse with one line and change nothing (158.616738ms)
✔ install needs --copy naming a copy that exists, and refuses outside the canonical checkout without --allow-worktree (70.235547ms)
✔ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (300.176636ms)
✔ render --copy runs the copy and reads the queue in the checkout; without --copy the unit is unchanged (18.906668ms)
✔ the uid header takes only an Authentik uid; the username header still takes a username (374.91116ms)
✔ a preview value cannot start with - or . (61.540262ms)
✔ status names the copy and whether refactor has moved past it, and says when the unit runs from no copy (838.300963ms)
✔ tokens.css and icons.svg are byte copies of docs/design (1.12564ms)
✔ JetBrains Mono files match the digests in their sources file, with the OFL text (2.368973ms)
✔ shipped strings are unchanged, and the web keeps its write boundary (1.970491ms)
✔ shell in a browser: System default, seeded states, 400px, focus and the Ctrl+K palette (8410.47356ms)
✔ five states on Board, Inbox, Tasks, Agents and Trail (2736.970519ms)
✔ Queue, Business and Settings in their five states, with no move button (5786.91954ms)
✔ seeded secrets, Discord ids and paths reach no response and no page; business refusals in the module's words (2902.697103ms)
✔ the server log names no config path when the system config refuses (278.533715ms)
ℹ tests 108
ℹ suites 0
ℹ pass 108
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 55151.295176
@@ -0,0 +1,17 @@
OK status with missing harness credential exits 3 and still lists accounts
OK status reports harness credential (read-only) + mosaic accounts
OK api key material never reaches output
OK oauth token material never reaches output
OK unparseable credential file exits 2
OK symlinked credential file exits 4
OK env-side credential names reported
OK env var values never reach output
OK accounts without an accounts dir reports none and creates nothing
OK accounts lists files and marks the active one
OK loose account perms flagged in listing
OK agent --auth with missing account file refuses (exit 4)
OK agent --auth with non-0600 account file refuses
OK agent --auth with invalid account name refuses
OK auth.sh without valid config refuses
selftest: 15 passed, 0 failed
@@ -0,0 +1,55 @@
Note: switching to 'cc48b124f17caf712eab1a68a25ca52fa3727d55'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Not currently on any branch.
nothing to commit, working tree clean
Note: switching to 'cc48b124f17caf712eab1a68a25ca52fa3727d55'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
OK dry-run: allowed change, exit 0, nothing committed (exit 0)
OK dry-run committed nothing
OK apply: allowed change exits 0 (exit 0)
OK apply: attribution in commit subject
OK apply: target tree clean after commit
OK disallowed path refused (exit 1)
OK disallowed path: target untouched
OK syntax gate refused broken .mjs (exit 1)
OK syntax gate: target untouched
OK suite failure refused (exit 1)
OK suite failure: target reverted to clean
OK disabled policy refused (exit 2)
OK disabled policy: target untouched
OK failed run refused (exit 1)
OK failed run: target untouched
OK missing run exits 4 (exit 4)
OK invalid policy exits 2 (exit 2)
selftest: 17 passed, 0 failed
@@ -0,0 +1,26 @@
OK absent adapter defaults to pi
OK adapter mock validates (exit 0)
OK unsupported adapter exits 2 (exit 2)
OK env exports adapter
OK bootstrap creates default when absent (exit 0)
OK bootstrap wrote config file
OK bootstrap is idempotent on existing config (exit 0)
OK bootstrap did not rewrite existing config
OK validate missing config exits 3 (exit 3)
OK malformed JSON exits 2 (exit 2)
OK unsupported configVersion exits 2 (exit 2)
OK unknown top-level key exits 2 (exit 2)
OK unknown execution key exits 2 (exit 2)
OK unsupported backend exits 2 (exit 2)
OK unsupported environment exits 2 (exit 2)
OK relative dataRoot exits 2 (exit 2)
OK non-canonical dataRoot exits 2 (exit 2)
OK filesystem root dataRoot exits 2 (exit 2)
OK home directory dataRoot exits 2 (exit 2)
OK dataRoot containing config dir exits 2 (exit 2)
OK control character in provider exits 2 (exit 2)
OK symlinked config file exits 2 (exit 2)
OK env exports resolve correctly
OK failed validation modified nothing
selftest: 24 passed, 0 failed
@@ -0,0 +1,70 @@
toolchain: node v26.8.1
OK syntax: packages/discord/src/approvals.mjs
OK syntax: packages/discord/src/authorize.mjs
OK syntax: packages/discord/src/binding.mjs
OK syntax: packages/discord/src/cli.mjs
OK syntax: packages/discord/src/connector.mjs
OK syntax: packages/discord/src/context.mjs
OK syntax: packages/discord/src/engine-pi.mjs
OK syntax: packages/discord/src/errors.mjs
OK syntax: packages/discord/src/gateway.mjs
OK syntax: packages/discord/src/git.mjs
OK syntax: packages/discord/src/journal.mjs
OK syntax: packages/discord/src/notify.mjs
OK syntax: packages/discord/src/rest.mjs
OK syntax: packages/discord/src/setspark.mjs
OK syntax: packages/discord/src/tools.mjs
OK syntax: packages/discord/src/web.mjs
OK syntax: packages/discord/bin/git-credential.mjs
OK syntax: packages/discord/extension/tools.mjs
OK syntax: packages/discord/tests/approvals.test.mjs
OK syntax: packages/discord/tests/authorize.test.mjs
OK syntax: packages/discord/tests/binding.test.mjs
OK syntax: packages/discord/tests/connector.test.mjs
OK syntax: packages/discord/tests/context.test.mjs
OK syntax: packages/discord/tests/engine.test.mjs
OK syntax: packages/discord/tests/fake-pi.mjs
OK syntax: packages/discord/tests/gateway.test.mjs
OK syntax: packages/discord/tests/git.test.mjs
OK syntax: packages/discord/tests/helpers.mjs
OK syntax: packages/discord/tests/journal.test.mjs
OK syntax: packages/discord/tests/notify.test.mjs
OK syntax: packages/discord/tests/recover.test.mjs
OK syntax: packages/discord/tests/rest.test.mjs
OK syntax: packages/discord/tests/setspark.test.mjs
OK syntax: packages/discord/tests/tools.test.mjs
OK syntax: packages/discord/tests/web.test.mjs
OK syntax: packages/discord/fixtures/claim-worker.mjs
OK syntax: packages/discord/fixtures/legacy-owner-worker.mjs
OK syntax: scripts/discord.sh
OK syntax: scripts/discord-service.sh
OK packages/discord declares no dependencies
OK no bot-token-shaped string in packages/discord
OK fixture binding uses placeholder ids only
OK fixture binding validates
OK real pi with the extension exposes exactly list_dir, read_file, search and no built-in tool
OK real pi with a writable root exposes exactly the three reads plus write_file and edit_file, and writes nothing at start
OK real pi with a web key exposes the three reads plus web_fetch and web_search, and no write tool without a writable root
OK real pi with a git root exposes the reads, writes and the four git verbs, commits nothing at start, and never shows the token
OK real pi with protocol vault adds reserve_id to the git verbs
OK real pi with a setspark key exposes the reads and the eight record verbs, no counters, and never shows the key
OK real pi refuses a git key on a read-only root (fail closed)
OK real pi with the pilot flags (--no-tools) exposes no tool at all
OK real pi exits non-zero without MOSAIC_DISCORD_TOOLS: no session, no tools (fail closed)
OK a failing nested test fails the run under a parent runner's NODE_TEST_CONTEXT
OK node --test packages/discord/tests/ (ℹ pass 178)
OK scripts/discord.sh --help exits 0
OK scripts/discord.sh check without a binding exits 4
OK scripts/discord.sh recover without a binding exits 4
OK scripts/discord.sh reload without a binding exits 4
OK scripts/discord-service.sh without a command exits 4
OK service unit renders with the repository path, a supervised run as the main process, exit 3 never retried, and reload as SIGHUP
OK service install writes the rendered unit (0644) and leaves no temp file
OK service install a second time reports unchanged
OK systemd-analyze verify accepts the rendered unit
OK service uninstall removes the unit file
OK service install with an unknown flag exits 4
OK service install with USER unset finishes and names the account for lingering
discord suite: 66 passed, 0 failed
@@ -0,0 +1,21 @@
OK initial ordinary-file install
OK installed tree matches canonical source
OK installed tree has no symlinks
OK check detects installation drift
OK sync refuses to overwrite installation drift
OK check detects an extra destination file
OK check detects an extra destination directory
OK check rejects a destination symlink
OK sync accepts a canonical source update
OK updated installation matches canonical source
scripts/test-extension-package.sh: line 14: 1679802 Killed "$@" > /dev/null 2>&1
OK forced interruption kills the replacing process
OK next invocation recovers old consistent installation
OK interrupted replacement rolled back
OK sync succeeds after interruption recovery
OK unlocked stale lock file does not block
OK active lock refuses a concurrent sync
OK source symlink fails closed
OK nested second entrypoint fails closed
extension package selftest: 18 passed, 0 failed
@@ -0,0 +1,53 @@
toolchain: node v26.8.1, python 3.12.8, jsonschema 4.26.0
OK syntax: scripts/foundation-inspect.mjs
OK syntax: scripts/foundation/strict-json.mjs
OK syntax: scripts/foundation/canonical.mjs
OK syntax: scripts/foundation/resolve.mjs
OK syntax: scripts/foundation/validate-record.mjs
OK syntax: scripts/foundation/fixtures/build-fixtures.mjs
OK syntax: scripts/foundation/canonical.test.mjs
OK syntax: scripts/foundation/cli.test.mjs
OK syntax: scripts/foundation/fixtures.test.mjs
OK syntax: scripts/foundation/resolve.test.mjs
OK syntax: scripts/foundation/strict-json.test.mjs
OK syntax: scripts/foundation/verify-schema.py (ast only; no bytecode written)
OK fixture generator runs
OK checked-in fixtures/bundles equal a fresh generation
OK checked-in fixtures/raw equal a fresh generation
OK checked-in fixtures/index.json equal a fresh generation
OK checked-in demo bundles equal a fresh generation
OK a failing nested test fails the run under a parent runner's NODE_TEST_CONTEXT
OK node --test scripts/foundation/ (ℹ pass 80)
OK differential schema oracle: PASS: differential schema oracle (finite corpus; compatibility evidence, not equivalence proof)
platform witness: strftime('%Y') for year 999 -> '999' (pinned checker refuses years 0001..0999)
node v26.8.1; corpus 1568 records (38 pinned fixtures, 478 unique bundle records, 1052 typeCase/mutation/lexical cases)
schema column: agree-valid 540, agree-invalid 991, DISAGREEMENTS 0; strict-only (parser-bound) cases: 27; unsupported-kind records not schema-assessed by the inspector: 10
profile column (schema-valid records only): profile-valid 510, profile-invalid 30
profile refusals asserted: 30 schema-agreed-valid records refused only by the strict typed-string profile (rule profile-pattern-mismatch), 12 declared by name; 73 named probes verified against declared schema/profile columns
OK oracle: zero schema-column disagreements with the pinned checker
OK oracle: strict-only profile refusals are counted and asserted
OK demo: permitted read preview exits 0 (exit 0)
OK demo: permitted file.change preview exits 0 (exit 0)
OK demo: assignment.change proposal is unresolved (exit 3) (exit 3)
OK demo: revoked registration is refused (exit 3) (exit 3)
OK demo: message is not authority (exit 3) (exit 3)
OK usage: no arguments exits 2 (exit 2)
OK io: missing file exits 4 (exit 4)
OK io: directory exits 4 (exit 4)
OK io: symlink exits 4 (O_NOFOLLOW) (exit 4)
OK bound: oversize fixture exits 2 (exit 2)
OK profile: one final LF in a typed selection id is refused before admission (exit 2) (exit 2)
OK profile: two final LFs fail the schema pattern itself (exit 2) (exit 2)
OK profile: escaped newlines in free-form text stay allowed (exit 0) (exit 0)
OK profile refusal is invalid-request/profile-pattern-mismatch with selection and operation withheld, value not echoed
OK text output starts with the disclaimer
OK json output is valid JSON with result allowed and exactly the charter §7 fields
OK json golden matches byte-for-byte
OK sandboxed bundle run (env -i, PATH=/nonexistent) produced the unresolved proposal
OK sandbox inventory (path/type/size/mode/uid/gid/inode/mtime/sha256) unchanged by runs
OK canary never printed (bundle run and credential-file run)
OK a non-bundle JSON file is refused at the shape gate, not read into output
OK no field of the non-bundle file is echoed
selftest: 44 passed, 0 failed
@@ -0,0 +1,36 @@
toolchain: node v26.8.1, git version 2.55.0
OK syntax: packages/queue/src/cli.mjs
OK syntax: packages/queue/src/errors.mjs
OK syntax: packages/queue/src/io.mjs
OK syntax: packages/queue/src/lock.mjs
OK syntax: packages/queue/src/queue.mjs
OK syntax: packages/queue/src/review.mjs
OK syntax: packages/queue/src/store.mjs
OK syntax: packages/queue/tests/commit.test.mjs
OK syntax: packages/queue/tests/data.test.mjs
OK syntax: packages/queue/tests/dispatch.test.mjs
OK syntax: packages/queue/tests/gate-owner.test.mjs
OK syntax: packages/queue/tests/helpers.mjs
OK syntax: packages/queue/tests/lock.test.mjs
OK syntax: packages/queue/tests/migration.test.mjs
OK syntax: packages/queue/tests/review.test.mjs
OK syntax: packages/queue/tests/store.test.mjs
OK syntax: packages/queue/tests/write.test.mjs
OK syntax: packages/queue/tests/fixtures/fake-gitea.mjs
OK syntax: packages/queue/tests/fixtures/kill-at.mjs
OK syntax: packages/queue/tests/fixtures/lock-child.mjs
OK syntax: packages/queue/tests/fixtures/mosaic-pre-a2.sh
OK syntax: scripts/queue-commit.sh
OK syntax: scripts/git-hooks/pre-commit
OK syntax: scripts/mosaic
OK queue-commit.sh, the guard and scripts/mosaic are executable
OK packages/queue declares no dependencies
ℹ tests 156
ℹ pass 156
ℹ fail 0
OK node --test packages/queue/tests/
OK scripts/mosaic queue help
skip queue verify and render --check: this checkout (/home/jwoltje/darkwing-scratch/r113/wt) is not the queue's canonical root (/mnt/storage/src/mosaic-stack)
queue suite: 28 passed, 0 failed
@@ -0,0 +1,16 @@
OK valid RELEASE resolves (exit 0)
OK invalid RELEASE exits 1 (exit 1)
OK missing RELEASE exits 1 (exit 1)
OK valid RELEASE leaves image tag consistent with version
OK status safe on empty state (exit 0)
OK status created no pointer
OK fault-injected activation refuses (exit 1)
OK refused activation wrote no pointer
OK refusal logged exactly once with valid fields
OK healthy activation succeeds (exit 0)
OK pointer written with valid fields
OK repeat activation succeeds (log grows) (exit 0)
OK log is append-only across activations
OK rollback without previous refuses (exit 1)
selftest: 14 passed, 0 failed
@@ -0,0 +1,101 @@
OK valid task validates (exit 0)
OK unknown task key exits 2 (exit 2)
OK unsupported taskVersion exits 2 (exit 2)
OK invalid task id exits 2 (exit 2)
OK empty prompt exits 2 (exit 2)
OK NUL in expectExact exits 2 (exit 2)
OK out-of-range timeout exits 2 (exit 2)
OK missing mission file exits 4 (exit 4)
OK task with valid mission validates (exit 0)
OK invalid mission exits 2 (exit 2)
OK validate missing task exits 4 (exit 4)
OK validation does not modify the task file
OK prune dry-run exits 0 (exit 0)
OK dry-run deleted nothing
OK prune --keep=2 --yes removes oldest (exit 0)
OK kept exactly 2 newest runs
OK newest run kept, oldest pruned
OK append-only receipt written (3 entries)
OK sessions/workspaces untouched by prune
OK prune with invalid keep exits 4 (exit 4)
OK mock adapter: gate passes on matching mock response (exit 0)
OK mock adapter: expect-mismatch recorded (exit 1)
OK mismatch reason recorded
OK unknown adapter fails closed (exit 1)
OK mission task runs via mock adapter (exit 0)
OK mission section injected into generated prompt
OK retry of mission run succeeds (exit 0)
OK retriedFrom lineage recorded
OK mission section present after retry (relative path resolved)
OK retry of missing run exits 4 (exit 4)
OK skill install bundled ms-tools (exit 0)
OK installed to skills-available
OK double install refuses (exit 1)
OK activate enables skill (exit 0)
OK enabled dir populated
OK uninstall while enabled refuses (exit 1)
OK deactivate moves back to available (exit 0)
OK uninstall removes from available (exit 0)
OK seat with enabled skill launches
OK skill path delivered to adapter
OK shipped researcher contract resolves (ceiling + network)
OK resolve-role refuses a non-role document (conductor policy) (exit 2)
OK resolve-role refuses name/filename mismatch (exit 2)
OK resolve-role refuses unknown network declaration (exit 2)
OK resolve-role refuses duplicate role tool (exit 2)
OK resolve-role refuses unsupported tool (exit 2)
OK resolve-role refuses missing contract file (exit 4)
OK version 1 role prints no contract line
OK shipped version 2 roles resolve with their contracts (pm, cto, coder, reviewer)
OK resolve-role accepts a minimal version 2 role (exit 0)
OK resolve-role refuses an action outside the vocabulary (exit 2)
OK resolve-role refuses a gated-only action in a role file (exit 2)
OK resolve-role refuses a Vikunja verb no role may hold (exit 2)
OK resolve-role refuses a version 2 role whose contract is missing (exit 2)
OK resolve-role refuses a contract that is a symbolic link (exit 2)
OK seat launches under role ceiling
OK role ceiling narrows seat tools (read,write,bash -> read,bash)
OK narrowing recorded loudly
OK missing role contract refuses launch (exit 2)
OK missing-contract refusal names the role
OK empty ceiling intersection -> tool-free seat
OK tool-free outcome recorded loudly
OK overridden agents dir without seat definition refuses (exit 4)
OK seat-resolution refusal names the seat
OK policy: mission only -> mission tools
OK policy: task only -> task tools
OK policy: both -> intersection (task narrowed)
OK policy: empty intersection -> tool-free
OK invalid mission capabilities rejected (exit 2)
mosaic-task: unsupported mission tool: "sudo" (supported: read, write, edit, bash, grep, find, ls)
OK task run with user layer present (exit 0)
OK user context dispatched into generated prompt
OK workspace+tools task runs via mock (exit 0)
OK workspace path + tools delivered to adapter
OK persistent workspace created on host
OK plain task still runs (no workspace/tools) (exit 0)
OK workspace var present but empty when absent
OK tools empty when absent
OK unknown tool exits 2 (exit 2)
OK workspace traversal exits 2 (exit 2)
OK live hello task succeeds with exact marker
OK result.json written in run dir
OK result.json contents are correct
OK wrong expectExact fails with exit 1 (reason: expect-mismatch)
OK each run gets a distinct run dir (no clobber)
OK list shows both runs
OK fork base: teach succeeds (exit 0)
OK fork child recalls ancestor context (exit 0)
OK forked child recalled ancestor code word
OK ancestor session untouched by fork
OK child session dir has its own branch file
OK onboard without name exits 4 (non-interactive) (exit 4)
OK onboard --name renders profile (exit 0)
OK profile written
OK canon structure: required filled, optional placeholdered
OK canon sections present
OK user recall run succeeds
OK recalled user name (response: Jason)
OK no agent identity on headless run
selftest: 98 passed, 0 failed
@@ -0,0 +1,11 @@
mutant m1 rc=1 ℹ pass 85 ℹ fail 1 ℹ skipped 0 restored=True
✖ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (411.093731ms)
KILLED
mutant m2 rc=1 ℹ pass 80 ℹ fail 6 ℹ skipped 0 restored=True
✖ a failing page 2 refuses the whole read without its stderr (142.629037ms)
✖ a short page 10 is read; a full page 10 refuses at the ceiling (141.879991ms)
✖ an issue number on two pages refuses (134.29877ms)
✖ issue pages of 50, 50 and 7 read 107 issues in 3 pages (142.316508ms)
✖ page 2 with a malformed record refuses (137.128337ms)
✖ page 2 with more than 50 rows refuses (138.019005ms)
KILLED
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
# Row 113 (#1607): the brief's two mutants, one per fix.
# m1 drops the id prefix check in t3.mjs, so every role "reasoning" row is
# skipped, including one whose id doesn't start "reasoning:".
# m2 stops the issue read after page 1, as if it were still one call.
# Each runs the FULL ledger suite (node --test tests/*.test.mjs in
# packages/ledger) and restores the source from the .orig copy whatever happens.
# Usage: mutants.py <worktree> <log dir>
import os, shutil, subprocess, sys, signal
WT, LOGS = sys.argv[1], sys.argv[2]
MUTANTS = {
'm1': ('packages/ledger/src/t3.mjs',
"if (m.role === 'reasoning' && typeof m.message_id === 'string' && m.message_id.startsWith('reasoning:')) {",
"if (m.role === 'reasoning') {"),
'm2': ('packages/ledger/src/ledger.mjs',
" if (rows.length < PAGE_SIZE) return { issues: issues.filter(i => !i.pull_request), pages: page };\n",
" return { issues: issues.filter(i => !i.pull_request), pages: page };\n"),
}
os.makedirs(LOGS, exist_ok=True)
env = dict(os.environ, TMPDIR=os.path.expanduser('~/darkwing-scratch/r113/tmp'))
for name, (rel, cur, new) in MUTANTS.items():
src = os.path.join(WT, rel)
text = open(src).read()
if text.count(cur) != 1:
sys.exit(f'STOP {name}: the target text in {rel} is not unique or has moved')
if os.path.exists(src + '.orig'):
sys.exit(f'STOP {rel}.orig already exists')
log_path = os.path.join(LOGS, f'mutant-{name}.log')
shutil.copy2(src, src + '.orig')
try:
open(src, 'w').write(text.replace(cur, new))
with open(log_path, 'w') as out:
p = subprocess.Popen('node --test tests/*.test.mjs', shell=True, cwd=os.path.join(WT, 'packages/ledger'),
stdout=out, stderr=subprocess.STDOUT, env=env, start_new_session=True)
try:
rc = p.wait(timeout=600)
except subprocess.TimeoutExpired:
os.killpg(p.pid, signal.SIGKILL)
p.wait()
rc = 'timeout'
finally:
shutil.move(src + '.orig', src)
restored = open(src).read() == text
log = open(log_path).read()
counts = [l for l in log.splitlines() if l.startswith(('ℹ pass', 'ℹ fail', 'ℹ skipped'))]
failed = [l.strip() for l in log.splitlines() if l.lstrip().startswith('✖') and 'failing tests' not in l]
print(f'mutant {name} rc={rc} {" ".join(counts)} restored={restored}')
for f in sorted(set(failed)):
print(' ' + f)
print('KILLED' if rc != 0 else 'SURVIVED')
if not restored:
sys.exit(f'STOP {rel} was not restored')
@@ -0,0 +1,117 @@
✔ a raw token file, with or without one trailing newline, reaches curl only through the config stream (120.340737ms)
✔ the raw path accepts nothing else, and refuses before curl runs (334.531809ms)
✔ the file checks still apply on the raw path: mode, symlink, missing, directory (260.658975ms)
✔ the raw path base URL has no override (58.479627ms)
✔ the JSON path is unchanged, and JSON never falls through to the raw path (239.149992ms)
✔ a file that changes between the two reads refuses before curl runs, with or without a body (688.511352ms)
✔ the token reaches no child environment, even with an inherited CFG or SHELLOPTS=allexport (660.085268ms)
✔ real helper GET HTTP 200 preserves exit 0 without credentials (13.507131ms)
✔ real helper POST HTTP 201 preserves exit 0 without credentials (10.033571ms)
✔ real helper GET HTTP 403 preserves exit 1 without credentials (8.586849ms)
✔ fixture git subjects only, follow-ups and three session kinds (142.188555ms)
✔ text and JSON carry same numbers, open and truncated title (203.542538ms)
✔ missing credentials exit 2, no-issues never calls API and shows unknown (181.143701ms)
✔ empty range gives no rows and zero totals (141.713767ms)
✔ inclusive UTC dates, first-line preamble only, role and seat boundaries (139.575854ms)
✔ close-only issue included, even median, missing metadata stays unknown (145.766841ms)
✔ unique commits but per-issue links count multiple tags once each (141.148232ms)
✔ issue pages of 50, 50 and 7 read 107 issues in 3 pages (309.541712ms)
✔ one short page reads 1 page; --no-issues reads none and says so (228.621572ms)
✔ a short page 10 is read; a full page 10 refuses at the ceiling (679.199685ms)
✔ an issue number on two pages refuses (152.791703ms)
✔ a failing page 2 refuses the whole read without its stderr (155.778629ms)
✔ page 2 with a malformed record refuses (148.137397ms)
✔ page 2 with more than 50 rows refuses (146.881978ms)
✔ bad API payload not JSON refuses (145.522689ms)
✔ bad API payload {} refuses (138.082594ms)
✔ bad API payload [{"number":1}] refuses (150.41171ms)
✔ partial or malformed session log refuses with location, not content (172.040275ms)
✔ a U+2028 or U+2029 inside a session string is one line, not a malformed record (143.346075ms)
✔ no sessions is an empty table; symlink source refuses (203.692994ms)
✔ reads only refactor even when another branch is checked out (154.740546ms)
✔ invalid dates, reverse dates and duplicate options refuse (111.18019ms)
✔ T3 agent assignments do not count as human in Table 2 (175.130336ms)
✔ preamble parsing and issue number boundaries (0.407452ms)
✔ T3 header: agent, or board from control-board; anything short of the full header is human (0.132503ms)
✔ no closed issues with human messages means undefined ratio, not invented zero (0.189682ms)
✔ T3: seat, archived, unmapped and Researcher threads count; imported, deleted and other-project threads do not (484.623629ms)
✔ T3: the default path is read from HOME and prints no path line; --no-t3 says so (688.058905ms)
✔ T3: a HOME with no database exits 1 and names --no-t3 (138.856765ms)
✔ T3: a file that is not a database exits 1 and names --no-t3 (137.411602ms)
✔ T3: a seat thread renamed to another seat exits 1 naming thread, title and roles (398.101166ms)
✔ T3: an unmapped thread addressed as a seat exits 1 (386.198698ms)
✔ T3: a header to another thread id is not cross-checked (380.284581ms)
✔ T3: no project, or two, for this root exits 1 (1050.78935ms)
✔ T3: a removed column exits 1 and names it (238.083314ms)
✔ T3: a missing table exits 1 and names it (224.200824ms)
✔ T3: a counted row with an unknown role exits 1 without its text (400.82703ms)
✖ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (411.093731ms)
✔ T3: a counted row with non-text content exits 1 without its text (424.670298ms)
✔ T3: a counted row with an unparseable created_at exits 1 without its text (477.135311ms)
✔ T3: a reasoning summary is skipped before any check and counted as excluded (1097.460064ms)
✔ T3: a missing orchestration_events makes the diagnostic unknown and keeps the counts (735.113282ms)
✔ T3: a human message with no event counts in humanWithoutEvent (397.977439ms)
✔ T3: an unparseable event makes the diagnostic unknown and keeps the counts (872.863613ms)
✔ T3: an event with no string messageId makes the diagnostic unknown and keeps the counts (756.020979ms)
✔ T3: an error that is not from SQLite is rethrown, not reported as a database failure (350.987921ms)
✔ T3: a symlink at ~/.t3 exits 1 (136.814014ms)
✔ T3: a symlink at ~/.t3/userdata exits 1 (141.043119ms)
✔ T3: a symlink at ~/.t3/userdata/state.sqlite exits 1 (135.113955ms)
✔ T3: with --t3-db, a symlinked file or directory exits 1 (467.393535ms)
✔ T3 WAL: the newest message only in -wal, writer attached, is counted (396.544902ms)
✔ T3 WAL: stopped cleanly, counts are correct and the main file is unchanged (426.261926ms)
✔ T3 WAL: -wal without -shm in a writable directory is read (455.83161ms)
✔ T3 WAL: -wal without -shm in a read-only directory exits 1 (474.234342ms)
✔ T3 WAL: stopped cleanly in a read-only directory exits 1 (425.725162ms)
✔ T3: a lock held past the 5 s busy timeout exits 1 and names --no-t3 (5403.012971ms)
✔ a done row whose closing issue is open is a violation; a row that is not done is not (1.731517ms)
✔ an issue several rows close is expected closed only once all of them are done (0.468666ms)
✔ closure needs positive evidence: unknown is undecided, and so is a skipped or short issue check (0.355841ms)
✔ each owner of an in-progress or in-review row gets one liveness class (7.339831ms)
✔ a required row not done after 14 days is a violation; a legacy row uses genesis as its lower bound (0.385769ms)
✔ an ISO requiredSince, as `set required` writes it, ages from its UTC day; one that does not parse is a violation (0.241737ms)
✔ the text section always ends in a count and a result, and never prints a full pass (0.349023ms)
✔ pidAlive: a running pid is present, an exited one is gone, and EPERM still means present (22.107102ms)
✔ issue states: open list first, then the metric page, then at most 10 lookups (259.418102ms)
✔ a full open list: lookups settle what it leaves out, and only an unsettled issue keeps it undecided (355.246127ms)
✔ the open list refuses on a failed call or a bad record, and never echoes the helper (161.017188ms)
✔ a helper call past the deadline is killed with its child, and the call reports it (2008.073449ms)
✔ readQueue loads queue.json through the queue validator and refuses anything else (121.541008ms)
✔ protected changes list every in-range entry that changes a required or parked row (385.213418ms)
✔ the CLI prints the queue section above the weekly table and under a queue key in --json (520.028922ms)
✔ a queue with nothing wrong prints 0 violations and a reduced pass, never a full pass (228.781477ms)
✔ --no-issues makes no call and leaves the issue checks undecided; --no-queue skips the section (309.350644ms)
✔ the CLI refuses a bad queue before any call, and a failed open list with exit 2 (306.08648ms)
✔ --unsupported-runtime repeats once per seat and takes a seat name (319.438491ms)
✔ an unreadable config makes every owner invalid instead of passing them (183.903992ms)
ℹ tests 86
ℹ suites 0
ℹ pass 85
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 22879.103768
✖ failing tests:
test at tests/ledger.test.mjs:383:4
✖ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (411.093731ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 1
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:386:46)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 1,
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,227 @@
✔ a raw token file, with or without one trailing newline, reaches curl only through the config stream (111.388536ms)
✔ the raw path accepts nothing else, and refuses before curl runs (355.70715ms)
✔ the file checks still apply on the raw path: mode, symlink, missing, directory (261.706998ms)
✔ the raw path base URL has no override (52.495705ms)
✔ the JSON path is unchanged, and JSON never falls through to the raw path (232.374532ms)
✔ a file that changes between the two reads refuses before curl runs, with or without a body (671.52699ms)
✔ the token reaches no child environment, even with an inherited CFG or SHELLOPTS=allexport (663.943161ms)
✔ real helper GET HTTP 200 preserves exit 0 without credentials (11.047478ms)
✔ real helper POST HTTP 201 preserves exit 0 without credentials (9.864337ms)
✔ real helper GET HTTP 403 preserves exit 1 without credentials (11.94368ms)
✔ fixture git subjects only, follow-ups and three session kinds (146.410888ms)
✔ text and JSON carry same numbers, open and truncated title (209.213949ms)
✔ missing credentials exit 2, no-issues never calls API and shows unknown (176.607891ms)
✔ empty range gives no rows and zero totals (145.899832ms)
✔ inclusive UTC dates, first-line preamble only, role and seat boundaries (154.07268ms)
✔ close-only issue included, even median, missing metadata stays unknown (140.622455ms)
✔ unique commits but per-issue links count multiple tags once each (149.756581ms)
✖ issue pages of 50, 50 and 7 read 107 issues in 3 pages (142.316508ms)
✔ one short page reads 1 page; --no-issues reads none and says so (229.205783ms)
✖ a short page 10 is read; a full page 10 refuses at the ceiling (141.879991ms)
✖ an issue number on two pages refuses (134.29877ms)
✖ a failing page 2 refuses the whole read without its stderr (142.629037ms)
✖ page 2 with a malformed record refuses (137.128337ms)
✖ page 2 with more than 50 rows refuses (138.019005ms)
✔ bad API payload not JSON refuses (125.654549ms)
✔ bad API payload {} refuses (126.873011ms)
✔ bad API payload [{"number":1}] refuses (127.113242ms)
✔ partial or malformed session log refuses with location, not content (133.183157ms)
✔ a U+2028 or U+2029 inside a session string is one line, not a malformed record (141.442584ms)
✔ no sessions is an empty table; symlink source refuses (206.963161ms)
✔ reads only refactor even when another branch is checked out (146.999648ms)
✔ invalid dates, reverse dates and duplicate options refuse (122.389181ms)
✔ T3 agent assignments do not count as human in Table 2 (141.474347ms)
✔ preamble parsing and issue number boundaries (0.440362ms)
✔ T3 header: agent, or board from control-board; anything short of the full header is human (0.150506ms)
✔ no closed issues with human messages means undefined ratio, not invented zero (0.186956ms)
✔ T3: seat, archived, unmapped and Researcher threads count; imported, deleted and other-project threads do not (432.688544ms)
✔ T3: the default path is read from HOME and prints no path line; --no-t3 says so (661.982219ms)
✔ T3: a HOME with no database exits 1 and names --no-t3 (127.072527ms)
✔ T3: a file that is not a database exits 1 and names --no-t3 (167.210086ms)
✔ T3: a seat thread renamed to another seat exits 1 naming thread, title and roles (397.309283ms)
✔ T3: an unmapped thread addressed as a seat exits 1 (369.019149ms)
✔ T3: a header to another thread id is not cross-checked (383.355658ms)
✔ T3: no project, or two, for this root exits 1 (948.074449ms)
✔ T3: a removed column exits 1 and names it (240.314945ms)
✔ T3: a missing table exits 1 and names it (234.28681ms)
✔ T3: a counted row with an unknown role exits 1 without its text (375.878828ms)
✔ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (368.400181ms)
✔ T3: a counted row with non-text content exits 1 without its text (385.294224ms)
✔ T3: a counted row with an unparseable created_at exits 1 without its text (398.14034ms)
✔ T3: a reasoning summary is skipped before any check and counted as excluded (942.214671ms)
✔ T3: a missing orchestration_events makes the diagnostic unknown and keeps the counts (722.919382ms)
✔ T3: a human message with no event counts in humanWithoutEvent (372.575028ms)
✔ T3: an unparseable event makes the diagnostic unknown and keeps the counts (704.976069ms)
✔ T3: an event with no string messageId makes the diagnostic unknown and keeps the counts (659.027782ms)
✔ T3: an error that is not from SQLite is rethrown, not reported as a database failure (311.591057ms)
✔ T3: a symlink at ~/.t3 exits 1 (125.078613ms)
✔ T3: a symlink at ~/.t3/userdata exits 1 (127.135099ms)
✔ T3: a symlink at ~/.t3/userdata/state.sqlite exits 1 (129.854222ms)
✔ T3: with --t3-db, a symlinked file or directory exits 1 (444.340631ms)
✔ T3 WAL: the newest message only in -wal, writer attached, is counted (406.646966ms)
✔ T3 WAL: stopped cleanly, counts are correct and the main file is unchanged (379.897252ms)
✔ T3 WAL: -wal without -shm in a writable directory is read (412.786146ms)
✔ T3 WAL: -wal without -shm in a read-only directory exits 1 (421.182687ms)
✔ T3 WAL: stopped cleanly in a read-only directory exits 1 (379.185721ms)
✔ T3: a lock held past the 5 s busy timeout exits 1 and names --no-t3 (5384.508215ms)
✔ a done row whose closing issue is open is a violation; a row that is not done is not (1.722235ms)
✔ an issue several rows close is expected closed only once all of them are done (0.47045ms)
✔ closure needs positive evidence: unknown is undecided, and so is a skipped or short issue check (0.350017ms)
✔ each owner of an in-progress or in-review row gets one liveness class (7.340355ms)
✔ a required row not done after 14 days is a violation; a legacy row uses genesis as its lower bound (0.3623ms)
✔ an ISO requiredSince, as `set required` writes it, ages from its UTC day; one that does not parse is a violation (0.230192ms)
✔ the text section always ends in a count and a result, and never prints a full pass (0.316459ms)
✔ pidAlive: a running pid is present, an exited one is gone, and EPERM still means present (25.619131ms)
✔ issue states: open list first, then the metric page, then at most 10 lookups (253.35516ms)
✔ a full open list: lookups settle what it leaves out, and only an unsettled issue keeps it undecided (360.042118ms)
✔ the open list refuses on a failed call or a bad record, and never echoes the helper (162.324498ms)
✔ a helper call past the deadline is killed with its child, and the call reports it (2008.176195ms)
✔ readQueue loads queue.json through the queue validator and refuses anything else (120.193261ms)
✔ protected changes list every in-range entry that changes a required or parked row (378.73155ms)
✔ the CLI prints the queue section above the weekly table and under a queue key in --json (505.408678ms)
✔ a queue with nothing wrong prints 0 violations and a reduced pass, never a full pass (236.277868ms)
✔ --no-issues makes no call and leaves the issue checks undecided; --no-queue skips the section (300.804059ms)
✔ the CLI refuses a bad queue before any call, and a failed open list with exit 2 (279.265874ms)
✔ --unsupported-runtime repeats once per seat and takes a seat name (350.74372ms)
✔ an unreadable config makes every owner invalid instead of passing them (171.507348ms)
ℹ tests 86
ℹ suites 0
ℹ pass 80
ℹ fail 6
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 20928.890762
✖ failing tests:
test at tests/ledger.test.mjs:146:1
✖ issue pages of 50, 50 and 7 read 107 issues in 3 pages (142.316508ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
50 !== 107
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:150:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 50,
expected: 107,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:162:1
✖ a short page 10 is read; a full page 10 refuses at the ceiling (141.879991ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ pages: 1,
- pages: 10,
read: true
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:165:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { read: true, pages: 1 },
expected: { read: true, pages: 10 },
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:171:1
✖ an issue number on two pages refuses (134.29877ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:174:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:176:1
✖ a failing page 2 refuses the whole read without its stderr (142.629037ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:178:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:182:99
✖ page 2 with a malformed record refuses (137.128337ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:185:48)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:182:99
✖ page 2 with more than 50 rows refuses (138.019005ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:185:48)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,25 @@
base cc48b124f DOCKER_HOST=unset docker=29.7.2 start 16:11:32
pkg-bus rc=0 16:11:32-16:11:36 ℹ pass 148 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 4297.744772
pkg-business rc=0 16:11:36-16:11:38 ℹ pass 67 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 1779.304694
pkg-cli rc=0 16:11:38-16:11:56 ℹ pass 184 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 17540.768373
pkg-control-board rc=0 16:11:56-16:11:56 ℹ pass 124 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 620.060996
pkg-conversation rc=0 16:11:56-16:12:44 ℹ pass 182 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 47313.901076
pkg-discord rc=0 16:12:44-16:12:46 ℹ pass 178 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 2609.325572
pkg-harness rc=0 16:12:46-16:12:57 ℹ pass 80 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 11024.709757
pkg-ledger rc=0 16:12:57-16:13:20 ℹ pass 86 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 22205.154959
pkg-mosaic rc=0 16:13:20-16:13:22 ℹ pass 69 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 2127.521824
pkg-queue rc=0 16:13:22-16:13:51 ℹ pass 156 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 29276.755618
pkg-runs rc=0 16:13:51-16:13:52 ℹ pass 43 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 736.604786
pkg-seat rc=0 16:13:52-16:13:57 ℹ pass 120 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 4917.587587
pkg-tasks rc=0 16:13:57-16:14:02 ℹ pass 92 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 5146.641147
pkg-webui rc=0 16:14:02-16:14:56 ℹ pass 108 ℹ fail 0 ℹ skipped 0 | ℹ duration_ms 54484.250053
script-auth rc=0 16:14:56-16:14:57 | selftest: 15 passed, 0 failed
script-conductor rc=0 16:14:57-16:15:02 | selftest: 17 passed, 0 failed
script-config rc=0 16:15:02-16:15:03 | selftest: 24 passed, 0 failed
script-discord rc=0 16:15:03-16:15:10 | discord suite: 66 passed, 0 failed
script-extension-package rc=0 16:15:10-16:15:11 | extension package selftest: 18 passed, 0 failed
script-foundation rc=0 16:15:11-16:15:48 | selftest: 44 passed, 0 failed
script-queue rc=0 16:15:48-16:16:20 ℹ pass 156 ℹ fail 0 | queue suite: 28 passed, 0 failed
script-release rc=0 16:16:20-16:16:33 | selftest: 14 passed, 0 failed
script-task rc=0 16:16:33-16:17:08 | selftest: 98 passed, 0 failed
GATE_PASSED 16:17:08
@@ -0,0 +1,156 @@
✔ agents: a held role with nothing on the bus is idle; a role session gets the claim rows unchanged (143.638381ms)
✔ agents: working counts what the holder received and has not read; routed alone is not working (241.179952ms)
✔ agents: input needed is the role's open decisions routed to the human, gated first, then oldest (343.239695ms)
✔ agents: working wins over waiting, and Input needed still shows (181.295661ms)
✔ agents: a new holder doesn't inherit what the last one left unread; decisions stay with the role (189.56719ms)
✔ agents: state reads only its own business, even for a run name both use (205.578354ms)
✔ agents: a message the holder released unread is stranded; the next holder gets nothing and cannot read it (261.157139ms)
✔ agents: a message the holder read is not stranded; one the current holder has not read is not listed (221.012416ms)
✔ agents: stranded is oldest first and capped at 50 for a role (904.708222ms)
✔ agents: stranded is per role and per business (338.557896ms)
✔ agents: a message routed to a held role and not yet received is not stranded (140.77587ms)
✔ launch identity is stamped, payload identity is refused and stale holder cannot send (178.790649ms)
✔ decision classes route from policy; gated resolution is human-only, choice and target must match (307.149728ms)
✔ claim exclusion, holder release, gated revoke and rerouting to a new holder are atomic (295.58731ms)
✔ launch events require a human CLI capability; generic emit cannot forge authority events (182.808684ms)
✔ within-role decisions close atomically and invalid options or blocking omissions refuse (198.046252ms)
✔ a recommendation that is not exactly one option key refuses invalid-recommendation after the options (315.925772ms)
✔ observer capabilities read human inbox but cannot mutate or forge launch identity (196.390918ms)
✔ task action subjects and linked decision trail are complete and ordered (198.516011ms)
✔ launch binding is durable and reconnecting requires the identical trusted record (141.083527ms)
✔ business isolation includes inherited object names and cross-business message references (237.243008ms)
✔ authority never transfers between action, run, target, unresolved or replaced role holder (272.179864ms)
✔ task projection uses schema current view, skipping earlier and equal-start polls (139.28702ms)
✔ revocation permanently bars the old run from reclaiming first, including after broker restart (228.956011ms)
✔ empty message references refuse before storage; refusal-evidence failure stays a typed error (136.92387ms)
✔ both arbiters require human resolution when their cross-role route is themselves (244.966386ms)
✔ the shipped coder role raises task.reassign as gated to the human; task.scope.change stays cross-role (123.611962ms)
✔ S1 adapter takes resolved limits and refs, rejects mismatched instance, never mutates input (3.963536ms)
✔ credentials gives human and reader sessions service, account, role, date and state, and nothing else (112.351271ms)
✔ credentials refuses a role session and any argument (199.704677ms)
✔ credentials reads the status on each request, and a broker without one lists none (231.918692ms)
✔ the broker process answers credentials without a token, path or variable in its output, log or store (206.887711ms)
✔ only validated broker references load; returned data and exceptions cannot expose a known token (4.448707ms)
✔ bad file modes, symlinks, repository/data paths, malformed tokens and missing dates refuse (3.229354ms)
✔ expiry refuses use and env references never become client data (1.130547ms)
✔ S1 parsed service refs work, service mismatch refuses, Gitea rotation due is a warning state (3.522471ms)
✔ opaque tokens shorter than 16 characters refuse before use (0.386403ms)
✔ roles lists open decisions routed to a role, and never the human inbox (251.898516ms)
✔ recent lists closed decisions of every route, newest close first, with how each closed (286.869972ms)
✔ recent gives the closing event as closed when the decision was seen first (317.374624ms)
✔ recent stops at RECENT rows (884.105325ms)
✔ every row is what trail already gives the same session for that id (278.789313ms)
✔ a role session can't list decisions, so it can't read another role's open decisions (431.839363ms)
✔ decisions is a read: one business, strict arguments, nothing written (372.205198ms)
✔ endLaunch writes session.ended, releases the run claim and kills its capabilities (135.060875ms)
✔ endLaunch refuses an unknown run, a second end and a rebind of the ended run (171.042762ms)
✔ a restarted broker refuses to rebind an ended run; a refused rebind leaves the run unbound (166.492526ms)
✔ endLaunch leaves a claim another run took alone (191.627207ms)
✔ refuse records action.refused against the caller with the code only (148.742463ms)
✔ launches off refuses role.launch with launch-revoked until launches on (200.596125ms)
✔ broker process: launch ops authorize role.launch, record refusals and end runs (279.885764ms)
✔ human proof binds CLI entry, process start and nonce; agents and incomplete ancestry refuse (3.984133ms)
✔ process reader gets own kernel identity without exposing environment values (0.77781ms)
✔ EACCES ancestor environments skip only markers; commands and registered launches still refuse (1.031284ms)
✔ real pid 1 remains inspectable when its environment is protected (0.429598ms)
✔ within-role sends cite an open gated launch decision without spending it or naming it in grants (213.584556ms)
✔ missing and foreign-business citations refuse and roll back message and grant (206.395663ms)
✔ cross-role sends still need a matching resolved decision and consume it once (261.357391ms)
✔ messages pages all human messages newest first without writes; read state is history (2749.213966ms)
✔ messages refuses role callers, invalid paging and cursors outside this human feed (264.244312ms)
✔ views messages passes only its paging arguments through (0.281179ms)
✔ messages isolates businesses even with a valid foreign cursor (193.786494ms)
✔ broker process binds trusted launches, offers reader capabilities, refuses human mutation, closes cleanly (227.06818ms)
✔ startup token refusal returns safe code without value or partial listening broker (40.801671ms)
✔ loaded fixture token is absent from socket replies and SQLite, including refusal evidence (200.101556ms)
✔ killed broker leaves an explicit stale lock; another process cannot silently reclaim it (197.784831ms)
✔ trusted host registers later launches; socket clients never have a registration verb (211.464389ms)
✔ runtime excludes declared project roots even when host supplies no repoRoots (55.318584ms)
✔ a refused launch binding leaves the broker and existing capabilities alive; bad protocol stops it (207.772665ms)
✔ a reply is listed for human and reader sessions, and its delivery rows are unchanged (250.991875ms)
✔ the reply still reaches the human message.receive (mosaic talk) after the Console showed it (205.757519ms)
✔ a message with no reply gives an empty list (177.757685ms)
✔ replies come oldest first and stop at REPLIES (859.253547ms)
✔ an id that names no message in the business refuses message-not-found, and the refusal is recorded (302.746498ms)
✔ strict arguments; a role session gets human-required (403.565841ms)
✔ views passes replies through as one call with the id (0.241455ms)
✔ requirements returns the committed list to a holding role session, and no one else (244.874473ms)
✔ the PM's prd.approve with no task, when no id fits, reaches the human's Inbox (162.516321ms)
✔ the PM's non-blocking role.revoke with no task reaches the human's Inbox (193.865538ms)
✔ a push is recorded as the action.allowed for git.push.working on the task, and only the host records one (266.625641ms)
✔ review.request names the latest pushed commit and sends the reviewer a REVIEW-REQUEST (256.753419ms)
✔ review.request says which run holds the reviewer role, or null, and a null request waits for a claim (327.013089ms)
✔ review.request refuses a commit that isn't the latest push, a non-reviewer and a role without the action (395.353012ms)
✔ reviewFetch answers only the addressed reviewer, for the request it cites (286.800623ms)
✔ review.verdict answers one request once, to the role that asked (319.694568ms)
✔ task.close on a pushed task needs an approve verdict for the latest push (408.464261ms)
✔ a refusal the host decided is filed on the task it names, and only a task ref counts (255.332747ms)
✔ v3b prototype refusals, views and append-only mutations (1138.49036ms)
✔ gated approval authorizes once, survives store reopen, and fresh approval works (294.832531ms)
✔ another run cannot consume an approval; a failed check leaves it usable (240.845264ms)
✔ two scheduled callers have exactly one grant and one consumed refusal (179.749668ms)
✔ failed commit rolls consumption back; cross-role consumes and within-role stays reusable (328.164559ms)
✔ class drift gated to cross-role refuses before consumption (258.304439ms)
✔ class drift cross-role to gated refuses before consumption (269.444902ms)
✔ class drift gated to within-role refuses before consumption (248.230447ms)
✔ class drift cross-role to within-role refuses before consumption (276.025994ms)
✔ class drift within-role to gated refuses before consumption (226.194917ms)
✔ class drift within-role to cross-role refuses before consumption (199.895723ms)
✔ message.send consumes approval and prevents a later send or authorize (212.929759ms)
✔ role.revoke consumes approval and prevents a later revoke or authorize (260.663051ms)
✔ a business that never switched launches reads allowed with no time and no event (147.507595ms)
✔ launches revoked and then restored read allowed, with the restore time and event id (183.649919ms)
✔ a task closed on the tracker leaves the open list, and total counts the open ones (159.16607ms)
✔ a tombstone is not open (155.482716ms)
✔ the open list stops at the cap and says so; total still counts every open task (176.403939ms)
✔ a role and a reader session read state; arguments, and an unbound cap, refuse (147.789819ms)
✔ a human session reads the same state, with the same cap (157.415953ms)
✔ reading state writes nothing: every table keeps its row count (174.417955ms)
✔ creates private WAL store and excludes a second writer until explicit close (161.747404ms)
✔ rollback is atomic and schema metadata is checked against trusted DDL, not just itself (186.724417ms)
✔ existing empty database and symlink runtime directory refuse, never initialize over damage (194.294553ms)
✔ crash during a transaction recovers no partial event after explicit fixture-only lock removal (169.337346ms)
✔ writer refuses mixed at/read_at forms atomically, even through trusted SQL helpers (126.413973ms)
✔ async transactions refuse before invoking their function (102.230557ms)
✔ the session default fits under the reply cap and pages to the end with next (337.8763ms)
✔ the short form: no description, assignees by role, every listed key (301.641002ms)
✔ each filter, alone and together, and total counts every match (358.345308ms)
✔ task_ref reads one task in full, as the whole board has it (281.217176ms)
✔ no arguments is the read the Console and mosaic make, unchanged (285.649803ms)
✔ an unknown argument or a bad value refuses invalid-request (967.45335ms)
✔ tasks rows carry priority and requirement for every session that reads tasks (323.114825ms)
✔ the read model rebuilds from the ledger: a reopened bus and each trail give the same values (378.757848ms)
✔ an empty business and one with snapshots but no task.created read cleanly (140.465634ms)
✔ recordTask keeps sync reads and a role write apart (177.129567ms)
✔ read_at must be one canonical UTC format, so the projection compares strings safely (119.781379ms)
✔ a bad entry refuses the whole record (133.679721ms)
✔ taskView reads the projection for one business (163.674978ms)
✔ requestTask hands only a holder and a task verb to the handler, and records refusals (278.008579ms)
✔ the server sends task verbs to the adapter with its own timeout; other verbs stay synchronous (407.333924ms)
✔ without an adapter the server refuses every task verb (257.081016ms)
✔ the runtime refuses an invalid adapter and closes a valid one (235.42688ms)
✔ the process loads the S3 adapter from plain-data trackers (278.381081ms)
✔ the tester binds only when the business sets bus.tester to exactly true (851.130284ms)
✔ a business may not name a role tester, so the tester address is never a role (282.656669ms)
✔ every verb outside the tester list refuses tester-refused and is recorded against the tester (570.809636ms)
✔ a tester message is from tester, starts [mos test], and writes no human.input or authority (229.765184ms)
✔ a role answers a tester only in reply to a tester message, and the answer never reaches the human (274.717093ms)
✔ the tester reads the human views a reader reads (127.301323ms)
✔ tester proof binds its own CLI, start time and nonce, refuses a managed run and allows an agent (1.138672ms)
✔ neither CLI's nonce proves the other: each proof is bound to its own CLI and nonce variable (0.343825ms)
✔ testerNonce reads only the tester's variable and gives null on any read error (0.207581ms)
✔ an envelope carries exactly one of cap, human and tester; no tester authenticator refuses (56.387306ms)
✔ tester-cli.mjs binds through the runtime when the switch is on, and refuses off or under a run marker (716.850979ms)
✔ socket capability stamps launch identity; shared views use wire, no SQL client (193.603137ms)
✔ two wire claims serialize; a lost reply never automatically retries (200.20578ms)
✔ malformed, oversized and identity-forging envelopes refuse without echoing input (116.298055ms)
✔ client preserves UTF-8 when a response divides a multibyte character (12.104003ms)
✔ committed mutation followed by dropped reply reports unknown and is never retried (144.04991ms)
ℹ tests 148
ℹ suites 0
ℹ pass 148
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4297.744772
@@ -0,0 +1,75 @@
✔ config directory and file path follow MOSAIC_CONFIG (1.121183ms)
✔ the fixture business validates and comes back frozen (3.230078ms)
✔ two instances may share a definition (1.061217ms)
✔ top-level refusals (3.067703ms)
✔ arbiters and projects (4.834311ms)
✔ role instances (2.683877ms)
✔ Vikunja bots (6.726973ms)
✔ a role without Vikunja takes no tracker block (2.907062ms)
✔ credential references match the definition's services (2.673255ms)
✔ launch (7.718923ms)
✔ loadBusiness: file checks (1.88022ms)
✔ loadBusiness: not a regular file (35.561788ms)
✔ loading writes nothing (0.984498ms)
✔ names that are Object.prototype properties don't count as declared (2.489077ms)
✔ the shipped example refuses as written and validates once filled in (0.50214ms)
✔ the role file loads and resolves through loadBusiness (4.476101ms)
✔ the shipped file is exactly decision 104's list (0.546846ms)
✔ the resolved record matches decision 104, so a widened file fails (1.298052ms)
✔ message.send is within role and every other action is gated (1.546471ms)
✔ a business grant of a gated action through limits does not widen the role (1.595631ms)
✔ a launch block whose by is the chief-of-staff instance is refused (1.768057ms)
✔ the instance takes no credential references and no tracker (2.882839ms)
✔ usage errors exit 4 (263.741633ms)
✔ validate: a good business exits 0 and prints instance digests (66.172642ms)
✔ validate: project files (296.772121ms)
✔ validate: missing files and a broken system config (225.61466ms)
✔ validate: credential reference problems exit 2 and name each one (62.170558ms)
✔ validate: a token file inside the repository is refused (63.230892ms)
✔ validate: role definitions come from MOSAIC_ROLES_DIR (183.631333ms)
✔ resolve: prints one instance's record (193.474851ms)
✔ resolve: refusals (361.826084ms)
✔ parse: exactly one of file or env, plus the service's date (2.354935ms)
✔ check: a good file has no problems (0.69117ms)
✔ check never opens the file: a write-only token passes (0.380444ms)
✔ check: file problems (1.134159ms)
✔ check: token files can't live in the repository or dataRoot, even through a linked directory (1.101336ms)
✔ check: dates and environment references (0.508668ms)
✔ path and load (1.959449ms)
✔ refusals (0.878857ms)
✔ systemVars flattens the validated config (2.458689ms)
✔ precedence: system, business, project, project role, agent (4.552195ms)
✔ limits narrow the definition and never widen it (2.003067ms)
✔ role.launch stays within-role only for the instance the launch block names (4.270901ms)
✔ limits.authority without role.launch leaves the launcher with no launch block (1.534387ms)
✔ limits.authority narrows cross-role actions too (0.989118ms)
✔ classify (1.023674ms)
✔ the record carries what the broker and launcher need (0.874314ms)
✔ digest: key order doesn't matter, any value change does (4.906639ms)
✔ refusals (1.800237ms)
✔ the four shipped version 2 roles load (2.647113ms)
✔ shipped role scopes match addendum B section 2 and the SR runbook (0.868204ms)
✔ shipped authority follows the note's table (0.544251ms)
✔ version 1 files keep loading with no authority (0.890761ms)
✔ the conductor policy isn't a role (0.23492ms)
✔ a missing role file is exit 4, a symbolic link too (0.431697ms)
✔ version 2 refusals (1.130438ms)
✔ authority: closed vocabulary, no gated-only action, no overlap (1.802504ms)
✔ credentials: Gitea scopes (0.811307ms)
✔ credentials: Vikunja scopes are a group-to-verbs map from the grantable list (1.033974ms)
✔ credentials: services (0.525504ms)
✔ contract: a non-empty regular Markdown file beside the role file (0.877118ms)
✔ every key names known layers and a merge rule (0.96567ms)
✔ unknown keys and wrong layers refuse (0.86423ms)
✔ types (1.748073ms)
✔ merge: defaults, then the most specific layer wins (0.257783ms)
✔ merge: limits only narrow, and provenance lists each source (0.325673ms)
✔ merge doesn't change its inputs (0.153637ms)
ℹ tests 67
ℹ suites 0
ℹ pass 67
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1779.304694
@@ -0,0 +1,194 @@
✔ every screen and overlay fits 120x36, 80x24 and the narrow layout, row for row (1299.251829ms)
✔ width counts terminal cells: wide CJK and emoji 2, U+FE0F after a one-cell base 1, marks 0 (77.465261ms)
✔ broker text is shown, never interpreted: no raw control character or bidi override reaches the terminal (179.025718ms)
✔ NO_COLOR: no escape codes, except reverse video on the selected row (253.713276ms)
✔ 1-9 shows the decide flow's own lines and question; only y resolves (177.575006ms)
✔ the app shows the same decide text as mosaic decide (125.85137ms)
✔ any key but y or Y at the question answers No; nothing is sent (1768.210054ms)
✔ below 40x10 the question is hidden, so every key answers it No, y included (Filbert R3) (593.482247ms)
✔ under 40 columns a tall terminal shows the too-small screen even where the decide box would fit; y sends nothing (Filbert N10) (1168.831332ms)
✔ a hidden decide box names the way out, and the status line under it does not promise y (Filbert N12) (95.88743ms)
✔ a throw while answering the question goes to crash, sends nothing and leaves no job pending (95.766774ms)
✔ type-ahead never answers the question: a paste, keys typed before it is drawn, keys inside askMs (1012.795356ms)
✔ quitting at the question answers No and sends nothing, armed or not (191.152827ms)
✔ a timer tick reads nothing under an overlay, never answers the question, and keeps a resolved status (121.515414ms)
✔ a long question is cut inside the question; the action, target, choice and prompt stay (Dewey B1) (134.273092ms)
✔ a decide box too big for the terminal says so, and every key answers it No, y included (Dewey B1, round 3) (823.926912ms)
✔ at every size the decide box shows each line y depends on, or says it is hidden (8333.895832ms)
✔ outcome unknown: the CLI's sentence, no retry, then the trail or a re-read (158.419734ms)
✔ refused and failed reads keep the last list, marked stale; a refused decide says refused (110.187674ms)
✔ help or a detail box cut to fit keeps its last line, Esc included (Dewey) (57.590324ms)
✔ keys: views, moving, trail of a selection, the command line, help and quit (224.686294ms)
✔ one option: the status line says Press 1, not 1-1 (96.455546ms)
✔ no business: the app says so and :business picks one (48.224807ms)
✔ mosaic with no argument: exit 3 in an agent run, exit 4 with the usage off a terminal, the app on one (1.782373ms)
✔ scripts/mosaic with no argument reaches the app entry; the seat usage it printed before has not drifted (168.560561ms)
✔ strings to keep exactly live once, in the decide flow and the transport; the app does not restate them (0.457544ms)
✔ decide with --note still asks; a No sends nothing (64.421352ms)
✔ the app's business comes from a live bus host only (0.987721ms)
✔ runApp leaves the terminal as it found it on q, end of input, SIGTERM, SIGINT, SIGHUP and an error, the first frame's included (6.400024ms)
✔ draw is pure: same state, same frame (0.741049ms)
✔ inbox lists only decisions routed to the human, with what approving authorizes and how to decide (135.825524ms)
✔ decide resolves by id prefix with --yes, and the trail shows it in broker order with the task to follow (144.506321ms)
✔ decide refuses without a terminal or --yes, on an unknown option and on a short reference (112.581472ms)
✔ decide prints a declining choice as declining (114.33328ms)
✔ an unknown outcome is reported once and never resent (123.177075ms)
✔ a decision closed before the answer arrives exits 2 and points at its trail (103.75977ms)
✔ a prefix that matches two open decisions exits 2 and resolves neither (106.258989ms)
✔ without --business a command uses the live host's business, and a stale host.json is not a host (96.564299ms)
✔ every human command refuses inside an agent run before it touches the bus (107.860354ms)
✔ usage errors exit 4; no business and no host is a usage error (103.370386ms)
✔ agents and tasks print through the broker (78.174077ms)
✔ notify.json: missing, loose, malformed and extra keys refuse; a binding or null passes (1.415225ms)
✔ bootConfig builds the broker's boot message for one business, with no trackers key when no project names one (59.366049ms)
✔ trackers come from the tracker.* variables of the one project that names a tracker project (87.558035ms)
✔ with two projects, the one that sets tracker.project supplies the tracker and the other is no conflict (33.938941ms)
✔ two projects that each name a tracker project refuse, since the boot shape holds one (37.481953ms)
✔ a business without tracker.baseUrl gets no trackers entry (29.513382ms)
✔ an unknown business and a broken system config refuse with exit 3 (58.927357ms)
✔ follow prints an unsolicited message after plain talk returned (172.374413ms)
✔ talk --follow continues after reply and prints a later unsolicited message (192.08223ms)
✔ inbox lists all unread human messages under decisions, does not deliver or read them (2247.640831ms)
✔ follow refuses agent context and bad arguments (80.534474ms)
✔ follow Ctrl-C wakes the poll sleep and removes its handler; transport errors also clean up (176.436353ms)
✔ plain talk leaves the process SIGINT handlers unchanged (135.097222ms)
✔ empty views say so (1.116018ms)
✔ the trail keeps the broker's order and names a decision's task without its rows (1.395494ms)
✔ tasks print the tracker fields the snapshot carries (0.240392ms)
✔ the review loop: the coder pushes and asks, the reviewer fetches and approves, and the task's trail holds each step (703.730107ms)
✔ refusals: no action, non-fast-forward, an unknown commit or request, and a push for another task moves only that task's ref (634.625419ms)
✔ the size cap refuses a push before any byte (343.119577ms)
✔ a fetch over the cap refuses before any byte reaches the reviewer (588.728734ms)
✔ the socket refuses a request with no capability, an unknown one, and a bad request line (364.85346ms)
✔ a rigged clone runs nothing: hooks, fsmonitor, a filter, a gitlink and a symlinked .git/config leave no marker (835.587348ms)
✔ an identity with no role, or of another business, refuses not-a-role and moves no ref (640.858703ms)
✔ a review of a project the business no longer has refuses unknown-project (399.920841ms)
✔ past maxActive connections the socket refuses git-busy, and a hung-up connection frees its slot (289.381166ms)
✔ close() answers host-closing to a connection still sending its request line (265.404793ms)
✔ a bundle that trickles in refuses body-timeout at its deadline and frees its slot (735.470786ms)
✔ a reviewer gone before its bundle was sent is filed fetch-aborted, not as the host's fault (705.739364ms)
✔ a reviewer that hangs up the moment it has the whole bundle was served, not aborted (560.672217ms)
✔ send: a close after every byte left is served; one that fails a queued write is fetch-aborted (42.62747ms)
✔ a bundle with no bytes for bodyIdle refuses body-timeout long before its deadline (586.374099ms)
✔ send: a close once the loop is past its last chunk is served, and a failed write there is fetch-aborted (23.861635ms)
✔ letGo waits for an answer to leave for at most its cap, then destroys the socket (301.613276ms)
✔ a record that fails and can't be undone refuses rollback-failed, which the host logs (498.242332ms)
✔ the host boots the broker, binds a launch in process, and the notifier DMs a blocking decision exactly once (930.570871ms)
✔ a notifier that dies takes the host down with exit 1, so the unit restarts the pair (270.34129ms)
✔ a second host for the same data root refuses with exit 3 while the first runs (174.965785ms)
✔ two bus starts racing for one data root leave one host running; the other refuses that a host already runs (579.322314ms)
✔ a host takes over a host.lock its dead host left, and puts back a live claim that replaced it meanwhile (1.220032ms)
✔ a host.lock that goes between the check and the read is tried again; one that can't be parsed still refuses as unreadable (0.726876ms)
✔ a live host's lock stays, however old the file is (0.50203ms)
✔ a host.lock left by a host killed with SIGKILL doesn't stop the next bus start (818.107662ms)
✔ while a host boots, a reader sees no host: the human commands still ask for --business, stop and status find none (192.665123ms)
✔ a host started before host.lock existed, holding only host.json, still refuses a second start, which leaves no lock (27.133161ms)
✔ a broker fork that throws leaves no host.lock and no host.json (30.50015ms)
✔ a broker send that throws leaves no host.lock and no host.json (31.130437ms)
✔ a broker that misses its boot wait leaves no host.lock and no host.json (30.749886ms)
✔ a notifier fork that throws stops the broker and leaves no host.lock and no host.json (340.601732ms)
✔ a notifier send that throws stops the broker and leaves no host.lock and no host.json (241.370471ms)
✔ a boot reply with no reader for the business refuses with exit 3 naming it, before the notifier starts, and leaves no host.lock and no live broker (247.995465ms)
✔ a boot reply with no reader for the business refuses with exit 3 naming it, with no notifier, and leaves no host.lock and no live broker (243.894249ms)
✔ a host.json that can't be written stops both children and leaves no host.lock (261.492389ms)
✔ an error event on the broker before it replies fails the start at once, and leaves no host.lock and no live child (31.730237ms)
✔ an error event on the notifier before it replies fails the start at once, and leaves no host.lock and no live child (161.557552ms)
✔ an error event on the broker while the notifier starts fails the start once the notifier replies (276.220212ms)
✔ an error event on the broker once the host is up stops the host with exit 1, and leaves no host.lock and no host.json (254.886887ms)
✔ an error event on the notifier once the host is up stops the host with exit 1, and leaves no host.lock and no host.json (354.605317ms)
✔ a broker reply that misses the wait breaks the channel: the late reply answers nothing, later requests refuse, the host exits 1 (1146.496225ms)
✔ a broker reply with another request's id, or none, breaks the channel and the host exits 1 (279.115496ms)
✔ a broker reply with no request waiting breaks the channel and the host exits 1 (162.899888ms)
✔ a notifier that refuses stops the broker and the host refuses with exit 3 (202.402759ms)
✔ a notifier that refuses after the broker died still refuses with exit 3, without a send to the dead broker (179.315596ms)
✔ a notifier that dies before it replies, after the broker died, still refuses, without a send to the dead broker (120.631079ms)
✔ a close send that fails with EPIPE after the notifier refuses still gives the notifier's refusal, exit 3 (204.689545ms)
✔ a close send that fails with EPIPE after the notifier dies unanswered still gives the notifier's error (119.570567ms)
✔ close() whose stop and close sends fail with EPIPE still finishes, with exit 1 (183.399437ms)
✔ watchChildren reports a child that died before it was called, and one that dies later (22.024784ms)
✔ bus stop refuses to signal a live pid that is not a bus host (202.856686ms)
✔ bus start refuses with exit 3 and the code when the broker refuses to boot; bus status names the lock (269.331232ms)
✔ bus start refuses with exit 3 without a notifier config (103.953256ms)
✔ bus start runs until bus stop; status reports it while it runs (702.706512ms)
✔ bus-service.sh renders the unit and installs it into a given directory (58.037141ms)
✔ bus-service.sh pins the claude binary, refuses one the unit can't carry, and renders without one (73.687451ms)
✔ bus-service.sh refuses a directory pin and keeps a symlink default unresolved (14.86434ms)
✔ bus-service.sh refuses a default claude without the execute bit, or in a PATH dir with a space (9.864365ms)
✔ bus start --pm: the PM runs under its own PID namespace, registered, with a manifest (1341.616097ms)
✔ the PM launches a coder through its launch tool; the coder answers; refusals name their code (807.799422ms)
✔ each launch makes sure the workspace has a clone of the project: cloned, fast-forwarded, or kept and logged (1922.331675ms)
✔ a project clone that can't be made refuses checkout-failed, from --pm and from a session, with no run and no clone left (228.499888ms)
✔ a runner that stops at once ends its launch with the runner's reason (288.462051ms)
✔ a Claude Code launch with no session credential refuses before it starts (187.059889ms)
✔ a pi launch needs no session credential: pi logs in through its own ENV_ALLOW variables (254.545705ms)
✔ a runner killed from the host ends its launch as killed, not failed (339.610014ms)
✔ a missing or failing bwrap refuses sandbox-unavailable before anything starts; there is no unconfined fallback (222.535548ms)
✔ a real Claude Code coder's shell can't read a stand-in secret or anything else its sandbox doesn't hold (1495.226645ms)
✔ a host that died hard leaves its sessions to the next host, which kills them and ends their runs so the role can be launched again (757.017898ms)
✔ a host that died hard leaves its sessions to the next host, which finds one already exited (23) and ends their runs so the role can be launched again (3668.009174ms)
✔ a malformed sessions.json refuses the host start with exit 3 and stays as it was (117.698105ms)
✔ an over-long launch request is refused at once, not at the 10 s idle timeout (125.565943ms)
✔ a launch client that never closes its side doesn't hold the host's close (139.298563ms)
✔ a runner that ignores SIGTERM is killed when the host closes (1285.874414ms)
✔ claudeVersion asks MOSAIC_CLAUDE_BIN when set, else claude on PATH (4.454362ms)
✔ zoned uses the IANA zone across DST (24.156846ms)
✔ each open blocking decision is DM'd once, across polls and a restart; non-blocking ones are not (142.05589ms)
✔ two blocking decisions get two DMs with different nonces (125.734529ms)
✔ the digest nonce differs per business and per day and fits Discord's 25 characters (0.302334ms)
✔ a failed DM is journaled, backs off, and is retried until it lands (118.741045ms)
✔ five definite refusals stop a DM: one gave-up line, one log line, and a restart keeps the count (102.657469ms)
✔ 429s, 5xx-style unknowns and refusals without a status never count toward the limit (130.086829ms)
✔ a crash between the fifth refusal and its gave-up line: the next poll appends it and sends nothing (116.312332ms)
✔ polled every POLL_MS against a permanent 403, a DM is sent at 0, 30, 60, 90 and 120 min and gives up only then (168.341831ms)
✔ a restart after the second refusal does not send before that refusal's 30 min are up (128.721201ms)
✔ the digest goes at 08:00 Chicago once a day, with blocking ones marked as DM'd (134.042719ms)
✔ a late start with no digest for the day sends one at once; an empty inbox gets one line (78.964526ms)
✔ an inbox read failure is logged and the next poll retries (1.030307ms)
✔ no Discord id reaches the journal or the log (90.952784ms)
✔ the journal: a torn tail is copied out and truncated, so an append after it reopens cleanly (20.499134ms)
✔ the journal: a crash between the copy and the truncate leaves a tail the next open repairs (40.408061ms)
✔ the journal: a whole file that is one torn line truncates to empty (19.196728ms)
✔ the journal: a malformed complete line refuses and leaves the file and any torn tail alone (1.887312ms)
✔ the journal: a loose file mode, a loose directory or a symlinked journal refuses (0.754517ms)
✔ the journal: a line with a wrong type refuses with exit 3 and names the field (4.948359ms)
✔ the journal: a symlinked directory refuses and says it is a link (0.630148ms)
✔ the journal: a dangling directory link, a parent that is a file and a journal that is a directory each refuse with exit 3 (0.982563ms)
✔ the journal: an append after the file was swapped for a symlink refuses and writes nothing through it (0.4883ms)
✔ the journal: a directory it cannot write or create refuses with exit 3 and names the path (0.596641ms)
✔ digest content stays within Discord's 2000 characters (0.340286ms)
✔ runLoop never overlaps ticks and stops after the one in flight (111.359888ms)
✔ shared copy: npm ci, pushed reachability, readonly/existing copy, webui delegation (605.885442ms)
✔ wrapper preserves Q81 lease and marker, rejects foreign/symlink; check uses effective roots (428.541764ms)
✔ bus unit copy/pm pins, install refuses all busy states and failed reads, drop-in refusal (463.632073ms)
✔ missing package manifest refuses before npm; npm failure removes the unpublished temp copy (296.65093ms)
✔ real pinned install loads bus and Console; same-copy mosaic talk passes proof, other trees refuse (3716.900336ms)
✔ bus status reads effective copy/pm/drop-ins without writes; check refuses an overridden ExecStart (457.149882ms)
✔ drop-ins in either override field and malformed metadata refuse; uninstall also checks --no-reload (179.326581ms)
✔ install never shows a template name on systemd 261; template drop-ins still refuse (172.243885ms)
✔ unlisted instance drop-in is found in another unit lookup directory; path discovery errors refuse (170.307523ms)
✔ talk --tester sends a [mos test] message as tester from inside an agent and prints the role's reply (155.060585ms)
✔ talk --tester refuses text without the [mos test] prefix before any call (115.402134ms)
✔ the read verbs take --tester inside an agent, and the trail shows the tester as the sender (108.920961ms)
✔ decide, stop and launches take no --tester (93.869907ms)
✔ the tester transport runs tester-cli.mjs, and the tester's refusals exit 3 (0.336927ms)
✔ with no stand-in transport, --tester runs tester-cli.mjs on the data root's socket (0.542007ms)
task.close {} answered: invalid-request; fake saw 18 requests, first GET /info 200, GET /projects/1 200, GET /projects/1/views 200
task.close on a missing task answered: task-not-found; it made GET /tasks/999 404
✔ bootConfig trackers reach the S3 adapter in the real broker child, which goes ready against a fake Vikunja (389.881128ms)
✔ the transport writes {business, verb, args} to the child and reads its JSON (48.419939ms)
✔ a bus code on stderr becomes the exit code; garbage and timeouts are outcome problems (2155.585697ms)
✔ busExit and refuseInsideAgent (0.488986ms)
✔ talk sends a REQUEST, prints and reads everything that arrives, and stops at the reply (217.299713ms)
✔ talk --wait 0 only sends; no reply within --wait exits 1 and says where it will show (1134.902028ms)
✔ a late reply the Console has listed still reaches the next talk (2178.686619ms)
✔ talk, stop and launches off/on refuse inside an agent run; bad arguments are usage errors (106.64487ms)
✔ launches off and on go to the broker and change the business's launch state (244.928307ms)
✔ launches list reads sessions.json and marks a stale entry; stop reports it and refuses a non-runner (208.440466ms)
ℹ tests 184
ℹ suites 0
ℹ pass 184
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 17540.768373
@@ -0,0 +1,132 @@
✔ explicit request, Seen, ordinary completion and a new request have distinct attention states (3.780367ms)
✔ attention convention ignores reasoning/quoted examples and permits leading blank lines (0.318725ms)
✔ completed smoke replies and ordinary questions are idle, not human blockers (0.699065ms)
✔ only an explicit first-line input request makes a finished reply waiting (0.143938ms)
✔ tool activity, user text, errors and unfinished turns override attention text (0.119014ms)
✔ STOP access failure is unknown, not absence, under a non-root identity (28.695886ms)
✔ connector Task never inherits Discord routing envelopes; ordinary Task still uses user text (2.609152ms)
✔ connector discovery keeps only safe identity; rejects modes, mismatches, links and traversal (1.246884ms)
✔ canonical owner identity and STOP are independent; no tmux fallback or forged registration (6.906893ms)
✔ connector reply refusal precedes forged live tmux registration; ordinary agent still sends (0.82424ms)
✔ server rescans connector discovery and refuses HTTP reply without transport (37.485058ms)
✔ connector session links and linked directories are not read (1.081359ms)
✔ newer live matching launch marks old activity, preserves history/attention/attribution, then clears on new activity (2.387099ms)
✔ CLI print uses the relaunch notice instead of old current preview (53.580709ms)
✔ connector owner and fixed task never inherit a native relaunch notice (2.386218ms)
✔ equality, stale/unknown/offline, mismatched registration and unknown activity do not assert relaunch (2.769534ms)
✔ loadConfig: missing file throws ConfigError (1.37738ms)
✔ loadConfig: invalid JSON throws ConfigError (0.279921ms)
✔ loadConfig: missing dataRoot throws ConfigError (0.199405ms)
✔ loadConfig: relative dataRoot throws ConfigError (0.192519ms)
✔ loadConfig: valid config returns dataRoot (0.594288ms)
✔ findNewestSession: picks the newest by mtime among two files (0.415991ms)
✔ findNewestSession: finds files in nested subdirectories (0.288009ms)
✔ findNewestSession: returns null for a missing dir (0.136724ms)
✔ readSession: extracts fields, collapses/truncates text, counts a truncated final line (0.588067ms)
✔ readSession: model and provider follow the latest model_change entry or assistant turn; null when the log names neither; scanAgent carries them (1.133222ms)
✔ readSession: lastError carries the assistant errorMessage only when the last assistant turn errored (0.445348ms)
✔ findNewestSession/scan: never read sibling auth or secrets next to a sessions dir (1.011901ms)
✔ deriveState: full state table (0.154302ms)
✔ rule: newest entry is an assistant message with a tool call, after a question-looking text, is working (0.294953ms)
✔ rule: newest entry is a tool result with no assistant text after it is working (0.247743ms)
✔ rule: a finished ordinary turn is idle, even if it says your move (0.238597ms)
✔ task: the first user message of the session, from text blocks (0.235382ms)
✔ task: a plain-string user content is accepted, whitespace collapsed and long text capped (0.242861ms)
✔ task: no user message in the log means null (shown as unknown), never a guess (0.253233ms)
✔ workspace: the live tmux pane path wins; the session cwd is the fallback; neither means null (0.338904ms)
✔ activeProject: basename of the nearest .git directory or .git file above the workspace; none means null (0.480309ms)
✔ scan: the written record carries task, workspace and activeProject (0.427131ms)
✔ registration: overrides task, project and workspace; every source says registration; registered carries the launch fields; the grouping column is untouched (0.52776ms)
✔ registration: empty task and null project/workspace leave the derived values in place; registered is still non-null (0.328475ms)
✔ registration: a record whose pid is gone is stale; derived values win, sources say derived, registered stays with alive false; a pid the probe cannot decide is not stale; pidAlive itself (0.889749ms)
✔ registration: no registration leaves the Gate A fields exactly as before, and registered is null (0.379767ms)
✔ loadRegistrations: a missing seatsDir gives empty lists (0.141578ms)
✔ loadRegistrations: one good record, one malformed JSON, one with an unknown field; a stray file under seatsDir is ignored (0.657588ms)
✔ matchRegistration: matches by sessionsDir, and by realpath through a symlink; sessionsDir null never matches; same seat name with a different sessionsDir does not match (fleet vs repo darkwing) (0.286234ms)
✔ scan: writes the registration override to disk; index.json carries registered and registrationErrors (1.226908ms)
✔ scan: a relative seatsDir throws ConfigError; an omitted seatsDir behaves as before (0.225873ms)
✔ scanAgent: waitingOnYou is true for waiting/error and false otherwise (0.409986ms)
✔ scanAgent: ageSeconds is computed from the injected now (0.230759ms)
✔ scanAgent: sessionFile null and state idle when sessions dir is empty but alive (0.139917ms)
✔ discoverRepoAgents: finds agents with a sessions dir, skips those without, sorted by name (0.299938ms)
✔ discoverFleetAgents: finds agents with a sessions dir, sorted by name, fleet tmux fields (0.341094ms)
✔ scan: writes per-agent files and index.json, rerun overwrites, no leftover tmp files (0.751489ms)
✔ scan: relative boardDir throws ConfigError (0.075508ms)
✔ CLI: scan with assume-alive liveness exits 0, prints board summary, writes board files (55.406235ms)
✔ CLI: missing config exits 2 with a refused: message (49.421311ms)
✔ CLI: unknown command exits 2 (45.847449ms)
✔ CLI: unknown --liveness value exits 2 (46.773243ms)
✔ panesRunPi: true when any trimmed line equals 'pi' (0.189928ms)
✔ panesRunPi: false for bash-only, claude, empty, or node-pi-style lines (0.071776ms)
✔ tmuxIsAlive: a pane running pi is alive (0.167263ms)
✔ tmuxIsAlive: session exists but pi has exited is not alive (0.074889ms)
✔ tmuxIsAlive: no such tmux session is not alive (0.061486ms)
✔ tmuxIsAlive: tmux could not be run at all is unknown (null), never assumed alive (0.058269ms)
✔ tmuxIsAlive: passes -L <socket> only when a socket is given (0.107331ms)
✔ parsePanes: one pane per line, command and optional tab-separated path (0.076618ms)
✔ tmuxInspect: reports the path of the pane running pi, not of a shell pane (0.069424ms)
✔ tmuxInspect: no pi pane, no session, or no tmux gives no workspace and the matching liveness (0.085387ms)
✔ loadSeen: missing file returns {} (0.123592ms)
✔ loadSeen: invalid JSON throws ConfigError (0.179856ms)
✔ loadSeen: a JSON array throws ConfigError (0.149629ms)
✔ loadSeen: a non-string value throws ConfigError (0.160982ms)
✔ markSeen: seen true adds the key and writes seen.json mode 0600, no leftover tmp files (0.304016ms)
✔ markSeen: seen false deletes the key (0.238741ms)
✔ markSeen: missing, empty, or non-string fields throw ConfigError (0.223581ms)
✔ markSeen: project containing '/' throws ConfigError (0.115111ms)
✔ markSeen: non-boolean seen throws ConfigError (0.104962ms)
✔ scanAgent: a seen mark matching the waiting session's lastTimestamp clears waitingOnYou (0.281778ms)
✔ scanAgent: a stale mark (agent wrote something newer) is not seen and waitingOnYou is true (0.221915ms)
✔ scanAgent: a working session with a matching mark is not seen (marks only apply to waiting/error) (0.245397ms)
✔ scanAgent: an error-state session with a matching mark is seen (0.287591ms)
✔ scan: index.seen and waitingOnYou reflect seen.json, which scan never rewrites or deletes (0.484112ms)
✔ scan: a corrupt seen.json makes scan throw ConfigError (fail closed) (0.200658ms)
✔ taskSetBy: a registered task carries the record's setter; a record without the field (pre-#1511) reads unknown; the value is not copied into registered (0.590062ms)
✔ taskSetBy: null whenever the task shown is not the registered one: no registration, an empty registered task, a stale registration; the field is always present (0.564121ms)
✔ taskSetBy: scan() reads the field from disk through the seat package (bounded there), writes it to the per-agent record and index, and an invalid on-disk value is a registrationError, never a row value (1.294954ms)
✔ isLoopbackHost: recognizes loopback hosts (1.111819ms)
✔ isLoopbackHost: rejects non-loopback hosts (4.074643ms)
✔ startServer: refuses a non-loopback host with ConfigError, never opens a socket (2.835435ms)
✔ startServer: serves page, healthz, and a rescanning /api/board (31.871634ms)
✔ startServer: a seatsDir registration overrides the row and index.registered reflects it (6.130543ms)
✔ startServer: /api/board returns 500 JSON with an error field when scan throws (2.36855ms)
✔ CLI: serve refuses a non-loopback host with exit 2 and a refused: message (51.723865ms)
✔ CLI: serve rejects a non-numeric --port with exit 2 (47.194167ms)
✔ CLI: scan still works after the async cli refactor (49.259354ms)
✔ CLI: live serve prints its URL and answers /healthz (65.390767ms)
✔ page.html: esc() escapes every HTML-significant character (0.6994ms)
✔ POST /api/seen marks a row; GET /api/board still shows it seen; seen:false clears it (8.966904ms)
✔ POST /api/seen without a JSON content-type returns 400 and does not write a mark (3.527396ms)
✔ POST /api/seen with invalid JSON returns 400 (1.833432ms)
✔ POST /api/seen with a body over 4096 bytes returns 400 (or resets the connection) and writes no mark (2.136158ms)
✔ POST /api/seen with a missing agent returns 400 (1.509673ms)
✔ POST /api/board returns 405; PUT /api/seen returns 405 (1.907104ms)
✔ CLI: scan --print marks a seen row with 's' and the summary line ends with 'N seen)' (56.008698ms)
✔ page.html: seenControl() escapes rec.project/agent/lastActivity, and the POST uses a JSON content-type (0.360486ms)
✔ page.html: has a collapsed Seen section that lists seen rows with the shared row builder (0.302679ms)
✔ page.html: each project has a Hide seen checkbox (default on) beside Hide offline, with a hidden-count note (0.199776ms)
✔ page.html: a project header reads "N of N" only while a checkbox hides rows (0.181787ms)
✔ page.html: every row shows Task and Active project, derived or the word unknown, with the workspace in the detail (0.33623ms)
✔ page.html: task and active project cells show their source via sourceTag(); the detail has a Registered row via registeredText(); SOURCE_LABEL maps registration to registered; every dynamic value in sourceTag/fromSource/registeredText is escaped (0.658877ms)
✔ POST /api/reply: runs agent-send.sh with -s from the registration, -S <host>:control-board, -m text plus the fixed trailer, no -L on the default socket, MOSAIC_TMUX_SOCKET stripped; answers delivered with the exit code and both streams (29.063587ms)
✔ POST /api/reply: a registration with a tmux socket adds -L <socket> (27.323866ms)
✔ POST /api/reply: a non-zero tool exit is a 200 with delivered false, the exit code and the stderr verbatim (25.408545ms)
✔ POST /api/reply: refusals before the tool runs: empty or blank or long text 400, unknown row 404, no registration 409, stale registration 409, no tmux session 409, bad JSON 400; the tool is never called (13.944489ms)
✔ POST /api/reply: a missing agent-send.sh is a 500 with the path in the error, not a crash (4.325951ms)
✔ replyToRow: DEFAULT_AGENT_SEND is the repository's tools/tmux/agent-send.sh and it is executable (0.157476ms)
✔ page.html: the reply box appears only where canReply() holds (live registration with a tmux session), the detail has a Reply row, the submit posts JSON to /api/reply, receipts and drafts survive a refresh, and every receipt value is escaped (0.585699ms)
✔ startServer: /api/board carries taskSetBy from a live registration and null for the derived rows (2.307638ms)
✔ page.html: the task cell and detail show who set a registered task via setByTag()/setByText(), both escaped, only from rec.taskSetBy; the reply gate does not read it (0.307738ms)
✔ Host/Origin guard: GET /api/board and POST /api/reply refuse a foreign Host, a wrong port and a cross-origin Origin with 403 JSON, before any scan or send, and never send CORS headers (7.560772ms)
✔ Host/Origin guard: loopback names on this port are accepted, with or without a same-origin Origin (36.028031ms)
✔ conversation routes (F16): a foreign Host, a wrong port and a cross-origin Origin get 403 before the reader runs, with no CORS headers (4.459255ms)
✔ every refusal code the reader can raise has an HTTP status (0.898965ms)
✔ conversation routes: catalogue, first page, next page and follow over HTTP; refusals map to 4xx with their code; nothing is written (45.562805ms)
ℹ tests 124
ℹ suites 0
ℹ pass 124
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 620.060996
@@ -0,0 +1,190 @@
✔ W1: two processes acquire the same pair at once; exactly one claim (202.768392ms)
✔ W1: two writers publish the same revision at once: one wins, the other gets null, the winner's record stays (30.353857ms)
✔ W1: a revision name appears only after its bytes are synced; before that, only a temp file exists (17.342267ms)
✔ W2: acquire while a claim is reserved or active refuses already-active (356.851085ms)
✔ W3: acquire while stopping, uncertain, or stopped without proof refuses unsafe-replacement (377.725155ms)
✔ W4: same session with another seat tuple, and the reverse, both refuse; a loser on the seat key closes it no-unit (244.446199ms)
✔ W4: a hard link of one session under another seat is the same session: the second controller refuses already-active and launches nothing (181.363883ms)
✔ W4: a copy of one session under another seat is the same session: the second controller refuses already-active and launches nothing (192.134722ms)
✔ W4: a session header ID that changes after construction refuses target; nothing is claimed or launched (2.341137ms)
✔ W5: SIGKILL between every publication barrier of acquire and transition; restart never finds two holders or a lost claim (9464.925251ms)
✔ W5: SIGKILL between every publication barrier of release; restart finishes or holds the release (31791.476427ms)
✔ W6: controller killed mid-turn while the engine lives; restart is uncertain, no launch, prompts refuse (258.263611ms)
✔ W12: a live owner paused with SIGSTOP; a second controller refuses already-active and changes nothing (145.139871ms)
✔ W13: crash after the engine spawns, before active; restart finds the live unit: uncertain, no second spawn, force stop only (427.143693ms)
✔ W14: crash after reservation, before the spawn marker: stopped with a no-unit observation; the pair is free (272.008712ms)
✔ W20: crash after the spawn marker, scope collected; uncertain in both runs, the marker is copied, no launch until a boot proof (356.026691ms)
✔ W15: crash between the two keys during release; restart finishes it under the same claim ID (107.992842ms)
✔ W7: recorded boot ID differs on the same machine: stopped with a boot proof; open tool calls become uncertain (166.435254ms)
✔ W8: resume after a proven stop with the same pins: new claim ID, generation +1, same conversation, branch and leaf (265.442824ms)
✔ W9: resume with a changed binary, argv digest, branch or leaf is refused and the claim is unchanged (766.062147ms)
✔ W11: the controller writes no session file; only the fake engine's own appends appear (194.493352ms)
✔ W16: a highest revision that won't parse holds the pair uncertain; the older stopped revision is not reused (91.227893ms)
✔ W17: a claim root copied from another host refuses foreign-host and promotes nothing (66.301374ms)
✔ G1: a session path or claim root under .pi/state, ~/.claude, the data root or a registration refuses at construction (3.846382ms)
✔ G2: a symlink inside the fixture root to a live session file is refused by the real-path check (1.018254ms)
✔ G3: a fixture path swapped for a live path after construction is refused at bind (1.886737ms)
✔ no shim from this file's tests is left running for the after hook (4.641676ms)
✔ K1: force stop kills a tool child that called setsid; stopped with a verified proof (561.587991ms)
✔ K2: K1 on the process-group fallback ends uncertain, never stopped (437.416951ms)
✔ K3: SIGTERM acknowledged while a member lives: stopping until the kill phase, never stopped from TERM (540.750864ms)
✔ K4: two engines; force stop one; the other survives by independent observation (2754.539897ms)
✔ K5: a stop during a tool call leaves the effect uncertain, and it is shown (452.459687ms)
✔ K12: a member forking in a loop: the freeze stops it, enumeration is complete, populated 0 after cgroup.kill (559.983292ms)
✔ K13: a member writing its pid into another cgroup is refused by the namespace; the kill is complete (485.480195ms)
✔ K15: the shim gone, engine/cgroup.events unreadable, or the engine cgroup missing: evidence unavailable, not empty; uncertain (5141.567289ms)
✔ K10: controller killed between the TERM and kill phases: restart checks the invocation ID and re-runs from TERM for the same stop (705.145309ms)
✔ K11: controller killed after the confirmation is recorded, before TERM: restart checks the invocation ID and re-runs from TERM for the same stop (544.733376ms)
✔ K14: a unit with the recorded name but another invocation ID: evidence unavailable, no signals, uncertain (409.130107ms)
✔ K6: recover without proof, without confirmation, or with changed pins is refused (725.578936ms)
✔ K7: recover after proof, then launch: new claim and execution, generation +1, same leaf; the cancelled prompt is not replayed (423.920433ms)
✔ K8: an engine that loads another leaf on resume is refused before admission; it stays claimed until a proven stop (498.395617ms)
✔ K9: an interrupt that never settles stays uncertain; force stop stays available; takeover is refused while fenced (3326.946727ms)
✔ K16: a claim from another machine ID refuses foreign-host; no boot proof is issued (43.472143ms)
✔ K17: two launcher calls with one eligibility record: one launch, the other refuses, no second engine (336.295232ms)
✔ K18: the leaf changes after eligibility: launch refused; the reservation stays until released with proof (310.182893ms)
✔ K19: a scope launched with only the engine environment still reaches the user manager; the engine sees no other names (72.975903ms)
✔ R1: after a proven force stop the controller releases the scope; the shim and the unit are gone (373.694668ms)
✔ R2: close releases the scope of a binding proven stopped, once, when the stop's own release hasn't run (495.312791ms)
✔ R3: no release after an unavailable stop or an unverified proof: the scope and its shim stay as evidence (1148.801364ms)
✔ E1: a natural engine exit with no member left: an engine-exit stop, stopped on a proof naming the engine, and the scope released (367.693089ms)
✔ E2: an engine exit with a tool child alive: the stop ends uncertain and nothing is released; a force stop then ends it (2478.004401ms)
✔ E3: an engine exit and a force stop take one escalation slot, in either order (1098.245398ms)
✔ E4: a shim that doesn't answer: the engine-exit stop misses its deadline, ends uncertain and frees the slot (1005.03095ms)
✔ E5: an engine exit after a force stop ended uncertain starts no engine-exit stop; the force stop stays current (2567.474592ms)
✔ E6: the engine-exit observation refuses a reaped process that isn't the recorded engine: another PID or start ticks (341.125293ms)
✔ R5: the harness finds a running shim and reaps it, and never signals a shim outside a mosaic-chat- scope (Filbert N1 and N2 on #1533) (383.81334ms)
✔ R6: releaseCohort releases nothing while the engine runs, for another invocation ID, or for a cohort without a scope (126.622167ms)
✔ R7: controller killed after the claim is stopped, before the release: the restart releases the scope (2651.811761ms)
✔ R8: controller killed between the two keys' stopped revisions: the restart releases the scope (476.530485ms)
✔ R9: a release that ended unavailable is tried again on a confirmed recover, not a refused one (511.54733ms)
✔ R10: close releases and signals nothing for a stopped binding whose proof no longer verifies (Filbert N3 on #1536) (362.766868ms)
✔ R11: close({ killEngine: true }) after a proven stop sends no signal to the recorded engine PID; a restart releases nothing more (2584.710995ms)
✔ R12: a restart onto a claim stopped on a boot proof releases nothing, though its scope is listed (252.180337ms)
✔ no shim from this file's tests is left running for the after hook (4.388096ms)
✔ S1: `/goal x`, with leading spaces or a tab, refuses text-policy at admission; zero engine bytes (202.818396ms)
✔ S2: every prefix pinned Pi interprets is refused, from the list the code uses; the rest reach the engine exactly (195.471106ms)
✔ S3: `/goal` on the second line is pinned from the source: Pi checks only index 0, so it is admitted and sent exactly (197.107897ms)
✔ S4: a `/` left in the composer is cleared when control transfers and returns; the next submit sends only the new text (269.232459ms)
✔ S5: an observer terminal gets a paste then Enter, as send-message.sh does: not admitted: controller, nothing sent (196.918282ms)
✔ S6: a mediated-shaped registration (no tmux) passed to the board's replyToRow: 409 no tmux session; exec never runs (0.456655ms)
✔ S7: ESC, bracketed-paste markers and U+2028/U+2029 travel as one JSON string; the engine receives the exact text in one record (194.122732ms)
✔ P3: a Pi confirm, select, input or editor dialog is shown disabled with a reason and never answered (290.557588ms)
✔ E1: send, ack, user, toolCall, toolResult, final answer: shown once, no refresh, draft and reading position kept (210.8699ms)
✔ E2: U+2028, U+2029 inside JSON strings and CRLF line ends each parse as one record, on the splitter and through the controller (188.272851ms)
✔ E3: a multipart final, two blocks, null request correlation and duplicate delivery (208.366891ms)
✔ E4: a page read after message_end but before its entry is persisted: marker at the seam, re-read after run-settled, each message once (207.935293ms)
✔ E4: a gap or a new epoch also reconciles; nothing is concatenated across a gap (10.064863ms)
✔ E5: an unknown native event gives no client event; evidence records its type and bytes; the terminal count goes up (206.968897ms)
✔ E6: a tool result delayed across a pause and a reconnect is reconciled without a manual refresh (216.354492ms)
✔ E7: the terminal renders the same stream as the library client, as observer and then as controller, and submits only as controller (224.828527ms)
✔ terminal: engine control characters are made visible; a lost connection refuses submit (191.280658ms)
✔ terminal: outcome unknown is shown as such, with no resend offer, and nothing is resent (0.395579ms)
✔ terminal: text after Enter in the same input chunk starts the next message; it never joins the one submitted (0.25269ms)
✔ terminal: a paste-start marker split right after its ESC still opens the paste; the Enter inside it never submits (0.305709ms)
✔ terminal: Ctrl-T then Enter in one chunk is judged after the takeover, as if typed one key at a time (Filbert F2, #1507) (0.512394ms)
✔ terminal: input held behind Ctrl-T waits for that takeover while an earlier action is still pending (Darkwing T1 on #1522) (31.048819ms)
✔ terminal: a hold inside held input holds again, and once it is drained later input and Ctrl-C still reach the terminal (Darkwing note 1 on #1522) (0.416016ms)
✔ terminal: an action that throws still releases the input held behind it, in order, then rethrows (5.785397ms)
✔ terminal: after an action throws, later input still runs; input() puts the error in the status line (Filbert N1 on #1522) (0.357821ms)
✔ terminal: input() reports an error when it happens, so it never overwrites a later status; held input's promise doesn't carry the holder's error (Filbert N4 on #1522) (0.359741ms)
✔ terminal: invisible and bidi characters are made visible; head, status and notice lines stay one line (0.09465ms)
✔ every record these fixtures produced is a valid CHAT-01 record (E5: no record fails the schema) (215.031711ms)
✔ H1: two takeovers with the same expected generation: one wins, +1; the other refuses generation (243.004754ms)
✔ H2: the old controller's prompt after a takeover commits is refused with zero engine bytes (285.166877ms)
✔ H3: a takeover while a prompt holds the dispatch lock: written under the old actor, or refused; never both (794.331092ms)
✔ H4: self-takeover is refused (188.413994ms)
✔ H9: Interrupt racing a prompt's dispatch: before the write, dispatch-refused and no-turn; after, §3 rules (428.085817ms)
✔ H10: Interrupt and force stop together: one stop chain, force stop supersedes (1015.862722ms)
✔ H10: an overlap during the pause before the abort: no abort, the stop ends uncertain (205.497744ms)
✔ H10: a no-turn Interrupt lifts only its own fence; admission stays closed under force stop, overlap or revocation (543.485978ms)
✔ H11: the controller disconnects mid-turn: work continues, the claim is unchanged, control stays put (269.701604ms)
✔ H12: an exact retry after reconnecting to the same incarnation returns the same receipt; one dispatch (140.516995ms)
✔ H13: a retry with the same request ID and different text is refused (183.605296ms)
✔ H14: late stdout from the old engine after a replacement is dropped by incarnation, counted, never rendered (541.668395ms)
✔ H15: a revoked connection's command is refused; the revocation fence holds (265.788573ms)
✔ H16: a second controller for the same session refuses already-active; the first is untouched (194.497006ms)
✔ H10: a second force stop while the first escalation runs refuses fenced; one escalation, and the claim records only the first stop's phases (820.751596ms)
✔ a force stop whose fence throws leaves no escalation flag behind, so the next force stop runs (Darkwing F2, #1507) (348.279908ms)
✔ H17: a confirmation reused, answered from another connection, or used after the stop changed is refused (708.776125ms)
✔ H18: two prompts before any native output: the second refuses busy; one engine write (196.930494ms)
✔ H19: the pipe fails mid-line under a large prompt: delivery-unknown transport-unknown, poisoned, no later write (329.838443ms)
✔ H19: the link itself never writes again after an unknown outcome, whoever calls it (0.666356ms)
✔ H19: the controller dies mid-write of a large line: after restart the outcome is unknown and nothing is resent (647.112384ms)
✔ H20: the line is written but the ack is lost when the controller dies: orphan, outcome unknown, nothing resent (528.171446ms)
✔ H21: a retry of the exact request with the old token after a crash is stale-incarnation; no second write (744.650161ms)
✔ H22: after H21 and a valid recovery, a new request with the new token is admitted (2992.009716ms)
✔ H23: requests pending at a restart are not resent; each shows outcome unknown (664.717897ms)
✔ no shim from this file's tests is left running for the after hook (4.449054ms)
✔ a plain conversation: catalogue row, one page, CHAT-01 records (6.012587ms)
✔ native entries map to blocks: tools, thinking, bash, notices, ids that do not fit (1.614189ms)
✔ F1: a malformed line is an unavailable part at its position, and reading continues (1.630853ms)
✔ F1: a missing parent stops the history with a notice that names the unreadable lines (2.446641ms)
✔ F1: an unreadable fork is never merged into another branch's history (1.567977ms)
✔ F1: a follow stays on its branch when the next entry's parent is unreadable (2.156968ms)
✔ F1: a file whose entries are all unreadable shows a notice per line (0.789239ms)
✔ F2: a truncated trailing line marks the view incomplete, not an error (1.197397ms)
✔ pagination: 100 parts, then the rest; parts concatenate to the whole branch (3.877736ms)
✔ F3: a replaced file (new inode) refuses old cursors with reconcile (6.276142ms)
✔ F4: a same-inode rewrite of the prefix refuses old cursors with reconcile (7.625669ms)
✔ F5: growth between pages keeps the epoch and the page stops at the pinned length (6.943843ms)
✔ F6: unknown, foreign and expired cursors refuse and leave the cursor usable (7.318877ms)
✔ F7: a symlinked file and a symlinked directory component are refused, never opened (7.766085ms)
✔ F8: a file swapped for a symlink after the catalogue is refused (1.683084ms)
✔ F9: registrations never add or redirect a root (1.597636ms)
✔ F10: a header cwd naming another project is refused (3.875992ms)
✔ F11: parentSession renders with a marker and the parent is never opened (0.675633ms)
✔ F12: two leaves: the default leaf is shown and the other branch reads alone (3.566748ms)
✔ F12: a follow refuses when an appended duplicate id changes the branch's earlier parts (1.780516ms)
✔ F12: a second root (Pi's resetLeaf) starts its own branch (1.181623ms)
✔ F13: compaction is a marker in place, then the retained content (0.798436ms)
✔ F14: long strings split into fragments and parts, reassemble exactly, and pages respect the byte cap (493.751933ms)
✔ fragments never cut a surrogate pair and keep an empty string (4.648456ms)
✔ F15: a Claude seat is an unsupported-harness placeholder whose directory is never read (1.522532ms)
✔ unknown conversations, empty files and non-Pi files refuse (2.338399ms)
✔ an unreadable file or root inside the roots is refused per row, not a failed catalogue (1.108105ms)
✔ a seat directory without search permission refuses that root, not the catalogue (2.045799ms)
✔ every page and cursor is a valid CHAT-01 record (810.508533ms)
✔ the engine pin holds for the installed package (1.798852ms)
✔ pinned Pi, sealed and without credentials, answers the controller's commands with the shapes the fake models (254.556063ms)
✔ sealed, pinned Pi ignores a trusted project's .pi resources; --approve past the seal would load them, and checkSeal refuses it (Filbert F2 on #1522) (502.805128ms)
✔ pinned Pi appends thinking_level_change at start when the branch lacks one, so the leaf moves (K8 then fails closed) (284.329677ms)
✔ N25: ordinary Interrupt reconciles; a non-empty queue_update in the window is O5 (473.941676ms)
✔ N1: an extension's follow-up queued after the fence is cleared before any abort; O5, Unknown (424.143277ms)
✔ N1: a follow-up queued before the fence is O5 at once; the Interrupt refuses fenced (231.700508ms)
✔ N2: with abort first, the fake runs the external item (the ordering guard has teeth) (20.051938ms)
✔ N3: the fence lands in preflight, preflight errors, no run: failed, No run, uncertain (324.580932ms)
✔ N4: the ack arrives after the first abort and a run starts: clear and abort again; Interrupted (195.327707ms)
✔ N5: an input handler takes the prompt: ack, no run, delivery-unknown handled-without-run (295.982736ms)
✔ N6: an extension queues between clear_queue and abort: O5 and O6, Unknown (469.235148ms)
✔ N7: clear_queue times out: no abort, nativeQueue unknown, force stop still ends it (1882.457432ms)
✔ N7: clear_queue answers an error: no abort, nativeQueue unknown, the link not poisoned (185.023065ms)
✔ N8: an extension prompt starts a run during Mosaic preflight; the losing settle is O3 (252.073732ms)
✔ N9: a run that started before the fence and ends aborted: failed interrupted, Interrupted (178.312405ms)
✔ N9: decision 34: a run that ends aborted with no stop in progress: aborted-without-stop, uncertain, outcome unknown (211.174413ms)
✔ N9: an aborted that lands after the fence but before any abort is written: aborted-without-stop, Unknown (386.126639ms)
✔ N10: fake conformance (31.394594ms)
✔ N11: the run fails before any user message_start: delivery-unknown ack-without-start, never failed (412.123403ms)
✔ N12: input that starts a run after the final empty clear is O1 and not part of the stop's proof (265.39736ms)
✔ N13: agent_start with no slot held is O1; a later prompt refuses with zero engine bytes (280.708726ms)
✔ N14: the run completes while clear_queue is in flight: finished, Completed first, uncertain (349.561723ms)
✔ N14: the run completes after the abort is written, before Pi applies it: finished, never relabelled (339.955248ms)
✔ N15: the fence lands in preflight, then an input handler takes it: handled-without-run, No run (347.586317ms)
✔ N16: Interrupt with no slot and no run refuses no-turn: no stop, no bytes, admission open (174.904267ms)
✔ N17: the run fails on its own during the exchange: failed, Failed on its own (339.728667ms)
✔ N18: no final assistant message_end, or a lost line: working stays working; before working, transport-unknown (641.086947ms)
✔ N19: a losing extension prompt settles inside the Mosaic run before its user message: O3, run-overlap (544.726143ms)
✔ N20: an extension triggerTurn during Mosaic preflight starts first; while streaming it queues with no signal (559.598527ms)
✔ N21: a losing settle after the receipt settled finished is O2; the receipt stays finished (228.588563ms)
✔ N22: an agent-level custom message is dropped by the clear with no signal; evidence names the seal (194.492896ms)
✔ N23: a nextTurn message survives clear and abort and attaches to the next prompt, with no signal (192.497186ms)
✔ N24: the seal is an allow-list: --extension, a missing --no-* flag, a second --mode or --session, a session or output flag, or a stray word refuses unsealed-engine; no engine starts (207.638527ms)
✔ N24b: the seal covers the engine command and environment: config can't name either, the env is built from names, and a mutated command is refused at bind (143.357917ms)
ℹ tests 182
ℹ suites 0
ℹ pass 182
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 47313.901076
@@ -0,0 +1,186 @@
✔ approvals: a request is validated before anything is posted; the rendering shows names and never ids (3.177259ms)
✔ approvals: the ledger is appended and folded into open requests with bind and approval states (1.637986ms)
✔ approvals: a reply approves only when it points at a request, says exactly approve, and comes from a listed approver once (0.589015ms)
✔ approvals: a button approves only on its own request message with the matching custom id (0.469707ms)
✔ approvals flow: a turn that opened a request posts the message with the button, records it, binds it, and both approvers approve (19.905738ms)
✔ approvals flow: a non-approver, a repeat, a wrong custom id and a service refusal each get their fixed line and a drop entry (6.921375ms)
✔ approvals flow: an invalid request from the model, a refused post, and no api client are recorded and post nothing (10.171129ms)
✔ approvals flow: start retries a bind and an approval left as unknown, under their original keys (2.49555ms)
✔ authorize: open channel, listed user (1.860552ms)
✔ authorize: wrong guild (0.248679ms)
✔ authorize: no guild (DM) (0.296389ms)
✔ authorize: unlisted channel (0.186064ms)
✔ authorize: unknown channel, no info (0.286981ms)
✔ authorize: thread of listed parent (0.195114ms)
✔ authorize: thread of unlisted parent (0.221517ms)
✔ authorize: text channel that is not a thread and not listed (0.128879ms)
✔ authorize: unlisted user (1.160243ms)
✔ authorize: no author (0.458736ms)
✔ authorize: bot author (listed id, bot flag) (0.21639ms)
✔ authorize: system author (0.262329ms)
✔ authorize: the bot itself (0.08118ms)
✔ authorize: webhook (0.585996ms)
✔ authorize: mention channel without mention (0.125957ms)
✔ authorize: mention channel with bot mention (0.119925ms)
✔ authorize: mention channel with @everyone only (0.113028ms)
✔ authorize: mention channel mentioning someone else (0.069541ms)
✔ authorize: mention channel, content says @bot but mentions empty (0.074482ms)
✔ authorize: private thread under mention channel, mentioned (0.076298ms)
✔ authorize: private thread under mention channel, not mentioned (0.063075ms)
✔ authorize: thread in another guild per channel info (0.064999ms)
✔ authorize: not an object (0.054499ms)
✔ authorize: no id (0.052523ms)
✔ authorize: oversize content is accepted and flagged (0.06172ms)
✔ authorize: exactly the limit is not oversize (0.062164ms)
✔ authorize: a user's channel allowlist drops them outside it, threads count as the parent, others are unaffected (0.698306ms)
✔ authorize: order puts wrong guild before user, and user before channel (no channel lookup for strangers) (0.129968ms)
✔ binding: a complete binding validates and is frozen (4.72068ms)
✔ binding: unknown key, missing field, wrong type refuse with exit 2 (1.309214ms)
✔ binding: empty allowlists refuse (2.489823ms)
✔ binding: a user's channel allowlist must be non-empty, listed and unique; absent means every listed channel (1.314593ms)
✔ reloadDiff: reloadable keys are summarised by id; every fixed key refuses with exit 2 (1.549846ms)
✔ binding: dmRecipient is optional, a snowflake, one of the listed users, and a fixed key (0.450363ms)
✔ binding: file must be 0600, regular, not a symlink (1.461004ms)
✔ binding: token file mode, symlink, emptiness and shape are checked; token never appears in errors (1.28688ms)
✔ cli: check refuses a non-0600 token file with exit 2 before any network use (83.268112ms)
✔ context files: absolute paths, traversal, symlinks and out-of-repo targets refuse; in-repo files resolve (1.961658ms)
✔ cli: check refuses a missing context file and a missing binding with exit 2; usage is exit 4 (273.810613ms)
✔ cli: reload validates the file first (exit 2), then needs a live owner (exit 1); usage is exit 4 (209.748338ms)
✔ cli: run refuses when STOP is present, before any network use (109.187188ms)
✔ binding: tools is optional, validated strictly, a fixed key for reload, and its roots are resolved against the data root (1.621558ms)
✔ binding: a git key is validated at load and reaches the extension whole, and only on a writable root (1.061408ms)
✔ delivery: an accepted message is in the inbox before the turn, the reply is chunked with one nonce per chunk, and the turn record is write-once (21.584423ms)
✔ delivery: refused and unknown outcomes are journaled; a later chunk is not sent after a failure (19.499266ms)
✔ delivery: restart with an unknown entry re-sends the same nonce once and reconciles before accepting traffic (1.621941ms)
✔ delivery: an unknown entry older than the dedupe window is marked refused, not re-sent; a still-unknown one refuses start (1.124725ms)
✔ delivery: repeated unknown reconciliations never refresh the dedupe window; the original intent time decides (1.153393ms)
✔ turn: a failed engine turn posts the fixed line, never model output, and writes a failed record (2.221045ms)
✔ turn: a second message during a turn is held by the engine, both get their own reply and record (32.621261ms)
✔ turn: a thread under a listed channel is answered in the thread; an unknown thread is looked up once (2.998397ms)
✔ drop: an unlisted user gets silence and one drop line; no inbox entry, no REST call, no engine call (0.881233ms)
✔ drop: an oversize message is accepted into the inbox, answered with the fixed line and journaled as a drop (0.874242ms)
✔ restart: an inbox with three ids and a replay of the same three produces zero turns (41.0457ms)
✔ stop: STOP present refuses start; STOP written while running refuses new turns and the current one finishes (30.874764ms)
✔ ceiling: the ceiling plus one is refused and journaled; one fixed line per UTC day; a new day accepts again (5.486567ms)
✔ ceiling: a burst arriving while turns are still running cannot queue past the ceiling (3.72449ms)
✔ ceiling: a turn interrupted by a crash still counts after restart; admissions are durable (1.746437ms)
✔ ceiling: the daily notice survives a same-day restart; one delivery attempt in total, even when the first attempt crashed mid-flight (4.279954ms)
✔ duplicate: the same event delivered twice while the thread lookup is held yields one prompt, one admission and one reply (2.122217ms)
✔ journal: no token-shaped string and no model output on the drop path reaches disk (0.438087ms)
✔ receipt: an admitted message gets one eyes reaction on the inbound message; drops and refusals get none; a failed reaction is recorded and does not fail the turn (2.157974ms)
✔ receipt: Discord refusing the reaction leaves the turn intact and records ok false (1.704484ms)
✔ reload: a new user is silent before and answered after; a removed channel goes silent; a lower ceiling applies at once (3.433985ms)
✔ reload: a fixed key refuses with exit 2 and the old binding stays in force (1.890919ms)
✔ tools: with a tools binding the turn record lists every read and its outcome; without one the field is null (3.541287ms)
✔ context: the Discord block names the server, channels and modes, and states the rules from Q15 and Q16 (2.413443ms)
✔ context: with tools the block names the roots, keeps file content as data, and says to state refusals plainly (0.679383ms)
✔ context: a writable root adds the write rules and says a write is real only once Jason commits (1.668342ms)
✔ context: the envelope is one bracketed line then the text; names cannot break the line (1.072061ms)
✔ context: a git root swaps the terminal-commit line for the git verbs, and a vault root adds the id protocol (1.39933ms)
✔ context: assembleContext concatenates files in launcher format and appends the block; sha256 is stable (1.398487ms)
✔ context: splitReply keeps paragraphs together under the limit and splits long ones at lines, spaces, then hard (0.802622ms)
✔ engine: buildPiArgs carries the fixed flags, engine settings, session dir and prompt file (2.652765ms)
✔ engine: with tools, buildPiArgs turns pi's own tools off, loads the extension explicitly and allowlists exactly our three (0.399573ms)
✔ engine: a run with tool turns settles once, on the answer, with every tool call in the result (60.452935ms)
✔ engine: a run that ends on a tool-only turn fails the prompt as empty; a retried run settles on the real end (37.528153ms)
✔ engine: one prompt, one turn, text and usage come back (34.63666ms)
✔ engine: a prompt while streaming is held until pi settles, then sent as its own run, and answered in order (330.015604ms)
✔ engine: a held prompt that times out before pi settles fails on its own and is never sent (231.663584ms)
✔ engine: timeout sends abort and fails only that turn; the process stays (103.586017ms)
✔ engine: tool events from a run that outlived its timeout never land in the next prompt's record (226.72613ms)
✔ engine: a prompt after a turn that timed out before its agent_start waits for pi to settle instead of being refused (124.607046ms)
✔ engine: when pi has not started a timed-out turn by the end of the abort grace, the engine stops pi and fails held prompts (212.540143ms)
✔ engine: a timed-out turn pi starts only after the grace never answers a later prompt (614.442143ms)
✔ engine: late events of a run past its grace, before pi exits, answer nothing and nothing more is sent (early prompt response) (1.333291ms)
✔ engine: late events of a run past its grace, before pi exits, answer nothing and nothing more is sent (late prompt response) (0.538663ms)
✔ engine: a timed-out run pi did start outlives the grace; the next prompt goes out when it ends (430.367296ms)
✔ engine: a malformed JSONL line fails the turn, not the process (23.387147ms)
✔ engine: a turn that ends in error rejects with the error code; process exit fails pending turns (43.688791ms)
✔ gateway: hello -> identify with intents, ready, heartbeat with jitter, ack (2.273992ms)
✔ gateway: missed ack closes the socket and resumes with the last sequence (1.529716ms)
✔ gateway: op 7 reconnect resumes; op 9 non-resumable re-identifies (0.542571ms)
✔ gateway: op 9 resumable resumes (0.337128ms)
✔ gateway: close 4014 is fatal, reports the missing intent, never reconnects (3.108122ms)
✔ gateway: 4004 and 4013 are fatal too; 1006 reconnects with identify when no session (0.577335ms)
✔ gateway: close() is final and unparseable frames are ignored (0.687619ms)
✔ git: config validation is strict, needs write: true, a work tree and a private token file (75.540042ms)
✔ git: the child environment drops every host git config, names one helper, and carries the token path only for origin (42.124292ms)
✔ git: status reports the branch, ahead/behind and changed paths, and refuses off the named branch or mid-merge (61.00131ms)
✔ git: parseStatus reads porcelain v2 including renames and conflicts (0.269748ms)
✔ git: a commit stages exactly the named files, carries the seat author and the requester trailer, and pushes at once (67.662682ms)
✔ git: commit refusals: message, paths, requester, nothing to commit, and an index that already holds other work (74.041047ms)
✔ git: a commit whose push fails is still a commit, says so, and the next commit's push carries both (D6) (73.308014ms)
✔ git: pull is fast-forward only; a diverged origin or dirty local files refuse with nothing merged (183.620646ms)
✔ git: push pushes the named branch only and reports up to date (65.402936ms)
✔ git: no token value or token path ever reaches a git argument list; outputs are masked and capped (75.340446ms)
✔ git: the credential helper answers get over https from a private file and nothing else (185.679595ms)
✔ git: the vault protocol validates before a commit, honours another owner's lock, reserves ids, and locks around writes (704.228928ms)
✔ lock: the claim is exclusive; a second start against a live owner refuses (4.291282ms)
✔ lock: a stale lock (dead owner, reused pid, or record without start) refuses run and is never signaled; only unlock clears it (79.938917ms)
✔ lock: an incomplete claim (directory without owner record) is busy and refuses run; unlock clears it (0.743503ms)
✔ lock: an owner record that exists but cannot be read is invalid: never signaled, never removed, never claimed over (2.69706ms)
✔ lock: legacy upgrade; a live connector holding a {pid, start} record is unknown, unlock refuses and nothing changes; after it exits, unlock clears it (39.725804ms)
✔ lock: a live pid whose record carries a malformed or noncanonical start or boot string is unknown, not a mismatch; nothing signals, removes, or claims over it (259.660388ms)
✔ lock: identity syntax; only canonical unsigned decimal start ticks and lowercase boot uuids are identities (0.382848ms)
✔ lock: a process whose start marker or boot id cannot be read refuses to claim (24.422152ms)
✔ lock: a live pid whose identity cannot be read right now is unknown: never signaled, never removed, never claimed over (0.895946ms)
✔ lock: four processes racing for the same binding; exactly one claims it and the others refuse (35.172741ms)
✔ lock: stale handoff; concurrent starts over a stale lock all refuse, nothing reclaims, one unlock then exactly one live owner (136.966307ms)
✔ lock: four-party schedule; claims landing inside an unlock's gap never survive, one unlock leaves no owner and no residue (86.715196ms)
✔ notices: a kind is recorded per UTC day and found again (0.434669ms)
✔ notify: the DM channel opens once, every send carries the nonce, and only the message id comes back (5.964259ms)
✔ notify: refusals and unknowns surface as RestOutcome without ids; a refused send reopens the channel next time (2.3028ms)
✔ notify: no dmRecipient, a non-0600 binding or token, or a missing binding refuse before any network use (3.194931ms)
✔ recover: nothing to do is clean; a lock whose owner is gone or that has no record is cleared and STOP ends up absent (58.445812ms)
✔ recover: an operator STOP refuses with exit 3 and is never removed, whatever the lock says (39.616748ms)
✔ recover: a brake written during the unlock wins; STOP stays with both lines and the start is refused (26.861783ms)
✔ recover: a held binding refuses with exit 3 and writes no STOP: live owner, alive pid without verifiable identity, unreadable record (63.441563ms)
✔ cli: recover exits 0 when ready, 3 behind a brake or a held binding, and run's own STOP refusal is 3 (600.069422ms)
✔ rest: createMessage sends nonce, enforce_nonce, empty allowed_mentions and a soft reply reference (2.431023ms)
✔ rest: 429 waits retry_after and retries; 4xx is refused; 5xx and socket errors are unknown (2.893624ms)
✔ rest: content and nonce limits are enforced locally; typing never throws (0.823591ms)
✔ rest: react PUTs the encoded emoji on the inbound message for @me; 2xx is true, anything else is false and never throws (0.963816ms)
✔ rest: createDm posts the recipient and resolves the channel id; 4xx refused, 5xx unknown, bad id never sent (1.014025ms)
✔ setspark config: a bare https or loopback origin, a private key file, a principal (3.812839ms)
✔ setspark config: reaches the tools config and the binding as a fixed key (2.330594ms)
✔ setspark config: the binding's key survives resolveToolRoots and the engine's JSON hand-off to the extension (1.296827ms)
✔ setspark config: approvers come from the binding's users, never from the binding's setspark key (1.582361ms)
✔ setspark verbs: required_approvers go out as discord ids from names and come back as names (17.896928ms)
✔ setspark verbs: no Discord user id reaches tool text, whatever shape the service returns it in (7.352391ms)
✔ setspark contract: a decision made with names opens a request the connector accepts; names stored by an old record still refuse (4.934904ms)
✔ setspark keys: read per call, one printable token per file, rotation without a restart (2.417694ms)
✔ setspark idempotency keys: principal, turn id, call index; connector keys name a step (0.507085ms)
✔ setspark http core: json in and out, bearer header, idempotency header, fixed user agent, no key anywhere else (1.923655ms)
✔ setspark http core: error bodies become fixed refusals with code and the 409 fields; server text is data, cut (1008.318868ms)
✔ setspark verbs: a setspark key enables the eight verbs and no counters (0.454031ms)
✔ setspark verbs: writes carry the turn's key and the asserted requester, reads carry no key, and the api key never appears in text or details (6.020542ms)
✔ setspark verbs: no turn refuses every write before any request; bad arguments refuse before any request; reads still work (1.215824ms)
✔ setspark verbs: renderRecord caps long output and hides the accepted snapshot (0.192922ms)
✔ setspark api: bind, add_approval (button and reply) and get use integer request ids and the connector's keys (2.260698ms)
✔ tools: config refuses a missing, symlinked, dotted, non-directory or duplicate root and bad limits (2.745448ms)
✔ tools: every escape is refused with a fixed reason and nothing outside the root is read (3.393042ms)
✔ tools: happy paths list, read a window, and search case-insensitively; dotfiles and symlinks never appear (3.461326ms)
✔ tools: the tool set renders text for the model, records details for the journal, and enforces the per-run budget (2.101789ms)
✔ tools: listing and search caps hold (7.657901ms)
✔ tools: credential shapes are caught; ordinary prose and ids are not (0.636524ms)
✔ tools: the read uses the checked file itself; a symlink, a swapped file, a FIFO, a grown file or a hard link at read time is refused (4.12875ms)
✔ tools: an unreadable file under the root is skipped by search and refused by read (1.2251ms)
✔ tools: config accepts write: true only as a boolean, and enables the write tools only then (0.993715ms)
✔ tools: every write outside the fence is refused before any byte lands, and no temp file remains (4.265937ms)
✔ tools: write_file leaves the exact bytes, edit_file replaces one exact match, and the set renders the change as uncommitted (2.438094ms)
✔ tools: a target that changed between the check and the rename is refused and the temp file is removed (1.242756ms)
✔ web: config takes an https or loopback-http SearXNG base url and a bounded fetch cap (2.198188ms)
✔ web: address rules refuse every private, loopback, link-local, mapped and multicast form (1.656732ms)
✔ web: web_fetch refuses bad urls, private hosts, rebinding names, non-https redirects, too many hops, error status, non-text bodies, and times out (1024.644928ms)
✔ web: web_fetch returns html as text with the title, follows an https redirect, keeps plain text and json, and cuts at the cap (4.179723ms)
✔ web: html to text drops scripts, styles and comments, decodes entities and keeps block breaks (0.254238ms)
✔ web: web_search asks the instance for json, returns at most ten clean results, and refuses a bad query, a down instance or an unusable answer (2.593111ms)
✔ web: the tool set enables the web tools only with a web key, counts them in the budget, and records url, status and hits (2.170217ms)
ℹ tests 178
ℹ suites 0
ℹ pass 178
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2609.325572
@@ -0,0 +1,88 @@
✔ sessionModel: agent vars win, then the system's execution settings (13.592456ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (6.300387ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (3.429935ms)
✔ the prompt's built-in tools line is the harness's own names, as the manifest lists them (9.261754ms)
✔ the prompt names the project clones in the workspace, and none when there are none (5.397023ms)
✔ the prompt explains the review loop to a role with push_working, and reviews to one with fetch_review (5.832209ms)
✔ a bundle is written once: an existing file refuses (1.351598ms)
✔ a path with a single quote can't go into the hook command (1.389334ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (131.919529ms)
✔ a missing or wrong policy, or a bad event, exits 2 (74.22573ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1088.044553ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (734.592609ms)
✔ claude: the hook alone blocks a path outside the workspace (443.02577ms)
✔ claude: a second turn resumes the first turn's session (740.873375ms)
✔ claude adapter: --restricted is always passed (5.275618ms)
✔ claude adapter: MOSAIC_CLAUDE_BIN wins over PATH and must be an absolute executable (20.496068ms)
✔ claude adapter: a directory pin exits 2 before it runs; a pin with a space runs (6.059446ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (727.691785ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.347032ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (3.141994ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.716647ms)
✔ file tool paths must resolve inside the workspace (1.324356ms)
✔ pi's own path normalisation can't be used to step out (1.024039ms)
✔ a symlink inside the workspace that points out is outside (0.799356ms)
✔ a dangling symlink is refused at any depth, in both harnesses (2.613665ms)
✔ read is checked under every spelling pi's read would open, in both harnesses (15.982849ms)
✔ other spellings cover directories, dangling links and pi's cwd (1.463989ms)
✔ a relative path climbs from the workspace's real path, in both harnesses (4.821926ms)
✔ claude path fields per tool (0.73711ms)
✔ glob patterns stay inside the workspace (0.650598ms)
✔ a path that can't be checked is blocked (0.360691ms)
✔ fetch_review's have lists the working refs before origin's, and no more than HAVE_MAX (211.888205ms)
✔ fetch_review's have orders the working refs newest first within each clone, one clone after another (140.135958ms)
✔ a runner git past its time: SIGTERM reaches its process group, and SIGKILL follows after the grace period (1809.722696ms)
✔ once a signalled runner git has closed, its group gets SIGKILL, so a process that ignored SIGTERM dies too (303.967694ms)
✔ initialize, ping and tools/list (45.825924ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (36.070466ms)
✔ replies are compact JSON; over the cap a tool error names the size and the cap (38.747852ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (28.653523ms)
✔ a missing argument is a usage error (23.129387ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (366.921294ms)
✔ pi: a reply over the cap is a tool error naming the size and the cap; list_tasks asks for open tasks (316.115261ms)
✔ pi: a write through a dangling symlink is blocked, and nothing appears outside (319.328383ms)
✔ pi: a read is refused when pi would open another spelling outside (312.088811ms)
✔ pi: a relative path climbs from the real path of a workspace behind a symlink (304.802288ms)
✔ pi: a relative path climbs from the real path of a dataRoot behind a symlink (330.080833ms)
✔ pi: a missing extension refuses before any model call (5.812296ms)
✔ pi: an extension without its configuration fails pi's start (247.300778ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.708404ms)
✔ turnRequest names the sender, class, reply and decision (0.304737ms)
✔ turnRequest says a tester's message is a test and never Jason's instruction (0.306605ms)
✔ turnRequest shows the message's own sent time, a day old as well as new (0.21075ms)
✔ stateBlock names the launch state with its time and event, and the open tasks with the cap (0.313829ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (249.280014ms)
✔ launches revoked and then restored: the turn's block reads allowed and gives the restore time (258.959367ms)
✔ a task closed on the tracker is missing from the next turn's open list (207.427361ms)
✔ a message read a day after it was sent shows the time it was sent (143.587533ms)
✔ a failed state read fails the turn: no adapter runs, the sender hears why, the message is read (118.07172ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (101.202114ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (374.570724ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1302.463466ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (145.963685ms)
✔ founder credentials stop before the claim (20) (161.099363ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (185.188186ms)
✔ the launch ending under a running session exits 22 (146.094775ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (242.190245ms)
✔ a broker that is down at the claim exits 23, not 21 (96.302758ms)
✔ no capability, or a malformed one, on stdin exits 2 (196.055577ms)
✔ a missing or malformed policy exits 2 before the claim (140.483167ms)
✔ the PM gets launch, its task verbs and the reads (7.387137ms)
✔ list_requirements reads the requirement ids, for a task.create holder with a tracker (4.005451ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (2.110678ms)
✔ a coder with a tracker gets its own task tools and no task_reassign (1.364625ms)
✔ launch only when the business's launch block names the instance as launcher (1.91319ms)
✔ an action outside the instance's authority has no tool (1.752901ms)
✔ the review loop: push_working and request_review for the coder, fetch_review and review_verdict for the reviewer, none for the PM (4.923006ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (7.735293ms)
✔ list_tasks takes the broker's filters and pages; get_task takes a task_ref (2.905418ms)
✔ callTool sends list_tasks done false unless the session names done; other tools as given (2.636329ms)
✔ replyText: compact JSON up to the cap, an error naming the size and the cap over it (0.797487ms)
ℹ tests 80
ℹ suites 0
ℹ pass 80
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 11024.709757
@@ -0,0 +1,94 @@
✔ a raw token file, with or without one trailing newline, reaches curl only through the config stream (118.727531ms)
✔ the raw path accepts nothing else, and refuses before curl runs (336.147104ms)
✔ the file checks still apply on the raw path: mode, symlink, missing, directory (251.915474ms)
✔ the raw path base URL has no override (54.948698ms)
✔ the JSON path is unchanged, and JSON never falls through to the raw path (244.882633ms)
✔ a file that changes between the two reads refuses before curl runs, with or without a body (699.407088ms)
✔ the token reaches no child environment, even with an inherited CFG or SHELLOPTS=allexport (664.730325ms)
✔ real helper GET HTTP 200 preserves exit 0 without credentials (13.516522ms)
✔ real helper POST HTTP 201 preserves exit 0 without credentials (9.654705ms)
✔ real helper GET HTTP 403 preserves exit 1 without credentials (8.481285ms)
✔ fixture git subjects only, follow-ups and three session kinds (146.05258ms)
✔ text and JSON carry same numbers, open and truncated title (204.188167ms)
✔ missing credentials exit 2, no-issues never calls API and shows unknown (168.368488ms)
✔ empty range gives no rows and zero totals (148.439012ms)
✔ inclusive UTC dates, first-line preamble only, role and seat boundaries (159.157287ms)
✔ close-only issue included, even median, missing metadata stays unknown (162.7644ms)
✔ unique commits but per-issue links count multiple tags once each (142.771195ms)
✔ issue pages of 50, 50 and 7 read 107 issues in 3 pages (344.804764ms)
✔ one short page reads 1 page; --no-issues reads none and says so (240.635842ms)
✔ a short page 10 is read; a full page 10 refuses at the ceiling (717.400455ms)
✔ an issue number on two pages refuses (161.732831ms)
✔ a failing page 2 refuses the whole read without its stderr (150.402265ms)
✔ page 2 with a malformed record refuses (150.763429ms)
✔ page 2 with more than 50 rows refuses (178.290086ms)
✔ bad API payload not JSON refuses (148.918202ms)
✔ bad API payload {} refuses (138.00924ms)
✔ bad API payload [{"number":1}] refuses (141.388559ms)
✔ partial or malformed session log refuses with location, not content (143.589613ms)
✔ a U+2028 or U+2029 inside a session string is one line, not a malformed record (147.683157ms)
✔ no sessions is an empty table; symlink source refuses (203.736991ms)
✔ reads only refactor even when another branch is checked out (136.588346ms)
✔ invalid dates, reverse dates and duplicate options refuse (127.937641ms)
✔ T3 agent assignments do not count as human in Table 2 (135.953314ms)
✔ preamble parsing and issue number boundaries (0.438155ms)
✔ T3 header: agent, or board from control-board; anything short of the full header is human (0.135122ms)
✔ no closed issues with human messages means undefined ratio, not invented zero (0.187566ms)
✔ T3: seat, archived, unmapped and Researcher threads count; imported, deleted and other-project threads do not (451.200978ms)
✔ T3: the default path is read from HOME and prints no path line; --no-t3 says so (671.1279ms)
✔ T3: a HOME with no database exits 1 and names --no-t3 (136.678532ms)
✔ T3: a file that is not a database exits 1 and names --no-t3 (130.594985ms)
✔ T3: a seat thread renamed to another seat exits 1 naming thread, title and roles (371.820462ms)
✔ T3: an unmapped thread addressed as a seat exits 1 (385.177481ms)
✔ T3: a header to another thread id is not cross-checked (390.119422ms)
✔ T3: no project, or two, for this root exits 1 (1003.899028ms)
✔ T3: a removed column exits 1 and names it (239.614171ms)
✔ T3: a missing table exits 1 and names it (242.028814ms)
✔ T3: a counted row with an unknown role exits 1 without its text (366.546587ms)
✔ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (380.110803ms)
✔ T3: a counted row with non-text content exits 1 without its text (403.91963ms)
✔ T3: a counted row with an unparseable created_at exits 1 without its text (395.876638ms)
✔ T3: a reasoning summary is skipped before any check and counted as excluded (1007.905624ms)
✔ T3: a missing orchestration_events makes the diagnostic unknown and keeps the counts (690.336446ms)
✔ T3: a human message with no event counts in humanWithoutEvent (386.390198ms)
✔ T3: an unparseable event makes the diagnostic unknown and keeps the counts (764.68974ms)
✔ T3: an event with no string messageId makes the diagnostic unknown and keeps the counts (690.468117ms)
✔ T3: an error that is not from SQLite is rethrown, not reported as a database failure (330.200606ms)
✔ T3: a symlink at ~/.t3 exits 1 (127.100997ms)
✔ T3: a symlink at ~/.t3/userdata exits 1 (132.856147ms)
✔ T3: a symlink at ~/.t3/userdata/state.sqlite exits 1 (138.788071ms)
✔ T3: with --t3-db, a symlinked file or directory exits 1 (449.179352ms)
✔ T3 WAL: the newest message only in -wal, writer attached, is counted (405.915002ms)
✔ T3 WAL: stopped cleanly, counts are correct and the main file is unchanged (381.357877ms)
✔ T3 WAL: -wal without -shm in a writable directory is read (435.44462ms)
✔ T3 WAL: -wal without -shm in a read-only directory exits 1 (436.560877ms)
✔ T3 WAL: stopped cleanly in a read-only directory exits 1 (415.785305ms)
✔ T3: a lock held past the 5 s busy timeout exits 1 and names --no-t3 (5389.094444ms)
✔ a done row whose closing issue is open is a violation; a row that is not done is not (1.745968ms)
✔ an issue several rows close is expected closed only once all of them are done (0.492135ms)
✔ closure needs positive evidence: unknown is undecided, and so is a skipped or short issue check (0.334936ms)
✔ each owner of an in-progress or in-review row gets one liveness class (7.302851ms)
✔ a required row not done after 14 days is a violation; a legacy row uses genesis as its lower bound (0.351611ms)
✔ an ISO requiredSince, as `set required` writes it, ages from its UTC day; one that does not parse is a violation (0.203652ms)
✔ the text section always ends in a count and a result, and never prints a full pass (0.356803ms)
✔ pidAlive: a running pid is present, an exited one is gone, and EPERM still means present (23.38393ms)
✔ issue states: open list first, then the metric page, then at most 10 lookups (260.221304ms)
✔ a full open list: lookups settle what it leaves out, and only an unsettled issue keeps it undecided (348.901266ms)
✔ the open list refuses on a failed call or a bad record, and never echoes the helper (176.076401ms)
✔ a helper call past the deadline is killed with its child, and the call reports it (2008.547084ms)
✔ readQueue loads queue.json through the queue validator and refuses anything else (137.732575ms)
✔ protected changes list every in-range entry that changes a required or parked row (366.855935ms)
✔ the CLI prints the queue section above the weekly table and under a queue key in --json (511.703255ms)
✔ a queue with nothing wrong prints 0 violations and a reduced pass, never a full pass (224.848173ms)
✔ --no-issues makes no call and leaves the issue checks undecided; --no-queue skips the section (307.521627ms)
✔ the CLI refuses a bad queue before any call, and a failed open list with exit 2 (278.984424ms)
✔ --unsupported-runtime repeats once per seat and takes a seat name (326.276326ms)
✔ an unreadable config makes every owner invalid instead of passing them (181.811561ms)
ℹ tests 86
ℹ suites 0
ℹ pass 86
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 22205.154959
@@ -0,0 +1,77 @@
✔ pure resolution selects current default or explicit enrolled account (1.892656ms)
✔ scope is explicit, bounded and never inferred (1.561671ms)
✔ fork pin is preserved against default change, override, missing account and revocation (0.719319ms)
✔ unenrolled account/provider, missing harness, model expansion and native model ceiling refuse (0.780418ms)
✔ only explicit synthetic credential forms and internal fixture stores admitted (5.400616ms)
✔ two concurrent workspaces of the same agent publish distinct complete private generations (57.791167ms)
✔ same execution ID is exclusively claimed and cannot overwrite a published generation (31.016875ms)
✔ failed generation after-auth preserves prior files, records failure and refuses blind same-ID retry (44.604026ms)
✔ failed generation before-publish preserves prior files, records failure and refuses blind same-ID retry (55.374491ms)
✔ credential lock contention refuses without duplicate side effects (11.792121ms)
✔ symlinked pre-existing final target is refused and never followed (26.740376ms)
✔ invalid registry cannot resolve; no fallback to supplied partial entries (0.273072ms)
✔ post-publication failure records uncertainty, preserves complete generation and prevents replay (27.525572ms)
✔ expired credentials refresh under transaction and subsequent generation reuses rotation (84.316591ms)
✔ refresh failure retains prior generation and store state (61.434066ms)
✔ refresh timeout retains prior generation and store state (145.401572ms)
✔ refresh malformed retains prior generation and store state (67.119396ms)
✔ concurrent refresh on same account refuses contention while unrelated account proceeds (229.571178ms)
✔ invalid refresh options refuse before burning claim (35.609213ms)
✔ fixed fake process rotates both OAuth fields without mutating caller input (30.06856ms)
✔ concurrent isolated processes preserve separate provider credentials (25.740598ms)
✔ fake failure is refused with fixed diagnostics (22.272477ms)
✔ fake malformed is refused with fixed diagnostics (21.938816ms)
✔ fake timeout is refused with fixed diagnostics (103.219921ms)
✔ fake unchanged is refused with fixed diagnostics (25.147081ms)
✔ caller executable/environment injection is rejected before spawning (0.295939ms)
✔ valid fixture tree validates and lists without secrets (65.553565ms)
✔ unknown-field refuses (0.374707ms)
✔ invalid-id refuses uppercase and traversal shapes (0.265447ms)
✔ plain-http baseUrl requires allowInsecureTransport (0.291239ms)
✔ native provider rejects allowInsecureTransport (0.124274ms)
✔ unsupported credential type and kind refuse (0.146078ms)
✔ account provider-path mismatch refuses (0.10084ms)
✔ profile account refs must be provider/account shaped (0.261541ms)
✔ seat selection accepts fork pin field, validates account refs (0.221318ms)
✔ harness manifest id must equal executable (gate 1) (0.194878ms)
✔ CLI validate: duplicate provider id across files refuses (25.902814ms)
✔ CLI validate: missing referenced provider/account refuse (33.074662ms)
✔ CLI validate: broken JSON refuses without secret echo (26.493174ms)
✔ CLI usage errors exit 2 (45.531277ms)
✔ credential.json sibling presence does not break validation and is never read (62.369404ms)
✔ D1 missing, empty and structurally empty roots refuse, no list projection (171.391516ms)
✔ D1 required directory auth cannot be absent (51.02375ms)
✔ D1 required directory auth/providers cannot be absent (53.044715ms)
✔ D1 required directory auth/accounts cannot be absent (57.811414ms)
✔ D1 required directory auth/settings cannot be absent (61.058319ms)
✔ D1 required directory harnesses cannot be absent (68.612655ms)
✔ D1 root file and unreadable metadata refuse (105.340529ms)
✔ D2 no symlink traversal at auth/providers/openai-codex.json (54.253557ms)
✔ D2 no symlink traversal at auth/accounts/openai-codex/homelab-openai (61.735163ms)
✔ D2 no symlink traversal at auth/providers (55.91683ms)
✔ D2 no symlink traversal at auth (56.39023ms)
✔ D2 root and ancestor symlinks and lexical traversal refuse (151.515841ms)
✔ private filesystem modes enforced for root (54.73426ms)
✔ private filesystem modes enforced for auth (53.881096ms)
✔ private filesystem modes enforced for auth/providers/openai-codex.json (52.51144ms)
✔ private filesystem modes enforced for auth/accounts/openai-codex/homelab-openai/account.json (70.290729ms)
✔ D3 numeric version 1 only across all record kinds (1.174936ms)
✔ D4 nested unknown keys and missing per-kind required fields refuse (62.907505ms)
✔ D5 unenrolled default refuses even when account exists (64.704694ms)
✔ D6 provider/account credential type must match (62.866183ms)
✔ D7 every harness endpoint enforces HTTP opt-in and shape (0.481961ms)
✔ D8 URLs reject embedded credentials and unsupported protocols without echo (158.223946ms)
✔ D9 malformed JSON diagnostics contain no content excerpt (63.248083ms)
✔ D10 missing metadata is missing-path, not invalid-json (68.134661ms)
✔ D10 library returns no partial entries on any invalid record (75.176278ms)
✔ null/scalar/array metadata refuses without stack or echo (247.69481ms)
✔ credential sibling is never opened, even when an unreadable symlink (31.414183ms)
✔ oversized metadata refuses before parsing (57.951145ms)
ℹ tests 69
ℹ suites 0
ℹ pass 69
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 2127.521824
@@ -0,0 +1,166 @@
✔ F1: an ordinary commit after update-ref is refused until step 8; then it commits and the queue stays at C (1215.914812ms)
✔ F1: a plain `commit -e` whose guard ran before update-ref fails at its own HEAD update (952.995895ms)
ℹ git commit -e: index.lock free during the editor
✔ F1: a `commit -e -- path` whose guard ran before update-ref fails at its own HEAD update (976.49178ms)
ℹ git commit -e -- src.txt: index.lock held during the editor
✔ F1: step 8 with index.lock held exits 3, and ordinary commits stay refused until the printed command runs (1031.622263ms)
✔ F1: HEAD moving after the step-7 guard check and before update-ref: refused, nothing published (1020.004447ms)
✔ F1: H is recorded before the canary, so HEAD moving during the step-1 canary is refused at step 7 (991.461101ms)
✔ F1: a queue commit landing after H is recorded: step 1 says HEAD moved, not the guard (1304.47048ms)
✔ F1: a queue commit landing between the HEAD check and the canary: the failed clean run is reported as HEAD moved (920.305828ms)
✔ F1: a shared-index change during the procedure is not committed (1006.02997ms)
✔ F1: a queue path staged after update-ref: step 8 stops and touches nothing (1090.487716ms)
✔ F1: a missing or a different hook refuses (704.526514ms)
✔ F1: same bytes without the exec bit, a symlinked hook, and core.hooksPath in the local or global scope each refuse before update-ref (1147.866968ms)
✔ F1: the canary refuses a hook that git would not run (637.28245ms)
✔ F1: the guard deactivated after step 1 is refused at the step-7 recheck (906.464489ms)
✔ bootstrap: implementation-only HEAD, the guard, genesis, the --genesis commit, then an extending commit (903.772772ms)
✔ bootstrap: --genesis with a base present, no base without --genesis, an op before the first commit, a changed map, another branch (1106.602556ms)
✔ bootstrap: the archived tests and validator run outside any repository (1085.40739ms)
✔ general: an unrelated staged file stays staged, and the committed blobs are the snapshot bytes (862.881086ms)
✔ general: a queue write after the snapshot is not committed (1312.07093ms)
✔ general: a snapshot whose log does not extend the base refuses (1019.305396ms)
✔ general: install-hook privilege, repair of a same-bytes hook, and its refusals (150.607514ms)
✔ general: environment overrides, a linked worktree and usage (621.548028ms)
✔ general: a queue path staged before the run refuses at step 1 (625.223004ms)
✔ general: HEAD's queue tests failing in the archive refuse (893.744537ms)
✔ genesis document serializes deterministically and replays (4.060102ms)
✔ a hand edit that stays valid JSON fails replay; a formatting-only edit fails re-serialization (3.034827ms)
✔ a tampered result, receipt or viewSha fails replay (2.790229ms)
✔ op ids: 8 to 72 characters for callers, 80 in the log for .outcome entries (0.187728ms)
✔ add: defaults for an ordinary seat, privileged extras, refusals (4.447611ms)
✔ matrix: queued→briefed privileged; briefed→in-progress owner with after satisfied (10.152072ms)
✔ matrix: release, review round, changes requested and waiting-on-jason (17.590316ms)
✔ matrix J5: in-review→done by the gate owner with evidence naming the current round (8.244523ms)
✔ review issue, lead decision 23: none refuses, one is used, several need --issue, later rounds keep it (19.229485ms)
✔ the row schema refuses a round with a null issue, and the A1 review shape (P2) (2.271595ms)
✔ matrix R1: every state × target × actor class matches 8.7, gate owner jason or not, required or not (1327.655886ms)
✔ matrix: blocked keeps the claim and returns only to previousState (3.731079ms)
✔ matrix J4: parking is Jason's, refused while required; unpark returns to queued (2.410993ms)
✔ field edits: who may change what (4.635129ms)
✔ set issues keeps a logged narrowing of closes (N10) (2.898213ms)
✔ text the table shows refuses \ and <, everywhere it enters (N8) (1.677693ms)
✔ every accepted text renders to nine cells on every row (N8) (20.349297ms)
✔ genesis: the map refuses an owner among its row's reviewers; replay doesn't (2026-10-04) (0.463273ms)
✔ times and dates must be calendar values, not just the shape (2026-10-04) (1.41702ms)
✔ replay holds every op id to the caller's rule (N11) (4.131921ms)
✔ note: owner, listed reviewer or privileged; empty clears (0.975737ms)
✔ assign moves the claim with the owner; done clears it (2.121496ms)
✔ render is byte-stable and escapes pipes (0.42715ms)
✔ view classification: current, genuine stale, edited stale marker, changed current body, markers (0.524868ms)
✔ next: resume, then review, then start, then wait, then nothing; lowest id first (15.749023ms)
✔ canonical args make a retry's identity independent of list order (0.299303ms)
✔ manifests, headings and blob ids (0.396434ms)
✔ the migration map: one queue-map block, exact keys (0.576501ms)
✔ every call but `queue` reaches the seat CLI exactly as before A2 (530.418932ms)
✔ no argument reaches the app entry in packages/cli, and only that call (55.840434ms)
✔ `queue` reaches the queue CLI with the rest of the arguments (190.004779ms)
✔ the pre-A2 fixture is the script A2 changed (0.328187ms)
✔ an old privileged add with no gate owner still replays through loadDoc, and gets jason (8.256688ms)
✔ a non-privileged add gets jason through the replay path and can't name a gate owner (2.717201ms)
✔ the CLI refuses a privileged add without --gate-owner, for jason and sage, and writes nothing (295.304689ms)
✔ the CLI add with --gate-owner carries the named owner and records a log entry (262.037236ms)
✔ the CLI add by a non-privileged seat gets jason and can't name a gate owner (297.686103ms)
✔ a retried sage add recorded with no gate owner answers (already recorded at rev N) and writes nothing (263.516671ms)
✔ acquire publishes the record by link; release removes only its own lock (14.74055ms)
✔ a kill between the temp write and the link leaves no lock (50.679345ms)
✔ a short or failed temp write refuses and leaves no lock and no temp (9.234966ms)
✔ a link error other than EEXIST refuses (5.946692ms)
✔ an error after the link releases the lock: unreadable gate, failing temp stat (24.140513ms)
✔ a release that fails on a gate path is reported, never a stack trace (P1) (37.565124ms)
✔ a paused holder: another writer waits 10 s, then refuses naming it live (10094.153082ms)
✔ two concurrent unlockers: the second refuses on the gate (40.95355ms)
✔ a writer publishing during an unlock, lock first: unlock sees it live and refuses (22.107707ms)
✔ a writer publishing during an unlock, gate first: the writer releases and refuses (18.819762ms)
✔ a gate swapped while held is left in place and reported, on success and on refusal (N1) (19.571498ms)
✔ a reused pid within one boot is mismatch; unlock removes the lock and never signals the process (12.614873ms)
✔ the same pid and start on a different boot is mismatch (0.426472ms)
✔ a foreign host is unknown whatever the local pid says; unlock refuses (63.135383ms)
✔ unreadable /proc: classification is unknown and acquire refuses (0.682255ms)
✔ invalid records: empty, unparsable, wrong keys, bad start or boot (0.192928ms)
✔ a stale gate blocks writers; --check-gate says mismatch for a reused pid (20.141774ms)
✔ a delayed release by a dead owner, after unlock and a new owner: the inode check keeps the new lock (16.984167ms)
✔ release checks the inode too: a byte-identical lock file with a new inode is left in place (5.359768ms)
✔ unlock refuses a live, unknown or invalid lock, and does nothing without one (30.767494ms)
✔ the migration map validates and renders the golden genesis table (5.218552ms)
✔ the marked QUEUE.md holds every row and parked item between its markers (1.952308ms)
✔ map-check reports each kind of drift (5.689196ms)
✔ a request posts once as the requester; a retry sends nothing (798.508631ms)
✔ each transport answer maps to posted, failed or uncertain (8.9 step 3) (4360.43698ms)
✔ the pre-send checks: GET user must name the requester, under the deadline (1581.69014ms)
✔ the lead's request refuses a token for login sage (931.874419ms)
✔ the credential file: the seat's own, 0600, no symlink, never the shared default (765.025726ms)
✔ an unresolved request blocks a new request, a new round, waiting-on-jason and done (2260.507933ms)
✔ a same-op retry after a kill sends nothing, even with a stale view (2941.313275ms)
✔ a held lock at the outcome exits 3 and names what the transport said (670.875975ms)
✔ late outcomes: after an abandon, and after a resolve with the same or another id (2557.550683ms)
✔ resolve checks the comment: issue, markers, round, candidate and author (1650.666897ms)
✔ the lead resolves a seat's request: the comment's author is the requester, fetched with the lead's token (682.959484ms)
✔ validateRow checks a request round's shape, which every replayed entry must keep (522.146406ms)
✔ request, changes, a new candidate, approval: every round pinned; no review files (1702.650936ms)
✔ a row with no reviewers opens a round that posts nothing (1202.969847ms)
✔ verify-commit: a prospective tree must hold exactly the candidate's paths (1340.032054ms)
✔ semantics: v1 entries replay as before; review entries need v2 (500.629545ms)
✔ set reviewers refuses the row's owner (2026-09-28) (366.295838ms)
✔ the owner records no verdict, even as a listed reviewer (518.169034ms)
✔ a request comment over the length limit is not sent (564.192106ms)
✔ a late POST on a closed row leaves a conflict nothing can resolve, and resolve asks nothing (660.210934ms)
✔ a Jason-gated row reaches waiting-on-jason only on every reviewer's approval (2609.597768ms)
✔ genesis: refusals before anything is written (425.803972ms)
✔ genesis: the map must be committed, well formed, with committed briefs and seats (582.819017ms)
✔ genesis: markers, a stray witness, once only; a retry returns the receipt (513.336668ms)
✔ genesis: a file holding genesis alone with no witness is confirmed by sync or a retry (383.099658ms)
✔ canonical checks: worktree, second clone, detached HEAD, wrong branch, GIT_DIR, foreign code; a symlink works (621.981519ms)
✔ --by that differs from MOSAIC_AGENT_NAME warns on stderr and logs nothing more (N12) (827.699107ms)
✔ op ids: missing, too long, reserved; a retry answers; another payload refuses (707.523328ms)
✔ a retried add returns the id it first allocated, after reassignment and after done (959.645922ms)
✔ Rocko's S4 schedule: a lost result, another writer, then the retry opens no second round (684.902866ms)
✔ the review issue and the evidence round through the CLI (lead decision 23, 8.7) (1202.705916ms)
✔ claims and add defaults through the CLI; candidates are manifests or reachable commits (772.549347ms)
✔ add, set reviewers and assign refuse the row's owner as a reviewer (492.957148ms)
✔ the working-brief check: a changed working copy refuses the start and flags next (645.141711ms)
✔ next: resume first, then nothing for an idle seat; needs a seat (293.747138ms)
✔ view stale: new ops and verify refuse naming the unshown op; retries answer; reads warn; render fixes (642.661855ms)
✔ view unknown: a hand edit, an old marker over an edited body, missing or duplicate markers (1188.579763ms)
✔ a hand edit to queue.json refuses every verb, reads included (580.599723ms)
✔ verify and render --check leave bytes and mtimes unchanged (409.60657ms)
✔ render is byte-stable across runs and repositories (293.299996ms)
✔ snapshot and verify --snapshot (725.775455ms)
✔ usage errors exit 4 (510.812222ms)
✔ a short write, ENOSPC or a file fsync failure: nothing visible, temp removed (298.585091ms)
✔ a rename failure: nothing visible, temp removed (204.28157ms)
✔ a directory fsync failure: uncertain, exit 3, no receipt; the tail refuses new ops; a retry confirms (224.57637ms)
✔ a directory fsync failure, then sync names the op (381.66251ms)
✔ a witness write failure: uncertain, durable, exit 3; the view is untouched (211.528336ms)
✔ the .git fsync after the witness rename fails: uncertain, exit 3, the witness says so (195.772366ms)
✔ confirming a tail fsyncs queue.json and docs/plans before the witness; either failure changes nothing (221.629408ms)
✔ the docs/plans fsync after the view rename fails: the op stands, the view is written, a warning says so (175.421407ms)
✔ a lock swapped while held is left in place and reported, on a receipt and on a refusal (197.419038ms)
✔ a lock that cannot be released after an op is reported, on a receipt and on a refusal (197.417895ms)
✔ unlock prints a swapped gate's warning on stderr, the result on stdout (142.360309ms)
✔ a view write that fails keeps the op and reports a stale view (221.269186ms)
✔ SIGKILL before the rename: nothing recorded; the retry removes the leftover temp (670.996291ms)
✔ SIGKILL after the rename, before the witness: the tail refuses new ops and sync names the op (696.692576ms)
✔ SIGKILL after the witness, before the view: the stale refusal names the op (644.425449ms)
✔ SIGKILL after the view, before the receipt: the retry returns the receipt (688.781395ms)
✔ git checkout between steps 1 and 7: step 7 refuses and nothing is written (246.841125ms)
✔ git stash restoring an older valid pair: history lost; accept-history needs privilege, a reason and --yes (1023.611417ms)
✔ a deleted witness: refused after the locked recheck; accept-history records it absent (334.084552ms)
✔ a header edit during a write: the op stands, the view write is skipped with a warning (218.688505ms)
✔ a reader paused between the witness and the file while a writer finishes: no lost-history report (210.73913ms)
✔ rows: every row as show prints it, in list order; writes nothing; same notes and refusals as list (247.458244ms)
✔ file-then-witness order forced by a hook: the locked recheck prevents a false report (191.40775ms)
✔ a writer paused before and after the witness rename: readers see a tail, then a match (188.245392ms)
✔ a true rollback is reported only after the locked recheck; a held lock names its holder instead (573.276625ms)
✔ an accept-history in progress: an unlocked reader waits on the lock and never reports lost history (570.400421ms)
✔ the platform check refuses other filesystems (145.715453ms)
✔ tmpfs passes only a test layer that allows it (N5) (229.794041ms)
✔ unlock keeps a multi-line lock record on stdout (P3) (199.603237ms)
ℹ tests 156
ℹ suites 0
ℹ pass 156
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 29276.755618
@@ -0,0 +1,51 @@
✔ isRunId accepts the run id shape and nothing else (0.848024ms)
✔ a missing data root or runs directory lists nothing (1.334924ms)
✔ runs as a regular file lists nothing, as before (0.506065ms)
✔ listRunIds keeps r- names only, sorted oldest first (0.631163ms)
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (1.638693ms)
✔ readRunRecord returns documents and artifacts in directory order (0.877229ms)
✔ readRunRecord is null for a missing run, a dangling link or a file (0.566651ms)
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.543903ms)
✔ readRunDocument reads only the three run documents (0.450974ms)
✔ a link inside the data root is followed (0.848388ms)
✔ a data root that is itself a link is trusted as configured (0.582202ms)
✔ a run directory linked out of the data root is never read (0.597195ms)
✔ a document linked out of the data root reads as null (0.726408ms)
✔ a runs directory linked out of the data root refuses (0.50743ms)
✔ a relative link that climbs out of the data root refuses (0.362881ms)
✔ a sibling whose name starts with the data root's name is outside it (0.419149ms)
✔ a link loop refuses instead of reading as missing (0.53099ms)
✔ an unreadable runs directory refuses instead of listing nothing (0.356995ms)
✔ an unreadable run directory refuses instead of reading as missing (0.433353ms)
✔ a link to the data root's parent is outside it (0.330785ms)
✔ listRunIds sorts whatever order the directory returns (0.634004ms)
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.405112ms)
✔ the readers write nothing (1.724148ms)
✔ no pointer is null (1.488086ms)
✔ the pointer release.sh writes reads back (0.932992ms)
✔ a pointer that isn't the version 1 shape refuses with exit 2 (1.541138ms)
✔ a pointer that is a directory refuses with exit 4 (0.987318ms)
✔ a state file linked out of the data root refuses (0.776711ms)
✔ a state directory linked out of the data root refuses (0.484001ms)
✔ a state directory linked out to nothing reads as no release and an empty log (0.404177ms)
✔ a missing log is empty (0.309658ms)
✔ the log reads oldest first and counts malformed lines (0.827568ms)
✔ last must be a positive integer (0.391406ms)
✔ the state readers write nothing (0.683683ms)
✔ list prints each run in the established format (65.037447ms)
✔ list prints a damaged result.json as unknown and keeps listing the runs after it (63.479674ms)
✔ list prints each result field that isn't a string as unknown or - (63.356753ms)
✔ show prints the run in the established format (65.267026ms)
✔ show of a missing run and an invalid id exit 4 as before (91.350821ms)
✔ list and show refuse a runs directory linked out of the data root (119.312805ms)
✔ show refuses a run linked out of the data root; list reports it unknown (121.53307ms)
✔ list shows an r- name that isn't a valid run id, as before (60.624744ms)
✔ show refuses an invalid id before reading the config (38.855262ms)
ℹ tests 43
ℹ suites 0
ℹ pass 43
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 736.604786
@@ -0,0 +1,132 @@
✔ a first launch clones the root at its branch, with the root's path as origin (31.862295ms)
✔ the clone is not at its place until git clone has finished (21.386746ms)
✔ a later launch fast-forwards a clean clone after a commit to the root, then finds it current (66.98501ms)
✔ a clone ahead of the root keeps its commits and counts as current (46.971756ms)
▶ a dirty clone, one on another branch and one diverged are kept as they are
✔ a modified file (33.862191ms)
✔ an untracked file (37.082251ms)
✔ a staged file (32.888271ms)
✔ another branch (32.496336ms)
✔ a detached HEAD (30.684655ms)
✔ a diverged branch (46.343048ms)
✔ a dirty clone, one on another branch and one diverged are kept as they are (214.634432ms)
▶ a clone with user.name or user.email in its config is kept, and git runs nothing in it
✔ user.name (29.940527ms)
✔ user.email (25.337715ms)
✔ a clone with user.name or user.email in its config is kept, and git runs nothing in it (55.751112ms)
✔ a commit git can't read after the fast-forward is null (49.259518ms)
✔ a new clone whose commit can't be read refuses the launch and leaves nothing behind (19.098007ms)
▶ a clone the session rigged is kept, and git runs nothing and writes nothing outside it
✔ core.fsmonitor (39.268664ms)
✔ core.hooksPath (38.715931ms)
✔ a hook file (36.355306ms)
✔ include.path (32.95699ms)
✔ includeIf (39.279579ms)
✔ a filter driver (38.720878ms)
✔ origin moved (33.381291ms)
✔ a second origin url (34.870827ms)
✔ the origin url twice, both the root (38.68925ms)
✔ an ext:: origin (35.784127ms)
✔ a branch tracking another remote (39.727209ms)
✔ a branch merging a tag (36.822745ms)
✔ a fetch line onto local branches (34.875684ms)
✔ no origin (36.132942ms)
✔ a config file over the size cap (31.401ms)
✔ config a symlink to /dev/zero (32.267145ms)
✔ the clone a symlink to the bait (31.704542ms)
✔ the clone a file (32.995984ms)
✔ the clone a plain directory (30.186967ms)
✔ .git a gitdir: file (30.357874ms)
✔ .git a symlink (33.005715ms)
✔ .git/logs a symlink (30.745302ms)
✔ .git/refs/heads a symlink (35.944294ms)
✔ .git/objects a symlink (34.450727ms)
✔ a reflog hard-linked to a file outside (32.35135ms)
✔ HEAD a fifo (32.104053ms)
✔ a commondir file (32.526858ms)
✔ an alternates file (30.536893ms)
✔ a gitlink staged, no .gitmodules (44.361997ms)
✔ a gitlink and .gitmodules staged (50.264642ms)
✔ a gitlink to a repository with its own gitlink (56.508917ms)
✔ a gitlink and .gitmodules committed (57.977593ms)
✔ a gitlink and submodule.active in config (47.349025ms)
✔ a .git/modules with no gitlink (38.764819ms)
✔ a clone the session rigged is kept, and git runs nothing and writes nothing outside it (1265.810783ms)
▶ a root that can't be cloned refuses with the project id and leaves nothing behind
✔ missing (11.220239ms)
✔ not a repository (11.8591ms)
✔ a plain directory inside another repository (20.5938ms)
✔ unreadable (10.420935ms)
✔ on no branch (11.359425ms)
✔ missing an object (16.424895ms)
✔ a root that can't be cloned refuses with the project id and leaves nothing behind (82.771436ms)
✔ a clone whose root is on no branch, or gone, is kept and named (29.460579ms)
✔ no credential or forge remote of the root reaches a clone (60.879784ms)
✔ every project in the business file gets its own clone at its own branch (43.16312ms)
✔ a clone past its time gets SIGTERM and refuses the launch, with nothing left in the workspace (517.646079ms)
✔ a clone that ignores SIGTERM gets SIGKILL once the grace period is over (1016.425836ms)
✔ a timeout signals git's process group, so a process git started dies with it (514.040406ms)
✔ once a signalled git has closed, its group gets SIGKILL, so a process that ignored SIGTERM dies too (515.323393ms)
✔ RUNNER_FILES is exactly what the runner and the harness sources it starts import (1.590029ms)
✔ sandboxProblem names a missing bwrap and a bwrap that fails (7.710862ms)
✔ every bind says why; the bundle and session file stay read-only over the run directory (1.29835ms)
✔ the host's git socket is bound only when given, read-only and before the writable binds (0.659953ms)
✔ the git identity is the instance's, at <instance>@<business>.mosaic.invalid, and sandboxArgv refuses without it (1.051952ms)
✔ a confined session's shell reaches its own workspace and run directory and nothing of the founder's or another session's (1775.612612ms)
✔ a bind that exposes a stand-in, or a missing workspace bind, fails the matching check (2503.382516ms)
✔ a confined session that runs tester-cli.mjs is refused as tester, and the same shim outside the sandbox binds (278.289361ms)
✔ resolveSeat: by name under --repo resolves the repo layout (1.241979ms)
✔ resolveSeat: by path resolves the fleet layout (0.319532ms)
✔ resolveSeat: refusals for missing dir, missing launch.sh, non-executable launch.sh, invalid name, and unknown layout (0.714815ms)
✔ tmuxContext: outside tmux, default socket, custom socket, and exec failure (0.644997ms)
✔ makeRegistration produces a record that validates; each shape violation throws SeatError (0.77977ms)
✔ writeRegistration/readRegistration: round trip, permissions, absence, and malformed records (1.331486ms)
✔ updateTask: changes task, taskSetBy and updatedAt only, and refuses appropriately (1.129898ms)
✔ CLI launch: registers, execs the fake launch script, and passes args through (28.791768ms)
✔ CLI launch: --harness lands in the record (26.867031ms)
✔ CLI launch: the launch script's own exit code passes through (28.825096ms)
✔ CLI launch: relaunching a seat rewrites the one registration record (55.427191ms)
✔ CLI launch: omitting --task records an empty string, not null (28.654903ms)
✔ CLI seat task: updates only the task after a launch, and refuses on an unlaunched seat (81.15466ms)
✔ CLI refusals: no args, unknown flag, missing config, already-registered env, and exec failure (136.184587ms)
✔ samePath: equal paths, symlinked dirs, distinct dirs, and non-strings (0.49917ms)
✔ resolveSetBy: explicit --by wins over the environment; absent or empty environment gives unknown; invalid explicit or environment values refuse with exit 4 (0.621294ms)
✔ validateRegistration/readRegistration: taskSetBy is optional; a record without it (written before #1511) still loads unchanged; an invalid one is refused; the version does not change (0.8703ms)
✔ updateTask: records setBy, preserves startedAt and every unrelated field, upgrades an old record in place only when the task is set, and replaces a previous attribution (1.28269ms)
✔ CLI seat task: --by beats MOSAIC_AGENT_NAME, the environment beats nothing, empty environment is unknown, invalid --by or environment refuses with exit 4 and leaves the record byte for byte (261.057148ms)
✔ family: exactly one launch.max key in the model name, else null (0.661917ms)
✔ sessionEnv passes only the allowlist, the repo's bin on PATH, and the run id (0.668614ms)
✔ sessionExit gives a runner's signal death back as the signal; a session credential is one whole set of nonempty variables (0.263204ms)
✔ newRun: short ids, 0700 directories, and a refusal when the socket path won't fit (1.381296ms)
✔ session file and launch log: 0600, the session file written once (1.003527ms)
✔ endReason maps the runner's exit codes; a signal is killed (0.112966ms)
✔ Registry mirrors to sessions.json; readSessions marks live entries; bad files refuse (1.201293ms)
✔ stopSession refuses an unknown run, reports a stale one, and won't signal a pid that isn't a runner (0.966491ms)
✔ a session runs in its sandbox as pid 1 of its namespace, claims, answers, and stops on mosaic stop (304.482183ms)
✔ workRef and validBranch take only what a ref name can hold (1.108976ms)
✔ a push lands as the task's work ref, a fast-forward lands after it, and main is the root's (151.463622ms)
✔ a rewritten branch refuses non-fast-forward and the work ref stays (143.241882ms)
✔ a branch with no history in common with main refuses unrelated-history (68.183546ms)
✔ a bundle that needs commits the working repository lacks refuses missing-prerequisite (45.756132ms)
✔ main is fetched from the root again before each push, so a clone of a newer root pushes (144.558065ms)
✔ a root moved back after the clone leaves the push's base unknown: missing-prerequisite (101.135127ms)
✔ a commit with a broken object refuses invalid-bundle, and only because fsck is on (91.707063ms)
✔ only a v2 bundle with the named branch is read (45.590433ms)
✔ a branch named main, or named for another task, moves only this task's work ref (92.848287ms)
✔ a record that throws moves the work ref back, or removes a new one (157.771418ms)
✔ a work ref that can't go back refuses rollback-failed, naming the ref and the commit (418.489392ms)
✔ a root that can't be read refuses root-unreadable (29.597142ms)
✔ a git past its time gets SIGTERM, leaves no ref lock, and the next push lands (2166.245725ms)
✔ a git that ignores SIGTERM gets SIGKILL once the grace period is over (1029.598123ms)
✔ a working repository path that isn't a directory refuses (24.345845ms)
✔ review bundles a pushed commit as refs/mosaic/review, leaving out what the reviewer has (129.887884ms)
✔ review of a project with no working repository refuses unknown-commit (15.329269ms)
✔ the runner's git tools hold the host's limits and branch rule (1.479776ms)
ℹ tests 120
ℹ suites 0
ℹ pass 120
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 4917.587587
@@ -0,0 +1,100 @@
✔ the boot config is checked before anything starts (100.810503ms)
✔ a business with no tracker entry refuses task verbs (135.156383ms)
✔ credential.expiring and .expired are recorded once per instance (231.108617ms)
✔ a token file that changes on disk records credential.changed (106.766435ms)
✔ autostart polls, reconciles and retries a startup the tracker was down for (141.784624ms)
✔ a refusal a restart must clear is not retried by the poll (87.17022ms)
✔ a poll that fires while two are queued is dropped (109.365947ms)
✔ close waits for a running verb and refuses one that has not started (195.456691ms)
✔ the bundled Vikunja is the pinned upstream image the runbook names (0.85136ms)
✔ every published port is on 127.0.0.1, and no secret is in the file (0.300373ms)
✔ the committed table loads frozen; its verbs are the broker task verbs (1.985705ms)
✔ a write names a verb the table has as its own key, not one it inherits (0.715215ms)
✔ the schema refuses any other shape (3.298956ms)
✔ the Field table in the slice 1 plan names the verbs each field is written by (0.660461ms)
✔ each verb refuses, asks for a decision and writes as the table and the role files say (1173.580392ms)
✔ the list holds the PRD's requirement ids, in its order, at its version (6.163708ms)
✔ the committed list loads frozen (0.882089ms)
✔ the schema refuses any other shape (3.268043ms)
✔ the fake answers each route with the statuses and shapes Vikunja v2.7.0 sent (367.023142ms)
✔ the project list holds recorded project objects in the recorded list envelope (102.818568ms)
✔ the recorded task bodies pass the checks S3 applies to every read (0.518852ms)
✔ the client works against the fake over real HTTP with the platform fetch (241.067373ms)
✔ a correct install starts, and the first reconcile records tasks that already exist (111.177446ms)
✔ verbs refuse while a business is starting and after startup refused it (150.287194ms)
✔ startup refuses a token that can do more than its role needs (411.563049ms)
✔ startup refuses an unsupported version and flags an untested one (291.720517ms)
✔ startup refuses a board that the runbook did not install (332.455339ms)
✔ startup refuses a project the sync bot cannot read (101.577682ms)
✔ startup refuses a configured label the pm bot cannot see (86.999018ms)
✔ startup refuses an expired credential and a missing sync credential (163.675954ms)
✔ an unreachable tracker refuses with tracker-unavailable (67.946336ms)
✔ an edit in the UI is recorded once, with the fields that changed (207.420041ms)
✔ a move between open buckets is seen on the board, though updated does not change (184.496586ms)
✔ a person's comment is counted and a bot's is not (279.964143ms)
✔ the hourly reconcile catches a comment through comment_count (205.589341ms)
✔ a task closed in the UI leaves the open view with its done bucket (379.517539ms)
✔ a task that leaves the board is recorded as deleted, moved or out of reach (265.194025ms)
✔ a poll that read before a verb wrote does not overwrite the verb (166.30198ms)
✔ a tracker fault during a tick is reported and the next tick catches up (152.980228ms)
✔ a malformed answer refuses the tick with tracker-shape (127.945823ms)
✔ no token value reaches the database, the log or a refusal (272.655431ms)
✔ the first look at a task counts only comments inside the window (169.452199ms)
✔ with descendants off the adapter reads no project list and no child, as in v0 (117.353565ms)
✔ a three-level tree is read per project, and a project outside it is not (122.659312ms)
✔ a watch-only child keeps the business ready, and a failed child read refuses as transient (221.365861ms)
✔ a root without the installed buckets refuses with descendants on (96.9564ms)
✔ the project list refuses without read_all, and skips archived projects and saved filters (200.459278ms)
✔ descendants must be true or false (99.096147ms)
✔ a move inside the tree is a moved tombstone plus a snapshot under the new ref (174.955144ms)
✔ a child made after startup joins the tree at the next reconcile (157.268629ms)
✔ a child that leaves the tree has its tasks recorded missing, and the ledger keeps their history (152.256472ms)
✔ a child deleted or hidden between reconciles drops out at the next tick, and the root still refuses (200.098292ms)
✔ a reconcile that fails keeps the previous tree (121.629774ms)
✔ a closed task the cursor missed takes its own project's done bucket (113.112991ms)
✔ closed tasks read at startup take their own project's done bucket (90.527097ms)
✔ a closed task the cursor returns takes its own project's done bucket (119.296375ms)
✔ a task moved out of a child that leaves the tree at the same time is moved, not no-access (115.012983ms)
✔ a task in a bucket outside the five keeps its raw bucket id (116.702468ms)
✔ bucket 0 on a watch-only task never becomes a bucket or a state (204.488815ms)
✔ a child whose kanban view is deleted still refuses the tick, and the reconcile reads it watch-only (138.703111ms)
✔ a child dropped at a tick comes back at the next reconcile once the bot reads it again (134.002239ms)
✔ task.create needs a recorded human request and a requirement id (207.285912ms)
✔ task.create takes only an approved requirement id (216.041551ms)
✔ task.create cites the request a received message carries, not the message's id (175.009077ms)
✔ only labels named in the business file can be written (224.524524ms)
✔ task.schedule sets and clears a due date and relations (267.579679ms)
✔ assign and reassign move the role bots and record task.assigned (312.106554ms)
✔ task.update.assigned is for the assignee and records task.state (286.015596ms)
✔ a wrong expected digest records task.conflict and writes nothing (167.466134ms)
✔ a cross-role verb needs a resolved decision, used once (232.583999ms)
✔ task.close needs a verdict; after it every verb refuses with task-done (210.296368ms)
✔ a task with pushed work closes only citing an approve verdict for its latest push, and a refusal writes nothing (266.646586ms)
✔ a lost answer is settled by a re-read and never retried (194.642454ms)
✔ a create whose answer is lost is reported uncertain, and the poll finds the task (110.004515ms)
✔ a task the sync bot cannot read refuses and records nothing (96.042486ms)
✔ verbs and polls for one business run one at a time (166.994219ms)
✔ a due date with milliseconds is written to the second (157.384855ms)
✔ every write landed and the final read failed: the verb succeeds and records what it wrote (111.645476ms)
✔ some writes landed and the final read failed: write-uncertain, and nothing is recorded (82.784877ms)
✔ a create whose final read fails succeeds and records task.created (91.170273ms)
✔ an edit between the last write and the final read shows as external on the next poll (110.037686ms)
✔ task.created is recorded when a later label write fails (78.465799ms)
✔ every verb acts in an installed child, on the child's own board (266.36522ms)
✔ task.create refuses a project outside the tree, a watch-only one and one that is not an id (171.810139ms)
✔ with descendants off, task.create takes only the root project (84.809623ms)
✔ a verb on a watch-only task, or a relation to one, refuses with project-not-installed (115.692355ms)
✔ a related task is read before authority: in another project than its ref names, task-moved; missing, task-not-found (136.881316ms)
✔ a task moved to another project of the tree refuses its old ref with task-moved and takes its new one (89.270996ms)
✔ a verb and a create in the child record the final read of the child's board (90.852233ms)
✔ a create in the child whose final read fails records the child's todo bucket (95.727796ms)
✔ a lost answer in the child is settled by a re-read of the child's board (124.512695ms)
✔ every related task is read before authority, not only the first (100.470772ms)
ℹ tests 92
ℹ suites 0
ℹ pass 92
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 5146.641147
@@ -0,0 +1,117 @@
✔ the Board: held roles with no machine sessions, a claim with no address, the toggle kept across a reload, and Message addressed to the role (6906.419305ms)
✔ a redirect answer on a Board read, a bus read, a conversation read, a board POST, a module read and a send signs the page out: one line, nothing stale, no further reads (6970.129784ms)
✔ browser edge states: loading, empty, malformed, stale, hostile/long values, in-flight reply and appearance fallback (5426.959228ms)
Rendered contrast: {"failures":[],"count":330,"lowest":4.504658476260286}
✔ served Console browser: real board fixtures, keyboard, drafts, receipts, themes, 320px and failures (5605.370231ms)
✔ the README says a refused field table names the file or the key at fault, never a path (1.408582ms)
✔ S5 pages in a browser: real broker rows, inert text, Copy, routes, failures, layout and no writes (6975.380725ms)
✔ bus routes serve the four reads from the reader view, unescaped JSON for the page to escape (304.602609ms)
✔ decisions route serves the roles and recent lists from the reader view (420.530236ms)
✔ credentials route serves the broker credential status from the reader view (211.792033ms)
✔ replies route serves the replies to one message from the reader view (613.145626ms)
✔ bus routes are GET-only, have no write verb, and keep the same-origin checks (325.650464ms)
✔ bus refusals map to statuses and never carry a path or a stack (158.439102ms)
✔ humanCall speaks the human transport protocol without blocking the server (2150.255096ms)
✔ busReader takes --business, else the live bus host, else refuses (414.033631ms)
✔ humanCall kills a transport that runs past its timeout (529.154468ms)
✔ serve refuses a --business value that is not a business id (221.356836ms)
✔ conversation view: full history, collapsed tools, hidden thinking, inert hostile content, malformed and reconcile markers (5495.915317ms)
✔ conversation view: a fork keeps the open branch, says so, and opens the new one on request (3843.5227ms)
✔ conversation view: a newer session with no readable history keeps the marker (1997.641093ms)
✔ conversation view: seats without history say so and offer no reply (2616.369487ms)
✔ Discord row through real board/WebUI: independent brake/liveness, no Reply, literal content (5281.954563ms)
✔ return flow through the conversation view: send, tool call, delayed result, peer message, exact long answers, relaunch (54034.507916ms)
✔ messages HTTP read pages and preserves metadata; bad arguments refuse before a read; other reads unchanged (380.512674ms)
✔ Console Messages lists late unsolicited messages on polling with sender class time read state and trail; nav count includes beyond the page; reads never deliver (10592.400598ms)
✔ Messages nav count polls on Tasks and Board and clears on a Board refusal; messages 403 refuses local pages (3868.12418ms)
✔ copy writes the Console paths at the full id, read-only, and leaves an existing copy alone (3041.871527ms)
✔ copy refuses a commit off refactor, an unknown one, a worktree and a bad copies directory (3623.72698ms)
✔ copy writes nothing when an archived path is missing at the commit (771.709978ms)
✔ a copy that loses the rename race leaves no read-only temp directory behind (2650.811247ms)
✔ a copy whose rename fails with no target refuses, writes no copy and leaves no temp directory (994.8384ms)
✔ a copy that meets a target holding files says exists: and moves nothing into it (709.666588ms)
✔ a copy that meets an empty target directory replaces it by rename, not by moving into it (750.99622ms)
✔ serve runs from a copy: /healthz 200, the config check, roles and RELEASE from the copy, the queue from --checkout (1311.344499ms)
✔ serve refuses a --checkout that is not an absolute directory path (239.400255ms)
✔ consoleReads runs the queue read under queueRoot and reads RELEASE under root (51.184123ms)
✔ preview options are all three or none, and each is checked (10.867998ms)
✔ the CLI refuses a partial or invalid preview flag set at start (2526.191371ms)
✔ the CLI with all three flags serves the preview mode (315.917206ms)
✔ a request for the public name needs the header equal to the user id, else 401 and nothing read (47.077395ms)
✔ the header name matches without regard to case, and the value compare is exact (5.157204ms)
✔ the public name with the header reads the bus views, and the Host and Origin are checked first (57.45019ms)
✔ in preview mode every write answers 403 read-only, from the public name and loopback, and reaches nothing (21.248211ms)
✔ loopback requests are unchanged in preview mode, and the bus views work with the board down (8.973497ms)
✔ a proxy that rewrites Host to the loopback port gets 403 on its first request, whatever the user (23.126788ms)
✔ a repeated Host is 400 before any other check, in preview mode and without it (9.843597ms)
✔ without the preview flags the public name is refused and writes still reach the board (7.811076ms)
✔ redactor: config, dataRoot, any absolute path, Discord ids and the JSON parser quote (2.318495ms)
✔ credential state from the date alone, as the bus states it (0.279957ms)
✔ queue: rows, one row, ids and methods, notes; no path or id from a row (1876.087005ms)
✔ queue: a refused read fails closed with the store's text, redacted (1239.610602ms)
✔ queue: a store that fails to load, or a child that dies, gives a fixed message with no path or stack (3565.499624ms)
✔ business: names, vars on the allowlist, authority, credential metadata only (12.717646ms)
✔ business: missing or invalid file refuses with the module's text, redacted (7.359469ms)
✔ business without --business: the live bus host, else no-bus-host; no system config: not-configured (7.978395ms)
✔ settings: release, board, loopback address, notifier binding name only (360.918896ms)
✔ task fields: the committed table with no reads configured, GET only; a bad table refuses with no path (59.600444ms)
✔ both presentations replace old activity with relaunch notice, label retained history, then resume after new activity (4238.509387ms)
✔ reported return flow and relative Age: reply sent from the inspector, then the new answer appears there without manual refresh (23225.934019ms)
✔ the send box: held roles, the draft and caret across a refresh, each receipt, one POST per Send, and the trail link; the board Reply on a 4xx and a 5xx (6650.209137ms)
✔ a sent receipt lists its replies as the page refreshes, oldest first and capped, and marks none delivered or read (13207.308896ms)
✔ startServer takes send only as a function and only with the preview mode (7.359711ms)
✔ the CLI refuses --send without the preview flags, and without a configured bus (512.835407ms)
✔ the CLI with --send and a configured bus sends through the human transport and logs one line (117.09995ms)
✔ without --send the route is read-only like every other write, and config says no send (6.675942ms)
✔ with --send every other write is still 403 read-only, and nothing reaches the board or bus (4.950577ms)
✔ config says send only on the public name with --send on (1.698066ms)
✔ a send without the signed-in user is 401 and is neither sent nor logged, loopback included (3.426462ms)
✔ each request check refuses before anything is sent, and logs the refusal without the body (12.201301ms)
✔ a send passes exactly to, body and in_reply_to, answers the id, and logs it (2.38405ms)
✔ a crafted role name cannot forge a log line (1.752267ms)
✔ a bus refusal is not sent, with its status; an outcome the bus could not confirm is unknown and never retried (5.963724ms)
✔ through the human transport the request is exactly the business, message.send and the keys (111.58994ms)
✔ against a real broker: the message is written once as a human send, and its refusals map (1477.032082ms)
✔ loopback host and board origin fail closed (5.761368ms)
✔ real board fixture passes through WebUI; assets and isolated seen/reply work (643.042791ms)
✔ proxy preserves exact request bytes, status and receipt, rejects forms and malformed JSON, never follows redirect (42.517649ms)
✔ unreachable board reports URL; CLI rejects unsupported options (334.187484ms)
✔ render prints the unit without the preview flags (22.059345ms)
✔ render carries every serve flag, the preview set included (6.850243ms)
✔ a partial preview set is refused (13.749328ms)
✔ a value the unit cannot carry is refused, for every flag (663.7004ms)
✔ the rendered unit names none of the human proof agent markers and sets no agent variable (32.691251ms)
✔ install into --dir with --no-reload writes the file whole, then reports unchanged (339.294651ms)
✔ install without --no-reload runs daemon-reload and nothing that starts the unit (75.291327ms)
✔ uninstall refuses while the unit is running, with or without --no-reload, and removes it once it is not (227.918039ms)
✔ status prints the unit state and GET /healthz on the installed port (264.830912ms)
✔ usage: an unknown verb or flag, and start or enable, exit 4 (105.23854ms)
✔ without --send, render is the template with its placeholders filled, byte for byte (135.128978ms)
✔ render --send with the preview set ends ExecStart with --send and changes nothing else (91.891658ms)
✔ --send without the whole preview set is refused and writes nothing (190.616606ms)
✔ install --send into --dir with --no-reload writes the sending unit, and status says whether it sends (521.329462ms)
✔ uninstall and status take no --send (62.856733ms)
✔ install refuses while the unit is running, in any state but inactive or failed, and changes nothing (358.979808ms)
✔ when the state read fails, install and uninstall refuse with one line and change nothing (95.198771ms)
✔ install needs --copy naming a copy that exists, and refuses outside the canonical checkout without --allow-worktree (96.637986ms)
✔ install refuses unless the bus unit runs from the same copy, naming both paths, and changes nothing (462.039053ms)
✔ render --copy runs the copy and reads the queue in the checkout; without --copy the unit is unchanged (15.983212ms)
✔ the uid header takes only an Authentik uid; the username header still takes a username (273.905447ms)
✔ a preview value cannot start with - or . (34.86533ms)
✔ status names the copy and whether refactor has moved past it, and says when the unit runs from no copy (565.307428ms)
✔ tokens.css and icons.svg are byte copies of docs/design (0.898846ms)
✔ JetBrains Mono files match the digests in their sources file, with the OFL text (1.666027ms)
✔ shipped strings are unchanged, and the web keeps its write boundary (1.994523ms)
✔ shell in a browser: System default, seeded states, 400px, focus and the Ctrl+K palette (7660.231ms)
✔ five states on Board, Inbox, Tasks, Agents and Trail (3323.248149ms)
✔ Queue, Business and Settings in their five states, with no move button (5036.721075ms)
✔ seeded secrets, Discord ids and paths reach no response and no page; business refusals in the module's words (3448.342066ms)
✔ the server log names no config path when the system config refuses (313.209604ms)
ℹ tests 108
ℹ suites 0
ℹ pass 108
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 54484.250053
@@ -0,0 +1,17 @@
OK status with missing harness credential exits 3 and still lists accounts
OK status reports harness credential (read-only) + mosaic accounts
OK api key material never reaches output
OK oauth token material never reaches output
OK unparseable credential file exits 2
OK symlinked credential file exits 4
OK env-side credential names reported
OK env var values never reach output
OK accounts without an accounts dir reports none and creates nothing
OK accounts lists files and marks the active one
OK loose account perms flagged in listing
OK agent --auth with missing account file refuses (exit 4)
OK agent --auth with non-0600 account file refuses
OK agent --auth with invalid account name refuses
OK auth.sh without valid config refuses
selftest: 15 passed, 0 failed
@@ -0,0 +1,55 @@
Note: switching to 'cc48b124f17caf712eab1a68a25ca52fa3727d55'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Not currently on any branch.
nothing to commit, working tree clean
Note: switching to 'cc48b124f17caf712eab1a68a25ca52fa3727d55'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
OK dry-run: allowed change, exit 0, nothing committed (exit 0)
OK dry-run committed nothing
OK apply: allowed change exits 0 (exit 0)
OK apply: attribution in commit subject
OK apply: target tree clean after commit
OK disallowed path refused (exit 1)
OK disallowed path: target untouched
OK syntax gate refused broken .mjs (exit 1)
OK syntax gate: target untouched
OK suite failure refused (exit 1)
OK suite failure: target reverted to clean
OK disabled policy refused (exit 2)
OK disabled policy: target untouched
OK failed run refused (exit 1)
OK failed run: target untouched
OK missing run exits 4 (exit 4)
OK invalid policy exits 2 (exit 2)
selftest: 17 passed, 0 failed
@@ -0,0 +1,26 @@
OK absent adapter defaults to pi
OK adapter mock validates (exit 0)
OK unsupported adapter exits 2 (exit 2)
OK env exports adapter
OK bootstrap creates default when absent (exit 0)
OK bootstrap wrote config file
OK bootstrap is idempotent on existing config (exit 0)
OK bootstrap did not rewrite existing config
OK validate missing config exits 3 (exit 3)
OK malformed JSON exits 2 (exit 2)
OK unsupported configVersion exits 2 (exit 2)
OK unknown top-level key exits 2 (exit 2)
OK unknown execution key exits 2 (exit 2)
OK unsupported backend exits 2 (exit 2)
OK unsupported environment exits 2 (exit 2)
OK relative dataRoot exits 2 (exit 2)
OK non-canonical dataRoot exits 2 (exit 2)
OK filesystem root dataRoot exits 2 (exit 2)
OK home directory dataRoot exits 2 (exit 2)
OK dataRoot containing config dir exits 2 (exit 2)
OK control character in provider exits 2 (exit 2)
OK symlinked config file exits 2 (exit 2)
OK env exports resolve correctly
OK failed validation modified nothing
selftest: 24 passed, 0 failed
@@ -0,0 +1,70 @@
toolchain: node v26.8.1
OK syntax: packages/discord/src/approvals.mjs
OK syntax: packages/discord/src/authorize.mjs
OK syntax: packages/discord/src/binding.mjs
OK syntax: packages/discord/src/cli.mjs
OK syntax: packages/discord/src/connector.mjs
OK syntax: packages/discord/src/context.mjs
OK syntax: packages/discord/src/engine-pi.mjs
OK syntax: packages/discord/src/errors.mjs
OK syntax: packages/discord/src/gateway.mjs
OK syntax: packages/discord/src/git.mjs
OK syntax: packages/discord/src/journal.mjs
OK syntax: packages/discord/src/notify.mjs
OK syntax: packages/discord/src/rest.mjs
OK syntax: packages/discord/src/setspark.mjs
OK syntax: packages/discord/src/tools.mjs
OK syntax: packages/discord/src/web.mjs
OK syntax: packages/discord/bin/git-credential.mjs
OK syntax: packages/discord/extension/tools.mjs
OK syntax: packages/discord/tests/approvals.test.mjs
OK syntax: packages/discord/tests/authorize.test.mjs
OK syntax: packages/discord/tests/binding.test.mjs
OK syntax: packages/discord/tests/connector.test.mjs
OK syntax: packages/discord/tests/context.test.mjs
OK syntax: packages/discord/tests/engine.test.mjs
OK syntax: packages/discord/tests/fake-pi.mjs
OK syntax: packages/discord/tests/gateway.test.mjs
OK syntax: packages/discord/tests/git.test.mjs
OK syntax: packages/discord/tests/helpers.mjs
OK syntax: packages/discord/tests/journal.test.mjs
OK syntax: packages/discord/tests/notify.test.mjs
OK syntax: packages/discord/tests/recover.test.mjs
OK syntax: packages/discord/tests/rest.test.mjs
OK syntax: packages/discord/tests/setspark.test.mjs
OK syntax: packages/discord/tests/tools.test.mjs
OK syntax: packages/discord/tests/web.test.mjs
OK syntax: packages/discord/fixtures/claim-worker.mjs
OK syntax: packages/discord/fixtures/legacy-owner-worker.mjs
OK syntax: scripts/discord.sh
OK syntax: scripts/discord-service.sh
OK packages/discord declares no dependencies
OK no bot-token-shaped string in packages/discord
OK fixture binding uses placeholder ids only
OK fixture binding validates
OK real pi with the extension exposes exactly list_dir, read_file, search and no built-in tool
OK real pi with a writable root exposes exactly the three reads plus write_file and edit_file, and writes nothing at start
OK real pi with a web key exposes the three reads plus web_fetch and web_search, and no write tool without a writable root
OK real pi with a git root exposes the reads, writes and the four git verbs, commits nothing at start, and never shows the token
OK real pi with protocol vault adds reserve_id to the git verbs
OK real pi with a setspark key exposes the reads and the eight record verbs, no counters, and never shows the key
OK real pi refuses a git key on a read-only root (fail closed)
OK real pi with the pilot flags (--no-tools) exposes no tool at all
OK real pi exits non-zero without MOSAIC_DISCORD_TOOLS: no session, no tools (fail closed)
OK a failing nested test fails the run under a parent runner's NODE_TEST_CONTEXT
OK node --test packages/discord/tests/ (ℹ pass 178)
OK scripts/discord.sh --help exits 0
OK scripts/discord.sh check without a binding exits 4
OK scripts/discord.sh recover without a binding exits 4
OK scripts/discord.sh reload without a binding exits 4
OK scripts/discord-service.sh without a command exits 4
OK service unit renders with the repository path, a supervised run as the main process, exit 3 never retried, and reload as SIGHUP
OK service install writes the rendered unit (0644) and leaves no temp file
OK service install a second time reports unchanged
OK systemd-analyze verify accepts the rendered unit
OK service uninstall removes the unit file
OK service install with an unknown flag exits 4
OK service install with USER unset finishes and names the account for lingering
discord suite: 66 passed, 0 failed
@@ -0,0 +1,21 @@
OK initial ordinary-file install
OK installed tree matches canonical source
OK installed tree has no symlinks
OK check detects installation drift
OK sync refuses to overwrite installation drift
OK check detects an extra destination file
OK check detects an extra destination directory
OK check rejects a destination symlink
OK sync accepts a canonical source update
OK updated installation matches canonical source
scripts/test-extension-package.sh: line 14: 1518443 Killed "$@" > /dev/null 2>&1
OK forced interruption kills the replacing process
OK next invocation recovers old consistent installation
OK interrupted replacement rolled back
OK sync succeeds after interruption recovery
OK unlocked stale lock file does not block
OK active lock refuses a concurrent sync
OK source symlink fails closed
OK nested second entrypoint fails closed
extension package selftest: 18 passed, 0 failed
@@ -0,0 +1,53 @@
toolchain: node v26.8.1, python 3.12.8, jsonschema 4.26.0
OK syntax: scripts/foundation-inspect.mjs
OK syntax: scripts/foundation/strict-json.mjs
OK syntax: scripts/foundation/canonical.mjs
OK syntax: scripts/foundation/resolve.mjs
OK syntax: scripts/foundation/validate-record.mjs
OK syntax: scripts/foundation/fixtures/build-fixtures.mjs
OK syntax: scripts/foundation/canonical.test.mjs
OK syntax: scripts/foundation/cli.test.mjs
OK syntax: scripts/foundation/fixtures.test.mjs
OK syntax: scripts/foundation/resolve.test.mjs
OK syntax: scripts/foundation/strict-json.test.mjs
OK syntax: scripts/foundation/verify-schema.py (ast only; no bytecode written)
OK fixture generator runs
OK checked-in fixtures/bundles equal a fresh generation
OK checked-in fixtures/raw equal a fresh generation
OK checked-in fixtures/index.json equal a fresh generation
OK checked-in demo bundles equal a fresh generation
OK a failing nested test fails the run under a parent runner's NODE_TEST_CONTEXT
OK node --test scripts/foundation/ (ℹ pass 80)
OK differential schema oracle: PASS: differential schema oracle (finite corpus; compatibility evidence, not equivalence proof)
platform witness: strftime('%Y') for year 999 -> '999' (pinned checker refuses years 0001..0999)
node v26.8.1; corpus 1568 records (38 pinned fixtures, 478 unique bundle records, 1052 typeCase/mutation/lexical cases)
schema column: agree-valid 540, agree-invalid 991, DISAGREEMENTS 0; strict-only (parser-bound) cases: 27; unsupported-kind records not schema-assessed by the inspector: 10
profile column (schema-valid records only): profile-valid 510, profile-invalid 30
profile refusals asserted: 30 schema-agreed-valid records refused only by the strict typed-string profile (rule profile-pattern-mismatch), 12 declared by name; 73 named probes verified against declared schema/profile columns
OK oracle: zero schema-column disagreements with the pinned checker
OK oracle: strict-only profile refusals are counted and asserted
OK demo: permitted read preview exits 0 (exit 0)
OK demo: permitted file.change preview exits 0 (exit 0)
OK demo: assignment.change proposal is unresolved (exit 3) (exit 3)
OK demo: revoked registration is refused (exit 3) (exit 3)
OK demo: message is not authority (exit 3) (exit 3)
OK usage: no arguments exits 2 (exit 2)
OK io: missing file exits 4 (exit 4)
OK io: directory exits 4 (exit 4)
OK io: symlink exits 4 (O_NOFOLLOW) (exit 4)
OK bound: oversize fixture exits 2 (exit 2)
OK profile: one final LF in a typed selection id is refused before admission (exit 2) (exit 2)
OK profile: two final LFs fail the schema pattern itself (exit 2) (exit 2)
OK profile: escaped newlines in free-form text stay allowed (exit 0) (exit 0)
OK profile refusal is invalid-request/profile-pattern-mismatch with selection and operation withheld, value not echoed
OK text output starts with the disclaimer
OK json output is valid JSON with result allowed and exactly the charter §7 fields
OK json golden matches byte-for-byte
OK sandboxed bundle run (env -i, PATH=/nonexistent) produced the unresolved proposal
OK sandbox inventory (path/type/size/mode/uid/gid/inode/mtime/sha256) unchanged by runs
OK canary never printed (bundle run and credential-file run)
OK a non-bundle JSON file is refused at the shape gate, not read into output
OK no field of the non-bundle file is echoed
selftest: 44 passed, 0 failed
@@ -0,0 +1,36 @@
toolchain: node v26.8.1, git version 2.55.0
OK syntax: packages/queue/src/cli.mjs
OK syntax: packages/queue/src/errors.mjs
OK syntax: packages/queue/src/io.mjs
OK syntax: packages/queue/src/lock.mjs
OK syntax: packages/queue/src/queue.mjs
OK syntax: packages/queue/src/review.mjs
OK syntax: packages/queue/src/store.mjs
OK syntax: packages/queue/tests/commit.test.mjs
OK syntax: packages/queue/tests/data.test.mjs
OK syntax: packages/queue/tests/dispatch.test.mjs
OK syntax: packages/queue/tests/gate-owner.test.mjs
OK syntax: packages/queue/tests/helpers.mjs
OK syntax: packages/queue/tests/lock.test.mjs
OK syntax: packages/queue/tests/migration.test.mjs
OK syntax: packages/queue/tests/review.test.mjs
OK syntax: packages/queue/tests/store.test.mjs
OK syntax: packages/queue/tests/write.test.mjs
OK syntax: packages/queue/tests/fixtures/fake-gitea.mjs
OK syntax: packages/queue/tests/fixtures/kill-at.mjs
OK syntax: packages/queue/tests/fixtures/lock-child.mjs
OK syntax: packages/queue/tests/fixtures/mosaic-pre-a2.sh
OK syntax: scripts/queue-commit.sh
OK syntax: scripts/git-hooks/pre-commit
OK syntax: scripts/mosaic
OK queue-commit.sh, the guard and scripts/mosaic are executable
OK packages/queue declares no dependencies
ℹ tests 156
ℹ pass 156
ℹ fail 0
OK node --test packages/queue/tests/
OK scripts/mosaic queue help
skip queue verify and render --check: this checkout (/home/jwoltje/darkwing-scratch/r113/wt) is not the queue's canonical root (/mnt/storage/src/mosaic-stack)
queue suite: 28 passed, 0 failed
@@ -0,0 +1,16 @@
OK valid RELEASE resolves (exit 0)
OK invalid RELEASE exits 1 (exit 1)
OK missing RELEASE exits 1 (exit 1)
OK valid RELEASE leaves image tag consistent with version
OK status safe on empty state (exit 0)
OK status created no pointer
OK fault-injected activation refuses (exit 1)
OK refused activation wrote no pointer
OK refusal logged exactly once with valid fields
OK healthy activation succeeds (exit 0)
OK pointer written with valid fields
OK repeat activation succeeds (log grows) (exit 0)
OK log is append-only across activations
OK rollback without previous refuses (exit 1)
selftest: 14 passed, 0 failed
@@ -0,0 +1,101 @@
OK valid task validates (exit 0)
OK unknown task key exits 2 (exit 2)
OK unsupported taskVersion exits 2 (exit 2)
OK invalid task id exits 2 (exit 2)
OK empty prompt exits 2 (exit 2)
OK NUL in expectExact exits 2 (exit 2)
OK out-of-range timeout exits 2 (exit 2)
OK missing mission file exits 4 (exit 4)
OK task with valid mission validates (exit 0)
OK invalid mission exits 2 (exit 2)
OK validate missing task exits 4 (exit 4)
OK validation does not modify the task file
OK prune dry-run exits 0 (exit 0)
OK dry-run deleted nothing
OK prune --keep=2 --yes removes oldest (exit 0)
OK kept exactly 2 newest runs
OK newest run kept, oldest pruned
OK append-only receipt written (3 entries)
OK sessions/workspaces untouched by prune
OK prune with invalid keep exits 4 (exit 4)
OK mock adapter: gate passes on matching mock response (exit 0)
OK mock adapter: expect-mismatch recorded (exit 1)
OK mismatch reason recorded
OK unknown adapter fails closed (exit 1)
OK mission task runs via mock adapter (exit 0)
OK mission section injected into generated prompt
OK retry of mission run succeeds (exit 0)
OK retriedFrom lineage recorded
OK mission section present after retry (relative path resolved)
OK retry of missing run exits 4 (exit 4)
OK skill install bundled ms-tools (exit 0)
OK installed to skills-available
OK double install refuses (exit 1)
OK activate enables skill (exit 0)
OK enabled dir populated
OK uninstall while enabled refuses (exit 1)
OK deactivate moves back to available (exit 0)
OK uninstall removes from available (exit 0)
OK seat with enabled skill launches
OK skill path delivered to adapter
OK shipped researcher contract resolves (ceiling + network)
OK resolve-role refuses a non-role document (conductor policy) (exit 2)
OK resolve-role refuses name/filename mismatch (exit 2)
OK resolve-role refuses unknown network declaration (exit 2)
OK resolve-role refuses duplicate role tool (exit 2)
OK resolve-role refuses unsupported tool (exit 2)
OK resolve-role refuses missing contract file (exit 4)
OK version 1 role prints no contract line
OK shipped version 2 roles resolve with their contracts (pm, cto, coder, reviewer)
OK resolve-role accepts a minimal version 2 role (exit 0)
OK resolve-role refuses an action outside the vocabulary (exit 2)
OK resolve-role refuses a gated-only action in a role file (exit 2)
OK resolve-role refuses a Vikunja verb no role may hold (exit 2)
OK resolve-role refuses a version 2 role whose contract is missing (exit 2)
OK resolve-role refuses a contract that is a symbolic link (exit 2)
OK seat launches under role ceiling
OK role ceiling narrows seat tools (read,write,bash -> read,bash)
OK narrowing recorded loudly
OK missing role contract refuses launch (exit 2)
OK missing-contract refusal names the role
OK empty ceiling intersection -> tool-free seat
OK tool-free outcome recorded loudly
OK overridden agents dir without seat definition refuses (exit 4)
OK seat-resolution refusal names the seat
OK policy: mission only -> mission tools
OK policy: task only -> task tools
OK policy: both -> intersection (task narrowed)
OK policy: empty intersection -> tool-free
OK invalid mission capabilities rejected (exit 2)
mosaic-task: unsupported mission tool: "sudo" (supported: read, write, edit, bash, grep, find, ls)
OK task run with user layer present (exit 0)
OK user context dispatched into generated prompt
OK workspace+tools task runs via mock (exit 0)
OK workspace path + tools delivered to adapter
OK persistent workspace created on host
OK plain task still runs (no workspace/tools) (exit 0)
OK workspace var present but empty when absent
OK tools empty when absent
OK unknown tool exits 2 (exit 2)
OK workspace traversal exits 2 (exit 2)
OK live hello task succeeds with exact marker
OK result.json written in run dir
OK result.json contents are correct
OK wrong expectExact fails with exit 1 (reason: expect-mismatch)
OK each run gets a distinct run dir (no clobber)
OK list shows both runs
OK fork base: teach succeeds (exit 0)
OK fork child recalls ancestor context (exit 0)
OK forked child recalled ancestor code word
OK ancestor session untouched by fork
OK child session dir has its own branch file
OK onboard without name exits 4 (non-interactive) (exit 4)
OK onboard --name renders profile (exit 0)
OK profile written
OK canon structure: required filled, optional placeholdered
OK canon sections present
OK user recall run succeeds
OK recalled user name (response: Jason)
OK no agent identity on headless run
selftest: 98 passed, 0 failed
@@ -0,0 +1,11 @@
mutant m1 rc=1 ℹ pass 85 ℹ fail 1 ℹ skipped 0 restored=True
✖ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (392.948652ms)
KILLED
mutant m2 rc=1 ℹ pass 80 ℹ fail 6 ℹ skipped 0 restored=True
✖ a failing page 2 refuses the whole read without its stderr (131.72083ms)
✖ a short page 10 is read; a full page 10 refuses at the ceiling (135.522954ms)
✖ an issue number on two pages refuses (132.832385ms)
✖ issue pages of 50, 50 and 7 read 107 issues in 3 pages (137.931377ms)
✖ page 2 with a malformed record refuses (134.782255ms)
✖ page 2 with more than 50 rows refuses (138.592444ms)
KILLED
@@ -0,0 +1,117 @@
✔ a raw token file, with or without one trailing newline, reaches curl only through the config stream (117.374149ms)
✔ the raw path accepts nothing else, and refuses before curl runs (378.46937ms)
✔ the file checks still apply on the raw path: mode, symlink, missing, directory (273.443783ms)
✔ the raw path base URL has no override (62.608359ms)
✔ the JSON path is unchanged, and JSON never falls through to the raw path (263.62697ms)
✔ a file that changes between the two reads refuses before curl runs, with or without a body (698.379111ms)
✔ the token reaches no child environment, even with an inherited CFG or SHELLOPTS=allexport (653.922382ms)
✔ real helper GET HTTP 200 preserves exit 0 without credentials (13.810798ms)
✔ real helper POST HTTP 201 preserves exit 0 without credentials (10.231389ms)
✔ real helper GET HTTP 403 preserves exit 1 without credentials (8.775646ms)
✔ fixture git subjects only, follow-ups and three session kinds (148.312975ms)
✔ text and JSON carry same numbers, open and truncated title (242.956568ms)
✔ missing credentials exit 2, no-issues never calls API and shows unknown (194.083675ms)
✔ empty range gives no rows and zero totals (175.092098ms)
✔ inclusive UTC dates, first-line preamble only, role and seat boundaries (180.938898ms)
✔ close-only issue included, even median, missing metadata stays unknown (140.081004ms)
✔ unique commits but per-issue links count multiple tags once each (146.485246ms)
✔ issue pages of 50, 50 and 7 read 107 issues in 3 pages (346.420065ms)
✔ one short page reads 1 page; --no-issues reads none and says so (243.412666ms)
✔ a short page 10 is read; a full page 10 refuses at the ceiling (695.741148ms)
✔ an issue number on two pages refuses (155.209212ms)
✔ a failing page 2 refuses the whole read without its stderr (153.747726ms)
✔ page 2 with a malformed record refuses (168.295244ms)
✔ page 2 with more than 50 rows refuses (199.640363ms)
✔ bad API payload not JSON refuses (148.35931ms)
✔ bad API payload {} refuses (167.537549ms)
✔ bad API payload [{"number":1}] refuses (157.607219ms)
✔ partial or malformed session log refuses with location, not content (131.944963ms)
✔ a U+2028 or U+2029 inside a session string is one line, not a malformed record (140.787358ms)
✔ no sessions is an empty table; symlink source refuses (217.311986ms)
✔ reads only refactor even when another branch is checked out (147.538282ms)
✔ invalid dates, reverse dates and duplicate options refuse (117.723651ms)
✔ T3 agent assignments do not count as human in Table 2 (189.007018ms)
✔ preamble parsing and issue number boundaries (0.448992ms)
✔ T3 header: agent, or board from control-board; anything short of the full header is human (0.130306ms)
✔ no closed issues with human messages means undefined ratio, not invented zero (0.191604ms)
✔ T3: seat, archived, unmapped and Researcher threads count; imported, deleted and other-project threads do not (496.237648ms)
✔ T3: the default path is read from HOME and prints no path line; --no-t3 says so (684.655326ms)
✔ T3: a HOME with no database exits 1 and names --no-t3 (136.723747ms)
✔ T3: a file that is not a database exits 1 and names --no-t3 (135.154109ms)
✔ T3: a seat thread renamed to another seat exits 1 naming thread, title and roles (378.566686ms)
✔ T3: an unmapped thread addressed as a seat exits 1 (383.536645ms)
✔ T3: a header to another thread id is not cross-checked (567.857558ms)
✔ T3: no project, or two, for this root exits 1 (1025.096401ms)
✔ T3: a removed column exits 1 and names it (236.853251ms)
✔ T3: a missing table exits 1 and names it (226.277828ms)
✔ T3: a counted row with an unknown role exits 1 without its text (378.145903ms)
✖ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (392.948652ms)
✔ T3: a counted row with non-text content exits 1 without its text (395.081419ms)
✔ T3: a counted row with an unparseable created_at exits 1 without its text (424.974114ms)
✔ T3: a reasoning summary is skipped before any check and counted as excluded (965.017097ms)
✔ T3: a missing orchestration_events makes the diagnostic unknown and keeps the counts (706.561241ms)
✔ T3: a human message with no event counts in humanWithoutEvent (401.877608ms)
✔ T3: an unparseable event makes the diagnostic unknown and keeps the counts (705.327573ms)
✔ T3: an event with no string messageId makes the diagnostic unknown and keeps the counts (716.799559ms)
✔ T3: an error that is not from SQLite is rethrown, not reported as a database failure (359.807131ms)
✔ T3: a symlink at ~/.t3 exits 1 (136.15649ms)
✔ T3: a symlink at ~/.t3/userdata exits 1 (131.410634ms)
✔ T3: a symlink at ~/.t3/userdata/state.sqlite exits 1 (143.645683ms)
✔ T3: with --t3-db, a symlinked file or directory exits 1 (439.868268ms)
✔ T3 WAL: the newest message only in -wal, writer attached, is counted (413.168029ms)
✔ T3 WAL: stopped cleanly, counts are correct and the main file is unchanged (424.145158ms)
✔ T3 WAL: -wal without -shm in a writable directory is read (457.003254ms)
✔ T3 WAL: -wal without -shm in a read-only directory exits 1 (471.492395ms)
✔ T3 WAL: stopped cleanly in a read-only directory exits 1 (396.929907ms)
✔ T3: a lock held past the 5 s busy timeout exits 1 and names --no-t3 (5389.951519ms)
✔ a done row whose closing issue is open is a violation; a row that is not done is not (1.743663ms)
✔ an issue several rows close is expected closed only once all of them are done (0.623899ms)
✔ closure needs positive evidence: unknown is undecided, and so is a skipped or short issue check (0.350652ms)
✔ each owner of an in-progress or in-review row gets one liveness class (12.763668ms)
✔ a required row not done after 14 days is a violation; a legacy row uses genesis as its lower bound (0.546054ms)
✔ an ISO requiredSince, as `set required` writes it, ages from its UTC day; one that does not parse is a violation (0.332903ms)
✔ the text section always ends in a count and a result, and never prints a full pass (0.462535ms)
✔ pidAlive: a running pid is present, an exited one is gone, and EPERM still means present (25.824901ms)
✔ issue states: open list first, then the metric page, then at most 10 lookups (285.779949ms)
✔ a full open list: lookups settle what it leaves out, and only an unsettled issue keeps it undecided (381.572934ms)
✔ the open list refuses on a failed call or a bad record, and never echoes the helper (179.26393ms)
✔ a helper call past the deadline is killed with its child, and the call reports it (2009.17234ms)
✔ readQueue loads queue.json through the queue validator and refuses anything else (174.862121ms)
✔ protected changes list every in-range entry that changes a required or parked row (385.539721ms)
✔ the CLI prints the queue section above the weekly table and under a queue key in --json (534.984587ms)
✔ a queue with nothing wrong prints 0 violations and a reduced pass, never a full pass (218.512781ms)
✔ --no-issues makes no call and leaves the issue checks undecided; --no-queue skips the section (294.843316ms)
✔ the CLI refuses a bad queue before any call, and a failed open list with exit 2 (263.432466ms)
✔ --unsupported-runtime repeats once per seat and takes a seat name (355.335034ms)
✔ an unreadable config makes every owner invalid instead of passing them (179.012557ms)
ℹ tests 86
ℹ suites 0
ℹ pass 85
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 22786.752105
✖ failing tests:
test at tests/ledger.test.mjs:383:4
✖ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (392.948652ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 1
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:386:46)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 1,
operator: 'strictEqual',
diff: 'simple'
}
@@ -0,0 +1,227 @@
✔ a raw token file, with or without one trailing newline, reaches curl only through the config stream (106.968844ms)
✔ the raw path accepts nothing else, and refuses before curl runs (367.888732ms)
✔ the file checks still apply on the raw path: mode, symlink, missing, directory (270.377967ms)
✔ the raw path base URL has no override (52.050934ms)
✔ the JSON path is unchanged, and JSON never falls through to the raw path (221.324212ms)
✔ a file that changes between the two reads refuses before curl runs, with or without a body (657.343007ms)
✔ the token reaches no child environment, even with an inherited CFG or SHELLOPTS=allexport (650.643121ms)
✔ real helper GET HTTP 200 preserves exit 0 without credentials (14.484012ms)
✔ real helper POST HTTP 201 preserves exit 0 without credentials (10.008841ms)
✔ real helper GET HTTP 403 preserves exit 1 without credentials (8.268265ms)
✔ fixture git subjects only, follow-ups and three session kinds (151.482219ms)
✔ text and JSON carry same numbers, open and truncated title (234.353774ms)
✔ missing credentials exit 2, no-issues never calls API and shows unknown (190.574083ms)
✔ empty range gives no rows and zero totals (154.354733ms)
✔ inclusive UTC dates, first-line preamble only, role and seat boundaries (154.667788ms)
✔ close-only issue included, even median, missing metadata stays unknown (141.168929ms)
✔ unique commits but per-issue links count multiple tags once each (139.592694ms)
✖ issue pages of 50, 50 and 7 read 107 issues in 3 pages (137.931377ms)
✔ one short page reads 1 page; --no-issues reads none and says so (230.214589ms)
✖ a short page 10 is read; a full page 10 refuses at the ceiling (135.522954ms)
✖ an issue number on two pages refuses (132.832385ms)
✖ a failing page 2 refuses the whole read without its stderr (131.72083ms)
✖ page 2 with a malformed record refuses (134.782255ms)
✖ page 2 with more than 50 rows refuses (138.592444ms)
✔ bad API payload not JSON refuses (132.371237ms)
✔ bad API payload {} refuses (127.892137ms)
✔ bad API payload [{"number":1}] refuses (124.942729ms)
✔ partial or malformed session log refuses with location, not content (134.589493ms)
✔ a U+2028 or U+2029 inside a session string is one line, not a malformed record (136.416933ms)
✔ no sessions is an empty table; symlink source refuses (202.400409ms)
✔ reads only refactor even when another branch is checked out (145.814399ms)
✔ invalid dates, reverse dates and duplicate options refuse (117.131654ms)
✔ T3 agent assignments do not count as human in Table 2 (138.565841ms)
✔ preamble parsing and issue number boundaries (0.432186ms)
✔ T3 header: agent, or board from control-board; anything short of the full header is human (0.144098ms)
✔ no closed issues with human messages means undefined ratio, not invented zero (0.194941ms)
✔ T3: seat, archived, unmapped and Researcher threads count; imported, deleted and other-project threads do not (428.92355ms)
✔ T3: the default path is read from HOME and prints no path line; --no-t3 says so (698.946504ms)
✔ T3: a HOME with no database exits 1 and names --no-t3 (126.833417ms)
✔ T3: a file that is not a database exits 1 and names --no-t3 (165.846959ms)
✔ T3: a seat thread renamed to another seat exits 1 naming thread, title and roles (397.729413ms)
✔ T3: an unmapped thread addressed as a seat exits 1 (387.431195ms)
✔ T3: a header to another thread id is not cross-checked (388.184445ms)
✔ T3: no project, or two, for this root exits 1 (941.23848ms)
✔ T3: a removed column exits 1 and names it (235.683544ms)
✔ T3: a missing table exits 1 and names it (232.089131ms)
✔ T3: a counted row with an unknown role exits 1 without its text (377.295293ms)
✔ T3: a counted row with role reasoning without the reasoning: id prefix exits 1 without its text (387.895009ms)
✔ T3: a counted row with non-text content exits 1 without its text (387.577906ms)
✔ T3: a counted row with an unparseable created_at exits 1 without its text (435.290626ms)
✔ T3: a reasoning summary is skipped before any check and counted as excluded (964.651479ms)
✔ T3: a missing orchestration_events makes the diagnostic unknown and keeps the counts (663.363903ms)
✔ T3: a human message with no event counts in humanWithoutEvent (367.516405ms)
✔ T3: an unparseable event makes the diagnostic unknown and keeps the counts (670.071065ms)
✔ T3: an event with no string messageId makes the diagnostic unknown and keeps the counts (695.817173ms)
✔ T3: an error that is not from SQLite is rethrown, not reported as a database failure (331.16063ms)
✔ T3: a symlink at ~/.t3 exits 1 (127.134558ms)
✔ T3: a symlink at ~/.t3/userdata exits 1 (131.985126ms)
✔ T3: a symlink at ~/.t3/userdata/state.sqlite exits 1 (130.361825ms)
✔ T3: with --t3-db, a symlinked file or directory exits 1 (423.112865ms)
✔ T3 WAL: the newest message only in -wal, writer attached, is counted (396.838566ms)
✔ T3 WAL: stopped cleanly, counts are correct and the main file is unchanged (381.431517ms)
✔ T3 WAL: -wal without -shm in a writable directory is read (418.064109ms)
✔ T3 WAL: -wal without -shm in a read-only directory exits 1 (395.258346ms)
✔ T3 WAL: stopped cleanly in a read-only directory exits 1 (389.422042ms)
✔ T3: a lock held past the 5 s busy timeout exits 1 and names --no-t3 (5395.935418ms)
✔ a done row whose closing issue is open is a violation; a row that is not done is not (1.779054ms)
✔ an issue several rows close is expected closed only once all of them are done (0.485529ms)
✔ closure needs positive evidence: unknown is undecided, and so is a skipped or short issue check (0.369502ms)
✔ each owner of an in-progress or in-review row gets one liveness class (7.441047ms)
✔ a required row not done after 14 days is a violation; a legacy row uses genesis as its lower bound (0.376847ms)
✔ an ISO requiredSince, as `set required` writes it, ages from its UTC day; one that does not parse is a violation (0.200944ms)
✔ the text section always ends in a count and a result, and never prints a full pass (0.308852ms)
✔ pidAlive: a running pid is present, an exited one is gone, and EPERM still means present (22.470298ms)
✔ issue states: open list first, then the metric page, then at most 10 lookups (269.768992ms)
✔ a full open list: lookups settle what it leaves out, and only an unsettled issue keeps it undecided (358.820067ms)
✔ the open list refuses on a failed call or a bad record, and never echoes the helper (161.869692ms)
✔ a helper call past the deadline is killed with its child, and the call reports it (2007.52518ms)
✔ readQueue loads queue.json through the queue validator and refuses anything else (122.687781ms)
✔ protected changes list every in-range entry that changes a required or parked row (373.987307ms)
✔ the CLI prints the queue section above the weekly table and under a queue key in --json (497.373223ms)
✔ a queue with nothing wrong prints 0 violations and a reduced pass, never a full pass (238.346365ms)
✔ --no-issues makes no call and leaves the issue checks undecided; --no-queue skips the section (315.925822ms)
✔ the CLI refuses a bad queue before any call, and a failed open list with exit 2 (270.829427ms)
✔ --unsupported-runtime repeats once per seat and takes a seat name (342.329567ms)
✔ an unreadable config makes every owner invalid instead of passing them (176.193883ms)
ℹ tests 86
ℹ suites 0
ℹ pass 80
ℹ fail 6
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 21001.02703
✖ failing tests:
test at tests/ledger.test.mjs:146:1
✖ issue pages of 50, 50 and 7 read 107 issues in 3 pages (137.931377ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
50 !== 107
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:150:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 50,
expected: 107,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:162:1
✖ a short page 10 is read; a full page 10 refuses at the ceiling (135.522954ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected
{
+ pages: 1,
- pages: 10,
read: true
}
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:165:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: { read: true, pages: 1 },
expected: { read: true, pages: 10 },
operator: 'deepStrictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:171:1
✖ an issue number on two pages refuses (132.832385ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:174:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:176:1
✖ a failing page 2 refuses the whole read without its stderr (131.72083ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:178:10)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:182:99
✖ page 2 with a malformed record refuses (134.782255ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:185:48)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}
test at tests/ledger.test.mjs:182:99
✖ page 2 with more than 50 rows refuses (138.592444ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 2
at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r113/wt/packages/ledger/tests/ledger.test.mjs:185:48)
at Test.runInAsyncScope (node:async_hooks:226:14)
at Test.run (node:internal/test_runner/test:1402:25)
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
at Test.postRun (node:internal/test_runner/test:1542:19)
at Test.run (node:internal/test_runner/test:1467:12)
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: 0,
expected: 2,
operator: 'strictEqual',
diff: 'simple'
}