@mmnto/cli 2.1.0 → 2.2.1

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 (58) hide show
  1. package/dist/commands/doctor-parity-fetch.d.ts +93 -2
  2. package/dist/commands/doctor-parity-fetch.d.ts.map +1 -1
  3. package/dist/commands/doctor-parity-fetch.js +332 -11
  4. package/dist/commands/doctor-parity-fetch.js.map +1 -1
  5. package/dist/commands/doctor-parity-fetch.test.d.ts +6 -0
  6. package/dist/commands/doctor-parity-fetch.test.d.ts.map +1 -1
  7. package/dist/commands/doctor-parity-fetch.test.js +405 -1
  8. package/dist/commands/doctor-parity-fetch.test.js.map +1 -1
  9. package/dist/commands/doctor-parity.d.ts.map +1 -1
  10. package/dist/commands/doctor-parity.js +27 -1
  11. package/dist/commands/doctor-parity.js.map +1 -1
  12. package/dist/commands/doctor-parity.test.js +67 -0
  13. package/dist/commands/doctor-parity.test.js.map +1 -1
  14. package/dist/commands/eject-gate-needle.test.d.ts +2 -0
  15. package/dist/commands/eject-gate-needle.test.d.ts.map +1 -0
  16. package/dist/commands/eject-gate-needle.test.js +48 -0
  17. package/dist/commands/eject-gate-needle.test.js.map +1 -0
  18. package/dist/commands/eject.d.ts +10 -0
  19. package/dist/commands/eject.d.ts.map +1 -1
  20. package/dist/commands/eject.js +67 -12
  21. package/dist/commands/eject.js.map +1 -1
  22. package/dist/commands/eject.test.js +113 -0
  23. package/dist/commands/eject.test.js.map +1 -1
  24. package/dist/commands/gate-install.d.ts +55 -5
  25. package/dist/commands/gate-install.d.ts.map +1 -1
  26. package/dist/commands/gate-install.js +47 -34
  27. package/dist/commands/gate-install.js.map +1 -1
  28. package/dist/commands/gate-install.test.js +514 -56
  29. package/dist/commands/gate-install.test.js.map +1 -1
  30. package/dist/commands/gate.d.ts +24 -9
  31. package/dist/commands/gate.d.ts.map +1 -1
  32. package/dist/commands/gate.js +50 -18
  33. package/dist/commands/gate.js.map +1 -1
  34. package/dist/commands/gate.test.js +74 -3
  35. package/dist/commands/gate.test.js.map +1 -1
  36. package/dist/commands/host-hooks.d.ts +8 -2
  37. package/dist/commands/host-hooks.d.ts.map +1 -1
  38. package/dist/commands/host-hooks.js.map +1 -1
  39. package/dist/commands/init-templates.d.ts +4 -4
  40. package/dist/commands/init-templates.d.ts.map +1 -1
  41. package/dist/commands/init-templates.js +243 -63
  42. package/dist/commands/init-templates.js.map +1 -1
  43. package/dist/commands/init.d.ts.map +1 -1
  44. package/dist/commands/init.js +35 -17
  45. package/dist/commands/init.js.map +1 -1
  46. package/dist/commands/init.test.js +10 -0
  47. package/dist/commands/init.test.js.map +1 -1
  48. package/dist/commands/session-context-journal-select.test.d.ts +2 -0
  49. package/dist/commands/session-context-journal-select.test.d.ts.map +1 -0
  50. package/dist/commands/session-context-journal-select.test.js +95 -0
  51. package/dist/commands/session-context-journal-select.test.js.map +1 -0
  52. package/dist/commands/sync-labels-forms.test.d.ts +33 -0
  53. package/dist/commands/sync-labels-forms.test.d.ts.map +1 -0
  54. package/dist/commands/sync-labels-forms.test.js +325 -0
  55. package/dist/commands/sync-labels-forms.test.js.map +1 -0
  56. package/dist/index.js +2 -2
  57. package/dist/index.js.map +1 -1
  58. package/package.json +2 -2
@@ -24,8 +24,15 @@
24
24
  * JSON and NEVER spawn `gh`. The default spawns `gh api` via `safeExec` (arg
25
25
  * arrays, no `shell: true`, bounded timeout) — the git-subprocess pattern the
26
26
  * core detectors already use.
