@mmnto/totem 1.118.0 → 1.119.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.
Files changed (117) hide show
  1. package/dist/artifacts/admission.d.ts +12 -12
  2. package/dist/artifacts/verdict.d.ts +16 -16
  3. package/dist/compile-manifest.d.ts +89 -0
  4. package/dist/compile-manifest.d.ts.map +1 -1
  5. package/dist/compile-manifest.js +180 -31
  6. package/dist/compile-manifest.js.map +1 -1
  7. package/dist/compile-manifest.test.js +169 -1
  8. package/dist/compile-manifest.test.js.map +1 -1
  9. package/dist/compiler-schema.d.ts +1067 -0
  10. package/dist/compiler-schema.d.ts.map +1 -1
  11. package/dist/compiler-schema.js +204 -1
  12. package/dist/compiler-schema.js.map +1 -1
  13. package/dist/compiler-schema.test.js +92 -0
  14. package/dist/compiler-schema.test.js.map +1 -1
  15. package/dist/compiler.d.ts +2 -6
  16. package/dist/compiler.d.ts.map +1 -1
  17. package/dist/compiler.js +6 -17
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/freeze.d.ts +3 -3
  20. package/dist/index.d.ts +12 -3
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +6 -2
  23. package/dist/index.js.map +1 -1
  24. package/dist/ledger.d.ts +12 -12
  25. package/dist/lesson-format.d.ts +5 -2
  26. package/dist/lesson-format.d.ts.map +1 -1
  27. package/dist/lesson-format.js +16 -5
  28. package/dist/lesson-format.js.map +1 -1
  29. package/dist/lesson-format.test.js +11 -0
  30. package/dist/lesson-format.test.js.map +1 -1
  31. package/dist/regex-safety/apply-rules-bounded.d.ts +11 -0
  32. package/dist/regex-safety/apply-rules-bounded.d.ts.map +1 -1
  33. package/dist/regex-safety/apply-rules-bounded.js +59 -5
  34. package/dist/regex-safety/apply-rules-bounded.js.map +1 -1
  35. package/dist/regex-validation.d.ts +7 -0
  36. package/dist/regex-validation.d.ts.map +1 -0
  37. package/dist/regex-validation.js +32 -0
  38. package/dist/regex-validation.js.map +1 -0
  39. package/dist/rule-engine.d.ts +11 -1
  40. package/dist/rule-engine.d.ts.map +1 -1
  41. package/dist/rule-engine.js +125 -18
  42. package/dist/rule-engine.js.map +1 -1
  43. package/dist/spine/authored-rule.d.ts +669 -245
  44. package/dist/spine/authored-rule.d.ts.map +1 -1
  45. package/dist/spine/authored-rule.js +113 -27
  46. package/dist/spine/authored-rule.js.map +1 -1
  47. package/dist/spine/authored-rule.test.js +170 -4
  48. package/dist/spine/authored-rule.test.js.map +1 -1
  49. package/dist/spine/authoring-ledger.d.ts +69 -10
  50. package/dist/spine/authoring-ledger.d.ts.map +1 -1
  51. package/dist/spine/authoring-ledger.js +46 -25
  52. package/dist/spine/authoring-ledger.js.map +1 -1
  53. package/dist/spine/authoring-ledger.test.js +20 -7
  54. package/dist/spine/authoring-ledger.test.js.map +1 -1
  55. package/dist/spine/candidate-rule.d.ts +18 -1
  56. package/dist/spine/candidate-rule.d.ts.map +1 -1
  57. package/dist/spine/candidate-rule.js.map +1 -1
  58. package/dist/spine/cert-corpus-seed.d.ts +8 -8
  59. package/dist/spine/compile.d.ts +4 -1
  60. package/dist/spine/compile.d.ts.map +1 -1
  61. package/dist/spine/compile.js +50 -3
  62. package/dist/spine/compile.js.map +1 -1
  63. package/dist/spine/compile.test.js +189 -23
  64. package/dist/spine/compile.test.js.map +1 -1
  65. package/dist/spine/frozen-split.d.ts +18 -18
  66. package/dist/spine/ledgers.d.ts +24 -24
  67. package/dist/spine/lf-normalize.d.ts +9 -0
  68. package/dist/spine/lf-normalize.d.ts.map +1 -0
  69. package/dist/spine/lf-normalize.js +38 -0
  70. package/dist/spine/lf-normalize.js.map +1 -0
  71. package/dist/spine/preimage-differential.d.ts +3 -1
  72. package/dist/spine/preimage-differential.d.ts.map +1 -1
  73. package/dist/spine/preimage-differential.js +9 -6
  74. package/dist/spine/preimage-differential.js.map +1 -1
  75. package/dist/spine/preimage-differential.test.js +59 -0
  76. package/dist/spine/preimage-differential.test.js.map +1 -1
  77. package/dist/spine/record-exemplars.fixture.d.ts +5 -0
  78. package/dist/spine/record-exemplars.fixture.d.ts.map +1 -0
  79. package/dist/spine/record-exemplars.fixture.js +61 -0
  80. package/dist/spine/record-exemplars.fixture.js.map +1 -0
  81. package/dist/spine/record-lower.d.ts +90 -0
  82. package/dist/spine/record-lower.d.ts.map +1 -0
  83. package/dist/spine/record-lower.js +418 -0
  84. package/dist/spine/record-lower.js.map +1 -0
  85. package/dist/spine/record-lower.test.d.ts +2 -0
  86. package/dist/spine/record-lower.test.d.ts.map +1 -0
  87. package/dist/spine/record-lower.test.js +562 -0
  88. package/dist/spine/record-lower.test.js.map +1 -0
  89. package/dist/spine/record-runtime.d.ts +215 -0
  90. package/dist/spine/record-runtime.d.ts.map +1 -0
  91. package/dist/spine/record-runtime.js +330 -0
  92. package/dist/spine/record-runtime.js.map +1 -0
  93. package/dist/spine/record-runtime.test.d.ts +2 -0
  94. package/dist/spine/record-runtime.test.d.ts.map +1 -0
  95. package/dist/spine/record-runtime.test.js +814 -0
  96. package/dist/spine/record-runtime.test.js.map +1 -0
  97. package/dist/spine/rule-record.d.ts +864 -0
  98. package/dist/spine/rule-record.d.ts.map +1 -0
  99. package/dist/spine/rule-record.js +781 -0
  100. package/dist/spine/rule-record.js.map +1 -0
  101. package/dist/spine/rule-record.test.d.ts +2 -0
  102. package/dist/spine/rule-record.test.d.ts.map +1 -0
  103. package/dist/spine/rule-record.test.js +1262 -0
  104. package/dist/spine/rule-record.test.js.map +1 -0
  105. package/dist/spine/windtunnel-firing.d.ts.map +1 -1
  106. package/dist/spine/windtunnel-firing.js +28 -1
  107. package/dist/spine/windtunnel-firing.js.map +1 -1
  108. package/dist/spine/windtunnel-lock.d.ts +10 -10
  109. package/dist/stage4-verifier.d.ts.map +1 -1
  110. package/dist/stage4-verifier.js +61 -17
  111. package/dist/stage4-verifier.js.map +1 -1
  112. package/dist/sys/glob.d.ts +30 -0
  113. package/dist/sys/glob.d.ts.map +1 -1
  114. package/dist/sys/glob.js +62 -1
  115. package/dist/sys/glob.js.map +1 -1
  116. package/dist/types.d.ts +1 -1
  117. package/package.json +1 -1
