redlinegate 0.0.2 → 0.0.3

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 (63) hide show
  1. package/README.md +2 -2
  2. package/dist/bin/redline.js +247 -42
  3. package/dist/bin/redline.js.map +1 -1
  4. package/dist/commands/init.js +274 -26
  5. package/dist/commands/init.js.map +1 -1
  6. package/dist/commands/remove.js +40 -0
  7. package/dist/commands/remove.js.map +1 -1
  8. package/dist/commands/status.js +94 -0
  9. package/dist/commands/status.js.map +1 -0
  10. package/dist/config/redline-json.js +18 -1
  11. package/dist/config/redline-json.js.map +1 -1
  12. package/dist/core/git.js +50 -3
  13. package/dist/core/git.js.map +1 -1
  14. package/dist/core/version.js +6 -0
  15. package/dist/core/version.js.map +1 -1
  16. package/dist/detect/setup.js +200 -0
  17. package/dist/detect/setup.js.map +1 -0
  18. package/dist/detect/stack.js +56 -17
  19. package/dist/detect/stack.js.map +1 -1
  20. package/dist/metrics/options.js +0 -9
  21. package/dist/metrics/options.js.map +1 -1
  22. package/dist/platforms/azure/install.js +1 -5
  23. package/dist/platforms/azure/install.js.map +1 -1
  24. package/dist/platforms/azure/verify.js +4 -2
  25. package/dist/platforms/azure/verify.js.map +1 -1
  26. package/dist/platforms/github/install.js +110 -22
  27. package/dist/platforms/github/install.js.map +1 -1
  28. package/dist/platforms/github/vendor.js +81 -0
  29. package/dist/platforms/github/vendor.js.map +1 -0
  30. package/dist/platforms/github/verify.js +17 -2
  31. package/dist/platforms/github/verify.js.map +1 -1
  32. package/dist/platforms/types.js +4 -0
  33. package/dist/platforms/types.js.map +1 -1
  34. package/dist/render/standards.js +8 -1
  35. package/dist/render/standards.js.map +1 -1
  36. package/dist/render/vendors.js +9 -52
  37. package/dist/render/vendors.js.map +1 -1
  38. package/dist/rules/catalogue.js +127 -0
  39. package/dist/rules/catalogue.js.map +1 -0
  40. package/dist/ui/facts.js +30 -1
  41. package/dist/ui/facts.js.map +1 -1
  42. package/dist/ui/prompt.js +137 -8
  43. package/dist/ui/prompt.js.map +1 -1
  44. package/dist/ui/report.js +214 -0
  45. package/dist/ui/report.js.map +1 -0
  46. package/dist/ui/tty.js +358 -25
  47. package/dist/ui/tty.js.map +1 -1
  48. package/dist/ui/wizard.js +133 -19
  49. package/dist/ui/wizard.js.map +1 -1
  50. package/dist/verify/remote.js +33 -0
  51. package/dist/verify/remote.js.map +1 -1
  52. package/package.json +4 -1
  53. package/scripts/fetch-stars.mjs +92 -0
  54. package/scripts/lib/rules.d.mts +18 -0
  55. package/scripts/publish-local.mjs +183 -0
  56. package/standards/manifest.json +79 -8
  57. package/standards/stacks/angular.md +57 -0
  58. package/standards/stacks/dom.md +61 -0
  59. package/standards/stacks/svelte.md +45 -0
  60. package/standards/stacks/vue.md +54 -0
  61. package/templates/redline.yml +4 -0
  62. package/workflows/redline-gate.yml +28 -4
  63. package/scripts/measure-context.mjs +0 -101