27
+ *
28
+ * The two 472-charter orientation rows (mmnto-ai/totem#2791) join the same
29
+ * family here: `gh-issue-label-canon` adds a paginated REST label walk plus the
30
+ * roster-wide canon text ({@link resolveLabelCanon}), and
31
+ * `gh-project-vocabulary` adds a second read-only transport ({@link GhGraphql})
32
+ * for the bound project's single-select fields. Both keep the §14 edges above:
33
+ * read-only, per-surface honest degradation, no retries, never partial.
27
34
  */
28
- import type { NetworkPostureRow, NetworkProbeRepoSnapshot, NetworkSurfaceOutcome } from '@mmnto/totem';
35
+ import type { NetworkPostureRow, NetworkProbeRepoSnapshot, NetworkSurfaceOutcome, NetworkSurfaceSnapshot } from '@mmnto/totem';
29
36
  /** Resolve a contract id to its network-posture row kind, or undefined when unregistered. */
30
37
  export declare function networkPostureRowFor(contractId: string): NetworkPostureRow | undefined;
31
38
  /** One fetched surface plus its outcome — what {@link GhFetch} returns. */
@@ -42,6 +49,14 @@ export interface GhFetchResult {
42
49
  * implementation; production omits it and the default spawns `gh api`.
43
50
  */
44
51
  export type GhFetch = (apiPath: string, cwd: string) => GhFetchResult;
52
+ /**
53
+ * Injectable GraphQL transport seam: issue one read-only `gh api graphql` query
54
+ * from `cwd`. Same degradation contract as {@link GhFetch} — a transport throw
55
+ * classifies through {@link classifyGhError}, and a 200 body carrying `errors`
56
+ * classifies through {@link classifyGraphqlBody} (GraphQL reports authorization
57
+ * and not-found failures in the BODY, not the HTTP status).
58
+ */
59
+ export type GhGraphql = (query: string, variables: Record<string, string | number>, cwd: string) => GhFetchResult;
45
60
  /** Injectable local-remote reader (default `git remote get-url origin`). */
46
61
  export type ReadRemote = (cwd: string) => string | undefined;
47
62
  /** One network-posture row present in the manifest (id-derived row kind + its consumers scope). */
@@ -59,8 +74,16 @@ export interface ResolveNetworkSnapshotsOptions {
59
74
  gitRoot: string;
60
75
  /** Optional cross-repo read set (`orient.parityProbeRepos`), each an `owner/repo` slug. */
61
76
  probeRepos?: string[];
77
+ /**
78
+ * The CURRENT repo's bound GH Project number (`orient.projectNumber`). Only
79
+ * the current repo's binding is locally derivable — a sibling's config is not
80
+ * a surface this checkout reads (mmnto-ai/totem#2791).
81
+ */
82
+ projectNumber?: number;
62
83
  /** Injectable transport (default spawns `gh api`). */
63
84
  ghFetch?: GhFetch;
85
+ /** Injectable GraphQL transport (default spawns `gh api graphql`). */
86
+ ghGraphql?: GhGraphql;
64
87
  /** Injectable local-remote reader (default reads `git remote get-url origin`). */
65
88
  readRemote?: ReadRemote;
66
89
  }
@@ -78,7 +101,75 @@ export declare function resolveNetworkSnapshots(options: ResolveNetworkSnapshots
78
101
  /**
79
102
  * Extract `owner/repo` from an ssh (`git@host:owner/repo.git`) or https
80
103
  * (`https://host/owner/repo.git`) remote URL, tolerating a trailing `.git` and
81
- * slashes. Returns undefined when no `owner/repo` pair resolves.
104
+ * slashes in either order (`…/totem.git/` too falsification pass 5, p5-F5).
105
+ * The HOST is not part of the result: a mirror at the same `owner/repo` path
106
+ * yields the same slug, the same host-blindness the cohort-id derivation has.
107
+ * Returns undefined when no `owner/repo` pair resolves.
82
108
  */
83
109
  export declare function slugFromRemoteUrl(remoteUrl: string | undefined): string | undefined;
110
+ /** Seams + anchor for {@link resolveLabelCanon}. */
111
+ export interface ResolveLabelCanonOptions {
112
+ /** The git root the local read is anchored at + `gh` runs in. */
113
+ gitRoot: string;
114
+ /**
115
+ * The current repo's `owner/repo` slug from its LOCAL `origin` remote (no
116
+ * network; {@link defaultCurrentSlug}). The local read is selected only when
117
+ * this is exactly the canon's `owner/repo` PATH ({@link LABEL_CANON_REPO};
118
+ * the host is not compared — a mirror at the same path reads locally, the
119
+ * same host-blindness the cohort-id derivation has, disclosed). A
120
+ * fork or a differently owned checkout — even one whose cohort id derives to
121
+ * `totem` from its package name or its directory — takes the canonical
122
+ * contents fetch, so a stale or edited local script can never pose as the
123
+ * canon (Greptile P1 on mmnto-ai/totem#2797). Absent ⇒ the fetch.
124
+ */
125
+ currentSlug?: string;
126
+ /** Transport for the canonical (non-canon-repo) read. Tests inject; production builds one. */
127
+ ghFetch?: GhFetch;
128
+ /** Test seam for the local read (default: UTF-8 `readFileSync`). */
129
+ readFile?: (absPath: string) => string;
130
+ }
131
+ /**
132
+ * Resolve the ROSTER-WIDE label canon: the TEXT of
133
+ * `mmnto-ai/totem:scripts/sync-labels.ps1`, plus a `detail` naming its
134
+ * provenance. In the canon repository's own checkout (origin exactly
135
+ * `mmnto-ai/totem`) the file is local (no network, no rate limit); every other
136
+ * checkout — every other cohort repo AND every fork — reads the canonical blob
137
+ * over the contents API and discloses the blob sha. Parsing happens in core
138
+ * (Tenet 20) — this only resolves TEXT. Never throws: an unreadable canon is a
139
+ * cannot-verify outcome.
140
+ */
141
+ export declare function resolveLabelCanon(options: ResolveLabelCanonOptions): NetworkSurfaceSnapshot;
142
+ /**
143
+ * Build the production {@link GhFetch} for callers OUTSIDE
144
+ * {@link resolveNetworkSnapshots} (e.g. the label-canon resolution in
145
+ * `doctor-parity.ts`). Async only because `safeExec` is lazily imported — the
146
+ * returned transport is synchronous, and NOTHING spawns until it is called, so
147
+ * a test that never calls it never touches `gh`.
148
+ */
149
+ export declare function defaultGhFetch(): Promise<GhFetch>;
150
+ /**
151
+ * The current repo's `owner/repo` slug from its LOCAL `origin` remote, for
152
+ * callers outside {@link resolveNetworkSnapshots} (the label-canon source
153
+ * selection in `doctor-parity.ts`). No network: one `git remote get-url`
154
+ * read, degraded to `undefined` when there is no remote, no git, or no
155
+ * parseable `owner/repo`. Async only for the lazy `safeExec` import.
156
+ */
157
+ export declare function defaultCurrentSlug(gitRoot: string): Promise<string | undefined>;
158
+ /**
159
+ * Classify a GraphQL 200 BODY (GraphQL reports authorization + not-found in the
160
+ * body, not the HTTP status). ANY `errors` entry is decisive: GraphQL returns
161
+ * partial data beside its errors (a nested FORBIDDEN, a node-limit hit, a
162
+ * SERVICE_UNAVAILABLE on one field), and a partial field list verdicted as if
163
+ * complete is a drift verdict on a cannot-verify read — the one outcome §14
164
+ * clause 2 forbids (falsification pass 1, F1: a FORBIDDEN body with a half-read
165
+ * project rendered "Priority: field absent"). Pure: no I/O, exported for test.
166
+ */
167
+ export declare function classifyGraphqlBody(body: unknown): GhFetchResult;
168
+ /**
169
+ * True when the label-canon row will verdict at least one roster repo — the
170
+ * gate on the roster-wide canon read (falsification pass 1, F7; pass 2, p2-F7).
171
+ * The SAME predicate core applies per repo (`consumers` undefined = every repo),
172
+ * so the canon is read exactly when some line will use it. Pure, exported for test.
173
+ */
174
+ export declare function labelCanonNeeded(rows: readonly NetworkRowSpec[], snapshots: readonly NetworkProbeRepoSnapshot[]): boolean;
84
175
  //# sourceMappingURL=doctor-parity-fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-parity-fetch.d.ts","sourceRoot":"","sources":["../../src/commands/doctor-parity-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EAExB,qBAAqB,EAEtB,MAAM,cAAc,CAAC;AAkBtB,6FAA6F;AAC7F,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAEtF;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,qBAAqB,CAAC;IAC/B,gDAAgD;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,aAAa,CAAC;AAEtE,4EAA4E;AAC5E,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;AAE7D,mGAAmG;AACnG,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,iBAAiB,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,mDAAmD;AACnD,MAAM,WAAW,8BAA8B;IAC7C,yFAAyF;IACzF,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kFAAkF;IAClF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AC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAGrF;AAyCD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,CAkChE;AAoBD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,cAAc,EAAE,EAC/B,SAAS,EAAE,SAAS,wBAAwB,EAAE,GAC7C,OAAO,CAMT"}
@@ -24,9 +24,38 @@
24
24
  * JSON and NEVER spawn `gh`. The default spawns `gh api` via `safeExec` (arg
25
25
  * arrays, no `shell: true`, bounded timeout) — the git-subprocess pattern the
26
26
  * core detectors already use.
27
+ *
28
+ * The two 472-charter orientation rows (mmnto-ai/totem#2791) join the same
29
+ * family here: `gh-issue-label-canon` adds a paginated REST label walk plus the
30
+ * roster-wide canon text ({@link resolveLabelCanon}), and
31
+ * `gh-project-vocabulary` adds a second read-only transport ({@link GhGraphql})
32
+ * for the bound project's single-select fields. Both keep the §14 edges above:
33
+ * read-only, per-surface honest degradation, no retries, never partial.
27
34
  */
35
+ import * as fs from 'node:fs';
36
+ import * as path from 'node:path';
28
37
  /** Bounded per-request `gh api` timeout (mirrors orient's GH adapters). */
29
38
  const GH_TIMEOUT_MS = 15_000;
39
+ /** Page size for the labels REST walk (the API max). */
40
+ const LABELS_PER_PAGE = 100;
41
+ /**
42
+ * Hard ceiling on the labels walk. Beyond it the WHOLE surface degrades to
43
+ * `error` — never a partial list (the rulesets-boundary precedent: an
44
+ * undercount would let the detector certify conformance from a truncated read).
45
+ */
46
+ const LABELS_MAX_PAGES = 10;
47
+ /** `first:` page size for the project single-select field read. */
48
+ const PROJECT_FIELDS_FIRST = 50;
49
+ /** The repo owning the canonical label script. */
50
+ const LABEL_CANON_REPO = 'mmnto-ai/totem';
51
+ /** The canonical label script's repo-relative path. */
52
+ const LABEL_CANON_PATH = 'scripts/sync-labels.ps1';
53
+ /** Detail prefix for a failed canonical (non-local) canon fetch. */
54
+ const LABEL_CANON_FETCH_PREFIX = `canonical fetch ${LABEL_CANON_REPO}:${LABEL_CANON_PATH}: `;
55
+ /** Short-sha length used in the canon's provenance detail. */
56
+ const CANON_SHA_LENGTH = 7;
57
+ /** Max chars of a GraphQL error message carried into a surface detail. */
58
+ const GRAPHQL_DETAIL_MAX = 120;
30
59
  /**
31
60
  * The registry mapping a capability-probe contract id to its network-posture
32
61
  * row kind (mirrors `capabilityProbesFor` with a `default: undefined` → the
@@ -38,22 +67,43 @@ const NETWORK_POSTURE_ROW_IDS = {
38
67
  'repo-merge-posture': 'repo-merge-posture',
39
68
  'repo-required-checks-posture': 'repo-required-checks-posture',
40
69
  'repo-branch-protection-posture': 'repo-branch-protection-posture',
70
+ 'gh-issue-label-canon': 'gh-issue-label-canon',
71
+ 'gh-project-vocabulary': 'gh-project-vocabulary',
41
72
  };
42
73
  /** Resolve a contract id to its network-posture row kind, or undefined when unregistered. */
43
74
  export function networkPostureRowFor(contractId) {
44
75
  return NETWORK_POSTURE_ROW_IDS[contractId];
45
76
  }
77
+ /** A zero need — the per-repo accumulator's starting point. */
78
+ function noSurfaceNeed() {
79
+ return {
80
+ repoSettings: false,
81
+ rulesets: false,
82
+ branchProtection: false,
83
+ labels: false,
84
+ projectFields: false,
85
+ };
86
+ }
87
+ /** True when at least one surface is needed. */
88
+ function anySurfaceNeeded(need) {
89
+ return (need.repoSettings || need.rulesets || need.branchProtection || need.labels || need.projectFields);
90
+ }
46
91
  /** Per-row surface requirements. */
47
92
  function surfaceNeedsFor(row) {
93
+ const need = noSurfaceNeed();
48
94
  switch (row) {
49
95
  case 'repo-merge-posture':
50
- return { repoSettings: true, rulesets: false, branchProtection: false };
96
+ return { ...need, repoSettings: true };
51
97
  case 'repo-required-checks-posture':
52
- return { repoSettings: false, rulesets: true, branchProtection: false };
98
+ return { ...need, rulesets: true };
53
99
  case 'repo-branch-protection-posture':
54
- return { repoSettings: false, rulesets: true, branchProtection: true };
100
+ return { ...need, rulesets: true, branchProtection: true };
101
+ case 'gh-issue-label-canon':
102
+ return { ...need, labels: true };
103
+ case 'gh-project-vocabulary':
104
+ return { ...need, projectFields: true };
55
105
  default:
56
- return { repoSettings: false, rulesets: false, branchProtection: false };
106
+ return need;
57
107
  }
58
108
  }
59
109
  /**
@@ -73,38 +123,71 @@ export async function resolveNetworkSnapshots(options) {
73
123
  // never invoked, so no `gh`/`git` subprocess runs.
74
124
  const { safeExec } = await import('@mmnto/totem');
75
125
  const ghFetch = options.ghFetch ?? makeDefaultGhFetch(safeExec);
126
+ const ghGraphql = options.ghGraphql ?? makeDefaultGhGraphql(safeExec);
76
127
  const readRemote = options.readRemote ?? makeDefaultReadRemote(safeExec);
77
128
  const roster = resolveRoster(options, readRemote);
78
129
  const snapshots = [];
79
130
  for (const entry of roster) {
80
131
  // Per-repo needed surfaces = union over the rows in scope for THIS repo
81
132
  // (a `consumers: [totem]` row contributes its surfaces only to totem).
82
- const need = { repoSettings: false, rulesets: false, branchProtection: false };
133
+ const need = noSurfaceNeed();
134
+ let vocabularyInScope = false;
83
135
  for (const spec of options.rows) {
84
136
  if (spec.consumers !== undefined && !spec.consumers.includes(entry.repoId))
85
137
  continue;
138
+ if (spec.row === 'gh-project-vocabulary')
139
+ vocabularyInScope = true;
86
140
  const rowNeed = surfaceNeedsFor(spec.row);
87
141
  need.repoSettings ||= rowNeed.repoSettings;
88
142
  need.rulesets ||= rowNeed.rulesets;
89
143
  need.branchProtection ||= rowNeed.branchProtection;
144
+ need.labels ||= rowNeed.labels;
145
+ need.projectFields ||= rowNeed.projectFields;
90
146
  }
91
- if (!need.repoSettings && !need.rulesets && !need.branchProtection)
147
+ // The project BINDING is part of the snapshot only when the vocabulary row
148
+ // is in scope here — every other snapshot keeps its exact prior shape.
149
+ const project = vocabularyInScope ? projectBindingFor(entry, options.projectNumber) : undefined;
150
+ // Only a BOUND project is addressable: an unbound current repo / a sibling
151
+ // renders honest-absent in the detector, so nothing is read for it.
152
+ if (project?.kind !== 'bound')
153
+ need.projectFields = false;
154
+ // A repo whose only in-scope row is the vocabulary row still gets a
155
+ // snapshot (binding, no surfaces) so the detector can render its line.
156
+ if (!anySurfaceNeeded(need) && project === undefined)
92
157
  continue;
93
158
  snapshots.push({
94
159
  repoSlug: entry.repoSlug,
95
160
  repoId: entry.repoId,
96
- surfaces: fetchSurfaces(entry.repoSlug, need, ghFetch, options.gitRoot),
161
+ surfaces: fetchSurfaces(entry.repoSlug, need, ghFetch, ghGraphql, options.gitRoot, project),
162
+ ...(project !== undefined ? { project } : {}),
97
163
  });
98
164
  }
99
165
  return snapshots;
100
166
  }
167
+ /**
168
+ * The project binding for one roster repo: the current repo binds
169
+ * `orient.projectNumber` under its own owner; an unset number is `unbound`; a
170
+ * cross-repo probe is `sibling` (its binding lives in ITS checkout's config,
171
+ * which this doctor does not read).
172
+ */
173
+ function projectBindingFor(entry, projectNumber) {
174
+ if (!entry.current)
175
+ return { kind: 'sibling' };
176
+ if (projectNumber === undefined)
177
+ return { kind: 'unbound' };
178
+ return { kind: 'bound', owner: ownerSegment(entry.repoSlug), number: projectNumber };
179
+ }
101
180
  /** Build the roster: the current repo (local-remote-derived) plus any opt-in cross-repo slugs. */
102
181
  function resolveRoster(options, readRemote) {
103
182
  const entries = [];
104
183
  const seen = new Set();
105
184
  const currentSlug = deriveCurrentSlug(options, readRemote);
106
185
  if (currentSlug !== undefined) {
107
- entries.push({ repoSlug: currentSlug, repoId: options.repoId ?? repoSegment(currentSlug) });
186
+ entries.push({
187
+ repoSlug: currentSlug,
188
+ repoId: options.repoId ?? repoSegment(currentSlug),
189
+ current: true,
190
+ });
108
191
  seen.add(currentSlug);
109
192
  }
110
193
  for (const raw of options.probeRepos ?? []) {
@@ -112,7 +195,7 @@ function resolveRoster(options, readRemote) {
112
195
  if (slug.length === 0 || seen.has(slug))
113
196
  continue;
114
197
  // A cross-repo entry's cohort id is the repo segment of its own slug.
115
- entries.push({ repoSlug: slug, repoId: repoSegment(slug) });
198
+ entries.push({ repoSlug: slug, repoId: repoSegment(slug), current: false });
116
199
  seen.add(slug);
117
200
  }
118
201
  return entries;
@@ -134,16 +217,25 @@ function repoSegment(slug) {
134
217
  const parts = slug.split('/');
135
218
  return parts[parts.length - 1] ?? slug;
136
219
  }
220
+ /** The owner segment of an `owner/repo` slug (the GH Project's org login). */
221
+ function ownerSegment(slug) {
222
+ const parts = slug.split('/');
223
+ return parts[0] ?? slug;
224
+ }
137
225
  /**
138
226
  * Extract `owner/repo` from an ssh (`git@host:owner/repo.git`) or https
139
227
  * (`https://host/owner/repo.git`) remote URL, tolerating a trailing `.git` and
140
- * slashes. Returns undefined when no `owner/repo` pair resolves.
228
+ * slashes in either order (`…/totem.git/` too falsification pass 5, p5-F5).
229
+ * The HOST is not part of the result: a mirror at the same `owner/repo` path
230
+ * yields the same slug, the same host-blindness the cohort-id derivation has.
231
+ * Returns undefined when no `owner/repo` pair resolves.
141
232
  */
142
233
  export function slugFromRemoteUrl(remoteUrl) {
143
234
  if (typeof remoteUrl !== 'string' || remoteUrl.trim().length === 0)
144
235
  return undefined;
145
236
  const trimmed = remoteUrl
146
237
  .trim()
238
+ .replace(/\/+$/, '')
147
239
  .replace(/\.git$/i, '')
148
240
  .replace(/\/+$/, '');
149
241
  const match = /[/:]([^/:]+)\/([^/]+)$/.exec(trimmed);
@@ -157,7 +249,7 @@ export function slugFromRemoteUrl(remoteUrl) {
157
249
  return `${owner}/${repo}`;
158
250
  }
159
251
  /** Fetch the union of needed surfaces for one repo. */
160
- function fetchSurfaces(slug, need, ghFetch, cwd) {
252
+ function fetchSurfaces(slug, need, ghFetch, ghGraphql, cwd, project) {
161
253
  const surfaces = {};
162
254
  // Repo settings double as the source of `default_branch` for classic branch
163
255
  // protection, so fetch it whenever either surface is needed.
@@ -174,6 +266,14 @@ function fetchSurfaces(slug, need, ghFetch, cwd) {
174
266
  if (need.branchProtection) {
175
267
  surfaces.branchProtection = fetchBranchProtectionSurface(slug, repoResult, ghFetch, cwd);
176
268
  }
269
+ if (need.labels) {
270
+ surfaces.labels = fetchLabelsSurface(slug, ghFetch, cwd);
271
+ }
272
+ // `need.projectFields` is already gated on a BOUND binding by the caller; the
273
+ // narrowing here is what carries owner/number into the query.
274
+ if (need.projectFields && project !== undefined && project.kind === 'bound') {
275
+ surfaces.projectFields = fetchProjectFieldsSurface(project.owner, project.number, ghGraphql, cwd);
276
+ }
177
277
  return surfaces;
178
278
  }
179
279
  /** Narrow a {@link GhFetchResult} to a {@link NetworkSurfaceSnapshot}. */
@@ -277,6 +377,100 @@ function defaultBranchOf(data) {
277
377
  const branch = data.default_branch;
278
378
  return typeof branch === 'string' && branch.length > 0 ? branch : undefined;
279
379
  }
380
+ /**
381
+ * The labels surface: walk `GET /repos/<slug>/labels?per_page=100&page=N` until
382
+ * a page returns fewer than a full page. NEVER partial — a non-ok page
383
+ * propagates its outcome, a non-array page degrades, and a walk that reaches the
384
+ * page cap degrades the WHOLE surface (an undercount would let the detector
385
+ * certify canon-conformance from a truncated list).
386
+ */
387
+ function fetchLabelsSurface(slug, ghFetch, cwd) {
388
+ const all = [];
389
+ for (let page = 1; page <= LABELS_MAX_PAGES; page += 1) {
390
+ const result = ghFetch(`/repos/${slug}/labels?per_page=${LABELS_PER_PAGE}&page=${page}`, cwd);
391
+ if (result.outcome !== 'ok')
392
+ return toSnapshot(result);
393
+ if (!Array.isArray(result.data)) {
394
+ return { outcome: 'error', detail: 'unparseable labels page' };
395
+ }
396
+ all.push(...result.data);
397
+ if (result.data.length < LABELS_PER_PAGE)
398
+ return { outcome: 'ok', data: all };
399
+ }
400
+ return {
401
+ outcome: 'error',
402
+ detail: `label list exceeds ${LABELS_MAX_PAGES * LABELS_PER_PAGE} — cannot certify`,
403
+ };
404
+ }
405
+ /**
406
+ * The bound project's single-select vocabulary. `hasNextPage` rides in the body
407
+ * so the detector (not this edge) decides that an overflowed field list cannot
408
+ * certify — the edge stays a transport.
409
+ */
410
+ const PROJECT_FIELDS_QUERY = `query($org: String!, $number: Int!) { organization(login: $org) { projectV2(number: $number) { title fields(first: ${PROJECT_FIELDS_FIRST}) { pageInfo { hasNextPage } nodes { ... on ProjectV2SingleSelectField { name options { name } } } } } } }`;
411
+ /** Read the bound project's single-select fields (one GraphQL query). */
412
+ function fetchProjectFieldsSurface(owner, number, ghGraphql, cwd) {
413
+ return toSnapshot(ghGraphql(PROJECT_FIELDS_QUERY, { org: owner, number }, cwd));
414
+ }
415
+ /**
416
+ * Resolve the ROSTER-WIDE label canon: the TEXT of
417
+ * `mmnto-ai/totem:scripts/sync-labels.ps1`, plus a `detail` naming its
418
+ * provenance. In the canon repository's own checkout (origin exactly
419
+ * `mmnto-ai/totem`) the file is local (no network, no rate limit); every other
420
+ * checkout — every other cohort repo AND every fork — reads the canonical blob
421
+ * over the contents API and discloses the blob sha. Parsing happens in core
422
+ * (Tenet 20) — this only resolves TEXT. Never throws: an unreadable canon is a
423
+ * cannot-verify outcome.
424
+ */
425
+ export function resolveLabelCanon(options) {
426
+ if (options.currentSlug === LABEL_CANON_REPO) {
427
+ const readFile = options.readFile ?? ((absPath) => fs.readFileSync(absPath, 'utf-8'));
428
+ try {
429
+ const text = readFile(path.join(options.gitRoot, ...LABEL_CANON_PATH.split('/')));
430
+ return { outcome: 'ok', data: text, detail: `local checkout ${LABEL_CANON_PATH}` };
431
+ // totem-context: an absent/unreadable script in this checkout is a cannot-verify outcome for the canon (the detector renders `unknown`), never a throw and never a conformance verdict.
432
+ }
433
+ catch (err) {
434
+ void err;
435
+ return { outcome: 'error', detail: `local checkout ${LABEL_CANON_PATH} unreadable` };
436
+ }
437
+ }
438
+ const ghFetch = options.ghFetch;
439
+ if (ghFetch === undefined) {
440
+ return { outcome: 'no-transport', detail: `${LABEL_CANON_FETCH_PREFIX}no transport` };
441
+ }
442
+ const result = ghFetch(`/repos/${LABEL_CANON_REPO}/contents/${LABEL_CANON_PATH}`, options.gitRoot);
443
+ if (result.outcome !== 'ok') {
444
+ return {
445
+ outcome: result.outcome,
446
+ detail: `${LABEL_CANON_FETCH_PREFIX}${result.detail ?? result.outcome}`,
447
+ };
448
+ }
449
+ const contents = narrowContentsResponse(result.data);
450
+ if (contents === undefined) {
451
+ return { outcome: 'error', detail: 'unparseable contents response' };
452
+ }
453
+ // The API wraps the base64 payload at 60 columns and the script itself is
454
+ // CRLF — `Buffer.from(…, 'base64')` skips the wrapping newlines and the
455
+ // decoded bytes keep their own line endings verbatim.
456
+ const text = Buffer.from(contents.content, 'base64').toString('utf8');
457
+ return {
458
+ outcome: 'ok',
459
+ data: text,
460
+ detail: `${LABEL_CANON_REPO}:${LABEL_CANON_PATH}@${contents.sha.slice(0, CANON_SHA_LENGTH)}`,
461
+ };
462
+ }
463
+ /** Narrow a contents-API 200 to the base64 payload we can decode, else undefined. */
464
+ function narrowContentsResponse(data) {
465
+ if (typeof data !== 'object' || data === null)
466
+ return undefined;
467
+ const body = data;
468
+ if (body.encoding !== 'base64')
469
+ return undefined;
470
+ if (typeof body.content !== 'string' || typeof body.sha !== 'string')
471
+ return undefined;
472
+ return { content: body.content, sha: body.sha };
473
+ }
280
474
  /**
281
475
  * Build the default {@link GhFetch}: spawn `gh api <path>` via `safeExec` (arg
282
476
  * array, no shell, bounded timeout) and classify the outcome. `safeExec` is
@@ -306,6 +500,133 @@ function makeDefaultGhFetch(safeExec) {
306
500
  }
307
501
  };
308
502
  }
503
+ /**
504
+ * Build the production {@link GhFetch} for callers OUTSIDE
505
+ * {@link resolveNetworkSnapshots} (e.g. the label-canon resolution in
506
+ * `doctor-parity.ts`). Async only because `safeExec` is lazily imported — the
507
+ * returned transport is synchronous, and NOTHING spawns until it is called, so
508
+ * a test that never calls it never touches `gh`.
509
+ */
510
+ export async function defaultGhFetch() {
511
+ const { safeExec } = await import('@mmnto/totem');
512
+ return makeDefaultGhFetch(safeExec);
513
+ }
514
+ /**
515
+ * The current repo's `owner/repo` slug from its LOCAL `origin` remote, for
516
+ * callers outside {@link resolveNetworkSnapshots} (the label-canon source
517
+ * selection in `doctor-parity.ts`). No network: one `git remote get-url`
518
+ * read, degraded to `undefined` when there is no remote, no git, or no
519
+ * parseable `owner/repo`. Async only for the lazy `safeExec` import.
520
+ */
521
+ export async function defaultCurrentSlug(gitRoot) {
522
+ const { safeExec } = await import('@mmnto/totem');
523
+ return slugFromRemoteUrl(makeDefaultReadRemote(safeExec)(gitRoot));
524
+ }
525
+ /**
526
+ * Build the default {@link GhGraphql}: `gh api graphql -f query=… -f/-F k=v`
527
+ * (a `-F` variable is sent typed, which the `$number: Int!` argument requires).
528
+ * Read-only like the REST default; a spawn/HTTP failure classifies through
529
+ * {@link classifyGhError}, and a 200 body classifies through
530
+ * {@link classifyGraphqlBody}.
531
+ */
532
+ function makeDefaultGhGraphql(safeExec) {
533
+ return (query, variables, cwd) => {
534
+ const args = ['api', 'graphql', '-f', `query=${query}`];
535
+ for (const [key, value] of Object.entries(variables)) {
536
+ args.push(typeof value === 'number' ? '-F' : '-f', `${key}=${value}`);
537
+ }
538
+ let raw;
539
+ try {
540
+ raw = safeExec('gh', args, {
541
+ cwd,
542
+ timeout: GH_TIMEOUT_MS,
543
+ env: { ...process.env, GH_PROMPT_DISABLED: '1' },
544
+ });
545
+ // totem-context: a gh failure (no token, 4xx/5xx, offline, gh absent) is classified into a per-surface outcome (§14 clause 2/4), never rethrown — the sensor must degrade honestly, not crash.
546
+ }
547
+ catch (err) {
548
+ return classifyGhError(err);
549
+ }
550
+ let body;
551
+ try {
552
+ body = JSON.parse(raw);
553
+ // totem-context: an unparseable 200 body is a transient `error` outcome (→ unknown), not a throw.
554
+ }
555
+ catch {
556
+ return { outcome: 'error', detail: 'unparseable gh api graphql response' };
557
+ }
558
+ return classifyGraphqlBody(body);
559
+ };
560
+ }
561
+ /**
562
+ * Classify a GraphQL 200 BODY (GraphQL reports authorization + not-found in the
563
+ * body, not the HTTP status). ANY `errors` entry is decisive: GraphQL returns
564
+ * partial data beside its errors (a nested FORBIDDEN, a node-limit hit, a
565
+ * SERVICE_UNAVAILABLE on one field), and a partial field list verdicted as if
566
+ * complete is a drift verdict on a cannot-verify read — the one outcome §14
567
+ * clause 2 forbids (falsification pass 1, F1: a FORBIDDEN body with a half-read
568
+ * project rendered "Priority: field absent"). Pure: no I/O, exported for test.
569
+ */
570
+ export function classifyGraphqlBody(body) {
571
+ // Decisive on PRESENCE, whatever the shape: a conforming server sends a
572
+ // non-empty list of maps, but a string entry, a null entry, or a bare object
573
+ // must still never read as "no errors" (falsification pass 2, p2-F3).
574
+ if (!graphqlBodyHasErrors(body)) {
575
+ return { outcome: 'ok', data: body };
576
+ }
577
+ const errors = graphqlErrorsOf(body);
578
+ const haystack = errors
579
+ .map((e) => typeof e === 'string'
580
+ ? e
581
+ : `${typeof e.message === 'string' ? e.message : ''} ${typeof e.type === 'string' ? e.type : ''}`)
582
+ .join(' ');
583
+ const first = errors.find((e) => (typeof e === 'string' && e.length > 0) ||
584
+ (typeof e !== 'string' && typeof e.message === 'string' && e.message.length > 0));
585
+ const firstMessage = typeof first === 'string'
586
+ ? first
587
+ : typeof first?.message === 'string'
588
+ ? first.message
589
+ : 'graphql error';
590
+ const detail = firstMessage.slice(0, GRAPHQL_DETAIL_MAX);
591
+ if (/permission|scope|not accessible|FORBIDDEN|INSUFFICIENT_SCOPES/i.test(haystack)) {
592
+ return { outcome: 'auth', detail };
593
+ }
594
+ if (/NOT_FOUND|could not resolve/i.test(haystack)) {
595
+ return { outcome: 'not-found', detail };
596
+ }
597
+ return { outcome: 'error', detail };
598
+ }
599
+ /** True when the body carries an `errors` member that is not an empty list — any shape counts. */
600
+ function graphqlBodyHasErrors(body) {
601
+ if (typeof body !== 'object' || body === null)
602
+ return false;
603
+ const errors = body.errors;
604
+ if (errors === undefined || errors === null)
605
+ return false;
606
+ return !Array.isArray(errors) || errors.length > 0;
607
+ }
608
+ /** The readable `errors` entries of a GraphQL body: maps and bare strings (anything else contributes nothing). */
609
+ function graphqlErrorsOf(body) {
610
+ if (typeof body !== 'object' || body === null)
611
+ return [];
612
+ const errors = body.errors;
613
+ const list = Array.isArray(errors) ? errors : [errors];
614
+ return list.filter((e) => {
615
+ return typeof e === 'string' || (typeof e === 'object' && e !== null);
616
+ });
617
+ }
618
+ /**
619
+ * True when the label-canon row will verdict at least one roster repo — the
620
+ * gate on the roster-wide canon read (falsification pass 1, F7; pass 2, p2-F7).
621
+ * The SAME predicate core applies per repo (`consumers` undefined = every repo),
622
+ * so the canon is read exactly when some line will use it. Pure, exported for test.
623
+ */
624
+ export function labelCanonNeeded(rows, snapshots) {
625
+ const labelRow = rows.find((s) => s.row === 'gh-issue-label-canon');
626
+ if (labelRow === undefined)
627
+ return false;
628
+ return snapshots.some((snap) => labelRow.consumers === undefined || labelRow.consumers.includes(snap.repoId));
629
+ }
309
630
  /**
310
631
  * Classify a `gh api` failure into a network-read-only outcome (§14 clause 2/4):
311
632
  * - spawn failure (gh absent) → `no-transport` (offline honest-absent).
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-parity-fetch.js","sourceRoot":"","sources":["../../src/commands/doctor-parity-fetch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAUH,2EAA2E;AAC3E,MAAM,aAAa,GAAG,MAAM,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,uBAAuB,GAAsC;IACjE,oBAAoB,EAAE,oBAAoB;IAC1C,8BAA8B,EAAE,8BAA8B;IAC9D,gCAAgC,EAAE,gCAAgC;CACnE,CAAC;AAEF,6FAA6F;AAC7F,MAAM,UAAU,oBAAoB,CAAC,UAAkB;IACrD,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;AAkDD,oCAAoC;AACpC,SAAS,eAAe,CAAC,GAAsB;IAC7C,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,oBAAoB;YACvB,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC;QAC1E,KAAK,8BAA8B;YACjC,O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