@mmnto/cli 1.53.5 → 1.53.6
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/doctor-parity.d.ts +59 -36
- package/dist/commands/doctor-parity.d.ts.map +1 -1
- package/dist/commands/doctor-parity.js +377 -57
- package/dist/commands/doctor-parity.js.map +1 -1
- package/dist/commands/doctor-parity.test.js +320 -6
- package/dist/commands/doctor-parity.test.js.map +1 -1
- package/dist/commands/init-templates.d.ts +8 -0
- package/dist/commands/init-templates.d.ts.map +1 -1
- package/dist/commands/init-templates.js +8 -0
- package/dist/commands/init-templates.js.map +1 -1
- package/dist/commands/install-hooks.d.ts +5 -0
- package/dist/commands/install-hooks.d.ts.map +1 -1
- package/dist/commands/install-hooks.js +5 -5
- package/dist/commands/install-hooks.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,46 +1,186 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Parity-drift sensor for `totem doctor --parity` (mmnto-ai/totem-strategy#448).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
4
|
+
* Detection is wired across all three tractability classes (mmnto-ai/totem#2073):
|
|
5
|
+
* - **version-pinned** (PR-1, mmnto-ai/totem#2069): each deps contract whose id
|
|
6
|
+
* resolves an `@mmnto/*` package name runs through the core
|
|
7
|
+
* `detectVersionPinnedContract` engine (pin-currency verdict, local-only floor).
|
|
8
|
+
* - **mechanical content-equality** (mmnto-ai/totem#2073): three artifact shapes,
|
|
9
|
+
* all local-read-only against the running `@mmnto/cli`'s OWN in-process template:
|
|
10
|
+
* · **skills** (`claude-skills`): managed-block equality of
|
|
11
|
+
* `.claude/skills/<name>/SKILL.md` via `detectMechanicalContract`.
|
|
12
|
+
* · **git-hooks**: per-repo REGENERATED whole-file/region equality of the four
|
|
13
|
+
* `.git/hooks/*` (package-manager + tier parameterized) via
|
|
14
|
+
* `detectGeneratedArtifactContract` — catches stale-version drift (#1854).
|
|
15
|
+
* · **session-start-orientation**: STATIC whole-file equality of the
|
|
16
|
+
* `.claude/hooks/SessionStart.cjs` + `.gemini/hooks/SessionStart.js` templates,
|
|
17
|
+
* also via `detectGeneratedArtifactContract` (no parameterization).
|
|
18
|
+
* - **manual-attestation** (mmnto-ai/totem#2080): the no-mechanical-sensor class —
|
|
19
|
+
* `detectManualAttestationContract` surfaces the doctrine-currency row / vendor-SDK
|
|
20
|
+
* pin as `info` (or honest-absent `skip`), NEVER pass/warn/fail (the "never fails"
|
|
21
|
+
* contract; structurally cannot gate under `--strict`).
|
|
15
22
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* `--strict`. The detector carries that promotion eligibility back via
|
|
20
|
-
* `blockingDriftIds` so the command can gate without re-loading the manifest.
|
|
23
|
+
* The remaining contracts — the file-value-equality bot-configs (`cr-profile` etc.)
|
|
24
|
+
* and the structural-presence dimensions — keep the `skip` "not yet implemented" stub;
|
|
25
|
+
* their detection is a follow-on.
|
|
21
26
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
+
* The parity sensor owns its OWN render + result type (`ParityLine`) carrying a
|
|
28
|
+
* WIDER status vocabulary (pass/warn/fail/info/unknown/skip) than the shared
|
|
29
|
+
* `CheckStatus`, so the verdict-state split (#2073 req #1) never ripples
|
|
30
|
+
* `CheckStatus` across the unrelated doctor checks.
|
|
31
|
+
*
|
|
32
|
+
* Sensor-not-gate: the detectors return `skip`/`warn`/`pass`/`info`/`unknown` —
|
|
33
|
+
* never `fail`. The `--strict` exit-code decision lives at the CLI edge: a
|
|
34
|
+
* `warn` from a `blocking: true` contract is promoted to `fail` (non-zero) ONLY
|
|
35
|
+
* under `--strict`. `info`/`unknown` are never gated. Honest-absent (Tenet 14):
|
|
36
|
+
* unconfigured → exactly one `skip` line; configured-but-missing / unparseable /
|
|
37
|
+
* unsupported-schema → `warn`, never a crash. Dynamic-import `@mmnto/totem` to
|
|
38
|
+
* keep core off the CLI cold-start graph, matching the other doctor checks.
|
|
27
39
|
*/
|
|
28
40
|
import * as path from 'node:path';
|
|
41
|
+
// init-templates (large canonical strings) + the node:url / node:module builtins
|
|
42
|
+
// are dynamic-imported inside checkParity per the packages/cli lazy-load
|
|
43
|
+
// guideline — see the `ok` branch.
|
|
29
44
|
const CHECK_NAME = 'Parity';
|
|
30
45
|
/**
|
|
31
|
-
* Resolve
|
|
46
|
+
* Resolve the on-disk artifact(s) a mechanical contract checks, or `undefined`
|
|
47
|
+
* when this slice doesn't handle the contract (hooks / presence / value-equality
|
|
48
|
+
* → kept as `skip` stubs). `claude-skills` yields one artifact PER distributed
|
|
49
|
+
* skill; `review-reply-skill-content` is the single review-reply skill (it
|
|
50
|
+
* overlaps `claude-skills` by design — both are distinct manifest contracts on
|
|
51
|
+
* the same file; flagged to strategy as a manifest observation).
|
|
52
|
+
*
|
|
53
|
+
* The canonical block is extracted from the running CLI's OWN `init-templates`
|
|
54
|
+
* export (passed-in `extract` is the core `extractManagedBlock`, dynamic-imported
|
|
55
|
+
* by the caller to keep `@mmnto/totem` off the cold-start graph) — local-read-only.
|
|
56
|
+
*/
|
|
57
|
+
function mechanicalArtifactsFor(contractId, gitRoot, extract, templates) {
|
|
58
|
+
const { markers } = templates;
|
|
59
|
+
switch (contractId) {
|
|
60
|
+
case 'claude-skills':
|
|
61
|
+
return templates.distributedSkills.map((s) => ({
|
|
62
|
+
consumerPath: path.join(gitRoot, '.claude', 'skills', s.name, 'SKILL.md'),
|
|
63
|
+
markers,
|
|
64
|
+
canonicalBlock: extract(s.content, markers),
|
|
65
|
+
lineName: `Parity: claude-skills (${s.name})`,
|
|
66
|
+
}));
|
|
67
|
+
case 'review-reply-skill-content':
|
|
68
|
+
return [
|
|
69
|
+
{
|
|
70
|
+
consumerPath: path.join(gitRoot, '.claude', 'skills', 'review-reply', 'SKILL.md'),
|
|
71
|
+
markers,
|
|
72
|
+
canonicalBlock: extract(templates.reviewReplyContent, markers),
|
|
73
|
+
lineName: 'Parity: review-reply-skill-content',
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
default:
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Resolve the four git-hook artifacts the `git-hooks` contract checks, each with a
|
|
82
|
+
* per-repo regenerated canonical. Checks `.git/hooks/*` only — hook-manager installs
|
|
83
|
+
* (`.totem/hooks/*.sh` for husky / lefthook) are a follow-on (no cohort consumer uses
|
|
84
|
+
* one today); the detector's present-without-marker → `skip` keeps a manager repo
|
|
85
|
+
* honest in the meantime.
|
|
86
|
+
*/
|
|
87
|
+
function gitHookArtifactsFor(gitRoot, tier, fallbackCmd, builders) {
|
|
88
|
+
const hooksDir = path.join(gitRoot, '.git', 'hooks');
|
|
89
|
+
const m = builders.markers;
|
|
90
|
+
return [
|
|
91
|
+
{
|
|
92
|
+
consumerPath: path.join(hooksDir, 'pre-commit'),
|
|
93
|
+
canonicalContent: builders.buildPreCommitHook(tier),
|
|
94
|
+
ownershipMarker: m.preCommit,
|
|
95
|
+
lineName: 'Parity: git-hooks (pre-commit)',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
consumerPath: path.join(hooksDir, 'pre-push'),
|
|
99
|
+
canonicalContent: builders.buildPrePushHook(fallbackCmd, tier),
|
|
100
|
+
ownershipMarker: m.prePush,
|
|
101
|
+
lineName: 'Parity: git-hooks (pre-push)',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
consumerPath: path.join(hooksDir, 'post-merge'),
|
|
105
|
+
canonicalContent: builders.buildHookContent(fallbackCmd),
|
|
106
|
+
ownershipMarker: m.postMerge.start,
|
|
107
|
+
endMarker: m.postMerge.end,
|
|
108
|
+
lineName: 'Parity: git-hooks (post-merge)',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
consumerPath: path.join(hooksDir, 'post-checkout'),
|
|
112
|
+
canonicalContent: builders.buildPostCheckoutHookContent(fallbackCmd),
|
|
113
|
+
ownershipMarker: m.postCheckout.start,
|
|
114
|
+
endMarker: m.postCheckout.end,
|
|
115
|
+
lineName: 'Parity: git-hooks (post-checkout)',
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Resolve the two whole-file SessionStart hook artifacts the `session-start-orientation`
|
|
121
|
+
* contract checks: `.claude/hooks/SessionStart.cjs` (canonical `CLAUDE_SESSION_START`)
|
|
122
|
+
* and `.gemini/hooks/SessionStart.js` (canonical `GEMINI_SESSION_START`). Whole-file
|
|
123
|
+
* static canonical, no end marker, no regeneration. A vendor file absent here is
|
|
124
|
+
* honest-absent `skip` (cohort permits absence) via the detector's presence semantics;
|
|
125
|
+
* a present file whose marker opens it but whose body drifted is `warn` (the orientation
|
|
126
|
+
* slice generalized `isOwnedGeneratedFile` to treat a marker-at-start JS file as owned).
|
|
127
|
+
*/
|
|
128
|
+
function sessionStartArtifactsFor(gitRoot, templates) {
|
|
129
|
+
return [
|
|
130
|
+
{
|
|
131
|
+
consumerPath: path.join(gitRoot, '.claude', 'hooks', 'SessionStart.cjs'),
|
|
132
|
+
canonicalContent: templates.claude,
|
|
133
|
+
ownershipMarker: templates.marker,
|
|
134
|
+
lineName: 'Parity: session-start-orientation (claude)',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
consumerPath: path.join(gitRoot, '.gemini', 'hooks', 'SessionStart.js'),
|
|
138
|
+
canonicalContent: templates.gemini,
|
|
139
|
+
ownershipMarker: templates.marker,
|
|
140
|
+
lineName: 'Parity: session-start-orientation (gemini)',
|
|
141
|
+
},
|
|
142
|
+
];
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Resolve the running `@mmnto/cli`'s version + install path for the req-#5
|
|
146
|
+
* binary self-report (the Stale-Doctor-Paradox guard — surface WHICH binary
|
|
147
|
+
* computed the skills verdict so a shadowed/stale global is visible). Best-effort:
|
|
148
|
+
* a resolution failure degrades the self-report to absent (the verdict still
|
|
149
|
+
* renders, just without provenance), never a crash. Resolves from THIS module's
|
|
150
|
+
* own URL, so it names the actual running install (workspace dist vs a
|
|
151
|
+
* node_modules vendor vs a global shadow).
|
|
152
|
+
*/
|
|
153
|
+
function resolveRunningBinary(urlMod, createRequireFn) {
|
|
154
|
+
try {
|
|
155
|
+
const here = urlMod.fileURLToPath(import.meta.url);
|
|
156
|
+
// dist/commands/doctor-parity.js → up two → the @mmnto/cli package root.
|
|
157
|
+
const cliRoot = path.resolve(path.dirname(here), '..', '..');
|
|
158
|
+
const req = createRequireFn(import.meta.url);
|
|
159
|
+
const pkg = req('../../package.json');
|
|
160
|
+
if (typeof pkg.version !== 'string')
|
|
161
|
+
return undefined;
|
|
162
|
+
return { version: pkg.version, path: cliRoot };
|
|
163
|
+
// totem-context: best-effort cosmetic read — the binary self-report degrades to absent on ANY resolution failure and NEVER re-throws (GCA review), so a shadowed / broken install can't crash the doctor pipeline (Tenet 13: a cosmetic read must not break the sensor).
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Resolve, parse, and report the parity manifest as `ParityLine`s.
|
|
32
171
|
*
|
|
33
172
|
* Returns `{ results, blockingDriftIds }`: `results[0]` is always the section
|
|
34
|
-
* summary line; in the `ok` path it is followed by one line per contract
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* `
|
|
173
|
+
* summary line; in the `ok` path it is followed by one line per contract (or
|
|
174
|
+
* per artifact, for multi-artifact mechanical contracts) — a pin-currency
|
|
175
|
+
* verdict for the deps version-pinned contracts, a content-equality verdict for
|
|
176
|
+
* the mechanical skills contracts, and a `skip` stub for everything else. All
|
|
177
|
+
* non-`ok` paths return a single summary entry and an empty `blockingDriftIds`.
|
|
38
178
|
*
|
|
39
179
|
* @param cwd The directory to resolve config + manifest against (config/repo root).
|
|
40
180
|
*/
|
|
41
181
|
export async function checkParity(cwd) {
|
|
42
182
|
const { loadConfig, resolveConfigPath, isGlobalConfigPath } = await import('../utils.js');
|
|
43
|
-
const { deriveCohortRepoId, detectVersionPinnedContract, loadParityManifest, packageNameForContract, resolveGitRoot, SUPPORTED_PARITY_SCHEMA_VERSION, } = await import('@mmnto/totem');
|
|
183
|
+
const { deriveCohortRepoId, detectGeneratedArtifactContract, detectManualAttestationContract, detectMechanicalContract, detectVersionPinnedContract, extractManagedBlock, loadParityManifest, packageNameForContract, resolveGitRoot, SUPPORTED_PARITY_SCHEMA_VERSION, } = await import('@mmnto/totem');
|
|
44
184
|
// Read the config best-effort: a missing/corrupt config is the honest-absent
|
|
45
185
|
// path (no parity manifest configured), not a crash. Mirrors the config-load
|
|
46
186
|
// fallback in doctorCommand — surface only on a defective error object so
|
|
@@ -52,6 +192,11 @@ export async function checkParity(cwd) {
|
|
|
52
192
|
// today (no upward walk), so this equals cwd for the local case — the explicit
|
|
53
193
|
// anchor just keeps it correct if resolution ever changes.
|
|
54
194
|
let manifestRoot = cwd;
|
|
195
|
+
// Tier the git hooks were generated at. Resolved the SAME way `hooksCommand` does
|
|
196
|
+
// (config.hooks.tier, default 'standard') so the doctor regenerates the canonical
|
|
197
|
+
// at the CONFIGURED tier — a hook on disk that does not match its repo's configured
|
|
198
|
+
// tier is genuine drift, which the content compare correctly surfaces.
|
|
199
|
+
let hookTier = 'standard';
|
|
55
200
|
try {
|
|
56
201
|
const configPath = resolveConfigPath(cwd);
|
|
57
202
|
// Repo-scoped by design: the manifest location is per-repo, so a config-less
|
|
@@ -66,6 +211,7 @@ export async function checkParity(cwd) {
|
|
|
66
211
|
manifestRoot = path.dirname(configPath);
|
|
67
212
|
const config = await loadConfig(configPath);
|
|
68
213
|
configValue = config.orient?.parityManifest;
|
|
214
|
+
hookTier = config.hooks?.tier ?? 'standard';
|
|
69
215
|
}
|
|
70
216
|
// totem-context: a missing/corrupt totem config is the honest-absent path (treated as "no parity manifest configured"), not a sensor failure — the doctor runs against config-less repos by design.
|
|
71
217
|
}
|
|
@@ -112,31 +258,180 @@ export async function checkParity(cwd) {
|
|
|
112
258
|
status: 'pass',
|
|
113
259
|
message: `parity manifest: ${contracts.length} contract(s) loaded`,
|
|
114
260
|
};
|
|
261
|
+
// Lazy-load init-templates (large canonical strings) + the node builtins
|
|
262
|
+
// only on the ok path — the honest-absent cases above never pay for them
|
|
263
|
+
// (packages/cli lazy-load guideline).
|
|
264
|
+
const { createRequire } = await import('node:module');
|
|
265
|
+
const url = await import('node:url');
|
|
266
|
+
const { DISTRIBUTED_CLAUDE_SKILLS, REVIEW_REPLY_SKILL_CONTENT, SKILL_MARKER_START, SKILL_MARKER_END, CLAUDE_SESSION_START, GEMINI_SESSION_START, SESSION_START_MARKER, } = await import('./init-templates.js');
|
|
267
|
+
const skillTemplates = {
|
|
268
|
+
distributedSkills: DISTRIBUTED_CLAUDE_SKILLS,
|
|
269
|
+
reviewReplyContent: REVIEW_REPLY_SKILL_CONTENT,
|
|
270
|
+
markers: { start: SKILL_MARKER_START, end: SKILL_MARKER_END },
|
|
271
|
+
};
|
|
272
|
+
// The running CLI's own whole-file SessionStart hook templates (static — no
|
|
273
|
+
// parameterization), lazy-loaded on the ok path only (mmnto-ai/totem#2073 orientation slice).
|
|
274
|
+
const sessionStartTemplates = {
|
|
275
|
+
claude: CLAUDE_SESSION_START,
|
|
276
|
+
gemini: GEMINI_SESSION_START,
|
|
277
|
+
marker: SESSION_START_MARKER,
|
|
278
|
+
};
|
|
279
|
+
// The running CLI's own hook generators + markers + package-manager probe,
|
|
280
|
+
// lazy-loaded on the ok path only (cold-start guideline). The canonical for
|
|
281
|
+
// each git hook is regenerated per-repo from these (mmnto-ai/totem#2073 hooks slice).
|
|
282
|
+
const { buildPreCommitHook, buildPrePushHook, buildHookContent, buildPostCheckoutHookContent, getFallbackCommand, TOTEM_PRECOMMIT_MARKER, TOTEM_PREPUSH_MARKER, TOTEM_HOOK_MARKER, TOTEM_HOOK_END, TOTEM_CHECKOUT_MARKER, TOTEM_CHECKOUT_END, } = await import('./install-hooks.js');
|
|
283
|
+
const hookBuilders = {
|
|
284
|
+
buildPreCommitHook,
|
|
285
|
+
buildPrePushHook,
|
|
286
|
+
buildHookContent,
|
|
287
|
+
buildPostCheckoutHookContent,
|
|
288
|
+
markers: {
|
|
289
|
+
preCommit: TOTEM_PRECOMMIT_MARKER,
|
|
290
|
+
prePush: TOTEM_PREPUSH_MARKER,
|
|
291
|
+
postMerge: { start: TOTEM_HOOK_MARKER, end: TOTEM_HOOK_END },
|
|
292
|
+
postCheckout: { start: TOTEM_CHECKOUT_MARKER, end: TOTEM_CHECKOUT_END },
|
|
293
|
+
},
|
|
294
|
+
};
|
|
115
295
|
// Shared detection context. The cohort floor + repoId derive from the git
|
|
116
296
|
// root (anchored there, not the deep cwd — mirrors the core resolver).
|
|
117
297
|
// resolveGitRoot returns null outside a repo; fall back to cwd so the
|
|
118
298
|
// local self-in-tree / sibling probes still have an anchor.
|
|
119
299
|
const gitRoot = safeGitRoot(resolveGitRoot, cwd) ?? cwd;
|
|
120
300
|
const repoId = deriveCohortRepoId(cwd, { gitRoot });
|
|
301
|
+
const binary = resolveRunningBinary(url, createRequire);
|
|
302
|
+
// Derived from the repo's lockfile (the SAME probe the installer uses), so the
|
|
303
|
+
// regenerated git-hook canonical matches THIS repo's package manager — no false drift.
|
|
304
|
+
const fallbackCmd = getFallbackCommand(gitRoot);
|
|
121
305
|
const blockingDriftIds = [];
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
//
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
306
|
+
// flatMap, not map: a mechanical contract (claude-skills) expands to one
|
|
307
|
+
// line PER distributed skill, so the per-contract count can exceed the
|
|
308
|
+
// contract count.
|
|
309
|
+
const perContract = contracts.flatMap((c) => {
|
|
310
|
+
// ── version-pinned deps (PR-1) ──
|
|
311
|
+
if (c.tractability === 'version-pinned') {
|
|
312
|
+
const packageName = packageNameForContract(c, gitRoot);
|
|
313
|
+
if (packageName === undefined) {
|
|
314
|
+
return [
|
|
315
|
+
stub(c, `${c.dimension} (version-pinned) — drift detection not yet implemented`),
|
|
316
|
+
];
|
|
317
|
+
}
|
|
318
|
+
const verdict = detectVersionPinnedContract(c, { cwd, gitRoot, repoId, packageName });
|
|
319
|
+
if (verdict.status === 'warn' && c.blocking === true)
|
|
320
|
+
blockingDriftIds.push(c.id);
|
|
321
|
+
return [verdictToLine(c, verdict)];
|
|
134
322
|
}
|
|
135
|
-
|
|
136
|
-
if (
|
|
137
|
-
|
|
323
|
+
// ── mechanical content-equality (mmnto-ai/totem#2073) ──
|
|
324
|
+
if (c.tractability === 'mechanical') {
|
|
325
|
+
// Honor the contract's `consumers` scope before sensing drift (mirrors
|
|
326
|
+
// detectVersionPinnedContract, which self-guards). A scoped mechanical
|
|
327
|
+
// contract must not emit drift — or, under --strict, fail — in a repo that
|
|
328
|
+
// is not an intended consumer (CodeRabbit review on mmnto-ai/totem#2079).
|
|
329
|
+
if (c.consumers !== undefined) {
|
|
330
|
+
if (repoId === undefined) {
|
|
331
|
+
return [
|
|
332
|
+
lineFor(`Parity: ${c.id}`, {
|
|
333
|
+
status: 'skip',
|
|
334
|
+
message: `cannot determine applicability — repo id unresolvable; contract is scoped to consumers [${c.consumers.join(', ')}]`,
|
|
335
|
+
}),
|
|
336
|
+
];
|
|
337
|
+
}
|
|
338
|
+
if (!c.consumers.includes(repoId)) {
|
|
339
|
+
return [
|
|
340
|
+
lineFor(`Parity: ${c.id}`, {
|
|
341
|
+
status: 'skip',
|
|
342
|
+
message: `cohort permits absence here (${repoId} not in consumers)`,
|
|
343
|
+
}),
|
|
344
|
+
];
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
// Generated-artifact contracts (whole-file / region content-equality): the git
|
|
348
|
+
// hooks (regenerated per-repo for this package manager + tier — catches the
|
|
349
|
+
// stale-version drift half of mmnto-ai/totem#1854) and the static whole-file
|
|
350
|
+
// SessionStart hooks (orientation slice). Both resolve a GeneratedArtifact[] and
|
|
351
|
+
// run the same presence-aware detector + once-per-contract blocking tag.
|
|
352
|
+
let generatedArtifacts;
|
|
353
|
+
// Artifact-class copy threaded into the detector so the absence/drift
|
|
354
|
+
// remediation names the RIGHT installer per class (Greptile review on
|
|
355
|
+
// mmnto-ai/totem#2082): git hooks → `totem hook install`; the static
|
|
356
|
+
// SessionStart hooks → `totem init`.
|
|
357
|
+
let artifactLabel = 'artifact';
|
|
358
|
+
let installCommand = 'totem init';
|
|
359
|
+
if (c.id === 'git-hooks') {
|
|
360
|
+
generatedArtifacts = gitHookArtifactsFor(gitRoot, hookTier, fallbackCmd, hookBuilders);
|
|
361
|
+
artifactLabel = 'git hook';
|
|
362
|
+
installCommand = 'totem hook install';
|
|
363
|
+
}
|
|
364
|
+
else if (c.id === 'session-start-orientation') {
|
|
365
|
+
generatedArtifacts = sessionStartArtifactsFor(gitRoot, sessionStartTemplates);
|
|
366
|
+
artifactLabel = 'SessionStart hook';
|
|
367
|
+
installCommand = 'totem init';
|
|
368
|
+
}
|
|
369
|
+
if (generatedArtifacts !== undefined) {
|
|
370
|
+
// A drift on any artifact tags the contract id at most ONCE so the --strict
|
|
371
|
+
// count reflects contracts, not artifacts (mirrors the skills branch).
|
|
372
|
+
let blockingDrift = false;
|
|
373
|
+
const lines = generatedArtifacts.map((a) => {
|
|
374
|
+
const verdict = detectGeneratedArtifactContract({
|
|
375
|
+
canonicalContent: a.canonicalContent,
|
|
376
|
+
consumerPath: a.consumerPath,
|
|
377
|
+
ownershipMarker: a.ownershipMarker,
|
|
378
|
+
artifactLabel,
|
|
379
|
+
installCommand,
|
|
380
|
+
...(a.endMarker !== undefined ? { endMarker: a.endMarker } : {}),
|
|
381
|
+
...(binary !== undefined ? { binary } : {}),
|
|
382
|
+
});
|
|
383
|
+
if (verdict.status === 'warn' && c.blocking === true)
|
|
384
|
+
blockingDrift = true;
|
|
385
|
+
return lineFor(a.lineName, verdict);
|
|
386
|
+
});
|
|
387
|
+
if (blockingDrift)
|
|
388
|
+
blockingDriftIds.push(c.id);
|
|
389
|
+
return lines;
|
|
390
|
+
}
|
|
391
|
+
// skills: managed-block content equality against the in-process template.
|
|
392
|
+
const artifacts = mechanicalArtifactsFor(c.id, gitRoot, extractManagedBlock, skillTemplates);
|
|
393
|
+
if (artifacts === undefined) {
|
|
394
|
+
return [
|
|
395
|
+
stub(c, `${c.dimension} (mechanical) — drift detection not yet implemented for this sub-class`),
|
|
396
|
+
];
|
|
397
|
+
}
|
|
398
|
+
// A multi-artifact contract (claude-skills) can drift on several
|
|
399
|
+
// artifacts; tag the contract id at most ONCE so the --strict count
|
|
400
|
+
// reflects contracts, not artifacts.
|
|
401
|
+
let blockingDrift = false;
|
|
402
|
+
const lines = artifacts.map((a) => {
|
|
403
|
+
const verdict = detectMechanicalContract({
|
|
404
|
+
canonicalBlock: a.canonicalBlock,
|
|
405
|
+
consumerPath: a.consumerPath,
|
|
406
|
+
markers: a.markers,
|
|
407
|
+
...(binary !== undefined ? { binary } : {}),
|
|
408
|
+
});
|
|
409
|
+
if (verdict.status === 'warn' && c.blocking === true)
|
|
410
|
+
blockingDrift = true;
|
|
411
|
+
return lineFor(a.lineName, verdict);
|
|
412
|
+
});
|
|
413
|
+
if (blockingDrift)
|
|
414
|
+
blockingDriftIds.push(c.id);
|
|
415
|
+
return lines;
|
|
138
416
|
}
|
|
139
|
-
|
|
417
|
+
// ── manual-attestation (mmnto-ai/totem#2073 manual-attestation slice) ──
|
|
418
|
+
// The claim-class with no mechanical sensor: the detector surfaces the
|
|
419
|
+
// tracked vendor-SDK pin (package set) or doctrine-currency row (no package)
|
|
420
|
+
// as `info`, or honest-absent `skip` — NEVER pass/warn/fail/unknown. An
|
|
421
|
+
// `info` can't enter blockingDriftIds, so these contracts cannot fail even
|
|
422
|
+
// under --strict (the manifest's "never fails" contract).
|
|
423
|
+
if (c.tractability === 'manual-attestation') {
|
|
424
|
+
// The detector reads the sub-class discriminant (`c.package`) + the
|
|
425
|
+
// canonical source directly off the contract. `package:` set ⇒ vendor-SDK
|
|
426
|
+
// pin read; unset ⇒ doctrine-row pure-info surface. No `attested` yet (the
|
|
427
|
+
// schema has no last-attested field — strategy's follow-on lane).
|
|
428
|
+
const verdict = detectManualAttestationContract(c, { cwd, repoId });
|
|
429
|
+
return [verdictToLine(c, verdict)];
|
|
430
|
+
}
|
|
431
|
+
// ── anything else (a future tractability) → skip stub; the slice boundary stays observable ──
|
|
432
|
+
return [
|
|
433
|
+
stub(c, `${c.dimension} (${c.tractability}) — drift detection not yet implemented`),
|
|
434
|
+
];
|
|
140
435
|
});
|
|
141
436
|
return { results: [summary, ...perContract], blockingDriftIds };
|
|
142
437
|
}
|
|
@@ -146,15 +441,23 @@ export async function checkParity(cwd) {
|
|
|
146
441
|
function single(result) {
|
|
147
442
|
return { results: [result], blockingDriftIds: [] };
|
|
148
443
|
}
|
|
149
|
-
/** Map a core `ParityContractVerdict` to a
|
|
150
|
-
function
|
|
444
|
+
/** Map a core `ParityContractVerdict` to a `ParityLine` keyed by the contract id. */
|
|
445
|
+
function verdictToLine(contract, verdict) {
|
|
446
|
+
return lineFor(`Parity: ${contract.id}`, verdict);
|
|
447
|
+
}
|
|
448
|
+
/** Build a `ParityLine` from an explicit display name + a core verdict. */
|
|
449
|
+
function lineFor(name, verdict) {
|
|
151
450
|
return {
|
|
152
|
-
name
|
|
451
|
+
name,
|
|
153
452
|
status: verdict.status,
|
|
154
453
|
message: verdict.message,
|
|
155
454
|
...(verdict.remediation !== undefined ? { remediation: verdict.remediation } : {}),
|
|
156
455
|
};
|
|
157
456
|
}
|
|
457
|
+
/** The `skip` "not yet implemented" stub for a contract this build doesn't sense. */
|
|
458
|
+
function stub(contract, message) {
|
|
459
|
+
return { name: `Parity: ${contract.id}`, status: 'skip', message };
|
|
460
|
+
}
|
|
158
461
|
/**
|
|
159
462
|
* Resolve the git root, swallowing the `TotemGitError` that `resolveGitRoot`
|
|
160
463
|
* throws on a git hiccup (permission error / corrupted index) — the parity
|
|
@@ -178,7 +481,7 @@ function rel(cwd, target) {
|
|
|
178
481
|
// Same value as CHECK_NAME — aliased (not re-literal'd) so the two can't drift.
|
|
179
482
|
const TAG = CHECK_NAME;
|
|
180
483
|
/**
|
|
181
|
-
* CLI entry — runs `checkParity`, renders each `
|
|
484
|
+
* CLI entry — runs `checkParity`, renders each `ParityLine`, and throws a
|
|
182
485
|
* `TotemError` when a blocking contract drifted under `--strict` so the
|
|
183
486
|
* top-level `handleError` produces the non-zero exit code (no direct
|
|
184
487
|
* `process.exit` per AGENTS.md).
|
|
@@ -197,12 +500,15 @@ export async function doctorParityCliCommand(options = {}) {
|
|
|
197
500
|
const cwd = options.cwdForTest ?? process.cwd();
|
|
198
501
|
const { results, blockingDriftIds } = await checkParity(cwd);
|
|
199
502
|
// Under --strict, a blocking contract's drift `warn` is rendered + gated as a
|
|
200
|
-
// FAIL.
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
|
|
503
|
+
// FAIL. A contract's drift can render across MULTIPLE artifact lines
|
|
504
|
+
// (e.g. `Parity: claude-skills (signoff)`), so a line is promotable when its
|
|
505
|
+
// name is the `Parity: <id>` summary OR a `Parity: <id> (…)` artifact line —
|
|
506
|
+
// an exact-name Set would leave the artifact lines rendered as WARN while the
|
|
507
|
+
// command still exits non-zero (GCA review on the PR). The trailing space
|
|
508
|
+
// guards against a contract id that is a prefix of another.
|
|
509
|
+
const isPromotable = (name) => blockingDriftIds.some((id) => name === `Parity: ${id}` || name.startsWith(`Parity: ${id} `));
|
|
204
510
|
for (const r of results) {
|
|
205
|
-
const status = options.strict && r.status === 'warn' &&
|
|
511
|
+
const status = options.strict && r.status === 'warn' && isPromotable(r.name) ? 'fail' : r.status;
|
|
206
512
|
switch (status) {
|
|
207
513
|
case 'pass':
|
|
208
514
|
log.success(TAG, `${successColor(bold('PASS'))} — ${render(r.message)}`);
|
|
@@ -212,6 +518,20 @@ export async function doctorParityCliCommand(options = {}) {
|
|
|
212
518
|
if (r.remediation)
|
|
213
519
|
log.dim(TAG, `→ ${render(r.remediation)}`);
|
|
214
520
|
break;
|
|
521
|
+
case 'info':
|
|
522
|
+
// An attested, intentional fork — neutral/informational, never gated.
|
|
523
|
+
log.info(TAG, `${bold('INFO')} — ${render(r.message)}`);
|
|
524
|
+
if (r.remediation)
|
|
525
|
+
log.dim(TAG, `→ ${render(r.remediation)}`);
|
|
526
|
+
break;
|
|
527
|
+
case 'unknown':
|
|
528
|
+
// The Stale-Doctor-Paradox state: the canonical was unresolvable, so the
|
|
529
|
+
// verdict is unprovable (NOT a pass — no self-certification). A caution,
|
|
530
|
+
// not drift; never gated.
|
|
531
|
+
log.warn(TAG, `${warnColor(bold('UNKNOWN'))} — ${render(r.message)}`);
|
|
532
|
+
if (r.remediation)
|
|
533
|
+
log.dim(TAG, `→ ${render(r.remediation)}`);
|
|
534
|
+
break;
|
|
215
535
|
case 'fail':
|
|
216
536
|
// Mandated 'Totem Error' tag (packages/cli convention) — marks internal
|
|
217
537
|
// error output, distinct from the contextual TAG used for pass/warn/skip.
|
|
@@ -226,11 +546,11 @@ export async function doctorParityCliCommand(options = {}) {
|
|
|
226
546
|
}
|
|
227
547
|
// Sensor-not-gate: drift is report-only by default (exit 0). Only `--strict`
|
|
228
548
|
// promotes a `blocking: true` contract's drift to a non-zero exit; non-blocking
|
|
229
|
-
// drift never gates
|
|
230
|
-
//
|
|
231
|
-
// gating model for a future slice that DOES emit a `fail` is
|
|
232
|
-
// slice lands (CR review #2071: keep the gate from
|
|
233
|
-
// that would break sensor-not-gate).
|
|
549
|
+
// drift never gates, and `info`/`unknown` are never promoted. The detectors
|
|
550
|
+
// emit no raw `fail` status, so the gate is purely the strict+blocking
|
|
551
|
+
// promotion — the gating model for a future slice that DOES emit a `fail` is
|
|
552
|
+
// settled when that slice lands (CR review mmnto-ai/totem#2071: keep the gate from
|
|
553
|
+
// suggesting a non-strict path that would break sensor-not-gate).
|
|
234
554
|
if (options.strict && blockingDriftIds.length > 0) {
|
|
235
555
|
throw new TotemError('PARITY_DRIFT_DETECTED', `${blockingDriftIds.length} parity contract(s) reported blocking drift under --strict.`, 'Reconcile each blocking contract against its canonical source, then re-run totem doctor --parity --strict.');
|
|
236
556
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor-parity.js","sourceRoot":"","sources":["../../src/commands/doctor-parity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAMlC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAe5B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IAC3C,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IAC1F,MAAM,EACJ,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,+BAA+B,GAChC,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IAEjC,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,6BAA6B;IAC7B,IAAI,WAA+B,CAAC;IACpC,wEAAwE;IACxE,4EAA4E;IAC5E,+EAA+E;IAC/E,+EAA+E;IAC/E,2DAA2D;IAC3D,IAAI,YAAY,GAAG,GAAG,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC1C,6EAA6E;QAC7E,2EAA2E;QAC3E,4EAA4E;QAC5E,4E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