@mmnto/cli 2.2.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/config-drift.test.js +4 -1
- package/dist/commands/config-drift.test.js.map +1 -1
- package/dist/commands/gate-install.d.ts +17 -0
- package/dist/commands/gate-install.d.ts.map +1 -1
- package/dist/commands/gate-install.js +23 -0
- package/dist/commands/gate-install.js.map +1 -1
- package/dist/commands/gate-install.test.js +467 -0
- package/dist/commands/gate-install.test.js.map +1 -1
- package/dist/commands/gate.d.ts +9 -0
- package/dist/commands/gate.d.ts.map +1 -1
- package/dist/commands/gate.js +24 -2
- package/dist/commands/gate.js.map +1 -1
- package/dist/commands/gate.test.js +42 -1
- package/dist/commands/gate.test.js.map +1 -1
- package/dist/commands/init-templates.d.ts +5 -5
- package/dist/commands/init-templates.d.ts.map +1 -1
- package/dist/commands/init-templates.js +758 -79
- package/dist/commands/init-templates.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/init.test.js +122 -0
- package/dist/commands/init.test.js.map +1 -1
- package/dist/commands/mail-cli-wiring.test.js +58 -2
- package/dist/commands/mail-cli-wiring.test.js.map +1 -1
- package/dist/commands/mail-derive-seat.test.d.ts +28 -0
- package/dist/commands/mail-derive-seat.test.d.ts.map +1 -0
- package/dist/commands/mail-derive-seat.test.js +557 -0
- package/dist/commands/mail-derive-seat.test.js.map +1 -0
- package/dist/commands/mail.d.ts +112 -0
- package/dist/commands/mail.d.ts.map +1 -1
- package/dist/commands/mail.js +189 -0
- package/dist/commands/mail.js.map +1 -1
- package/dist/commands/resolve-threads-cli-wiring.test.d.ts +19 -0
- package/dist/commands/resolve-threads-cli-wiring.test.d.ts.map +1 -0
- package/dist/commands/resolve-threads-cli-wiring.test.js +103 -0
- package/dist/commands/resolve-threads-cli-wiring.test.js.map +1 -0
- package/dist/commands/resolve-threads.d.ts +472 -0
- package/dist/commands/resolve-threads.d.ts.map +1 -0
- package/dist/commands/resolve-threads.js +793 -0
- package/dist/commands/resolve-threads.js.map +1 -0
- package/dist/commands/resolve-threads.test.d.ts +2 -0
- package/dist/commands/resolve-threads.test.d.ts.map +1 -0
- package/dist/commands/resolve-threads.test.js +1123 -0
- package/dist/commands/resolve-threads.test.js.map +1 -0
- package/dist/commands/sync-labels-forms.test.d.ts +7 -4
- package/dist/commands/sync-labels-forms.test.d.ts.map +1 -1
- package/dist/commands/sync-labels-forms.test.js +266 -18
- package/dist/commands/sync-labels-forms.test.js.map +1 -1
- package/dist/index.js +74 -5
- package/dist/index.js.map +1 -1
- package/dist/parsers/bot-identity-parity.test.d.ts +2 -0
- package/dist/parsers/bot-identity-parity.test.d.ts.map +1 -0
- package/dist/parsers/bot-identity-parity.test.js +229 -0
- package/dist/parsers/bot-identity-parity.test.js.map +1 -0
- package/dist/parsers/bot-review-parser.d.ts +8 -5
- package/dist/parsers/bot-review-parser.d.ts.map +1 -1
- package/dist/parsers/bot-review-parser.js +12 -34
- package/dist/parsers/bot-review-parser.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `totem mail --derive-seat` — the signon step-0 identity probe
|
|
3
|
+
* (mmnto-ai/totem#2801, ruled design in `.totem/specs/2801.md`
|
|
4
|
+
* § Implementation Design + § Phase 4 rulings R2).
|
|
5
|
+
*
|
|
6
|
+
* The contract under test, verbatim from the design's data-model delta: the
|
|
7
|
+
* command "short-circuits before any poll: it calls `resolveSelfAgents(repoRoot,
|
|
8
|
+
* env)` and prints exactly one line `seat=<id> source=<env|config|dir>` when the
|
|
9
|
+
* resolution is a single seat that `env` supplied and this repo hosts;
|
|
10
|
+
* otherwise a refusal on stderr naming the supplied value (or "unset") and every
|
|
11
|
+
* seat this repo hosts, exit 2. No fallback to any seat, ever."
|
|
12
|
+
*
|
|
13
|
+
* Every `Invariants to lock in via tests` bullet from that design has at least
|
|
14
|
+
* one executed test here:
|
|
15
|
+
* - env unset in a two-seat repo → exit 2, both seats on stderr, stdout empty
|
|
16
|
+
* - env set to a hosted seat → exactly one stdout line, `source=env`, exit 0
|
|
17
|
+
* - env set to an unhosted seat → exit 2, stderr names the value + the list
|
|
18
|
+
* - never reads an outbox or a processed dir (the fs spy below)
|
|
19
|
+
* - `--as` (and `--all-seats`) with `--derive-seat` → contradictory, exit 2
|
|
20
|
+
* plus the design's fourth failure-mode row: a repo hosting no seat at all.
|
|
21
|
+
*
|
|
22
|
+
* Filesystem-driven and hermetic, same fixture idiom as mail.test.ts. The repo
|
|
23
|
+
* basenames are deliberately NON-cohort (`hostrepo`, `barerepo`) so the
|
|
24
|
+
* resolver's hardcoded basename map contributes nothing and the hosted set is
|
|
25
|
+
* exactly the seat dirs this fixture writes.
|
|
26
|
+
*/
|
|
27
|
+
import { execFileSync } from 'node:child_process';
|
|
28
|
+
import * as os from 'node:os';
|
|
29
|
+
import * as path from 'node:path';
|
|
30
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
31
|
+
// Mock node:fs so `vi.spyOn(fs, …)` works in ESM — same passthrough pattern as
|
|
32
|
+
// mail-degraded-e4.test.ts. Every call behaves identically to real fs until a
|
|
33
|
+
// test installs a targeted spy (and restores it in `finally`).
|
|
34
|
+
vi.mock('node:fs', async () => {
|
|
35
|
+
const actual = await vi.importActual('node:fs');
|
|
36
|
+
return { ...actual, default: actual };
|
|
37
|
+
});
|
|
38
|
+
import * as fs from 'node:fs';
|
|
39
|
+
import { envWithoutGitLocation, resolveSelfAgents } from '@mmnto/totem';
|
|
40
|
+
import { cleanTmpDir } from '../test-utils.js';
|
|
41
|
+
import { log } from '../ui.js';
|
|
42
|
+
import { deriveSeat, deriveSeatCommand } from './mail.js';
|
|
43
|
+
let tmpRoot;
|
|
44
|
+
/**
|
|
45
|
+
* Run git against a FIXTURE directory with git's repository-location env
|
|
46
|
+
* scrubbed — the same guard the product read carries (mmnto-ai/totem#2801 F3).
|
|
47
|
+
* Under an exported `GIT_DIR` (the shape every git hook runs in) an inherited
|
|
48
|
+
* environment would point `git init` and `git remote add` at the ambient
|
|
49
|
+
* repository instead of the fixture.
|
|
50
|
+
*/
|
|
51
|
+
function gitFixture(cwd, args) {
|
|
52
|
+
execFileSync('git', args, { cwd, stdio: 'ignore', env: envWithoutGitLocation(process.env) });
|
|
53
|
+
}
|
|
54
|
+
/** `<tmp>/<repo>/.totem/` with a seat dir (plus outbox/processed) per seat. */
|
|
55
|
+
function makeRepo(repo, seats) {
|
|
56
|
+
const repoRoot = path.join(tmpRoot, repo);
|
|
57
|
+
fs.mkdirSync(path.join(repoRoot, '.totem'), { recursive: true });
|
|
58
|
+
for (const seat of seats) {
|
|
59
|
+
const seatDir = path.join(repoRoot, '.totem', 'orchestration', seat);
|
|
60
|
+
fs.mkdirSync(path.join(seatDir, 'outbox'), { recursive: true });
|
|
61
|
+
fs.mkdirSync(path.join(seatDir, 'processed'), { recursive: true });
|
|
62
|
+
fs.writeFileSync(path.join(seatDir, 'outbox', '2026-09-07T1200Z-directed.md'), ['---', `from: ${seat}`, 'to: broadcast', 'subject: fixture', '---', '', 'Body.', ''].join('\n'), 'utf-8');
|
|
63
|
+
fs.writeFileSync(path.join(seatDir, 'processed', '2026-09-07T1200Z-directed.md.done'), '', 'utf-8');
|
|
64
|
+
}
|
|
65
|
+
return repoRoot;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Run the command with stdout and stderr captured. `log.error` is the CLI's
|
|
69
|
+
* stderr channel (ui.ts: every log method writes via console.error), so the
|
|
70
|
+
* refusal stream is captured there; `process.stdout.write` is the success
|
|
71
|
+
* channel the design specifies for scripting.
|
|
72
|
+
*/
|
|
73
|
+
async function run(opts) {
|
|
74
|
+
const stdout = [];
|
|
75
|
+
const stderr = [];
|
|
76
|
+
// The tag of every `log.error` call, captured beside the message: the repo
|
|
77
|
+
// styleguide fixes it at `'Totem Error'` for every `log.error`, and a
|
|
78
|
+
// command-specific tag here renders the wrong stderr prefix (PR round 1,
|
|
79
|
+
// gemini-code-assist + CodeRabbit).
|
|
80
|
+
const tags = [];
|
|
81
|
+
const outSpy = vi
|
|
82
|
+
.spyOn(process.stdout, 'write')
|
|
83
|
+
.mockImplementation((chunk) => {
|
|
84
|
+
stdout.push(typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf-8'));
|
|
85
|
+
return true;
|
|
86
|
+
});
|
|
87
|
+
const errSpy = vi.spyOn(log, 'error').mockImplementation((tag, msg) => {
|
|
88
|
+
tags.push(tag);
|
|
89
|
+
stderr.push(msg);
|
|
90
|
+
});
|
|
91
|
+
// The REAL stderr channels, observed beside the logger mock (the leg's F3):
|
|
92
|
+
// a `--json` arm that stays silent on `log.error` could still leak through
|
|
93
|
+
// `console.error` (ui.ts's own sink) or a direct `process.stderr.write`
|
|
94
|
+
// somewhere on the resolver path, and the logger mock cannot see either.
|
|
95
|
+
const consoleErrSpy = vi.spyOn(console, 'error').mockImplementation((...args) => {
|
|
96
|
+
stderr.push(args.map(String).join(' '));
|
|
97
|
+
});
|
|
98
|
+
const rawErrSpy = vi
|
|
99
|
+
.spyOn(process.stderr, 'write')
|
|
100
|
+
.mockImplementation((chunk) => {
|
|
101
|
+
stderr.push(typeof chunk === 'string' ? chunk : Buffer.from(chunk).toString('utf-8'));
|
|
102
|
+
return true;
|
|
103
|
+
});
|
|
104
|
+
try {
|
|
105
|
+
const { exitCode } = await deriveSeatCommand(opts);
|
|
106
|
+
return { exitCode, stdout: stdout.join(''), stderr: stderr.join('\n'), tags };
|
|
107
|
+
}
|
|
108
|
+
finally {
|
|
109
|
+
consoleErrSpy.mockRestore();
|
|
110
|
+
rawErrSpy.mockRestore();
|
|
111
|
+
outSpy.mockRestore();
|
|
112
|
+
errSpy.mockRestore();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
beforeEach(() => {
|
|
116
|
+
tmpRoot = fs.mkdtempSync(path.join(os.tmpdir(), 'totem-derive-seat-'));
|
|
117
|
+
});
|
|
118
|
+
afterEach(() => {
|
|
119
|
+
vi.restoreAllMocks();
|
|
120
|
+
cleanTmpDir(tmpRoot);
|
|
121
|
+
});
|
|
122
|
+
describe('totem mail --derive-seat (mmnto-ai/totem#2801)', () => {
|
|
123
|
+
it('env set to a hosted seat prints exactly one line `seat=<id> source=env` and exits 0', async () => {
|
|
124
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
125
|
+
const { exitCode, stdout, stderr } = await run({
|
|
126
|
+
repoRoot,
|
|
127
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
128
|
+
});
|
|
129
|
+
expect(exitCode).toBe(0);
|
|
130
|
+
// EXACTLY one line — the whole point of the stdout channel is that a
|
|
131
|
+
// caller can read it without parsing a banner.
|
|
132
|
+
expect(stdout).toBe('seat=seat-alpha source=env\n');
|
|
133
|
+
expect(stdout.trimEnd().split('\n')).toHaveLength(1);
|
|
134
|
+
// Nothing refused.
|
|
135
|
+
expect(stderr).toBe('');
|
|
136
|
+
});
|
|
137
|
+
it('env unset in a two-seat repo exits 2, names BOTH seats on stderr, and writes nothing to stdout', async () => {
|
|
138
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
139
|
+
const { exitCode, stdout, stderr } = await run({ repoRoot, env: {} });
|
|
140
|
+
expect(exitCode).toBe(2);
|
|
141
|
+
expect(stdout).toBe('');
|
|
142
|
+
expect(stderr).toContain('unset');
|
|
143
|
+
expect(stderr).toContain('seat-alpha');
|
|
144
|
+
expect(stderr).toContain('seat-beta');
|
|
145
|
+
// No fallback to any seat, ever: the refusal must not read as a derivation.
|
|
146
|
+
expect(stdout).not.toContain('seat=');
|
|
147
|
+
});
|
|
148
|
+
it('env naming a seat this repo does not host exits 2 and names the supplied value + the hosted list', async () => {
|
|
149
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
150
|
+
const { exitCode, stdout, stderr } = await run({
|
|
151
|
+
repoRoot,
|
|
152
|
+
env: { TOTEM_SELF_AGENT: 'strategy-claude' },
|
|
153
|
+
});
|
|
154
|
+
expect(exitCode).toBe(2);
|
|
155
|
+
expect(stdout).toBe('');
|
|
156
|
+
expect(stderr).toContain('strategy-claude');
|
|
157
|
+
expect(stderr).toContain('seat-alpha');
|
|
158
|
+
expect(stderr).toContain('seat-beta');
|
|
159
|
+
});
|
|
160
|
+
it('a repo hosting no seat refuses with the `totem seat add` cure (exit 2)', async () => {
|
|
161
|
+
const repoRoot = path.join(tmpRoot, 'barerepo');
|
|
162
|
+
fs.mkdirSync(path.join(repoRoot, '.totem'), { recursive: true });
|
|
163
|
+
const { exitCode, stdout, stderr } = await run({ repoRoot, env: {} });
|
|
164
|
+
expect(exitCode).toBe(2);
|
|
165
|
+
expect(stdout).toBe('');
|
|
166
|
+
expect(stderr).toContain('this repo hosts no seat — `totem seat add`');
|
|
167
|
+
});
|
|
168
|
+
// ── the per-agent-worktree shape (mmnto-ai/totem#2801 fold round 2) ──
|
|
169
|
+
//
|
|
170
|
+
// `.totem/orchestration/` is gitignored and a worktree's DIRECTORY basename
|
|
171
|
+
// (`totem-totem-claude-build-2801`) is no COHORT_AGENT_MAP key, so the
|
|
172
|
+
// structural union came back empty there. Round 1 answered that by falling
|
|
173
|
+
// back to the env-declared list, which made the hosted check a tautology —
|
|
174
|
+
// any well-formed id was accepted, so the probe could not refuse an identity,
|
|
175
|
+
// which is the entire point of it. The cure is structural information, not a
|
|
176
|
+
// looser probe: the cohort map is now keyed on the ORIGIN repository name, so
|
|
177
|
+
// this shape resolves the real totem seats and an unhosted seat is refused
|
|
178
|
+
// against them.
|
|
179
|
+
describe('per-agent worktree — cohort map keyed on the git origin (mmnto-ai/totem#2801)', () => {
|
|
180
|
+
/**
|
|
181
|
+
* `.totem/` plus a real git repo with an `origin` remote, in a directory
|
|
182
|
+
* whose basename is NOT a cohort key and with no orchestration tree at all
|
|
183
|
+
* — the exact shape of a per-agent worktree of `mmnto-ai/totem`.
|
|
184
|
+
*/
|
|
185
|
+
function makeWorktreeShape(originUrl) {
|
|
186
|
+
const repoRoot = path.join(tmpRoot, 'totem-totem-claude-build-2801');
|
|
187
|
+
fs.mkdirSync(path.join(repoRoot, '.totem'), { recursive: true });
|
|
188
|
+
gitFixture(repoRoot, ['init', '-q', '-b', 'main']);
|
|
189
|
+
if (originUrl !== undefined) {
|
|
190
|
+
gitFixture(repoRoot, ['remote', 'add', 'origin', originUrl]);
|
|
191
|
+
}
|
|
192
|
+
expect(fs.existsSync(path.join(repoRoot, '.totem', 'orchestration'))).toBe(false);
|
|
193
|
+
return repoRoot;
|
|
194
|
+
}
|
|
195
|
+
it('(a) env naming a seat the ORIGIN repo hosts is accepted', async () => {
|
|
196
|
+
const repoRoot = makeWorktreeShape('https://github.com/mmnto-ai/totem.git');
|
|
197
|
+
const { exitCode, stdout, stderr } = await run({
|
|
198
|
+
repoRoot,
|
|
199
|
+
env: { TOTEM_SELF_AGENT: 'totem-claude' },
|
|
200
|
+
});
|
|
201
|
+
expect(stderr).toBe('');
|
|
202
|
+
expect(stdout).toBe('seat=totem-claude source=env\n');
|
|
203
|
+
expect(exitCode).toBe(0);
|
|
204
|
+
});
|
|
205
|
+
it("(a') env naming a seat the origin repo does NOT host is REFUSED against the cohort list", async () => {
|
|
206
|
+
// The round-1 tautology, inverted: this is the assertion that fails when
|
|
207
|
+
// hosted-ness is whatever the env said.
|
|
208
|
+
const repoRoot = makeWorktreeShape('https://github.com/mmnto-ai/totem.git');
|
|
209
|
+
const { exitCode, stdout, stderr } = await run({
|
|
210
|
+
repoRoot,
|
|
211
|
+
env: { TOTEM_SELF_AGENT: 'lc-claude' },
|
|
212
|
+
});
|
|
213
|
+
expect(exitCode).toBe(2);
|
|
214
|
+
expect(stdout).toBe('');
|
|
215
|
+
expect(stderr).toContain('lc-claude');
|
|
216
|
+
expect(stderr).toContain('totem-claude');
|
|
217
|
+
expect(stderr).toContain('totem-gemini');
|
|
218
|
+
});
|
|
219
|
+
it("(a'') matching is case-insensitive and the STRUCTURAL casing is printed", async () => {
|
|
220
|
+
const repoRoot = makeWorktreeShape('git@github.com:mmnto-ai/totem.git');
|
|
221
|
+
const { exitCode, stdout, stderr } = await run({
|
|
222
|
+
repoRoot,
|
|
223
|
+
env: { TOTEM_SELF_AGENT: 'TOTEM-Claude' },
|
|
224
|
+
});
|
|
225
|
+
expect(stderr).toBe('');
|
|
226
|
+
expect(stdout).toBe('seat=totem-claude source=env\n');
|
|
227
|
+
expect(exitCode).toBe(0);
|
|
228
|
+
});
|
|
229
|
+
it('(b) NO origin and no seat dirs is the ruled hosts-no-seat refusal, even with the env set', async () => {
|
|
230
|
+
const repoRoot = makeWorktreeShape();
|
|
231
|
+
const { exitCode, stdout, stderr } = await run({
|
|
232
|
+
repoRoot,
|
|
233
|
+
env: { TOTEM_SELF_AGENT: 'totem-claude' },
|
|
234
|
+
});
|
|
235
|
+
expect(exitCode).toBe(2);
|
|
236
|
+
expect(stdout).toBe('');
|
|
237
|
+
expect(stderr).toContain('this repo hosts no seat — `totem seat add`');
|
|
238
|
+
});
|
|
239
|
+
it('(F6) with NO origin, a two-seat env is never echoed back as "this repo hosts"', async () => {
|
|
240
|
+
// The refusal's hosted list must come from the STRUCTURAL set. Here the
|
|
241
|
+
// structural set is empty, so the only honest answer is that the repo
|
|
242
|
+
// hosts no seat — echoing the env's own entries would tell the operator
|
|
243
|
+
// this repo hosts exactly what they typed, which is how the round-1
|
|
244
|
+
// tautology read from the outside.
|
|
245
|
+
const repoRoot = makeWorktreeShape();
|
|
246
|
+
const { exitCode, stdout, stderr } = await run({
|
|
247
|
+
repoRoot,
|
|
248
|
+
env: { TOTEM_SELF_AGENT: 'totem-claude,totem-gemini' },
|
|
249
|
+
});
|
|
250
|
+
expect(exitCode).toBe(2);
|
|
251
|
+
expect(stdout).toBe('');
|
|
252
|
+
expect(stderr).toContain('this repo hosts no seat — `totem seat add`');
|
|
253
|
+
expect(stderr).not.toContain('this repo hosts: totem-claude');
|
|
254
|
+
expect(stderr).not.toContain('this repo hosts: totem-claude, totem-gemini');
|
|
255
|
+
});
|
|
256
|
+
it('(F1) the `--as` asymmetry is a PROPERTY, not an accident: the probe refuses where the declaration resolves', async () => {
|
|
257
|
+
// Ruled as a disclosure, not an alignment. `--as <seat>` is the
|
|
258
|
+
// operator's explicit declaration on the command line, and its validator
|
|
259
|
+
// falls back to the env-declared list when the structural union is empty
|
|
260
|
+
// (mail.ts, the `--as` arm) — so the poll serves the seat. `--derive-seat`
|
|
261
|
+
// exists to CORROBORATE an inherited declaration against the repo, and a
|
|
262
|
+
// hosted set the env feeds corroborates nothing, so it refuses. Both
|
|
263
|
+
// behaviours are correct for what each flag is; the disagreement is
|
|
264
|
+
// locked here so a later "consistency" fix cannot quietly re-open the
|
|
265
|
+
// tautology.
|
|
266
|
+
const repoRoot = makeWorktreeShape();
|
|
267
|
+
const env = { TOTEM_SELF_AGENT: 'totem-claude' };
|
|
268
|
+
const { exitCode, stderr } = await run({ repoRoot, env });
|
|
269
|
+
expect(exitCode).toBe(2);
|
|
270
|
+
expect(stderr).toContain('this repo hosts no seat — `totem seat add`');
|
|
271
|
+
// The env-inclusive resolution `--as` validates against — same repo, same
|
|
272
|
+
// env — DOES resolve the seat.
|
|
273
|
+
const asSeatUnion = resolveSelfAgents(repoRoot, env);
|
|
274
|
+
expect(asSeatUnion.source).toBe('env');
|
|
275
|
+
expect(asSeatUnion.agents).toEqual(['totem-claude']);
|
|
276
|
+
});
|
|
277
|
+
it('(c) a comma list of two hosted seats still refuses — a session has one identity', async () => {
|
|
278
|
+
const repoRoot = makeWorktreeShape('https://github.com/mmnto-ai/totem.git');
|
|
279
|
+
const { exitCode, stdout, stderr } = await run({
|
|
280
|
+
repoRoot,
|
|
281
|
+
env: { TOTEM_SELF_AGENT: 'totem-claude,totem-gemini' },
|
|
282
|
+
});
|
|
283
|
+
expect(exitCode).toBe(2);
|
|
284
|
+
expect(stdout).toBe('');
|
|
285
|
+
expect(stderr).toContain('totem-claude,totem-gemini');
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
it('config.json host_agents omitting a PRESENT seat dir refuses by NAMING that cause, not by contradicting itself (fold F2)', async () => {
|
|
289
|
+
// The resolver keeps config's shipped replace semantics and attaches a
|
|
290
|
+
// "the dir is the registration" warning (mmnto-ai/totem#2141). Appending
|
|
291
|
+
// that warning to "is not a seat this repo hosts" told the reader both
|
|
292
|
+
// that the seat is not hosted and that its dir IS its registration. The
|
|
293
|
+
// verdict stays (config replaces the dir set, exactly as `--as` treats
|
|
294
|
+
// it); the refusal now names the cause and both cures.
|
|
295
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
296
|
+
fs.writeFileSync(path.join(repoRoot, '.totem', 'orchestration', 'config.json'), JSON.stringify({ host_agents: ['seat-beta'] }, null, 2), 'utf-8');
|
|
297
|
+
const { exitCode, stdout, stderr } = await run({
|
|
298
|
+
repoRoot,
|
|
299
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
300
|
+
});
|
|
301
|
+
expect(exitCode).toBe(2);
|
|
302
|
+
expect(stdout).toBe('');
|
|
303
|
+
expect(stderr).toContain('is a present seat dir that');
|
|
304
|
+
expect(stderr).toContain('host_agents omits');
|
|
305
|
+
expect(stderr).toContain('REPLACES the dir set (mmnto-ai/totem#2141)');
|
|
306
|
+
expect(stderr).toContain('Add the seat to host_agents, or remove its stale seat dir');
|
|
307
|
+
expect(stderr).toContain('this repo hosts: seat-beta');
|
|
308
|
+
// The self-contradiction is gone: the raw resolver warning no longer rides
|
|
309
|
+
// this refusal, and the old "not a seat this repo hosts" verdict prose is
|
|
310
|
+
// replaced rather than supplemented.
|
|
311
|
+
expect(stderr).not.toContain('the dir is the registration');
|
|
312
|
+
expect(stderr).not.toContain('is not a seat this repo hosts');
|
|
313
|
+
});
|
|
314
|
+
it('the config-omits-a-dir branch — the ONLY one that reads seat dirs — still touches no outbox or processed dir (fold round 2)', async () => {
|
|
315
|
+
// The suite's other spy test covers the SUCCESS path. This branch is the
|
|
316
|
+
// one that calls the seat-dir reader (and through it each dir's
|
|
317
|
+
// lifecycle.json), so it is the one place the no-poll-surfaces property
|
|
318
|
+
// could regress unnoticed.
|
|
319
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
320
|
+
fs.writeFileSync(path.join(repoRoot, '.totem', 'orchestration', 'config.json'), JSON.stringify({ host_agents: ['seat-beta'] }, null, 2), 'utf-8');
|
|
321
|
+
const touched = [];
|
|
322
|
+
const record = (target) => {
|
|
323
|
+
if (typeof target === 'string')
|
|
324
|
+
touched.push(target);
|
|
325
|
+
else if (Buffer.isBuffer(target))
|
|
326
|
+
touched.push(target.toString('utf-8'));
|
|
327
|
+
else if (target instanceof URL)
|
|
328
|
+
touched.push(target.pathname);
|
|
329
|
+
};
|
|
330
|
+
const realReaddir = fs.readdirSync;
|
|
331
|
+
const realReadFile = fs.readFileSync;
|
|
332
|
+
const readdirSpy = vi.spyOn(fs, 'readdirSync').mockImplementation(((target, options) => {
|
|
333
|
+
record(target);
|
|
334
|
+
return realReaddir(target, options);
|
|
335
|
+
}));
|
|
336
|
+
const readFileSpy = vi.spyOn(fs, 'readFileSync').mockImplementation(((target, options) => {
|
|
337
|
+
record(target);
|
|
338
|
+
return realReadFile(target, options);
|
|
339
|
+
}));
|
|
340
|
+
const errSpy = vi.spyOn(log, 'error').mockImplementation(() => { });
|
|
341
|
+
try {
|
|
342
|
+
const { exitCode } = await deriveSeatCommand({
|
|
343
|
+
repoRoot,
|
|
344
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
345
|
+
});
|
|
346
|
+
// The branch under test really is the one that ran.
|
|
347
|
+
expect(exitCode).toBe(2);
|
|
348
|
+
expect(errSpy.mock.calls.map((c) => String(c[1])).join('\n')).toContain('is a present seat dir that');
|
|
349
|
+
}
|
|
350
|
+
finally {
|
|
351
|
+
errSpy.mockRestore();
|
|
352
|
+
readdirSpy.mockRestore();
|
|
353
|
+
readFileSpy.mockRestore();
|
|
354
|
+
}
|
|
355
|
+
// Liveness: the reader was exercised over this fixture's tree.
|
|
356
|
+
const orchestration = path.join(repoRoot, '.totem', 'orchestration');
|
|
357
|
+
expect(touched.filter((p) => p.startsWith(orchestration)).length).toBeGreaterThan(0);
|
|
358
|
+
const poked = touched.filter((p) => /outbox|processed/i.test(p));
|
|
359
|
+
expect(poked, `the config branch must not touch the poll surfaces: ${poked.join(', ')}`).toEqual([]);
|
|
360
|
+
});
|
|
361
|
+
it('a DUPLICATED env entry is one identity, not two — accepted like the poll accepts it (fold round 2)', async () => {
|
|
362
|
+
// `pollMail` normalizes duplicates out of its own resolution before it
|
|
363
|
+
// counts seats; the probe must apply the same normalization or it refuses
|
|
364
|
+
// an identity the very next command serves.
|
|
365
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
366
|
+
const { exitCode, stdout, stderr } = await run({
|
|
367
|
+
repoRoot,
|
|
368
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha,seat-alpha' },
|
|
369
|
+
});
|
|
370
|
+
expect(stderr).toBe('');
|
|
371
|
+
expect(stdout).toBe('seat=seat-alpha source=env\n');
|
|
372
|
+
expect(exitCode).toBe(0);
|
|
373
|
+
});
|
|
374
|
+
it('a CASE-SHIFTED duplicate is one identity too, and the hosted spelling is printed (fold round 3 F6)', async () => {
|
|
375
|
+
// Every seat comparison downstream folds case, so `a,A` names one seat.
|
|
376
|
+
// Refusing it would be the probe disagreeing with the poll again.
|
|
377
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
378
|
+
const { exitCode, stdout, stderr } = await run({
|
|
379
|
+
repoRoot,
|
|
380
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha,SEAT-Alpha' },
|
|
381
|
+
});
|
|
382
|
+
expect(stderr).toBe('');
|
|
383
|
+
expect(stdout).toBe('seat=seat-alpha source=env\n');
|
|
384
|
+
expect(exitCode).toBe(0);
|
|
385
|
+
});
|
|
386
|
+
it('an env declaring MULTIPLE seats refuses — a session has one identity (exit 2)', async () => {
|
|
387
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
388
|
+
const { exitCode, stdout, stderr } = await run({
|
|
389
|
+
repoRoot,
|
|
390
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha,seat-beta' },
|
|
391
|
+
});
|
|
392
|
+
expect(exitCode).toBe(2);
|
|
393
|
+
expect(stdout).toBe('');
|
|
394
|
+
expect(stderr).toContain('seat-alpha,seat-beta');
|
|
395
|
+
});
|
|
396
|
+
it('a config/dirs-only resolution is NOT a derivation — a single-seat repo with env unset still refuses', async () => {
|
|
397
|
+
// The design's success gate is "a single seat that ENV supplied": the repo
|
|
398
|
+
// hosting exactly one seat is a repo fact, not this session's declared
|
|
399
|
+
// identity, so it refuses rather than adopting the only seat in sight.
|
|
400
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha']);
|
|
401
|
+
const { exitCode, stdout, stderr } = await run({ repoRoot, env: {} });
|
|
402
|
+
expect(exitCode).toBe(2);
|
|
403
|
+
expect(stdout).toBe('');
|
|
404
|
+
expect(stderr).toContain('seat-alpha');
|
|
405
|
+
});
|
|
406
|
+
it('--derive-seat with --as <seat> is contradictory (exit 2), like --as with --all-seats', async () => {
|
|
407
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
408
|
+
const { exitCode, stdout, stderr } = await run({
|
|
409
|
+
repoRoot,
|
|
410
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
411
|
+
asSeat: 'seat-beta',
|
|
412
|
+
});
|
|
413
|
+
expect(exitCode).toBe(2);
|
|
414
|
+
expect(stdout).toBe('');
|
|
415
|
+
expect(stderr).toContain('--as');
|
|
416
|
+
expect(stderr).toContain('--derive-seat');
|
|
417
|
+
});
|
|
418
|
+
it('--derive-seat with --all-seats is contradictory (exit 2)', async () => {
|
|
419
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
420
|
+
const { exitCode, stdout, stderr } = await run({
|
|
421
|
+
repoRoot,
|
|
422
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
423
|
+
allSeats: true,
|
|
424
|
+
});
|
|
425
|
+
expect(exitCode).toBe(2);
|
|
426
|
+
expect(stdout).toBe('');
|
|
427
|
+
expect(stderr).toContain('--all-seats');
|
|
428
|
+
expect(stderr).toContain('--derive-seat');
|
|
429
|
+
});
|
|
430
|
+
it('never reads an outbox or a processed dir (the poll path stays untouched)', async () => {
|
|
431
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
432
|
+
// Positive control: the fixture DOES carry the files a poll would read, so
|
|
433
|
+
// "no outbox read" is a statement about the code path, not an empty tree.
|
|
434
|
+
expect(fs.existsSync(path.join(repoRoot, '.totem', 'orchestration', 'seat-alpha', 'outbox', '2026-09-07T1200Z-directed.md'))).toBe(true);
|
|
435
|
+
const touched = [];
|
|
436
|
+
const record = (target) => {
|
|
437
|
+
if (typeof target === 'string')
|
|
438
|
+
touched.push(target);
|
|
439
|
+
else if (Buffer.isBuffer(target))
|
|
440
|
+
touched.push(target.toString('utf-8'));
|
|
441
|
+
else if (target instanceof URL)
|
|
442
|
+
touched.push(target.pathname);
|
|
443
|
+
};
|
|
444
|
+
const realReaddir = fs.readdirSync;
|
|
445
|
+
const realReadFile = fs.readFileSync;
|
|
446
|
+
const readdirSpy = vi.spyOn(fs, 'readdirSync').mockImplementation(((target, options) => {
|
|
447
|
+
record(target);
|
|
448
|
+
return realReaddir(target, options);
|
|
449
|
+
}));
|
|
450
|
+
const readFileSpy = vi.spyOn(fs, 'readFileSync').mockImplementation(((target, options) => {
|
|
451
|
+
record(target);
|
|
452
|
+
return realReadFile(target, options);
|
|
453
|
+
}));
|
|
454
|
+
// Silence the success line (the suite's stdout stays clean) — the write
|
|
455
|
+
// itself is asserted by the first test in this file.
|
|
456
|
+
const outSpy = vi.spyOn(process.stdout, 'write').mockImplementation(() => true);
|
|
457
|
+
try {
|
|
458
|
+
const { exitCode } = await deriveSeatCommand({
|
|
459
|
+
repoRoot,
|
|
460
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
461
|
+
});
|
|
462
|
+
expect(exitCode).toBe(0);
|
|
463
|
+
}
|
|
464
|
+
finally {
|
|
465
|
+
outSpy.mockRestore();
|
|
466
|
+
readdirSpy.mockRestore();
|
|
467
|
+
readFileSpy.mockRestore();
|
|
468
|
+
}
|
|
469
|
+
// Liveness (fold F5): a spy that observed NOTHING would satisfy the
|
|
470
|
+
// "no outbox" assertion vacuously — a wiring break, a mock that never
|
|
471
|
+
// installed, or a refactor that stopped touching the tree at all would all
|
|
472
|
+
// pass silently. The probe must be seen reading THIS fixture's
|
|
473
|
+
// orchestration tree for the negative below to mean anything.
|
|
474
|
+
const orchestration = path.join(repoRoot, '.totem', 'orchestration');
|
|
475
|
+
const observed = touched.filter((p) => p.startsWith(orchestration));
|
|
476
|
+
expect(observed.length, `the fs spy observed no read under ${orchestration} — the negative assertion below would be vacuous`).toBeGreaterThan(0);
|
|
477
|
+
const poked = touched.filter((p) => /outbox|processed/i.test(p));
|
|
478
|
+
expect(poked, `derive-seat must not touch the poll surfaces: ${poked.join(', ')}`).toEqual([]);
|
|
479
|
+
});
|
|
480
|
+
it('matches the hosted seat case-insensitively and prints the resolver’s casing (fold F5)', async () => {
|
|
481
|
+
// Every other seat comparison in mail.ts folds case (`pollMail`'s
|
|
482
|
+
// `selfLower`, the `--as` member lookup), so a case-shifted env must not
|
|
483
|
+
// be refused by a probe whose whole job is to agree with the poll — and
|
|
484
|
+
// the line must carry the dir's own spelling, not the env's.
|
|
485
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
486
|
+
const { exitCode, stdout, stderr } = await run({
|
|
487
|
+
repoRoot,
|
|
488
|
+
env: { TOTEM_SELF_AGENT: 'SEAT-Alpha' },
|
|
489
|
+
});
|
|
490
|
+
expect(stderr).toBe('');
|
|
491
|
+
expect(stdout).toBe('seat=seat-alpha source=env\n');
|
|
492
|
+
expect(exitCode).toBe(0);
|
|
493
|
+
});
|
|
494
|
+
it("every refusal is logged under the CLI's fixed 'Totem Error' tag, never the command's TAG (PR round 1)", async () => {
|
|
495
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
496
|
+
const unset = await run({ repoRoot, env: {} });
|
|
497
|
+
expect(unset.exitCode).toBe(2);
|
|
498
|
+
expect(unset.tags).toEqual(['Totem Error']);
|
|
499
|
+
const contradiction = await run({
|
|
500
|
+
repoRoot,
|
|
501
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
502
|
+
asSeat: 'seat-alpha',
|
|
503
|
+
});
|
|
504
|
+
expect(contradiction.exitCode).toBe(2);
|
|
505
|
+
expect(contradiction.tags).toEqual(['Totem Error']);
|
|
506
|
+
});
|
|
507
|
+
it('--json emits ONE stdout object in both arms with the same exit codes, and nothing on stderr (PR round 1, greptile)', async () => {
|
|
508
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
509
|
+
const ok = await run({ repoRoot, env: { TOTEM_SELF_AGENT: 'seat-alpha' }, json: true });
|
|
510
|
+
expect(ok.exitCode).toBe(0);
|
|
511
|
+
expect(ok.stderr).toBe('');
|
|
512
|
+
expect(JSON.parse(ok.stdout)).toEqual({
|
|
513
|
+
ok: true,
|
|
514
|
+
seat: 'seat-alpha',
|
|
515
|
+
source: 'env',
|
|
516
|
+
line: 'seat=seat-alpha source=env',
|
|
517
|
+
});
|
|
518
|
+
// The refusal arm: the poll's own --json contract — the object is emitted
|
|
519
|
+
// even on the exit-2 arm, so a consumer parses one object AND reads the
|
|
520
|
+
// exit code (mmnto-ai/totem#2312) — and stderr stays empty.
|
|
521
|
+
const refused = await run({ repoRoot, env: {}, json: true });
|
|
522
|
+
expect(refused.exitCode).toBe(2);
|
|
523
|
+
expect(refused.stderr).toBe('');
|
|
524
|
+
expect(refused.tags).toEqual([]);
|
|
525
|
+
const parsed = JSON.parse(refused.stdout);
|
|
526
|
+
expect(parsed.ok).toBe(false);
|
|
527
|
+
expect(parsed.refusal).toContain('seat-alpha');
|
|
528
|
+
expect(parsed.refusal).toContain('seat-beta');
|
|
529
|
+
// The contradiction arm under --json is the same object shape.
|
|
530
|
+
const contradiction = await run({
|
|
531
|
+
repoRoot,
|
|
532
|
+
env: { TOTEM_SELF_AGENT: 'seat-alpha' },
|
|
533
|
+
allSeats: true,
|
|
534
|
+
json: true,
|
|
535
|
+
});
|
|
536
|
+
expect(contradiction.exitCode).toBe(2);
|
|
537
|
+
expect(contradiction.stderr).toBe('');
|
|
538
|
+
expect(JSON.parse(contradiction.stdout)).toMatchObject({ ok: false });
|
|
539
|
+
expect(JSON.parse(contradiction.stdout).refusal).toContain('--all-seats');
|
|
540
|
+
});
|
|
541
|
+
it('deriveSeat is pure — it returns the verdict without printing (the lib/wrapper split)', () => {
|
|
542
|
+
const repoRoot = makeRepo('hostrepo', ['seat-alpha', 'seat-beta']);
|
|
543
|
+
const ok = deriveSeat({ repoRoot, env: { TOTEM_SELF_AGENT: 'seat-beta' } });
|
|
544
|
+
expect(ok.ok).toBe(true);
|
|
545
|
+
if (ok.ok) {
|
|
546
|
+
expect(ok.seat).toBe('seat-beta');
|
|
547
|
+
expect(ok.line).toBe('seat=seat-beta source=env');
|
|
548
|
+
}
|
|
549
|
+
const refused = deriveSeat({ repoRoot, env: {} });
|
|
550
|
+
expect(refused.ok).toBe(false);
|
|
551
|
+
if (!refused.ok) {
|
|
552
|
+
expect(refused.refusal).toContain('seat-alpha');
|
|
553
|
+
expect(refused.refusal).toContain('seat-beta');
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
});
|
|
557
|
+
//# sourceMappingURL=mail-derive-seat.test.js.map
|
|
@@ -0,0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