@mmnto/totem 1.53.4 → 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/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/parity-detect.d.ts +254 -5
- package/dist/parity-detect.d.ts.map +1 -1
- package/dist/parity-detect.js +451 -0
- package/dist/parity-detect.js.map +1 -1
- package/dist/parity-detect.test.js +500 -1
- package/dist/parity-detect.test.js.map +1 -1
- package/package.json +1 -1
package/dist/parity-detect.js
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
* - **Never throws:** every read failure degrades to a `skip`/`warn` verdict;
|
|
33
33
|
* the sensor must never crash the doctor pipeline.
|
|
34
34
|
*/
|
|
35
|
+
import * as crypto from 'node:crypto';
|
|
35
36
|
import * as fs from 'node:fs';
|
|
36
37
|
import * as path from 'node:path';
|
|
37
38
|
import semver from 'semver';
|
|
@@ -429,7 +430,457 @@ function findDeclaredRange(pkg, packageName) {
|
|
|
429
430
|
}
|
|
430
431
|
return undefined;
|
|
431
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Detect "drift" for ONE `manual-attestation` contract — the claim-class with NO
|
|
435
|
+
* mechanical sensor (Tenet 19). The verdict ceiling is **`info` or `skip` ONLY**:
|
|
436
|
+
* the doctor may SURFACE the tracked coupling/doctrine + FLAG staleness, but may
|
|
437
|
+
* NEVER assert drift (`warn`), failure (`fail`), currency (`pass`), or an
|
|
438
|
+
* unprovable-canonical (`unknown`) — there is no canonical to prove against. This
|
|
439
|
+
* is the manifest's "surfaces last-attested + flags staleness only, NEVER fails"
|
|
440
|
+
* contract, claim-class-tighter than the mechanical / version-pinned detectors
|
|
441
|
+
* (which may `warn`). The `info`/`skip` ceiling means the contract can never enter
|
|
442
|
+
* the CLI's `blockingDriftIds`, so it is structurally incapable of failing even
|
|
443
|
+
* under `--strict`.
|
|
444
|
+
*
|
|
445
|
+
* Two sub-classes, discriminated by the contract's `package:`:
|
|
446
|
+
* - **vendor-SDK coupling** (`packageName` set — `@google/genai`,
|
|
447
|
+
* `@anthropic-ai/sdk`): reads the consumer's LOCAL pin (declared range +
|
|
448
|
+
* resolved installed version, reusing the version-pinned machinery) and
|
|
449
|
+
* surfaces it as `info` — NO cohort floor exists, so NO currency claim is made
|
|
450
|
+
* (Tenet 16, attest-don't-enforce). The DURABLE manual-attestation case.
|
|
451
|
+
* - **doctrine row** (`packageName` unset — `governance-doctrine`,
|
|
452
|
+
* `agent-memory-doctrine`): `canonicalSource` is a cross-repo AGENTS.md the
|
|
453
|
+
* local-read-only doctor must NOT fetch. Emits a pure `info` doctrine-currency
|
|
454
|
+
* surface from the contract fields with ZERO on-disk I/O. TRANSIENT — graduates
|
|
455
|
+
* to version-pinned when doctrine-distribution ships (strategy#511 / #526).
|
|
456
|
+
*
|
|
457
|
+
* NEVER throws (reads degrade to skip), NEVER networks, NEVER reads the cross-repo
|
|
458
|
+
* `canonicalSource`, and NEVER emits `pass`/`warn`/`fail`/`unknown`.
|
|
459
|
+
*/
|
|
460
|
+
export function detectManualAttestationContract(contract, ctx) {
|
|
461
|
+
// ── Applicability: consumers list (verbatim parity with detectVersionPinnedContract) ──
|
|
462
|
+
if (contract.consumers !== undefined) {
|
|
463
|
+
if (ctx.repoId === undefined) {
|
|
464
|
+
return {
|
|
465
|
+
status: 'skip',
|
|
466
|
+
message: `cannot determine applicability — repo id unresolvable; contract is scoped to consumers [${contract.consumers.join(', ')}]`,
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
if (!contract.consumers.includes(ctx.repoId)) {
|
|
470
|
+
return {
|
|
471
|
+
status: 'skip',
|
|
472
|
+
message: `cohort permits absence here (${ctx.repoId} not in consumers)`,
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
// The last-attested suffix: a date if one was supplied (the reserved seam — the
|
|
477
|
+
// manifest has no `last-attested:` field yet), else the honest "not recorded".
|
|
478
|
+
// NEVER fabricated; a present date refines the MESSAGE, never the status.
|
|
479
|
+
const trimmedAttested = ctx.attested?.trim();
|
|
480
|
+
const attestedSuffix = trimmedAttested
|
|
481
|
+
? `last attested ${trimmedAttested}`
|
|
482
|
+
: 'last attested: not recorded';
|
|
483
|
+
// The `package:` field is the sub-class discriminant, read directly off the
|
|
484
|
+
// contract (single source of truth). A whitespace-only value is treated as
|
|
485
|
+
// absent (doctrine-like) rather than a degenerate vendor pin (`|| undefined`
|
|
486
|
+
// collapses an empty trim to the doctrine-row branch).
|
|
487
|
+
const pkg = contract.package?.trim() || undefined;
|
|
488
|
+
// ── Doctrine row (no package): a pure info surface, ZERO on-disk I/O ──
|
|
489
|
+
// canonicalSource is cross-repo (mmnto-ai/totem-strategy:AGENTS.md); the
|
|
490
|
+
// local-read-only doctor surfaces it as TEXT and never resolves it.
|
|
491
|
+
if (pkg === undefined) {
|
|
492
|
+
const source = contract.canonicalSource?.trim() || 'no external canonical source';
|
|
493
|
+
return {
|
|
494
|
+
status: 'info',
|
|
495
|
+
message: `doctrine currency tracked — ${contract.dimension} (canonical: ${source}); no local pin mechanism, pending doctrine-distribution (${contract.trackingIssue}). ${attestedSuffix}`,
|
|
496
|
+
};
|
|
497
|
+
}
|
|
498
|
+
// ── Vendor-SDK coupling (package set): surface the consumer's LOCAL pin ──
|
|
499
|
+
// Reuse the version-pinned package.json read, but STOP before any floor compare —
|
|
500
|
+
// there is no agreed cohort floor (Tenet 16), so the doctor asserts NO currency;
|
|
501
|
+
// the verdict is an info visibility surface, never pass/warn.
|
|
502
|
+
const readPkg = ctx.readPackageJson ?? readPackageJson;
|
|
503
|
+
const consumerPkg = readPkg(path.join(ctx.cwd, 'package.json'));
|
|
504
|
+
const declaredRange = consumerPkg ? findDeclaredRange(consumerPkg, pkg) : undefined;
|
|
505
|
+
if (declaredRange === undefined) {
|
|
506
|
+
// Applicable consumer, but the vendor SDK is not declared here. UNLIKE the
|
|
507
|
+
// version-pinned applicable-but-missing case (which becomes a drift `warn` once
|
|
508
|
+
// consumers are verified), a manual-attestation coupling NEVER warns: vendor
|
|
509
|
+
// spread is permitted by design (no cohort floor) → honest-absent skip.
|
|
510
|
+
return {
|
|
511
|
+
status: 'skip',
|
|
512
|
+
message: `${pkg} coupling not present here — cohort permits vendor spread (attest-don't-enforce)`,
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
// Resolve the installed version only for a valid range — guard FIRST so a garbage
|
|
516
|
+
// range never reaches semver.minVersion (resolveInstalledVersion's fallback). An
|
|
517
|
+
// unparseable range still surfaces as info (the coupling IS declared), just with
|
|
518
|
+
// installed unresolved — never a throw, never a warn.
|
|
519
|
+
const installed = semver.validRange(declaredRange) !== null
|
|
520
|
+
? resolveInstalledVersion(ctx.cwd, pkg, declaredRange)
|
|
521
|
+
: undefined;
|
|
522
|
+
const installedText = installed !== undefined ? `installed ${installed}` : 'installed: unresolved';
|
|
523
|
+
return {
|
|
524
|
+
status: 'info',
|
|
525
|
+
message: `${pkg} coupling tracked — declared ${declaredRange}, ${installedText}; no cohort floor (Tenet 16, attest only). ${attestedSuffix}`,
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Normalize a managed block for content comparison (req #3): CRLF / lone-CR → LF,
|
|
530
|
+
* strip trailing whitespace per line, and trim leading/trailing blank lines. Two
|
|
531
|
+
* blocks that differ ONLY in line endings or trailing whitespace — the win32
|
|
532
|
+
* checkout false-positive class — normalize equal.
|
|
533
|
+
*/
|
|
534
|
+
export function normalizeManagedBlock(block) {
|
|
535
|
+
return block
|
|
536
|
+
.replace(/\r\n?/g, '\n') // CRLF + lone CR → LF
|
|
537
|
+
.replace(/[ \t]+$/gm, '') // trailing whitespace per line
|
|
538
|
+
.replace(/^\n+/, '') // leading blank lines
|
|
539
|
+
.replace(/\n+$/, ''); // trailing blank lines
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Extract the content BETWEEN the first `markers.start` and the first following
|
|
543
|
+
* `markers.end`. Returns undefined when either marker is absent (an unmanaged or
|
|
544
|
+
* marker-stripped file). The markers themselves are excluded from the result.
|
|
545
|
+
*/
|
|
546
|
+
export function extractManagedBlock(content, markers) {
|
|
547
|
+
const startIdx = content.indexOf(markers.start);
|
|
548
|
+
if (startIdx === -1)
|
|
549
|
+
return undefined;
|
|
550
|
+
const afterStart = startIdx + markers.start.length;
|
|
551
|
+
const endIdx = content.indexOf(markers.end, afterStart);
|
|
552
|
+
if (endIdx === -1)
|
|
553
|
+
return undefined;
|
|
554
|
+
return content.slice(afterStart, endIdx);
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Parse a `<!-- totem:fork reason="…" owner="…" attested="…" -->` marker from
|
|
558
|
+
* anywhere in `content`. Whitespace-tolerant (mirrors `REFLEX_VERSION_RE`).
|
|
559
|
+
* Returns undefined when no marker is present; each attribute is independently
|
|
560
|
+
* optional, so a bare `<!-- totem:fork -->` returns an empty marker object
|
|
561
|
+
* (still a fork signal). The attribute patterns are fixed literals (no dynamic
|
|
562
|
+
* RegExp) and linear (no nested quantifiers) — ReDoS-safe.
|
|
563
|
+
*/
|
|
564
|
+
export function parseForkMarker(content) {
|
|
565
|
+
// `s` (dotAll) so a marker authored across multiple lines still matches; `.*?`
|
|
566
|
+
// stays non-greedy + bounded by the first `-->`, so it remains linear (ReDoS-safe).
|
|
567
|
+
const markerMatch = /<!--\s*totem:fork\b(.*?)-->/is.exec(content);
|
|
568
|
+
if (markerMatch === null)
|
|
569
|
+
return undefined;
|
|
570
|
+
const attrsText = markerMatch[1] ?? '';
|
|
571
|
+
const marker = {};
|
|
572
|
+
// Iterate ALL key="value" pairs with matchAll (not a single match() — per the
|
|
573
|
+
// security lesson, one match() lets a safe prefix shadow later pairs); a
|
|
574
|
+
// marker's attributes are unordered + each independently optional.
|
|
575
|
+
for (const pair of attrsText.matchAll(/(\w+)\s*=\s*"([^"]*)"/g)) {
|
|
576
|
+
const value = pair[2] ?? '';
|
|
577
|
+
if (pair[1] === 'reason')
|
|
578
|
+
marker.reason = value;
|
|
579
|
+
else if (pair[1] === 'owner')
|
|
580
|
+
marker.owner = value;
|
|
581
|
+
else if (pair[1] === 'attested')
|
|
582
|
+
marker.attested = value;
|
|
583
|
+
}
|
|
584
|
+
return marker;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Short content hash (sha256, first 12 hex chars) of a normalized block, for the
|
|
588
|
+
* verdict's machine-readable record (req #6). The hash IS the content-equality
|
|
589
|
+
* evidence — bytes, never prose-parsing (req #2's spirit).
|
|
590
|
+
*/
|
|
591
|
+
export function hashManagedBlock(normalized) {
|
|
592
|
+
return crypto.createHash('sha256').update(normalized, 'utf-8').digest('hex').slice(0, 12);
|
|
593
|
+
}
|
|
594
|
+
/** Format a fork marker's attested/owner attributes as a message suffix. */
|
|
595
|
+
function formatForkMeta(fork) {
|
|
596
|
+
return ((fork.attested !== undefined ? `, attested ${fork.attested}` : '') +
|
|
597
|
+
(fork.owner !== undefined ? `, owner ${fork.owner}` : ''));
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Detect drift for ONE mechanical managed-block contract (the #2073 mechanical
|
|
601
|
+
* skills slice). Compares the consumer's installed managed-block against the
|
|
602
|
+
* running `@mmnto/cli`'s own canonical block (passed in by the CLI), normalized
|
|
603
|
+
* for line-endings + trailing whitespace (req #3) and content-hashed (req #6).
|
|
604
|
+
* Honors the verdict-state split (req #1) + the fork marker (req #7):
|
|
605
|
+
*
|
|
606
|
+
* - `pass` — normalized blocks equal.
|
|
607
|
+
* - `warn` — blocks differ, no fork marker (drift); reports both short hashes.
|
|
608
|
+
* - `info` — blocks differ AND a `totem:fork` marker is present (attested fork).
|
|
609
|
+
* - `unknown` — canonical unresolvable (the doctor may itself be stale/shadowed);
|
|
610
|
+
* never self-certify as `pass`.
|
|
611
|
+
* - `skip` — consumer artifact not installed (cohort permits absence).
|
|
612
|
+
*
|
|
613
|
+
* NEVER throws (reads degrade), NEVER networks (canonical is in-process), NEVER
|
|
614
|
+
* emits `fail` (the gate edge is a CLI concern, unchanged from PR-1).
|
|
615
|
+
*/
|
|
616
|
+
export function detectMechanicalContract(ctx) {
|
|
617
|
+
const provenance = ctx.binary !== undefined
|
|
618
|
+
? ` (checked by @mmnto/cli@${ctx.binary.version} at ${ctx.binary.path})`
|
|
619
|
+
: '';
|
|
620
|
+
// Append the binary self-report (req #5) by concatenation (not interpolation)
|
|
621
|
+
// so the provenance suffix never reads as a jammed token in a message.
|
|
622
|
+
const tag = (msg) => msg + provenance;
|
|
623
|
+
// ── Canonical unresolvable → unknown (Stale-Doctor-Paradox guard) ──
|
|
624
|
+
// `undefined` = the CLI could not extract the canonical (a build/marker bug);
|
|
625
|
+
// an EMPTY string is a legitimately empty template that must still be COMPARED,
|
|
626
|
+
// not conflated with unresolvable (GCA + Greptile review on the PR). `=== undefined`
|
|
627
|
+
// is a single condition, so there's no boolean `||` for a numeric-default rule to misread.
|
|
628
|
+
if (ctx.canonicalBlock === undefined) {
|
|
629
|
+
return {
|
|
630
|
+
status: 'unknown',
|
|
631
|
+
message: tag('cannot resolve canonical template from the running @mmnto/cli — verdict unprovable'),
|
|
632
|
+
remediation: 'Reinstall @mmnto/cli (the running binary may be stale or shadowed), then re-run totem doctor --parity.',
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
const canonical = ctx.canonicalBlock;
|
|
636
|
+
// ── Read the consumer artifact (absent → skip; cohort permits absence) ──
|
|
637
|
+
const readFile = ctx.readFile ?? readFileText;
|
|
638
|
+
const consumerContent = readFile(ctx.consumerPath);
|
|
639
|
+
if (consumerContent === undefined) {
|
|
640
|
+
return {
|
|
641
|
+
status: 'skip',
|
|
642
|
+
message: `artifact not installed at ${ctx.consumerPath} — cohort permits absence`,
|
|
643
|
+
remediation: 'Run totem init to install the distributed artifact, or ignore if this repo intentionally omits it.',
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
// ── Extract the consumer's managed block ──
|
|
647
|
+
const consumerBlock = extractManagedBlock(consumerContent, ctx.markers);
|
|
648
|
+
if (consumerBlock === undefined) {
|
|
649
|
+
// Markers absent. A fork marker still signals an INTENTIONAL override (a
|
|
650
|
+
// heavy fork can strip the managed-block markers entirely) → `info`; only an
|
|
651
|
+
// unmarked, unmanaged file is drift `warn`.
|
|
652
|
+
const strippedFork = parseForkMarker(consumerContent);
|
|
653
|
+
if (strippedFork !== undefined) {
|
|
654
|
+
return {
|
|
655
|
+
status: 'info',
|
|
656
|
+
message: tag(`intentional fork${formatForkMeta(strippedFork)} — managed-block markers absent in ${ctx.consumerPath}`),
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
return {
|
|
660
|
+
status: 'warn',
|
|
661
|
+
message: `managed-block markers absent in ${ctx.consumerPath} — file is unmanaged or marker-stripped`,
|
|
662
|
+
remediation: 'Re-run totem init to restore the managed block, or add a totem:fork marker if this divergence is intentional.',
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
// ── Normalize + compare (req #3) ──
|
|
666
|
+
const canonicalNorm = normalizeManagedBlock(canonical);
|
|
667
|
+
const consumerNorm = normalizeManagedBlock(consumerBlock);
|
|
668
|
+
if (canonicalNorm === consumerNorm) {
|
|
669
|
+
return {
|
|
670
|
+
status: 'pass',
|
|
671
|
+
message: tag(`matches canonical — hash ${hashManagedBlock(consumerNorm)}`),
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
// ── Differ: an attested fork is `info`; otherwise drift `warn` (req #7 + #1) ──
|
|
675
|
+
const fork = parseForkMarker(consumerContent);
|
|
676
|
+
if (fork !== undefined) {
|
|
677
|
+
return {
|
|
678
|
+
status: 'info',
|
|
679
|
+
message: tag(`intentional fork${formatForkMeta(fork)} — differs from canonical (consumer ${hashManagedBlock(consumerNorm)} vs canonical ${hashManagedBlock(canonicalNorm)})`),
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
return {
|
|
683
|
+
status: 'warn',
|
|
684
|
+
message: tag(`drift — consumer ${hashManagedBlock(consumerNorm)} != canonical ${hashManagedBlock(canonicalNorm)}`),
|
|
685
|
+
remediation: 'Reconcile the artifact to the canonical (re-run totem init), or add a totem:fork marker if the divergence is intentional.',
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Extract the totem-owned region INCLUSIVE of both markers (start through end), or
|
|
690
|
+
* undefined when either is absent. Isolates an appended totem block embedded in a
|
|
691
|
+
* user-modified hook (post-merge / post-checkout carry an end marker) so the user's
|
|
692
|
+
* surrounding content is excluded from the comparison.
|
|
693
|
+
*/
|
|
694
|
+
function extractInclusiveRegion(content, start, end) {
|
|
695
|
+
const s = content.indexOf(start);
|
|
696
|
+
if (s === -1)
|
|
697
|
+
return undefined;
|
|
698
|
+
const e = content.indexOf(end, s + start.length);
|
|
699
|
+
if (e === -1)
|
|
700
|
+
return undefined;
|
|
701
|
+
return content.slice(s, e + end.length);
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Whether a file is a totem-OWNED whole file (generated verbatim by a `build*`
|
|
705
|
+
* template) rather than a totem block APPENDED into a pre-existing user file. Two
|
|
706
|
+
* generated shapes are owned:
|
|
707
|
+
* - **whole-file marker-at-start** — the ownership marker OPENS the file, so
|
|
708
|
+
* nothing meaningful precedes it. The JS SessionStart hooks (`// [totem]
|
|
709
|
+
* auto-generated …` at index 0, no shebang — mmnto-ai/totem#2073 orientation
|
|
710
|
+
* slice) are this shape.
|
|
711
|
+
* - **shell shebang + comment** — a shell hook generated as `#!/bin/sh\n#
|
|
712
|
+
* <marker> …`, so the only content before the marker is the shebang line plus
|
|
713
|
+
* the start of its comment (the git-hooks slice).
|
|
714
|
+
* An APPENDED block carries the user's prior content before the marker → NOT owned
|
|
715
|
+
* (the detector degrades it to `unknown`, claim-class-tight).
|
|
716
|
+
*/
|
|
717
|
+
function isOwnedGeneratedFile(content, marker) {
|
|
718
|
+
const idx = content.indexOf(marker);
|
|
719
|
+
if (idx === -1)
|
|
720
|
+
return false;
|
|
721
|
+
const before = content.slice(0, idx);
|
|
722
|
+
// Marker opens the file (whole-file JS templates), OR only a shebang + comment-
|
|
723
|
+
// start precedes it (shell hooks). User content before the marker → appended.
|
|
724
|
+
return before.trim().length === 0 || /^#![^\n]*\n#[ \t]*$/.test(before);
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Detect drift for ONE generated-artifact contract (the mmnto-ai/totem#2073 hooks
|
|
728
|
+
* slice) — the git hooks (`pre-commit` / `pre-push` / `post-merge` / `post-checkout`),
|
|
729
|
+
* which the CLI regenerates per-repo via `build*Hook(getFallbackCommand(repo), tier)`
|
|
730
|
+
* so the canonical matches THIS repo's package manager + tier (no frozen-string
|
|
731
|
+
* false-positive). Honors the verdict-state split + the fork marker, and detects
|
|
732
|
+
* STALE-VERSION drift (a hook frozen at an older generator's output differs from
|
|
733
|
+
* today's regenerated canonical → `warn` — the detection half of mmnto-ai/totem#1854):
|
|
734
|
+
*
|
|
735
|
+
* - `pass` — the totem-owned content equals the regenerated canonical.
|
|
736
|
+
* - `warn` — an owned hook drifted (incl. a stale pre-mmnto-ai/totem#2053 resolve order); reports both hashes.
|
|
737
|
+
* - `info` — drift AND a `totem:fork` marker — an attested intentional fork.
|
|
738
|
+
* - `unknown` — canonical unregenerable, OR a totem block appended inside a user
|
|
739
|
+
* hook with no end marker to isolate it (cannot prove drift).
|
|
740
|
+
* - `skip` — hook absent, OR present but not totem-managed (cohort permits absence).
|
|
741
|
+
*
|
|
742
|
+
* NEVER throws (reads degrade), NEVER networks (canonical is in-process), NEVER
|
|
743
|
+
* emits `fail` (the gate edge is a CLI concern, unchanged from PR-1).
|
|
744
|
+
*/
|
|
745
|
+
export function detectGeneratedArtifactContract(ctx) {
|
|
746
|
+
const provenance = ctx.binary !== undefined
|
|
747
|
+
? ` (checked by @mmnto/cli@${ctx.binary.version} at ${ctx.binary.path})`
|
|
748
|
+
: '';
|
|
749
|
+
// Append the binary self-report (req #5) by concatenation (not interpolation) so
|
|
750
|
+
// the provenance suffix never reads as a jammed token in a message.
|
|
751
|
+
const tag = (msg) => msg + provenance;
|
|
752
|
+
// Artifact-class copy (Greptile review on mmnto-ai/totem#2082): this detector serves
|
|
753
|
+
// both git hooks and the static SessionStart hooks, so the noun + install command are
|
|
754
|
+
// threaded in rather than hardcoded. Defaults keep standalone callers SessionStart-safe
|
|
755
|
+
// (never "run totem hook install" for a non-git artifact).
|
|
756
|
+
const label = ctx.artifactLabel ?? 'artifact';
|
|
757
|
+
const install = ctx.installCommand ?? 'totem init';
|
|
758
|
+
// ── Canonical unresolvable → unknown (Stale-Doctor-Paradox guard) ──
|
|
759
|
+
if (ctx.canonicalContent === undefined) {
|
|
760
|
+
return {
|
|
761
|
+
status: 'unknown',
|
|
762
|
+
message: tag(`cannot resolve canonical ${label} from the running @mmnto/cli — verdict unprovable`),
|
|
763
|
+
remediation: 'Reinstall @mmnto/cli (the running binary may be stale or shadowed), then re-run totem doctor --parity.',
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
const canonical = ctx.canonicalContent;
|
|
767
|
+
// ── Read the consumer artifact (absent → skip; cohort permits absence) ──
|
|
768
|
+
const readFile = ctx.readFile ?? readFileText;
|
|
769
|
+
const consumerContent = readFile(ctx.consumerPath);
|
|
770
|
+
if (consumerContent === undefined) {
|
|
771
|
+
return {
|
|
772
|
+
status: 'skip',
|
|
773
|
+
message: `${label} not installed at ${ctx.consumerPath} — cohort permits absence`,
|
|
774
|
+
remediation: `Run ${install} to install the managed ${label}, or ignore if this repo intentionally omits it.`,
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
// ── Presence semantics: a present hook with no totem marker is a pure user hook ──
|
|
778
|
+
// (NOT drift — totem simply is not installed here). Distinct from the skills model,
|
|
779
|
+
// where a markerless file is a marker-stripped managed artifact.
|
|
780
|
+
if (!consumerContent.includes(ctx.ownershipMarker)) {
|
|
781
|
+
return {
|
|
782
|
+
status: 'skip',
|
|
783
|
+
message: `${ctx.consumerPath} present but not totem-managed — cohort permits absence`,
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
// ── Clean owned-whole-file match (the common cohort case) ──
|
|
787
|
+
const canonicalNorm = normalizeManagedBlock(canonical);
|
|
788
|
+
if (normalizeManagedBlock(consumerContent) === canonicalNorm) {
|
|
789
|
+
return {
|
|
790
|
+
status: 'pass',
|
|
791
|
+
message: tag(`matches canonical — hash ${hashManagedBlock(canonicalNorm)}`),
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
// ── Differ. An attested fork is always `info` (req #7); never `warn`/`unknown`. ──
|
|
795
|
+
const fork = parseForkMarker(consumerContent);
|
|
796
|
+
// ── post-merge / post-checkout carry an end marker → isolate the totem region so a
|
|
797
|
+
// user's surrounding content does not read as drift, and a drifted region does. ──
|
|
798
|
+
if (ctx.endMarker !== undefined) {
|
|
799
|
+
const canonicalRegion = extractInclusiveRegion(canonical, ctx.ownershipMarker, ctx.endMarker);
|
|
800
|
+
// The regenerated canonical must contain its own end-marked region. If it does not
|
|
801
|
+
// (a generator/marker misconfig, or a truncated canonical), the region comparison is
|
|
802
|
+
// unprovable → unknown — mirroring the canonicalContent === undefined guard above,
|
|
803
|
+
// never a fall-through that could emit a false `warn` (Greptile review on mmnto-ai/totem#2079).
|
|
804
|
+
if (canonicalRegion === undefined) {
|
|
805
|
+
return {
|
|
806
|
+
status: 'unknown',
|
|
807
|
+
message: tag(`cannot resolve the canonical ${label} region (end marker absent in the regenerated template) — verdict unprovable`),
|
|
808
|
+
remediation: 'Reinstall @mmnto/cli (the running binary may be stale or shadowed), then re-run totem doctor --parity.',
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
const consumerRegion = extractInclusiveRegion(consumerContent, ctx.ownershipMarker, ctx.endMarker);
|
|
812
|
+
if (consumerRegion !== undefined) {
|
|
813
|
+
const consumerRegionNorm = normalizeManagedBlock(consumerRegion);
|
|
814
|
+
const canonicalRegionNorm = normalizeManagedBlock(canonicalRegion);
|
|
815
|
+
if (consumerRegionNorm === canonicalRegionNorm) {
|
|
816
|
+
// The totem-owned region is current; the whole-file diff is the user's own
|
|
817
|
+
// surrounding content — totem is not drifted.
|
|
818
|
+
return {
|
|
819
|
+
status: 'pass',
|
|
820
|
+
message: tag(`totem block current — hash ${hashManagedBlock(consumerRegionNorm)}`),
|
|
821
|
+
};
|
|
822
|
+
}
|
|
823
|
+
// Scope the fork attestation to the ISOLATED totem region — a totem:fork marker in
|
|
824
|
+
// the user's OWN surrounding shell must not suppress genuine totem-block drift
|
|
825
|
+
// (Greptile review on mmnto-ai/totem#2079).
|
|
826
|
+
const regionFork = parseForkMarker(consumerRegion);
|
|
827
|
+
if (regionFork !== undefined) {
|
|
828
|
+
return {
|
|
829
|
+
status: 'info',
|
|
830
|
+
message: tag(`intentional fork${formatForkMeta(regionFork)} — totem block differs in ${ctx.consumerPath}`),
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
return {
|
|
834
|
+
status: 'warn',
|
|
835
|
+
message: tag(`drift — totem block ${hashManagedBlock(consumerRegionNorm)} != canonical ${hashManagedBlock(canonicalRegionNorm)}`),
|
|
836
|
+
remediation: `Re-run ${install} to regenerate the managed block, or add a totem:fork marker if the divergence is intentional.`,
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
// Consumer has the start marker but not the end (truncated / stripped) → fall through
|
|
840
|
+
// to the ownership heuristic below (owned → drift warn; appended → unknown).
|
|
841
|
+
}
|
|
842
|
+
// ── No end marker (pre-commit / pre-push), or the region could not be bracketed. ──
|
|
843
|
+
if (isOwnedGeneratedFile(consumerContent, ctx.ownershipMarker)) {
|
|
844
|
+
// Owned whole-file that drifted (e.g. a stale pre-mmnto-ai/totem#2053 resolve order).
|
|
845
|
+
const consumerNorm = normalizeManagedBlock(consumerContent);
|
|
846
|
+
if (fork !== undefined) {
|
|
847
|
+
return {
|
|
848
|
+
status: 'info',
|
|
849
|
+
message: tag(`intentional fork${formatForkMeta(fork)} — differs from canonical (consumer ${hashManagedBlock(consumerNorm)} vs canonical ${hashManagedBlock(canonicalNorm)})`),
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
return {
|
|
853
|
+
status: 'warn',
|
|
854
|
+
message: tag(`drift — consumer ${hashManagedBlock(consumerNorm)} != canonical ${hashManagedBlock(canonicalNorm)}`),
|
|
855
|
+
remediation: `Re-run ${install} to regenerate the ${label} from the current @mmnto/cli, or add a totem:fork marker if the divergence is intentional.`,
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
// ── Totem block appended inside a user-modified artifact with no end marker to ──
|
|
859
|
+
// isolate it: can prove neither drift nor currency → unknown (claim-class-tight).
|
|
860
|
+
if (fork !== undefined) {
|
|
861
|
+
return {
|
|
862
|
+
status: 'info',
|
|
863
|
+
message: tag(`intentional fork${formatForkMeta(fork)} — totem block embedded in a user-modified ${label} (${ctx.consumerPath})`),
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
return {
|
|
867
|
+
status: 'unknown',
|
|
868
|
+
message: tag(`totem block embedded in a user-modified ${label} at ${ctx.consumerPath} — cannot isolate it for comparison`),
|
|
869
|
+
remediation: `Re-run ${install} to restore the managed ${label}, or remove the local edits before the totem marker so it can be verified independently.`,
|
|
870
|
+
};
|
|
871
|
+
}
|
|
432
872
|
// ─── Shared filesystem helpers ──────────────────────────
|
|
873
|
+
/** Read a UTF-8 text file, or undefined on any read failure (honest-absent). */
|
|
874
|
+
function readFileText(absPath) {
|
|
875
|
+
try {
|
|
876
|
+
// totem-context: a runtime sensor must read the ACTUAL on-disk installed artifact (not the git-index version — a consumer's installed skill may be untracked), and this detector is synchronous by design (mirrors readPackageJson / isDirectory below); making one reader async would ripple through the whole pure detector.
|
|
877
|
+
return fs.readFileSync(absPath, 'utf-8');
|
|
878
|
+
// totem-context: a missing / unreadable artifact is the honest-absent signal the mechanical detector degrades to a skip on; rethrowing would force the caller to wrap a routine absence in try/catch.
|
|
879
|
+
}
|
|
880
|
+
catch {
|
|
881
|
+
return undefined;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
433
884
|
/**
|
|
434
885
|
* Read + JSON-parse a package.json into the loose {@link PackageJsonShape}.
|
|
435
886
|
* Returns undefined on any read / parse failure or a non-object payload —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parity-detect.js","sourceRoot":"","sources":["../src/parity-detect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,2DAA2D;AAE3D;;;GAGG;AACH,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,4EAA4E;AAC5E,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEhD,wGAAwG;AACxG,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAEtC,sFAAsF;AACtF,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAErC;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,cAAc,EAAE,iBAAiB,EAAE,sBAAsB,CAAU,CAAC;AAoCxF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAChC,GAAW,EACX,UAAqC,EAAE;IAEvC,6BAA6B;IAC7B,MAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAClD,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,UAAU,CAAC;IAEhD,8EAA8E;IAC9E,2EAA2E;IAC3E,iCAAiC;IACjC,MAAM,IAAI,GAAG,sBAAsB,CAAC,G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