@@ -56,13 +56,13 @@ export declare const AdmissionScopeSchema: z.ZodObject<{
56
56
  head: z.ZodNullable<z.ZodString>;
57
57
  selectorForm: z.ZodNullable<z.ZodString>;
58
58
  }, "strict", z.ZodTypeAny, {
59
- head: string | null;
60
59
  source: "explicit-range" | "staged" | "uncommitted" | "branch-vs-base" | "none";
60
+ head: string | null;
61
61
  base: string | null;
62
62
  selectorForm: string | null;
63
63
  }, {
64
- head: string | null;
65
64
  source: "explicit-range" | "staged" | "uncommitted" | "branch-vs-base" | "none";
65
+ head: string | null;
66
66
  base: string | null;
67
67
  selectorForm: string | null;
68
68
  }>;
@@ -124,13 +124,13 @@ export declare const AdmissionRecordSchema: z.ZodObject<{
124
124
  head: z.ZodNullable<z.ZodString>;
125
125
  selectorForm: z.ZodNullable<z.ZodString>;
126
126
  }, "strict", z.ZodTypeAny, {
127
- head: string | null;
128
127
  source: "explicit-range" | "staged" | "uncommitted" | "branch-vs-base" | "none";
128
+ head: string | null;
129
129
  base: string | null;
130
130
  selectorForm: string | null;
131
131
  }, {
132
- head: string | null;
133
132
  source: "explicit-range" | "staged" | "uncommitted" | "branch-vs-base" | "none";
133
+ head: string | null;
134
134
  base: string | null;
135
135
  selectorForm: string | null;
136
136
  }>;