@@ -1,7 +1,8 @@
1
1
  import { existsSync, readdirSync, readFileSync, rmSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { isRedlineError, RedlineError } from "../core/errors.js";
4
- import { CLI_VERSION } from "../core/version.js";
4
+ import { CLI_VERSION, UNPUBLISHED_VERSION } from "../core/version.js";
5
+ import { VENDORED_GATE_PATH } from "../platforms/github/vendor.js";
5
6
  import { canPromote } from "../enforce/ladder.js";
6
7
  import { CAPABILITY_KEYS, MENU_DEFAULTS, CONFIG_FILE, MENU_KEYS, deselectedCapabilities, labelsCarriedByGate, readConfig, writeConfig, } from "../config/redline-json.js";
7
8
  import { proposeProfile } from "../detect/stack.js";
@@ -11,7 +12,8 @@ import { resolveProfile } from "../render/profile.js";
11
12
  import { render } from "../render/standards.js";
12
13
  import { renderCommands, COMMAND_HOSTS } from "../render/commands.js";
13
14
  import { CONTEXTS, detectSpecKit } from "../render/contexts.js";
14
- import { surveyRepo } from "../detect/existing.js";
15
+ import { surveyRepo, TOOL_PROBES } from "../detect/existing.js";
16
+ import { applySetup, offerable } from "../detect/setup.js";
15
17
  import { LOCAL_RULES_FILE } from "../render/vendors.js";
16
18
  import { isPending } from "../platforms/types.js";
17
19
  // What a repository gets when it says nothing. Every default here has to be
@@ -65,11 +67,29 @@ export const SENSITIVE_PATHS = [
65
67
  '/terraform/',
66
68
  'Dockerfile',
67
69
  ];
70
+ // The team that owns the paths Redline seeds into CODEOWNERS.
71
+ //
72
+ // A default, never a fact. GitHub silently ignores an owner it cannot resolve —
73
+ // no error on push, no warning in the UI — so a CODEOWNERS naming a team that
74
+ // does not exist reports as installed and enforces nothing, which is the worst
75
+ // of the three possible outcomes. This was hardcoded, which meant every
76
+ // organisation but the one it was written for got exactly that. `--review-owners`
77
+ // states the real owners; absent, the capability still defaults to this name and
78
+ // the report says plainly that it is a guess.
68
79
  export const OWNING_TEAM = 'platform-engineering';
69
80
  // Accessibility rules only exist for the stacks that render a user interface,
70
81
  // so recording `accessibility: true` on a Terraform or Go repository files a
71
82
  // commitment against rules that will never be rendered there.
72
- const ACCESSIBILITY_STACKS = ['react', 'react-native', 'kotlin', 'swift'];
83
+ const ACCESSIBILITY_STACKS = [
84
+ 'react',
85
+ 'react-native',
86
+ 'angular',
87
+ 'vue',
88
+ 'svelte',
89
+ 'dom',
90
+ 'kotlin',
91
+ 'swift',
92
+ ];
73
93
  // The 2.1 artifact that identifies a repository onboarded by the previous
74
94
  // generation. It is NOT in the removal list below: v3's GitHub adapter writes
75
95
  // the same path, so removing it would delete the gate this run just installed
@@ -90,8 +110,33 @@ const LEGACY_SCRIPT = /^redline-.*\.sh$/;
90
110
  // The brownfield rule applies to files as much as to host objects: what carries
91
111
  // no Redline marker belongs to a human and is never deleted.
92
112
  const REDLINE_OWNED = /(?:managed|generated|installed) by redline|REDLINE:BEGIN/i;
93
- export function sensitivePathRules(org) {
94
- return SENSITIVE_PATHS.map((pattern) => ({ pattern, owners: [`@${org}/${OWNING_TEAM}`] }));
113
+ /**
114
+ * Who owns the sensitive paths.
115
+ *
116
+ * `owners` are taken as written when given: a team (`@org/team`), a user
117
+ * (`@person`) and an email are all valid CODEOWNERS entries, and Redline is not
118
+ * the right place to decide which an organisation uses. A bare name is qualified
119
+ * with the org, because `@team` alone means a *user* to GitHub and would silently
120
+ * own nothing.
121
+ */
122
+ export function sensitivePathRules(org, owners) {
123
+ const resolved = owners !== undefined && owners.length > 0
124
+ ? owners.map((owner) => qualifyOwner(org, owner))
125
+ : [`@${org}/${OWNING_TEAM}`];
126
+ return SENSITIVE_PATHS.map((pattern) => ({ pattern, owners: resolved }));
127
+ }
128
+ // CODEOWNERS distinguishes the three by shape, so this only ever adds what is
129
+ // missing: `@name` is a USER and is left alone — qualifying it to `@org/name`
130
+ // would turn a person into a team that does not exist — `@org/team` and an email
131
+ // address are already complete, and only a bare word is ambiguous enough to need
132
+ // the organisation putting in front of it.
133
+ function qualifyOwner(org, owner) {
134
+ const trimmed = owner.trim();
135
+ if (trimmed.startsWith('@'))
136
+ return trimmed;
137
+ if (trimmed.includes('@'))
138
+ return trimmed;
139
+ return trimmed.includes('/') ? `@${trimmed}` : `@${org}/${trimmed}`;
95
140
  }
96
141
  export const ONBOARD_BRANCH = 'redline/onboard';
97
142
  // Local and free — both adapters read the checkout and nothing else — but the
@@ -211,6 +256,7 @@ export async function init(platform, opts) {
211
256
  const repair = opts.repair === true;
212
257
  const manifest = loadManifest(root);
213
258
  const now = opts.now ?? (() => new Date());
259
+ const step = opts.onStep ?? (() => { });
214
260
  // Profile resolution happens before any host call or write: a bad --profile
215
261
  // flag must fail clean, with nothing on disk and nothing sent to the host.
216
262
  const detected = opts.profile ?? proposeProfile(scanRepo(cwd)).profile;
@@ -239,6 +285,12 @@ export async function init(platform, opts) {
239
285
  // enforcement keeps what the repository already had: a re-run for an unrelated
240
286
  // reason silently promoting a repository is how a ladder loses the trust it
241
287
  // exists to build.
288
+ // Absent keeps what the repository recorded, for the same reason the rung
289
+ // does: `local` is the weaker control, and a re-run that said nothing about
290
+ // the gate must not be able to move a repository onto it — or, just as bad,
291
+ // silently move a deliberately-local repository back to an organisation gate
292
+ // that does not exist and lose it the gate entirely.
293
+ let gateSource = opts.gateSource ?? existing?.gateSource ?? 'org';
242
294
  const currentRung = existing?.rung ?? 'observe';
243
295
  const rungNotes = [];
244
296
  let rung = currentRung;
@@ -270,7 +322,12 @@ export async function init(platform, opts) {
270
322
  }
271
323
  // A dry run must work offline and with an unscoped token: repoRef() is a
272
324
  // live GET, so the plan is built from what the local clone already knows.
273
- const ref = dryRun ? platform.localRef(cwd) : await platform.repoRef(cwd);
325
+ // `--no-commit` is under the same rule and for the same reason — it is
326
+ // documented as contacting no host, and this read is a host contact whatever
327
+ // else the run goes on to skip.
328
+ const offline = dryRun || opts.noCommit === true;
329
+ step(offline ? 'reading the repository' : `reading ${platform.host}`);
330
+ const ref = offline ? platform.localRef(cwd) : await platform.repoRef(cwd);
274
331
  // detected <- what this repository already recorded <- what the caller
275
332
  // typed, the same precedence the menu resolves under. The org ceiling is
276
333
  // deliberately not applied to the RECORD: render() enforces it on every call
@@ -280,17 +337,55 @@ export async function init(platform, opts) {
280
337
  .filter(([, v]) => v.enabled)
281
338
  .map(([k]) => k);
282
339
  const vendors = opts.vendors ?? existing?.vendors ?? detectVendors(cwd, orgVendors);
283
- const gateOptions = {
340
+ // The same courtesy Spec Kit gets, generalised to the rest of the toolchain.
341
+ // A repository with a mature pipeline already runs a scanner for most of what
342
+ // the gate would add; installing a second one beside it is not defence in
343
+ // depth, it is two sets of findings and two exemption paths for one problem.
344
+ // What Redline still brings such a repository is the part nothing else does —
345
+ // the standards the AI reviews against, and a check that they were applied —
346
+ // so detection narrows the gate rather than cancelling the onboarding.
347
+ const survey = surveyRepo(cwd);
348
+ // Precedence, strongest first: what the caller stated this run, then what the
349
+ // repository recorded, then what detection found. Someone who corrected the
350
+ // survey once must not have to correct it again on every re-run.
351
+ const stated = opts.integrations ?? (existing !== null && existing.integrations.length > 0 ? existing.integrations : null);
352
+ const integrations = stated ?? survey.tools.map((tool) => tool.id);
353
+ const evidenceOf = new Map(survey.tools.map((tool) => [tool.id, tool.evidence]));
354
+ // Which of the gate's own jobs those tools make redundant. It is computed
355
+ // here, above the gate options, because the planning pass and the real
356
+ // install must build the SAME caller workflow: a stand-down list that
357
+ // appeared between them would make the two disagree about whether the file
358
+ // changed, which is the class of bug that plans a path nothing writes.
359
+ //
360
+ // Every tool on the list narrows the gate, whatever put it there. Detection
361
+ // deselects rather than duplicates — that is what cli/detect/existing.ts is
362
+ // for — and the wizard hands its own findings back through --integrations, so
363
+ // treating a detected tool as weaker than a typed one would make the same
364
+ // repository behave differently depending on which entry point ran it.
365
+ //
366
+ // `dependencies` and `secrets` are the two jobs no label can waive, so this
367
+ // is a security decision and never a silent one: every stand-down names the
368
+ // tool, the marker that proved it, and the flag that puts the job back.
369
+ const standDown = [
370
+ ...new Set(integrations.flatMap((id) => {
371
+ const covers = TOOL_PROBES.find((probe) => probe.id === id)?.standsDown;
372
+ return covers === undefined || covers === null ? [] : [covers];
373
+ })),
374
+ ];
375
+ let gateOptions = {
284
376
  ...FLOOR_GATE,
285
377
  ...(opts.pipeline ? { pipeline: opts.pipeline } : {}),
286
378
  ...(menu.adrForLargeDiffs ? {} : { adrDiffThreshold: Number.MAX_SAFE_INTEGER }),
287
379
  ...(opts.adoptCaller === true ? { adoptCaller: true } : {}),
288
380
  ...(capabilities.labels ? {} : { manageLabels: false }),
381
+ ...(standDown.length > 0 ? { standDown } : {}),
382
+ ...(gateSource === 'local' ? { gateSource } : {}),
383
+ ...(opts.noCommit === true ? { offline: true } : {}),
289
384
  // Written into the caller workflow, so the gate blocks or reports according
290
385
  // to the rung recorded here rather than needing a second source of truth.
291
386
  rung,
292
387
  };
293
- const ownershipRules = sensitivePathRules(ref.org);
388
+ const ownershipRules = sensitivePathRules(ref.org, opts.reviewOwners);
294
389
  // The gate and ownership file diffs are computed in check mode FIRST, before
295
390
  // a single host setting is touched. Without it there was no way to know a
296
391
  // re-run had nothing to do until four host objects had already been
@@ -302,8 +397,13 @@ export async function init(platform, opts) {
302
397
  // Redline, and its message says nothing was written; planning after the
303
398
  // render made that untrue, leaving every vendor artifact and command file on
304
399
  // disk with no .redline.json, no branch and no pull request to carry them.
305
- const gatePlan = capabilities.gate
306
- ? await platform.installGate(ref, cwd, gateOptions, true)
400
+ // `preflight: !dryRun` is what makes this pass a real plan rather than an
401
+ // optimistic one: a live run may ask the host whether the reusable workflow
402
+ // exists, and must, because the answer decides which paths it will stage. A
403
+ // dry run may not — it contacts no host and needs no credential.
404
+ step('planning the change');
405
+ let gatePlan = capabilities.gate
406
+ ? await platform.installGate(ref, cwd, { ...gateOptions, preflight: !dryRun }, true)
307
407
  : { files: [], outcomes: [] };
308
408
  const ownershipPlan = menu.sensitivePathReviewers
309
409
  ? await platform.ensureReviewOwnership(ref, cwd, ownershipRules, true)
@@ -312,6 +412,39 @@ export async function init(platform, opts) {
312
412
  // acting on any of it. Detection informs; it does not decide.
313
413
  const machinery = observeGateMachinery(platform, cwd);
314
414
  const notes = [...rungNotes];
415
+ // The organisation publishes no gate, and this run has written nothing yet.
416
+ // Offer the repository the one that fits in it, and re-plan so both passes
417
+ // agree on the paths — planning one gate source and installing another is
418
+ // exactly how a run stages a file nothing wrote.
419
+ if (gatePlan.vendorableGate === true && opts.onGateFallback !== undefined) {
420
+ const detail = `${ref.org}/.github publishes no Redline gate`;
421
+ if (await opts.onGateFallback(detail)) {
422
+ gateSource = 'local';
423
+ gateOptions = { ...gateOptions, gateSource };
424
+ gatePlan = await platform.installGate(ref, cwd, { ...gateOptions, preflight: !dryRun }, true);
425
+ notes.push(`${detail}, so the gate is vendored into this repository instead`);
426
+ }
427
+ }
428
+ // Said on every local run, not only the one that chose it here: a repository
429
+ // that recorded `local` three runs ago carries the same property and the same
430
+ // exposure, and a note that appears once at onboarding and never again is a
431
+ // note nobody reads at the moment it matters.
432
+ if (capabilities.gate && gateSource === 'local') {
433
+ notes.push(`the gate is vendored at ${VENDORED_GATE_PATH} rather than referenced from ` +
434
+ `${ref.org}/.github. It runs from the pull request's own head commit, so a pull ` +
435
+ 'request that edits it changes the gate judging it — including standing down the ' +
436
+ 'dependency and secret jobs, which no label can waive. Move to --gate-source org ' +
437
+ 'once the organisation publishes a gate');
438
+ // The protection already exists and is simply off: `/.github/workflows/` is
439
+ // the first entry in SENSITIVE_PATHS. Naming the command rather than
440
+ // turning it on, because the owner it would write is a guess — a CODEOWNERS
441
+ // line naming a team that does not exist blocks every pull request in the
442
+ // repository, which is worse than the exposure it was meant to close.
443
+ if (!menu.sensitivePathReviewers) {
444
+ notes.push('nothing requires review on .github/workflows/ here, so that edit needs no owner\'s ' +
445
+ 'approval. Re-run with --with review-ownership --review-owners <team> to require one');
446
+ }
447
+ }
315
448
  // Detection, not a decision. `readGateMachinery` is local and free, and what
316
449
  // it gives that nothing else here has is the path this host runs its gate
317
450
  // from — so the only claim made is what else is already sitting in that
@@ -366,25 +499,51 @@ export async function init(platform, opts) {
366
499
  'development context out rather than writing a second account of it beside the one Spec ' +
367
500
  'Kit maintains — pass --speckit to include it anyway');
368
501
  }
369
- // The same courtesy Spec Kit gets, generalised to the rest of the toolchain.
370
- // A repository with a mature pipeline already runs a scanner for most of what
371
- // the gate would add; installing a second one beside it is not defence in
372
- // depth, it is two sets of findings and two exemption paths for one problem.
373
- // What Redline still brings such a repository is the part nothing else does
374
- // the standards the AI reviews against, and a check that they were applied —
375
- // so detection narrows the gate rather than cancelling the onboarding.
376
- const survey = surveyRepo(cwd);
377
- for (const tool of survey.tools) {
378
- const covers = tool.standsDown;
502
+ for (const id of integrations) {
503
+ const probe = TOOL_PROBES.find((p) => p.id === id);
504
+ if (probe === undefined)
505
+ continue;
506
+ const how = evidenceOf.get(id) ?? 'you said so detection could not see it from the checkout';
507
+ const covers = probe.standsDown;
379
508
  notes.push(covers === null
380
- ? `this repository already runs ${tool.label} (${tool.evidence}) — noted; Redline installs nothing that overlaps it`
381
- : `this repository already runs ${tool.label} (${tool.evidence}), which covers what Redline's ` +
382
- `own ${covers} check would report. Narrowing the gate to match is not wired yet, so for now ` +
383
- `deselect it yourself with: redline init --skip gate`);
509
+ ? `this repository already runs ${probe.label} (${how}) — noted; Redline installs nothing that overlaps it`
510
+ : `this repository already runs ${probe.label} (${how}), which covers what Redline's own ` +
511
+ `${covers} check would report, so the gate's ${covers} job is stood down here rather ` +
512
+ `than run a second time. To run it anyway, re-run with an --integrations list that ` +
513
+ `leaves ${id} out`);
514
+ }
515
+ // Detected, and then unticked. Worth saying: the next run will not re-detect
516
+ // it into the plan, and a reader of the report should know why it is absent.
517
+ for (const tool of survey.tools) {
518
+ if (!integrations.includes(tool.id)) {
519
+ notes.push(`${tool.label} was detected (${tool.evidence}) but recorded as not in use here`);
520
+ }
521
+ }
522
+ // Controls the operator asked for. Written here rather than by an adapter
523
+ // because they are plain repository files on any host that supports them, and
524
+ // they ride in the same pull request as everything else this run writes.
525
+ const wanted = new Set(opts.setup ?? []);
526
+ const chosen = offerable(cwd, platform.host, stacks).filter(({ integration }) => wanted.has(integration.id));
527
+ const setupResult = applySetup(cwd, chosen, dryRun);
528
+ for (const path of setupResult.skipped) {
529
+ // Never overwritten: a repository with its own renovate.json has a
530
+ // considered one, and replacing it with a generated default is the kind of
531
+ // help that costs a team a week of tuning.
532
+ notes.push(`${path} already exists and was left exactly as it is`);
533
+ }
534
+ for (const { integration } of chosen) {
535
+ if (integration.id === 'renovate' && setupResult.written.includes('renovate.json')) {
536
+ notes.push('renovate.json is written, but Renovate only runs once the Renovate app is installed on ' +
537
+ 'the organisation — the file alone does nothing');
538
+ }
539
+ if (integration.id === 'codeql' && setupResult.written.includes('.github/workflows/codeql.yml')) {
540
+ notes.push('CodeQL is written; on a private repository it needs GitHub Advanced Security to run');
541
+ }
384
542
  }
385
543
  const contexts = CONTEXTS.filter((context) => menu[context.key]).map((context) => context.key);
386
544
  // Files next, host settings after: a denied host call must never cost the
387
545
  // file-level work that already succeeded.
546
+ step(dryRun ? 'rendering the standards (plan only)' : 'rendering the standards');
388
547
  const rendered = render({ root, profile, out: cwd, vendors, contexts, check: dryRun });
389
548
  // The ceiling render() applies internally, applied here too. renderCommands
390
549
  // cannot enforce it for itself: COMMAND_HOSTS carries hosts the vendor
@@ -413,6 +572,7 @@ export async function init(platform, opts) {
413
572
  ...commands.written,
414
573
  ...gatePlan.files,
415
574
  ...ownershipPlan.files,
575
+ ...setupResult.written,
416
576
  ];
417
577
  // A menu change moves no file of its own (the gate template already diffs
418
578
  // adrForLargeDiffs), but it is exactly what `redline init --blocking` on a
@@ -517,11 +677,11 @@ export async function init(platform, opts) {
517
677
  hostPlan,
518
678
  };
519
679
  }
520
- const files = [...changedFiles, CONFIG_FILE];
680
+ const plannedFiles = [...changedFiles, CONFIG_FILE];
521
681
  if (dryRun) {
522
682
  return {
523
683
  profile,
524
- files,
684
+ files: plannedFiles,
525
685
  removals,
526
686
  // installGate's plan reports no outcome (it made no host call);
527
687
  // ensureReviewOwnership's are decided locally and worth printing.
@@ -539,13 +699,78 @@ export async function init(platform, opts) {
539
699
  hostPlan,
540
700
  };
541
701
  }
702
+ step('installing the merge gate');
542
703
  const gate = capabilities.gate
543
704
  ? await platform.installGate(ref, cwd, gateOptions)
544
705
  : { files: [], outcomes: [] };
706
+ // Files written, nothing else attempted. Everything below this point either
707
+ // changes a setting on the host or puts a commit in the repository's history,
708
+ // and `--no-commit` exists precisely to reach neither.
709
+ //
710
+ // The config is written here rather than at the shared site below so this
711
+ // path records what it actually did: a repository whose settings were never
712
+ // applied must not carry a pendingAdmin list computed from outcomes that
713
+ // never happened, and must not read back as fully onboarded on the next run.
714
+ if (opts.noCommit === true) {
715
+ if (capabilities.gate && gateSource === 'org') {
716
+ notes.push(`the caller workflow references ${ref.org}/.github and nothing checked that it publishes ` +
717
+ 'the gate, because --no-commit contacts no host. Run redline verify after you commit, ' +
718
+ 'or re-run without --no-commit, before relying on the check');
719
+ }
720
+ const written = [
721
+ ...rendered.written,
722
+ ...removals,
723
+ ...commands.written,
724
+ ...gate.files,
725
+ ...setupResult.written,
726
+ CONFIG_FILE,
727
+ ];
728
+ step('recording .redline.json');
729
+ writeConfig(cwd, {
730
+ standardsVersion: manifest.version,
731
+ cliVersion: CLI_VERSION,
732
+ host: platform.host,
733
+ profile,
734
+ vendors,
735
+ menu,
736
+ capabilities,
737
+ integrations,
738
+ // Nothing was applied, so nothing is owed to an administrator yet. The
739
+ // run that does apply them computes this from real outcomes.
740
+ pendingAdmin: existing?.pendingAdmin ?? [],
741
+ onboardedAt: existing?.onboardedAt ?? now().toISOString(),
742
+ lastRunAt: now().toISOString(),
743
+ localRules: existsSync(join(cwd, LOCAL_RULES_FILE)),
744
+ commandFiles: commands.contentIds,
745
+ rung,
746
+ gateSource,
747
+ gateVersion: gateSource === 'local' && CLI_VERSION !== UNPUBLISHED_VERSION ? CLI_VERSION : '',
748
+ });
749
+ return {
750
+ profile,
751
+ files: written,
752
+ removals,
753
+ outcomes: [],
754
+ pendingAdmin: existing?.pendingAdmin ?? [],
755
+ pullRequest: null,
756
+ pullRequestError: null,
757
+ migratedFrom,
758
+ alreadyOnboarded: false,
759
+ dryRun: false,
760
+ noCommit: true,
761
+ menu,
762
+ capabilities,
763
+ optedOut,
764
+ notes,
765
+ hostPlan,
766
+ };
767
+ }
545
768
  const ownership = menu.sensitivePathReviewers
546
769
  ? await platform.ensureReviewOwnership(ref, cwd, ownershipRules)
547
770
  : { files: [], outcomes: [] };
771
+ step('applying the security floor');
548
772
  const security = await platform.enableSecurityFloor(ref);
773
+ step('applying the branch policy');
549
774
  const policy = capabilities.mergePolicy
550
775
  ? await platform.applyPolicy(ref, {
551
776
  requiredApprovals: 1,
@@ -558,13 +783,28 @@ export async function init(platform, opts) {
558
783
  // MergePolicy — what verify reports back off the host.
559
784
  requiredChecks: [],
560
785
  blocking: menu.blockingGate,
786
+ ...(opts.branches && opts.branches.length > 0 ? { branches: opts.branches } : {}),
561
787
  })
562
788
  : { outcomes: [], policy: null };
789
+ // The check pass cannot perform host preflight reads, so an adapter may
790
+ // suppress a planned file during the real install. Stage only what the
791
+ // installers actually wrote; otherwise git add receives a path that does
792
+ // not exist.
793
+ const files = [
794
+ ...rendered.written,
795
+ ...removals,
796
+ ...commands.written,
797
+ ...gate.files,
798
+ ...ownership.files,
799
+ ...setupResult.written,
800
+ CONFIG_FILE,
801
+ ];
563
802
  // denied -> pendingAdmin work for an administrator; unsupported -> the
564
803
  // capability doesn't exist on this repository (e.g. Advanced Security is
565
804
  // unlicensed) and must never be reported as permanently half-onboarded.
566
805
  const outcomes = [...gate.outcomes, ...ownership.outcomes, ...security.outcomes, ...policy.outcomes];
567
806
  const pendingAdmin = outcomes.filter(isPending).map((o) => o.capability);
807
+ step('recording .redline.json');
568
808
  writeConfig(cwd, {
569
809
  standardsVersion: manifest.version,
570
810
  cliVersion: CLI_VERSION,
@@ -573,6 +813,7 @@ export async function init(platform, opts) {
573
813
  vendors,
574
814
  menu,
575
815
  capabilities,
816
+ integrations,
576
817
  pendingAdmin,
577
818
  // When the repository joined, not when it was last touched: overwriting
578
819
  // this on every run erased the only record of when the standard landed.
@@ -585,7 +826,14 @@ export async function init(platform, opts) {
585
826
  // a re-run for an unrelated reason silently promoting a repository is how a
586
827
  // ladder loses the trust it exists to build.
587
828
  rung,
829
+ gateSource,
830
+ // Only a vendored gate has a version to record, and only a published CLI
831
+ // stamps one: a development build leaves the reusable copy's own pin alone
832
+ // rather than writing a version npm has never heard of, so there is nothing
833
+ // for verify to compare and the field stays empty.
834
+ gateVersion: gateSource === 'local' && CLI_VERSION !== UNPUBLISHED_VERSION ? CLI_VERSION : '',
588
835
  });
836
+ step('committing and opening the pull request');
589
837
  let pullRequest = null;
590
838
  let pullRequestError = null;
591
839
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,M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CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,sBAAsB,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QACpG,EAAE;QACF,yBAAyB;QACzB,EAAE;QACF,KAAK,IAAI,EAAE;QACX,oFAAoF;QACpF,6FAA6F;QAC7F,0EAA0E;QAC1E,EAAE;QACF,oBAAoB;QACpB,EAAE;QACF,oFAAoF;QACpF,4FAA4F;QAC5F,uEAAuE;QACvE,mGAAmG;QACnG,EAAE;QACF,uFAAuF;QACvF,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1F,GAAG,OAAO;KACX,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -185,6 +185,9 @@ function planGateMachinery(platform, cwd, actions) {
185
185
  const machinery = platform.readGateMachinery(cwd);
186
186
  if (!machinery.present)
187
187
  return;
188
+ // Planned before the caller below, so the two files are reported in the order
189
+ // they are read rather than the order they happen to be deleted in.
190
+ planVendoredGate(machinery, cwd, actions);
188
191
  const body = read(cwd, machinery.path);
189
192
  if (body === null)
190
193
  return;
@@ -209,6 +212,43 @@ function planGateMachinery(platform, cwd, actions) {
209
212
  'sitting at a Redline-shaped path',
210
213
  });
211
214
  }
215
+ // The second file a `--gate-source local` repository carries: the gate itself,
216
+ // vendored here rather than referenced from the organisation. Deleting the
217
+ // caller and leaving this behind left a workflow nothing calls sitting in
218
+ // .github/workflows/ after a removal that reported itself complete — and a
219
+ // repository that later switched back to an organisation gate kept it forever,
220
+ // because nothing afterwards ever looked at that path again.
221
+ //
222
+ // The path comes from the caller, which is what actually decides where the gate
223
+ // runs from, and is accepted only when it is the one path Redline writes — see
224
+ // LOCAL_GATE_REF. A caller is a file anybody can edit, and resolving an
225
+ // arbitrary `./…` out of it would let a hand-edited workflow nominate any file
226
+ // in the repository for deletion.
227
+ function planVendoredGate(machinery, cwd, actions) {
228
+ const path = machinery.vendored;
229
+ if (path === null)
230
+ return;
231
+ const body = read(cwd, path);
232
+ // The caller names it and it is not there. Nothing to remove, and nothing
233
+ // worth saying: the removal is about to delete the caller that named it.
234
+ if (body === null)
235
+ return;
236
+ if (MANAGED_BY_REDLINE.test(body)) {
237
+ actions.push({
238
+ kind: 'delete',
239
+ path,
240
+ directory: false,
241
+ reason: 'it is the gate this repository vendored, and carries the Redline ownership line',
242
+ });
243
+ return;
244
+ }
245
+ actions.push({
246
+ kind: 'kept',
247
+ path,
248
+ reason: 'the caller runs the gate from here, but this file carries nothing that attributes it to ' +
249
+ 'Redline — so it is this repository\'s own workflow and is left where it is',
250
+ });
251
+ }
212
252
  function planPullRequestTemplates(platform, cwd, actions) {
213
253
  for (const template of observePullRequestTemplates(platform.host, cwd)) {
214
254
  if (template.state === 'mangled') {