@@ -149,29 +149,29 @@ export declare const AdmissionRecordSchema: z.ZodObject<{
149
149
  skippedFileCount: z.ZodNumber;
150
150
  }, "strip", z.ZodTypeAny, {
151
151
  createdAt: string;
152
- reason: "no-diff" | "all-non-code" | "filtered-empty" | "all-generated";
153
- schemaVersion: string;
154
- inputHash: string;
155
152
  scope: {
156
- head: string | null;
157
153
  source: "explicit-range" | "staged" | "uncommitted" | "branch-vs-base" | "none";
154
+ head: string | null;
158
155
  base: string | null;
159
156
  selectorForm: string | null;
160
157
  };
158
+ reason: "no-diff" | "all-non-code" | "filtered-empty" | "all-generated";
159
+ schemaVersion: string;
160
+ inputHash: string;
161
161
  disposition: "not-applicable";
162
162
  projectionPolicyHash: string;
163
163
  skippedFileCount: number;
164
164
  }, {
165
165
  createdAt: string;
166
- reason: "no-diff" | "all-non-code" | "filtered-empty" | "all-generated";
167
- schemaVersion: string;
168
- inputHash: string;
169
166
  scope: {
170
- head: string | null;
171
167
  source: "explicit-range" | "staged" | "uncommitted" | "branch-vs-base" | "none";
168
+ head: string | null;
172
169
  base: string | null;
173
170
  selectorForm: string | null;
174
171
  };
172
+ reason: "no-diff" | "all-non-code" | "filtered-empty" | "all-generated";
173
+ schemaVersion: string;
174
+ inputHash: string;
175
175
  disposition: "not-applicable";
176
176
  projectionPolicyHash: string;
177
177
  skippedFileCount: number;
@@ -76,13 +76,13 @@ export declare const VerdictDiffScopeSchema: z.ZodDiscriminatedUnion<"source", [
76
76
  base: z.ZodString;
77
77
  head: z.ZodString;
78
78
  }, "strip", z.ZodTypeAny, {
79
- head: string;
80
79
  source: "explicit-range";
80
+ head: string;
81
81
  diffHash: string;
82
82
  base: string;
83
83
  }, {
84
- head: string;
85
84
  source: "explicit-range";
85
+ head: string;
86
86
  diffHash: string;
87
87
  base: string;
88
88
  }>, z.ZodObject<{
@@ -319,14 +319,14 @@ export declare const VerdictFindingSchema: z.ZodObject<{
319
319
  message: string;
320
320
  severity: "CRITICAL" | "WARN" | "INFO";
321
321
  confidence?: number | undefined;
322
- file?: string | undefined;
323
322
  line?: number | undefined;
323
+ file?: string | undefined;
324
324
  }, {
325
325
  message: string;
326
326
  severity: "CRITICAL" | "WARN" | "INFO";
327
327
  confidence?: number | undefined;
328
- file?: string | undefined;
329
328
  line?: number | undefined;
329
+ file?: string | undefined;
330
330
  }>;
331
331
  export type VerdictFinding = z.infer<typeof VerdictFindingSchema>;
332
332
  /**
@@ -522,13 +522,13 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
522
522
  base: z.ZodString;
523
523
  head: z.ZodString;
524
524
  }, "strip", z.ZodTypeAny, {
525
- head: string;
526
525
  source: "explicit-range";
526
+ head: string;
527
527
  diffHash: string;
528
528
  base: string;
529
529
  }, {
530
- head: string;
531
530
  source: "explicit-range";
531
+ head: string;
532
532
  diffHash: string;
533
533
  base: string;
534
534
  }>, z.ZodObject<{
@@ -704,14 +704,14 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
704
704
  message: string;
705
705
  severity: "CRITICAL" | "WARN" | "INFO";
706
706
  confidence?: number | undefined;
707
- file?: string | undefined;
708
707
  line?: number | undefined;
708
+ file?: string | undefined;
709
709
  }, {
710
710
  message: string;
711
711
  severity: "CRITICAL" | "WARN" | "INFO";
712
712
  confidence?: number | undefined;
713
- file?: string | undefined;
714
713
  line?: number | undefined;
714
+ file?: string | undefined;
715
715
  }>, "many">;
716
716
  /** A SINGLE top-level panel-diversity summary (classifyDiversity output) — present only with a panel; NEVER mirrored per finding. */
717
717
  diversity: z.ZodOptional<z.ZodObject<{
@@ -806,8 +806,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
806
806
  }, "strip", z.ZodTypeAny, {
807
807
  createdAt: string;
808
808
  diffScope: {
809
- head: string;
810
809
  source: "explicit-range";
810
+ head: string;
811
811
  diffHash: string;
812
812
  base: string;
813
813
  } | {
@@ -850,8 +850,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
850
850
  message: string;
851
851
  severity: "CRITICAL" | "WARN" | "INFO";
852
852
  confidence?: number | undefined;
853
- file?: string | undefined;
854
853
  line?: number | undefined;
854
+ file?: string | undefined;
855
855
  }[];
856
856
  attemptedLaneCount: number;
857
857
  completedLaneCount: number;
@@ -887,8 +887,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
887
887
  }, {
888
888
  createdAt: string;
889
889
  diffScope: {
890
- head: string;
891
890
  source: "explicit-range";
891
+ head: string;
892
892
  diffHash: string;
893
893
  base: string;
894
894
  } | {
@@ -931,8 +931,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
931
931
  message: string;
932
932
  severity: "CRITICAL" | "WARN" | "INFO";
933
933
  confidence?: number | undefined;
934
- file?: string | undefined;
935
934
  line?: number | undefined;
935
+ file?: string | undefined;
936
936
  }[];
937
937
  attemptedLaneCount: number;
938
938
  completedLaneCount: number;
@@ -968,8 +968,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
968
968
  }>, {
969
969
  createdAt: string;
970
970
  diffScope: {
971
- head: string;
972
971
  source: "explicit-range";
972
+ head: string;
973
973
  diffHash: string;
974
974
  base: string;
975
975
  } | {
@@ -1012,8 +1012,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
1012
1012
  message: string;
1013
1013
  severity: "CRITICAL" | "WARN" | "INFO";
1014
1014
  confidence?: number | undefined;
1015
- file?: string | undefined;
1016
1015
  line?: number | undefined;
1016
+ file?: string | undefined;
1017
1017
  }[];
1018
1018
  attemptedLaneCount: number;
1019
1019
  completedLaneCount: number;
@@ -1049,8 +1049,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
1049
1049
  }, {
1050
1050
  createdAt: string;
1051
1051
  diffScope: {
1052
- head: string;
1053
1052
  source: "explicit-range";
1053
+ head: string;
1054
1054
  diffHash: string;
1055
1055
  base: string;
1056
1056
  } | {
@@ -1093,8 +1093,8 @@ export declare const VerdictArtifactSchema: z.ZodEffects<z.ZodObject<{
1093
1093
  message: string;
1094
1094
  severity: "CRITICAL" | "WARN" | "INFO";
1095
1095
  confidence?: number | undefined;
1096
- file?: string | undefined;
1097
1096
  line?: number | undefined;
1097
+ file?: string | undefined;
1098
1098
  }[];
1099
1099
  attemptedLaneCount: number;
1100
1100
  completedLaneCount: number;
@@ -6,6 +6,18 @@ export declare const CompileManifestSchema: z.ZodObject<{
6
6
  output_hash: z.ZodString;
7
7
  rule_count: z.ZodNumber;
8
8
  compile_worker_fingerprint: z.ZodOptional<z.ZodString>;
9
+ /**
10
+ * Prop 310 § Design 1 — the aggregate attestation over the RECORD file class
11
+ * (`<totemDir>/rules/**\/*.rule.yaml`), computed by `generateRecordsHash`.
12
+ *
13
+ * OPTIONAL, per the slice-3 OQ-3 ruling: absence is legal IFF zero record files
14
+ * exist on disk (the state every pre-Prop-310 manifest is in), so no shipped
15
+ * manifest needs a hand-edit and downstream manifests keep verifying. The first
16
+ * record landing forces attestation — `verify-manifest` hard-FAILS on records
17
+ * present with no `records_hash` ("unattested file class"), and hard-FAILS on a
18
+ * mismatch. Neither ever takes the freeze WARN-downgrade, which is input-hash-only.
19
+ */
20
+ records_hash: z.ZodOptional<z.ZodString>;
9
21
  }, "strip", z.ZodTypeAny, {
10
22
  model: string;
11
23
  compiled_at: string;
@@ -13,6 +25,7 @@ export declare const CompileManifestSchema: z.ZodObject<{
13
25
  output_hash: string;
14
26
  rule_count: number;
15
27
  compile_worker_fingerprint?: string | undefined;
28
+ records_hash?: string | undefined;
16
29
  }, {
17
30
  model: string;
18
31
  compiled_at: string;
@@ -20,6 +33,7 @@ export declare const CompileManifestSchema: z.ZodObject<{
20
33
  output_hash: string;
21
34
  rule_count: number;
22
35
  compile_worker_fingerprint?: string | undefined;
36
+ records_hash?: string | undefined;
23
37
  }>;
24
38
  export type CompileManifest = z.infer<typeof CompileManifestSchema>;
25
39
  /**
@@ -40,6 +54,81 @@ export type CompileManifest = z.infer<typeof CompileManifestSchema>;
40
54
  * so the default no-arg form is byte-for-byte unchanged.
41
55
  */
42
56
  export declare function generateInputHash(lessonsDir: string, repoCwd?: string): string;
57
+ /** `.totem`-relative directory the Prop 310 rule records live in (§ Design 1). */
58
+ export declare const RECORDS_DIR_REL = "rules";
59
+ /** The double extension § Design 1 rules: `*.rule.yaml`, never a bare `*.yaml`. */
60
+ export declare const RECORD_FILE_SUFFIX = ".rule.yaml";
61
+ /**
62
+ * The `records_hash` of an EMPTY record set — sha256 over nothing, the value
63
+ * `generateRecordsHash` returns when `<totemDir>/rules/` is absent or holds no
64
+ * `*.rule.yaml`. COMPUTED, never a transcribed literal: a hand-copied digest is a
65
+ * mirror that can be typo'd, and this constant is what the OQ-3 "records: none"
66
+ * verdict and the cross-platform stability test both bind to.
67
+ */
68
+ export declare const EMPTY_RECORDS_HASH: string;
69
+ /**
70
+ * Enumerate the record files under `rulesDir`, sorted, '/'-separated, restricted
71
+ * to the git-tracked set when `repoCwd` resolves inside a repo (the same
72
+ * producer/consumer symmetry `generateInputHash` documents). Returns `[]` when the
73
+ * directory does not exist — an absent record class is the pre-Prop-310 state, not
74
+ * an error, which is the one place this differs from the lesson class.
75
+ *
76
+ * GIT-TRACKED, not "on disk": inside a repo an UNTRACKED `*.rule.yaml` is neither
77
+ * hashed nor counted, exactly as an untracked lesson is not. That is what keeps a
78
+ * draft record from diverging the attestation and blocking an unrelated push — and
79
+ * it is why every surface that reports on this class says "git-tracked" rather
80
+ * than "on disk". Outside a repo (or when git is unavailable) the restriction
81
+ * degrades to the plain fs walk, so the no-`repoCwd` form stays pure.
82
+ *
83
+ * Prefer `listRecordFilesUnder(totemDir, repoCwd)` at call sites that hold a
84
+ * `.totem` dir: it single-homes the `rules/` join with `attestRecordsHash`.
85
+ */
86
+ export declare function listRecordFiles(rulesDir: string, repoCwd?: string): string[];
87
+ /**
88
+ * Generate the deterministic sha256 attestation over the Prop 310 record file
89
+ * class — the same rolling `${relPath}\n${lfContent}\n` method `generateInputHash`
90
+ * uses over lessons, so the two attestations are path-AND-content sensitive in
91
+ * exactly the same way: one edited byte, one added, removed, or renamed record all
92
+ * move it. Absent directory ⇒ `EMPTY_RECORDS_HASH`.
93
+ */
94
+ export declare function generateRecordsHash(rulesDir: string, repoCwd?: string): string;
95
+ /**
96
+ * The ONE call every `writeCompileManifest` caller makes to attest the record
97
+ * class, given the `.totem` directory. Single-homed so six writer sites cannot
98
+ * disagree about where records live or how they are hashed (Tenet 20).
99
+ */
100
+ export declare function attestRecordsHash(totemDir: string, repoCwd?: string): string;
101
+ /**
102
+ * The record files the attestation covers, given the `.totem` dir — the READ-side
103
+ * twin of `attestRecordsHash`, over exactly the same directory and exactly the
104
+ * same tracked-set restriction.
105
+ *
106
+ * `verify-manifest` and `compile --refresh-manifest` need the COUNT, not the hash,
107
+ * to decide the OQ-3 verdict ("absent `records_hash` is OK iff zero records"), and
108
+ * they must be asking about the same set the writer hashed. Deciding it by
109
+ * comparing against `EMPTY_RECORDS_HASH` would infer a file count from a digest;
110
+ * re-deriving the directory at each call site would give the two surfaces two
111
+ * chances to disagree.
112
+ */
113
+ export declare function listRecordFilesUnder(totemDir: string, repoCwd?: string): string[];
114
+ /**
115
+ * The OQ-3 freshness predicate: is a manifest's `records_hash` still an honest
116
+ * statement about the record class on disk?
117
+ *
118
+ * TRUE when the field is ABSENT and zero git-tracked records exist (the
119
+ * pre-Prop-310 state the ruling keeps legal), or when it is PRESENT and equals
120
+ * the current attestation. FALSE otherwise — which is exactly the pair of
121
+ * conditions `verify-manifest` hard-FAILs on ("unattested file class" and
122
+ * "records hash mismatch").
123
+ *
124
+ * Single-homed because THREE surfaces have to agree about it: the verifier, the
125
+ * `--refresh-manifest` no-LLM path, and the ordinary compile no-op path. Two of
126
+ * them re-deriving the rule independently is how a writer comes to think a
127
+ * manifest is fresh that the verifier then rejects — the exact divergence bot
128
+ * round 1 found (B-1), where a record-only change left the no-op path convinced
129
+ * nothing needed rewriting.
130
+ */
131
+ export declare function isRecordsAttestationFresh(existingRecordsHash: string | undefined, totemDir: string, repoCwd?: string): boolean;
43
132
  /**
44
133
  * Recursively shape an object tree so every nested record's keys are sorted
45
134
  * lexicographically and `undefined` properties are dropped. Pure data
@@ -1 +1 @@
1
- {"version":3,"file":"compile-manifest.d.ts","sourceRoot":"","sources":["../src/compile-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC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C;AAE5E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAO5E;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ9E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5E;AAaD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAEjF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAKT;AAmDD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAUxD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAyB1E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAuC5D;AAMD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAW1F;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,CA6BzE"}
@@ -16,29 +16,95 @@ export const CompileManifestSchema = z.object({
16
16
  // Optional for backward-compat with pre-#1937 manifests; only the anthropic
17
17
  // provider populates it in Phase 1. Per Proposal 278 § Action 3.
18
18
  compile_worker_fingerprint: z.string().optional(),
19
+ /**
20
+ * Prop 310 § Design 1 — the aggregate attestation over the RECORD file class
21
+ * (`<totemDir>/rules/**\/*.rule.yaml`), computed by `generateRecordsHash`.
22
+ *
23
+ * OPTIONAL, per the slice-3 OQ-3 ruling: absence is legal IFF zero record files
24
+ * exist on disk (the state every pre-Prop-310 manifest is in), so no shipped
25
+ * manifest needs a hand-edit and downstream manifests keep verifying. The first
26
+ * record landing forces attestation — `verify-manifest` hard-FAILS on records
27
+ * present with no `records_hash` ("unattested file class"), and hard-FAILS on a
28
+ * mismatch. Neither ever takes the freeze WARN-downgrade, which is input-hash-only.
29
+ */
30
+ records_hash: z.string().optional(),
19
31
  });
20
32
  // ─── Hashing ─────────────────────────────────────────
21
33
  /**
22
- * Walk a directory recursively and collect all `.md` file paths
23
- * relative to `baseDir`, sorted alphabetically.
34
+ * Walk a directory recursively and collect every file path ending in `suffix`,
35
+ * relative to `baseDir`, '/'-separated. UNSORTED (callers sort).
36
+ *
37
+ * Generalised from the `.md`-only walk by Prop 310 slice 3 so the record file
38
+ * class (`*.rule.yaml`) is attested by the SAME collector the lesson class uses —
39
+ * a second walk would be the mirror that silently drifts on the next fix. The
40
+ * missing-directory throw is the lesson class's contract and is kept exactly:
41
+ * `collectMdFiles` is the thin wrapper below, so `generateInputHash` is unchanged.
24
42
  */
25
- function collectMdFiles(baseDir, currentDir = baseDir) {
26
- if (!fs.existsSync(baseDir)) {
27
- throw new TotemParseError(`Lessons directory not found: ${baseDir}`, 'Run "totem sync" or create .totem/lessons/ with lesson files.');
28
- }
43
+ function collectFilesWithSuffix(baseDir, suffix, currentDir = baseDir) {
29
44
  const entries = fs.readdirSync(currentDir, { withFileTypes: true });
30
45
  const results = [];
31
46
  for (const entry of entries) {
32
47
  const fullPath = path.join(currentDir, entry.name);
33
48
  if (entry.isDirectory()) {
34
- results.push(...collectMdFiles(baseDir, fullPath));
49
+ results.push(...collectFilesWithSuffix(baseDir, suffix, fullPath));
35
50
  }
36
- else if (entry.isFile() && entry.name.endsWith('.md')) {
51
+ else if (entry.isFile() && entry.name.endsWith(suffix)) {
37
52
  results.push(path.relative(baseDir, fullPath).replace(/\\/g, '/'));
38
53
  }
39
54
  }
40
55
  return results;
41
56
  }
57
+ /**
58
+ * Walk a directory recursively and collect all `.md` file paths
59
+ * relative to `baseDir`, sorted alphabetically.
60
+ */
61
+ function collectMdFiles(baseDir) {
62
+ if (!fs.existsSync(baseDir)) {
63
+ throw new TotemParseError(`Lessons directory not found: ${baseDir}`, 'Run "totem sync" or create .totem/lessons/ with lesson files.');
64
+ }
65
+ return collectFilesWithSuffix(baseDir, '.md');
66
+ }
67
+ /**
68
+ * Restrict a collected relative-path list to the git-tracked subset when
69
+ * `repoCwd` resolves inside a git repository; outside one (or when git is
70
+ * unavailable) the list passes through unchanged.
71
+ *
72
+ * Single-homed across both hashed file classes so lessons and records can never
73
+ * disagree about what "tracked" means (see `generateInputHash`'s own note for
74
+ * why tracked-only is the producer/consumer-symmetric answer).
75
+ */
76
+ function restrictToTracked(files, baseDir, repoCwd) {
77
+ if (repoCwd === undefined)
78
+ return files;
79
+ const tracked = listTrackedFilesUnder(repoCwd, baseDir);
80
+ if (tracked === null)
81
+ return files;
82
+ // Both collectors and `listTrackedFilesUnder` emit '/'-separated paths, so the
83
+ // membership test already agrees cross-platform. Normalize the comparison key
84
+ // anyway so this filter never silently depends on a distant function preserving
85
+ // that invariant — a no-op on forward-slash input.
86
+ return files.filter((relPath) => tracked.has(relPath.replace(/\\/g, '/')));
87
+ }
88
+ /**
89
+ * Roll a deterministic sha256 over `${relPath}\n${lfContent}\n` for each file, in
90
+ * the given order. The one hashing method both attested file classes use.
91
+ */
92
+ function rollingContentHash(baseDir, files, onReadError) {
93
+ const hash = crypto.createHash('sha256');
94
+ for (const relPath of files) {
95
+ try {
96
+ const content = fs.readFileSync(path.join(baseDir, relPath), 'utf-8').replace(/\r\n/g, '\n');
97
+ hash.update(`${relPath}\n${content}\n`);
98
+ }
99
+ catch (err) {
100
+ // `throw`n, not merely called: `onReadError` returns `never`, and writing the
101
+ // throw here keeps this catch visibly non-swallowing (Tenet 4) instead of
102
+ // hiding the rethrow behind a callback.
103
+ throw onReadError(relPath, err);
104
+ }
105
+ }
106
+ return hash.digest('hex');
107
+ }
42
108
  /**
43
109
  * Generate a deterministic SHA-256 hash of `.md` lesson files in a directory.
44
110
  *
@@ -57,30 +123,113 @@ function collectMdFiles(baseDir, currentDir = baseDir) {
57
123
  * so the default no-arg form is byte-for-byte unchanged.
58
124
  */
59
125
  export function generateInputHash(lessonsDir, repoCwd) {
60
- let files = collectMdFiles(lessonsDir).sort();
61
- if (repoCwd !== undefined) {
62
- const tracked = listTrackedFilesUnder(repoCwd, lessonsDir);
63
- if (tracked !== null) {
64
- // collectMdFiles and listTrackedFilesUnder both emit '/'-separated paths,
65
- // so the membership test already agrees cross-platform. Normalize the
66
- // comparison key anyway so this filter never silently depends on a distant
67
- // function preserving that invariant — a no-op on forward-slash input.
68
- files = files.filter((relPath) => tracked.has(relPath.replace(/\\/g, '/')));
69
- }
70
- }
71
- const hash = crypto.createHash('sha256');
72
- for (const relPath of files) {
73
- try {
74
- const content = fs
75
- .readFileSync(path.join(lessonsDir, relPath), 'utf-8')
76
- .replace(/\r\n/g, '\n');
77
- hash.update(`${relPath}\n${content}\n`);
78
- }
79
- catch (err) {
80
- throw new TotemParseError(`Cannot read lesson file ${relPath}: ${getErrorMessage(err)}`, 'Ensure all lesson files in .totem/lessons/ are readable.', err);
81
- }
126
+ const files = restrictToTracked(collectMdFiles(lessonsDir).sort(), lessonsDir, repoCwd);
127
+ return rollingContentHash(lessonsDir, files, (relPath, err) => {
128
+ throw new TotemParseError(`Cannot read lesson file ${relPath}: ${getErrorMessage(err)}`, 'Ensure all lesson files in .totem/lessons/ are readable.', err);
129
+ });
130
+ }
131
+ // ─── Prop 310 § Design 1 the RECORD file class ─────────────────────────────
132
+ /** `.totem`-relative directory the Prop 310 rule records live in Design 1). */
133
+ export const RECORDS_DIR_REL = 'rules';
134
+ /** The double extension § Design 1 rules: `*.rule.yaml`, never a bare `*.yaml`. */
135
+ export const RECORD_FILE_SUFFIX = '.rule.yaml';
136
+ /**
137
+ * The `records_hash` of an EMPTY record set — sha256 over nothing, the value
138
+ * `generateRecordsHash` returns when `<totemDir>/rules/` is absent or holds no
139
+ * `*.rule.yaml`. COMPUTED, never a transcribed literal: a hand-copied digest is a
140
+ * mirror that can be typo'd, and this constant is what the OQ-3 "records: none"
141
+ * verdict and the cross-platform stability test both bind to.
142
+ */
143
+ export const EMPTY_RECORDS_HASH = crypto.createHash('sha256').digest('hex');
144
+ /**
145
+ * Enumerate the record files under `rulesDir`, sorted, '/'-separated, restricted
146
+ * to the git-tracked set when `repoCwd` resolves inside a repo (the same
147
+ * producer/consumer symmetry `generateInputHash` documents). Returns `[]` when the
148
+ * directory does not exist — an absent record class is the pre-Prop-310 state, not
149
+ * an error, which is the one place this differs from the lesson class.
150
+ *
151
+ * GIT-TRACKED, not "on disk": inside a repo an UNTRACKED `*.rule.yaml` is neither
152
+ * hashed nor counted, exactly as an untracked lesson is not. That is what keeps a
153
+ * draft record from diverging the attestation and blocking an unrelated push — and
154
+ * it is why every surface that reports on this class says "git-tracked" rather
155
+ * than "on disk". Outside a repo (or when git is unavailable) the restriction
156
+ * degrades to the plain fs walk, so the no-`repoCwd` form stays pure.
157
+ *
158
+ * Prefer `listRecordFilesUnder(totemDir, repoCwd)` at call sites that hold a
159
+ * `.totem` dir: it single-homes the `rules/` join with `attestRecordsHash`.
160
+ */
161
+ export function listRecordFiles(rulesDir, repoCwd) {
162
+ if (!fs.existsSync(rulesDir))
163
+ return [];
164
+ return restrictToTracked(collectFilesWithSuffix(rulesDir, RECORD_FILE_SUFFIX).sort(), rulesDir, repoCwd);
165
+ }
166
+ /**
167
+ * Generate the deterministic sha256 attestation over the Prop 310 record file
168
+ * class — the same rolling `${relPath}\n${lfContent}\n` method `generateInputHash`
169
+ * uses over lessons, so the two attestations are path-AND-content sensitive in
170
+ * exactly the same way: one edited byte, one added, removed, or renamed record all
171
+ * move it. Absent directory ⇒ `EMPTY_RECORDS_HASH`.
172
+ */
173
+ export function generateRecordsHash(rulesDir, repoCwd) {
174
+ return rollingContentHash(rulesDir, listRecordFiles(rulesDir, repoCwd), (relPath, err) => {
175
+ throw new TotemParseError(`Cannot read rule record ${relPath}: ${getErrorMessage(err)}`, `Ensure all record files in ${RECORDS_DIR_REL}/ are readable.`, err);
176
+ });
177
+ }
178
+ /**
179
+ * The ONE call every `writeCompileManifest` caller makes to attest the record
180
+ * class, given the `.totem` directory. Single-homed so six writer sites cannot
181
+ * disagree about where records live or how they are hashed (Tenet 20).
182
+ */
183
+ export function attestRecordsHash(totemDir, repoCwd) {
184
+ return generateRecordsHash(recordsDirOf(totemDir), repoCwd);
185
+ }
186
+ /**
187
+ * The record directory for a `.totem` dir — the ONE home of the
188
+ * `join(totemDir, RECORDS_DIR_REL)` join. Kept private on purpose: callers ask
189
+ * `attestRecordsHash` for the hash and `listRecordFilesUnder` for the file set, so
190
+ * neither the writer nor the verifier re-derives the path and they cannot drift
191
+ * apart about where records live (Tenet 20).
192
+ */
193
+ function recordsDirOf(totemDir) {
194
+ return path.join(totemDir, RECORDS_DIR_REL);
195
+ }
196
+ /**
197
+ * The record files the attestation covers, given the `.totem` dir — the READ-side
198
+ * twin of `attestRecordsHash`, over exactly the same directory and exactly the
199
+ * same tracked-set restriction.
200
+ *
201
+ * `verify-manifest` and `compile --refresh-manifest` need the COUNT, not the hash,
202
+ * to decide the OQ-3 verdict ("absent `records_hash` is OK iff zero records"), and
203
+ * they must be asking about the same set the writer hashed. Deciding it by
204
+ * comparing against `EMPTY_RECORDS_HASH` would infer a file count from a digest;
205
+ * re-deriving the directory at each call site would give the two surfaces two
206
+ * chances to disagree.
207
+ */
208
+ export function listRecordFilesUnder(totemDir, repoCwd) {
209
+ return listRecordFiles(recordsDirOf(totemDir), repoCwd);
210
+ }
211
+ /**
212
+ * The OQ-3 freshness predicate: is a manifest's `records_hash` still an honest
213
+ * statement about the record class on disk?
214
+ *
215
+ * TRUE when the field is ABSENT and zero git-tracked records exist (the
216
+ * pre-Prop-310 state the ruling keeps legal), or when it is PRESENT and equals
217
+ * the current attestation. FALSE otherwise — which is exactly the pair of
218
+ * conditions `verify-manifest` hard-FAILs on ("unattested file class" and
219
+ * "records hash mismatch").
220
+ *
221
+ * Single-homed because THREE surfaces have to agree about it: the verifier, the
222
+ * `--refresh-manifest` no-LLM path, and the ordinary compile no-op path. Two of
223
+ * them re-deriving the rule independently is how a writer comes to think a
224
+ * manifest is fresh that the verifier then rejects — the exact divergence bot
225
+ * round 1 found (B-1), where a record-only change left the no-op path convinced
226
+ * nothing needed rewriting.
227
+ */
228
+ export function isRecordsAttestationFresh(existingRecordsHash, totemDir, repoCwd) {
229
+ if (existingRecordsHash === undefined) {
230
+ return listRecordFilesUnder(totemDir, repoCwd).length === 0;
82
231
  }
83
- return hash.digest('hex');
232
+ return existingRecordsHash === attestRecordsHash(totemDir, repoCwd);
84
233
  }
85
234
  /**
86
235
  * Deterministic JSON stringify. Walks the input tree and sorts every
@@ -1 +1 @@
1
- {"version":3,"file":"compile-manifest.js","sourceRoot":"","sources":["../src/compile-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,wDAAwD;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,WAAW,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