@gate-forge/cli 0.8.0 → 0.9.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.
- package/README.md +85 -1145
- package/dist/adapter-audit.d.ts +54 -0
- package/dist/adapter-audit.d.ts.map +1 -1
- package/dist/adapter-audit.js +48 -0
- package/dist/adapter-audit.js.map +1 -1
- package/dist/adapter-scaffold.d.ts +28 -3
- package/dist/adapter-scaffold.d.ts.map +1 -1
- package/dist/adapter-scaffold.js +145 -24
- package/dist/adapter-scaffold.js.map +1 -1
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +2 -0
- package/dist/args.js.map +1 -1
- package/dist/behavior-setup.d.ts.map +1 -1
- package/dist/behavior-setup.js +18 -5
- package/dist/behavior-setup.js.map +1 -1
- package/dist/commands/adapters.d.ts.map +1 -1
- package/dist/commands/adapters.js +73 -2
- package/dist/commands/adapters.js.map +1 -1
- package/dist/commands/adopt.d.ts +9 -1
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +72 -5
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/blocking.d.ts +45 -2
- package/dist/commands/blocking.d.ts.map +1 -1
- package/dist/commands/blocking.js +165 -11
- package/dist/commands/blocking.js.map +1 -1
- package/dist/commands/check.d.ts +34 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +152 -8
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/classify.d.ts +1 -1
- package/dist/commands/classify.d.ts.map +1 -1
- package/dist/commands/classify.js +63 -18
- package/dist/commands/classify.js.map +1 -1
- package/dist/commands/enforcement.d.ts.map +1 -1
- package/dist/commands/enforcement.js +263 -9
- package/dist/commands/enforcement.js.map +1 -1
- package/dist/commands/explain.d.ts +1 -1
- package/dist/commands/explain.d.ts.map +1 -1
- package/dist/commands/explain.js +162 -3
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/init-presets.d.ts +7 -0
- package/dist/commands/init-presets.d.ts.map +1 -1
- package/dist/commands/init-presets.js +10 -1
- package/dist/commands/init-presets.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +579 -61
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/next.d.ts.map +1 -1
- package/dist/commands/next.js +109 -6
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/pre-commit.d.ts.map +1 -1
- package/dist/commands/pre-commit.js +62 -19
- package/dist/commands/pre-commit.js.map +1 -1
- package/dist/commands/test-gates.js +1 -1
- package/dist/commands/tests.d.ts.map +1 -1
- package/dist/commands/tests.js +46 -7
- package/dist/commands/tests.js.map +1 -1
- package/dist/docs-exclusions.d.ts.map +1 -1
- package/dist/docs-exclusions.js +18 -3
- package/dist/docs-exclusions.js.map +1 -1
- package/dist/endpoint-compiler.d.ts.map +1 -1
- package/dist/endpoint-compiler.js +49 -1
- package/dist/endpoint-compiler.js.map +1 -1
- package/dist/evaluate.d.ts +16 -1
- package/dist/evaluate.d.ts.map +1 -1
- package/dist/evaluate.js +12 -2
- package/dist/evaluate.js.map +1 -1
- package/dist/gateforge-owned.d.ts +103 -0
- package/dist/gateforge-owned.d.ts.map +1 -0
- package/dist/gateforge-owned.js +375 -0
- package/dist/gateforge-owned.js.map +1 -0
- package/dist/git-hooks.d.ts +18 -0
- package/dist/git-hooks.d.ts.map +1 -1
- package/dist/git-hooks.js +36 -1
- package/dist/git-hooks.js.map +1 -1
- package/dist/git-ignored.d.ts +27 -0
- package/dist/git-ignored.d.ts.map +1 -0
- package/dist/git-ignored.js +102 -0
- package/dist/git-ignored.js.map +1 -0
- package/dist/glob.d.ts +33 -14
- package/dist/glob.d.ts.map +1 -1
- package/dist/glob.js +96 -5
- package/dist/glob.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/io.d.ts +18 -5
- package/dist/io.d.ts.map +1 -1
- package/dist/io.js +5 -4
- package/dist/io.js.map +1 -1
- package/dist/pipeline.d.ts +16 -1
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +23 -3
- package/dist/pipeline.js.map +1 -1
- package/dist/planes-inference.d.ts +12 -5
- package/dist/planes-inference.d.ts.map +1 -1
- package/dist/planes-inference.js +13 -15
- package/dist/planes-inference.js.map +1 -1
- package/dist/providers.d.ts +54 -0
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +101 -0
- package/dist/providers.js.map +1 -1
- package/dist/repo-scan.d.ts +7 -0
- package/dist/repo-scan.d.ts.map +1 -1
- package/dist/repo-scan.js +109 -8
- package/dist/repo-scan.js.map +1 -1
- package/dist/route-plane-proposals.d.ts +100 -0
- package/dist/route-plane-proposals.d.ts.map +1 -0
- package/dist/route-plane-proposals.js +213 -0
- package/dist/route-plane-proposals.js.map +1 -0
- package/dist/scope.d.ts +20 -0
- package/dist/scope.d.ts.map +1 -1
- package/dist/scope.js +26 -5
- package/dist/scope.js.map +1 -1
- package/dist/singleton-guidance.d.ts +15 -6
- package/dist/singleton-guidance.d.ts.map +1 -1
- package/dist/singleton-guidance.js +30 -10
- package/dist/singleton-guidance.js.map +1 -1
- package/dist/staged-candidate.d.ts.map +1 -1
- package/dist/staged-candidate.js +2 -1
- package/dist/staged-candidate.js.map +1 -1
- package/dist/trusted-policy.d.ts.map +1 -1
- package/dist/trusted-policy.js +3 -2
- package/dist/trusted-policy.js.map +1 -1
- package/dist/unmatched-routes.d.ts +60 -0
- package/dist/unmatched-routes.d.ts.map +1 -0
- package/dist/unmatched-routes.js +131 -0
- package/dist/unmatched-routes.js.map +1 -0
- package/guides/CONNECT-YOUR-PROJECT.md +93 -20
- package/guides/QUICKSTART.md +81 -16
- package/guides/REFERENCE.md +1756 -0
- package/guides/TEST-ENVIRONMENT.md +8 -5
- package/guides/UPGRADE-0.8-to-0.9.md +112 -0
- package/package.json +10 -10
|
@@ -428,6 +428,37 @@ export function writeEngineReference(io, engineRoot) {
|
|
|
428
428
|
writeLine(io.stdout, `exists, leaving untouched: ${path}`);
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
+
/**
|
|
432
|
+
* Reads the gate args an EXISTING generated hook script
|
|
433
|
+
* recorded at generation time — the `const args = [...]`
|
|
434
|
+
* line the template writes, which is the ONE thing that
|
|
435
|
+
* distinguishes a strict init's staged commit gate from the
|
|
436
|
+
* changed-scoped default. Returns null when the hook is
|
|
437
|
+
* absent, a foreign file, or its recorded args are
|
|
438
|
+
* unparsable — callers then fall back to their own default.
|
|
439
|
+
*/
|
|
440
|
+
export function generatedHookGateArgs(cwd) {
|
|
441
|
+
const hookScript = join(cwd, '.gateforge', 'hooks', 'gateforge-check.mjs');
|
|
442
|
+
if (!existsSync(hookScript))
|
|
443
|
+
return null;
|
|
444
|
+
const body = readFileSync(hookScript, 'utf8');
|
|
445
|
+
if (!isGeneratedHookScript(body))
|
|
446
|
+
return null;
|
|
447
|
+
const match = /^const args = (.+);$/m.exec(body);
|
|
448
|
+
if (match === null)
|
|
449
|
+
return null;
|
|
450
|
+
try {
|
|
451
|
+
const parsed = JSON.parse(match[1]);
|
|
452
|
+
if (!Array.isArray(parsed) ||
|
|
453
|
+
!parsed.every((arg) => typeof arg === 'string')) {
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
return parsed;
|
|
457
|
+
}
|
|
458
|
+
catch {
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
431
462
|
/** Ensures the check-gate hook script exists (executable).
|
|
432
463
|
*
|
|
433
464
|
* Args:
|
|
@@ -449,20 +480,25 @@ export function ensureHookScript(io, engineRoot, gateArgs = ['check', '--changed
|
|
|
449
480
|
writeLine(io.stdout, `created: ${hookScript}`);
|
|
450
481
|
}
|
|
451
482
|
else {
|
|
452
|
-
recordInitPath(io, io.cwd, hookScript, 'preserved');
|
|
453
483
|
const current = readFileSync(hookScript, 'utf8');
|
|
454
484
|
if (isGeneratedHookScript(current)) {
|
|
455
485
|
const updated = replaceGeneratedHookBlock(current, hookScriptTemplate(gateArgs));
|
|
456
486
|
if (updated !== current) {
|
|
457
487
|
writeFileSync(hookScript, updated, 'utf8');
|
|
458
488
|
chmodSync(hookScript, 0o755);
|
|
489
|
+
// The generated block was rewritten in place: the undo is a
|
|
490
|
+
// restore, not a delete (the file may hold the owner's own
|
|
491
|
+
// additions around our markers).
|
|
492
|
+
recordInitPath(io, io.cwd, hookScript, 'modified');
|
|
459
493
|
writeLine(io.stdout, `updated: ${hookScript} (${gateArgs.join(' ')})`);
|
|
460
494
|
}
|
|
461
495
|
else {
|
|
496
|
+
recordInitPath(io, io.cwd, hookScript, 'preserved');
|
|
462
497
|
writeLine(io.stdout, `verified: ${hookScript} (${gateArgs.join(' ')})`);
|
|
463
498
|
}
|
|
464
499
|
}
|
|
465
500
|
else {
|
|
501
|
+
recordInitPath(io, io.cwd, hookScript, 'preserved');
|
|
466
502
|
writeLine(io.stdout, `exists, leaving untouched: ${hookScript} (foreign file)`);
|
|
467
503
|
}
|
|
468
504
|
}
|
|
@@ -489,7 +525,63 @@ function isTracked(cwd, relativePath) {
|
|
|
489
525
|
stdio: 'ignore',
|
|
490
526
|
}).status === 0;
|
|
491
527
|
}
|
|
492
|
-
/**
|
|
528
|
+
/**
|
|
529
|
+
* Re-indents the gateforge-check block so its items nest under a
|
|
530
|
+
* `repos:` sequence whose items sit at `indent` spaces. The block
|
|
531
|
+
* is written for an item indent of 2; every item line shifts by
|
|
532
|
+
* (indent - 2), and the comment line is kept at the same indent
|
|
533
|
+
* as the item.
|
|
534
|
+
*/
|
|
535
|
+
function reindentPreCommitBlock(indent) {
|
|
536
|
+
const shift = indent - 2;
|
|
537
|
+
return PRE_COMMIT_BLOCK.trimEnd().split('\n').map((line, index) => {
|
|
538
|
+
if (index === 0)
|
|
539
|
+
return `${' '.repeat(indent)}${line}`;
|
|
540
|
+
const leading = line.length - line.trimStart().length;
|
|
541
|
+
return `${' '.repeat(Math.max(0, leading + shift))}${line.trimStart()}`;
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Builds the new .pre-commit-config.yaml body with the
|
|
546
|
+
* gateforge-check block inserted as the FIRST item of the
|
|
547
|
+
* top-level block-style `repos:` sequence. Returns null when the
|
|
548
|
+
* file has no such sequence — no `repos:` line at all, a
|
|
549
|
+
* flow-style `repos: []`, or no sequence item under the key — so
|
|
550
|
+
* the caller falls back to appending the block at the end.
|
|
551
|
+
*
|
|
552
|
+
* The block lands directly after the `repos:` line, so any comment
|
|
553
|
+
* that belonged to the first item stays attached to it.
|
|
554
|
+
*/
|
|
555
|
+
function prependPreCommitBlockToRepos(current) {
|
|
556
|
+
const lines = current.split('\n');
|
|
557
|
+
const reposIndex = lines.findIndex((line) => /^repos:\s*(#.*)?$/.test(line));
|
|
558
|
+
if (reposIndex < 0)
|
|
559
|
+
return null;
|
|
560
|
+
let itemIndex = -1;
|
|
561
|
+
for (let i = reposIndex + 1; i < lines.length; i += 1) {
|
|
562
|
+
const line = lines[i] ?? '';
|
|
563
|
+
if (line.trim() === '' || line.trimStart().startsWith('#'))
|
|
564
|
+
continue;
|
|
565
|
+
itemIndex = i;
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
const item = itemIndex < 0 ? '' : (lines[itemIndex] ?? '');
|
|
569
|
+
const itemMatch = /^(\s*)- /.exec(item);
|
|
570
|
+
if (itemMatch === null)
|
|
571
|
+
return null;
|
|
572
|
+
lines.splice(reposIndex + 1, 0, ...reindentPreCommitBlock((itemMatch[1] ?? '').length));
|
|
573
|
+
return lines.join('\n');
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Adds the gateforge-check hook to .pre-commit-config.yaml
|
|
577
|
+
* (idempotent). When the file already has a block-style `repos:`
|
|
578
|
+
* sequence, the hook block is inserted as its FIRST item — above
|
|
579
|
+
* the repository's own hooks, so a file-mutating hook can never
|
|
580
|
+
* run before the gate and invalidate its receipt. Only when no
|
|
581
|
+
* such sequence exists (no `repos:` line, or a flow-style
|
|
582
|
+
* `repos: []`) is the block appended at the end instead, with a
|
|
583
|
+
* note telling the owner to move the entry to the top by hand.
|
|
584
|
+
*/
|
|
493
585
|
export function appendPreCommitHook(io) {
|
|
494
586
|
const path = join(io.cwd, '.pre-commit-config.yaml');
|
|
495
587
|
if (existsSync(path)) {
|
|
@@ -499,15 +591,27 @@ export function appendPreCommitHook(io) {
|
|
|
499
591
|
writeLine(io.stdout, `exists, leaving untouched: ${path} (gateforge-check)`);
|
|
500
592
|
return;
|
|
501
593
|
}
|
|
502
|
-
|
|
503
|
-
//
|
|
504
|
-
//
|
|
505
|
-
//
|
|
506
|
-
// and
|
|
594
|
+
// The file belongs to the OWNER and this run edits it, so the
|
|
595
|
+
// ledger records it as MODIFIED: `rm -rf` would throw their
|
|
596
|
+
// hooks away, `git restore` puts the file back exactly.
|
|
597
|
+
// One line, one action: the file belongs to the OWNER, so the
|
|
598
|
+
// line says so and carries the exact way back. The command is
|
|
599
|
+
// printed only where it really works — `git restore` needs a
|
|
600
|
+
// tracked file, and an untracked config has nothing to restore.
|
|
507
601
|
const undo = isTracked(io.cwd, '.pre-commit-config.yaml')
|
|
508
602
|
? 'undo: git restore -- .pre-commit-config.yaml'
|
|
509
603
|
: 'undo: delete the appended gateforge-check entry from .pre-commit-config.yaml (the file is not tracked by git, so there is nothing to restore)';
|
|
604
|
+
const inserted = prependPreCommitBlockToRepos(current);
|
|
605
|
+
if (inserted !== null) {
|
|
606
|
+
writeFileSync(path, inserted);
|
|
607
|
+
recordInitPath(io, io.cwd, path, 'modified');
|
|
608
|
+
writeLine(io.stdout, `updated: ${path} (gateforge-check hook added as the first hook) — your repo's own hook file: ${undo}`);
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
writeFileSync(path, `${current.endsWith('\n') ? current : current + '\n'}${PRE_COMMIT_BLOCK}`);
|
|
612
|
+
recordInitPath(io, io.cwd, path, 'modified');
|
|
510
613
|
writeLine(io.stdout, `updated: ${path} (gateforge-check hook appended) — your repo's own hook file: ${undo}`);
|
|
614
|
+
writeLine(io.stdout, 'note: could not place gateforge-check first in .pre-commit-config.yaml — move its entry to the top of repos: yourself');
|
|
511
615
|
return;
|
|
512
616
|
}
|
|
513
617
|
writeFileSync(path, `repos:\n${PRE_COMMIT_BLOCK}`);
|
|
@@ -535,12 +639,15 @@ export function writeGitlabCiTemplate(io, mode = 'check') {
|
|
|
535
639
|
writeLine(io.stdout, `created: ${gitlabCi} (includes the gateforge jobs)`);
|
|
536
640
|
return;
|
|
537
641
|
}
|
|
538
|
-
recordInitPath(io, io.cwd, gitlabCi, 'preserved');
|
|
539
642
|
const current = readFileSync(gitlabCi, 'utf8');
|
|
540
643
|
if (current.includes('gitlab-gateforge.yml')) {
|
|
644
|
+
recordInitPath(io, io.cwd, gitlabCi, 'preserved');
|
|
541
645
|
writeLine(io.stdout, `exists, leaving untouched: ${gitlabCi} (gateforge include present)`);
|
|
542
646
|
return;
|
|
543
647
|
}
|
|
648
|
+
// The owner's CI file stays theirs: this run only ADDED the include,
|
|
649
|
+
// so the ledger records it as modified and the undo is a restore.
|
|
650
|
+
recordInitPath(io, io.cwd, gitlabCi, 'modified');
|
|
544
651
|
const local = " - local: '.gateforge/ci/gitlab-gateforge.yml'";
|
|
545
652
|
if (/^include:/m.test(current)) {
|
|
546
653
|
writeFileSync(gitlabCi, current.replace(/^include:[^\n]*/m, (match) => `${match}\n${local}`));
|
|
@@ -569,23 +676,70 @@ export function writeCiTemplate(io, provider, mode = 'check') {
|
|
|
569
676
|
writeGitlabCiTemplate(io, mode);
|
|
570
677
|
}
|
|
571
678
|
}
|
|
679
|
+
/**
|
|
680
|
+
* Detects which CI provider this repository already uses, from the
|
|
681
|
+
* files it already has. `null` when neither is present, so the caller
|
|
682
|
+
* can say so instead of guessing.
|
|
683
|
+
*
|
|
684
|
+
* The rule is the one `enforce` already uses for `--ci` (GitLab when a
|
|
685
|
+
* `.gitlab-ci.yml` exists, GitHub when only `.github` does), so the
|
|
686
|
+
* instructions and the generated wiring always agree.
|
|
687
|
+
*
|
|
688
|
+
* Args:
|
|
689
|
+
* cwd: repository root.
|
|
690
|
+
*
|
|
691
|
+
* Returns:
|
|
692
|
+
* 'github' | 'gitlab' | null: the detected provider, or null.
|
|
693
|
+
*/
|
|
694
|
+
export function detectCiProvider(cwd) {
|
|
695
|
+
if (existsSync(join(cwd, '.gitlab-ci.yml')))
|
|
696
|
+
return 'gitlab';
|
|
697
|
+
if (existsSync(join(cwd, '.github')))
|
|
698
|
+
return 'github';
|
|
699
|
+
return null;
|
|
700
|
+
}
|
|
572
701
|
/**
|
|
573
702
|
* Prints owner-run steps for making the generated CI job mandatory.
|
|
574
703
|
*
|
|
704
|
+
* Only the DETECTED provider's commands are printed: a GitLab-only
|
|
705
|
+
* repository was told GitHub branch-protection commands it can never
|
|
706
|
+
* run, and the reader had to work out which half applied. When the
|
|
707
|
+
* repository shows no provider at all, both are printed and the block
|
|
708
|
+
* says why.
|
|
709
|
+
*
|
|
575
710
|
* Args:
|
|
576
711
|
* io: process context.
|
|
712
|
+
* provider: the provider the wiring used, when the caller already
|
|
713
|
+
* resolved one; otherwise the repository is probed.
|
|
577
714
|
*
|
|
578
715
|
* Returns:
|
|
579
716
|
* void.
|
|
580
717
|
*/
|
|
581
|
-
export function writeServerProtectionInstructions(io) {
|
|
582
|
-
|
|
583
|
-
'Server setup (review and run explicitly; Gateforge does not change branch settings):',
|
|
718
|
+
export function writeServerProtectionInstructions(io, provider = detectCiProvider(io.cwd)) {
|
|
719
|
+
const github = [
|
|
584
720
|
'GitHub: gh api --method PUT "repos/OWNER/REPO/branches/BRANCH/protection" --input - <<\'JSON\'',
|
|
585
721
|
'{"required_status_checks":{"strict":true,"contexts":["gateforge"]},"enforce_admins":true,"required_pull_request_reviews":null,"restrictions":null}',
|
|
586
722
|
'JSON',
|
|
723
|
+
];
|
|
724
|
+
const gitlab = [
|
|
587
725
|
'GitLab: glab api --method PUT "projects/PROJECT_ID" -f only_allow_merge_if_pipeline_succeeds=true',
|
|
588
726
|
'GitLab: glab api --method POST "projects/PROJECT_ID/protected_branches" -f name=BRANCH -f push_access_level=0 -f merge_access_level=30 -f allow_force_push=false',
|
|
727
|
+
];
|
|
728
|
+
const lines = provider === 'github'
|
|
729
|
+
? [...github]
|
|
730
|
+
: provider === 'gitlab'
|
|
731
|
+
? [...gitlab]
|
|
732
|
+
: [
|
|
733
|
+
'note: no .gitlab-ci.yml and no .github/ — both providers are shown because neither was detected',
|
|
734
|
+
...github,
|
|
735
|
+
...gitlab,
|
|
736
|
+
];
|
|
737
|
+
writeLine(io.stdout, [
|
|
738
|
+
'Server setup (review and run explicitly; Gateforge does not change branch settings):',
|
|
739
|
+
provider === null
|
|
740
|
+
? 'no CI provider was detected (no .gitlab-ci.yml and no .github/) — both providers are shown:'
|
|
741
|
+
: `detected CI provider: ${provider}`,
|
|
742
|
+
...lines,
|
|
589
743
|
].join('\n'));
|
|
590
744
|
}
|
|
591
745
|
/** Wires engine, local hooks, and the selected CI provider. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocking.js","sourceRoot":"","sources":["../../src/commands/blocking.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,2BAA2B,GAAG,wCAAwC,CAAC;AACpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,wCAAwC,CAAC;A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,EAAE,MAAM,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/commands/check.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type RuntimeConfig } from '@gate-forge/core';
|
|
1
2
|
import type { Io } from '../io.js';
|
|
2
3
|
import { type RuntimeReuseMount } from '../runtime-reuse.js';
|
|
3
4
|
import { type VerifierKeyring } from '../verifier-keys.js';
|
|
@@ -38,6 +39,17 @@ export interface CheckGateOptions {
|
|
|
38
39
|
runtimeReuseCheck?: () => string | null;
|
|
39
40
|
/** Emit per-step wall-clock timings in the report (additive only). */
|
|
40
41
|
timing?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Phase 5 staged-candidate runs: the base-revision
|
|
44
|
+
* text reader for policy-input classification,
|
|
45
|
+
* resolved by the caller against the USER's
|
|
46
|
+
* repository BEFORE the process moves to the
|
|
47
|
+
* isolated checkout (the checkout has none of the
|
|
48
|
+
* base revision's objects, so the staged diff's
|
|
49
|
+
* base — HEAD, or the candidate commit's first
|
|
50
|
+
* parent — can only be read where it lives).
|
|
51
|
+
*/
|
|
52
|
+
fixedBaseText?: (path: string) => string | null;
|
|
41
53
|
/**
|
|
42
54
|
* Force a full scan: no detector or pytest
|
|
43
55
|
* collection cache reads or writes. Also forced by
|
|
@@ -65,6 +77,28 @@ export interface CheckGateOptions {
|
|
|
65
77
|
* @throws fail-closed errors (exit 2) from config/plugin/pipeline layers.
|
|
66
78
|
*/
|
|
67
79
|
export declare function checkCommand(io: Io, argv: readonly string[]): Promise<number>;
|
|
80
|
+
/**
|
|
81
|
+
* The staged-checkout dependency hint (0.9.1):
|
|
82
|
+
* appended to a test-discovery failure inside the
|
|
83
|
+
* staged candidate when the runtime document declares
|
|
84
|
+
* no `prepare.reuse` roots.
|
|
85
|
+
*/
|
|
86
|
+
export declare const STAGED_DISCOVERY_HINT: string;
|
|
87
|
+
/**
|
|
88
|
+
* Whether the error is a test-discovery failure inside
|
|
89
|
+
* the staged candidate: the pack's typed discovery
|
|
90
|
+
* error, or the usage error the CLI maps it to (its
|
|
91
|
+
* message names the playwright invocation that could
|
|
92
|
+
* not enumerate the candidate's tests).
|
|
93
|
+
*/
|
|
94
|
+
export declare function isStagedDiscoveryFailure(error: unknown): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the candidate's runtime document declares at
|
|
97
|
+
* least one `prepare.reuse` dependency directory — the
|
|
98
|
+
* sanctioned bridge from the user repository into the
|
|
99
|
+
* staged checkout.
|
|
100
|
+
*/
|
|
101
|
+
export declare function runtimeDeclaresReuse(runtimeDoc: RuntimeConfig | null): boolean;
|
|
68
102
|
/**
|
|
69
103
|
* Names the report's exit-code line for what it is when a non-blocking
|
|
70
104
|
* mode softened the run's exit code.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAwIA,OAAO,EAyBL,KAAK,aAAa,EACnB,MAAM,kBAAkB,CAAC;AAc1B,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AA+BnC,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAiCvF,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA8TnF,eAAO,MAAM,WAAW,QAM2F,CAAC;AAEpH,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,qDAAqD;IACrD,UAAU,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,UAAU,EAAE,OAAO,CAAC;IACpB,qBAAqB;IACrB,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAClC;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kEAAkE;IAClE,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;I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AAC,CAwkCrF"}
|
package/dist/commands/check.js
CHANGED
|
@@ -135,16 +135,18 @@ import { createHash } from 'node:crypto';
|
|
|
135
135
|
import { join } from 'node:path';
|
|
136
136
|
import { performance } from 'node:perf_hooks';
|
|
137
137
|
import { BLOCKING_VERDICTS, decideStrictness, loadQuarantines, QUARANTINE_DIR, resolveStrictnessMode, strictnessSummaryLine, CAUSE_NEXT_ACTIONS, canonicalJson, ENGINE_UPGRADE_REFUSAL_PREFIX, volatileEchoSkips, engineBundleDigestOf, executionBoundaryDigestOf, GateReceiptSchema, humanMessage, LOCAL_UNISOLATED_BOUNDARY, renderRun, runExitCode, } from '@gate-forge/core';
|
|
138
|
-
import { discoverTestCatalog, findPlaywrightConfig, scanTestFiles, untrustedEnv, } from '@gate-forge/pack-playwright';
|
|
138
|
+
import { discoverTestCatalog, findPlaywrightConfig, scanTestFiles, TestDiscoveryError, untrustedEnv, } from '@gate-forge/pack-playwright';
|
|
139
139
|
import { parseArgs, stringFlag } from '../args.js';
|
|
140
140
|
import { resolveAdoptedBaseline } from '../adopted-baseline.js';
|
|
141
|
-
import { UsageError } from '../errors.js';
|
|
141
|
+
import { printFailure, UsageError } from '../errors.js';
|
|
142
142
|
import { writeLine } from '../io.js';
|
|
143
143
|
import { trustedPolicyDigestForConfig } from '../execution.js';
|
|
144
|
+
import { gateforgeOwnedInputs } from '../gateforge-owned.js';
|
|
144
145
|
import { obligationFingerprint, evaluateRun, scopeBlocking } from '../evaluate.js';
|
|
145
146
|
import { auditAdapters } from '../adapter-audit.js';
|
|
146
147
|
import { singletonPerTenantAdvisories } from '../singleton-guidance.js';
|
|
147
148
|
import { responseFieldAdvisories } from '../response-field-guidance.js';
|
|
149
|
+
import { unmatchedRouteBannerLines } from '../unmatched-routes.js';
|
|
148
150
|
import { annotationMapSyncAdvisories, findRunnerConfigPath, loadOptionalTestMap, mappedCoverageFrom, mappingBlocking, nativeInventoryBlocking, resolveRepositoryMappings, TEST_MAP_RELATIVE } from '../mapping.js';
|
|
149
151
|
import { collectInputFiles, computeInputSnapshot, diffInputFiles, SnapshotUnavailableError, UnsupportedSnapshotError, } from '../input-snapshot.js';
|
|
150
152
|
import { runPipeline, resolveRepoPath, sourcesByResourceId } from '../pipeline.js';
|
|
@@ -153,7 +155,7 @@ import { RuntimeBlockError, loadRuntimeConfigAt, prepareRuntime } from '../runti
|
|
|
153
155
|
import { digestRuntimeReuseMounts } from '../runtime-reuse.js';
|
|
154
156
|
import { authenticatedChangedInputs, loadReceiptFor, receiptGateBlocking, scopedReceiptCoverageBlocking, } from '../receipts.js';
|
|
155
157
|
import { resealChainBlocking, retainedCarriedEvidence } from '../reseal-chain.js';
|
|
156
|
-
import { mergeRequestScopePreflight, resolveProvider } from '../providers.js';
|
|
158
|
+
import { changeBaseTextReader, mergeRequestScopePreflight, resolveProvider, textReaderAtRevision } from '../providers.js';
|
|
157
159
|
import { computeEvaluationScope, detectStagedWorkingTreeMismatches, } from '../scope.js';
|
|
158
160
|
import { assertRuntimeReuseOwnerApproval, freezeCommitCandidate, freezeStagedCandidate, materializeStagedCandidate, recheckStagedCandidate, releaseStagedCandidate, StagedCandidateBlockError, } from '../staged-candidate.js';
|
|
159
161
|
import { httpRoutesView, readCandidateTreeEntries, readStateDocument, resolveStateDir } from '../state.js';
|
|
@@ -523,9 +525,24 @@ async function stagedCheckCommand(io, options) {
|
|
|
523
525
|
}
|
|
524
526
|
throw error;
|
|
525
527
|
}
|
|
528
|
+
// The base revision of the frozen change set lives in
|
|
529
|
+
// the USER's repository: the staged index was diffed
|
|
530
|
+
// against its HEAD (or the candidate commit against
|
|
531
|
+
// its first parent), and the isolated checkout the
|
|
532
|
+
// gate runs in has none of those objects. Resolve the
|
|
533
|
+
// base-revision text reader HERE, before the process
|
|
534
|
+
// moves to the checkout, so `.gitignore` policy-input
|
|
535
|
+
// classification compares the staged bytes against
|
|
536
|
+
// the exact base the frozen index was diffed against.
|
|
537
|
+
const fixedBaseText = options.candidateCommitSha === undefined
|
|
538
|
+
? changeBaseTextReader('local-staged', io.cwd, io.env)
|
|
539
|
+
: frozen.parentShas[0] === undefined
|
|
540
|
+
? null
|
|
541
|
+
: textReaderAtRevision(frozen.parentShas[0], io.cwd, io.env);
|
|
526
542
|
let checkoutDir;
|
|
527
543
|
let runtimeReuseDigest = null;
|
|
528
544
|
let runtimeReuseMounts = [];
|
|
545
|
+
let runtimeDoc = null;
|
|
529
546
|
try {
|
|
530
547
|
checkoutDir = materializeStagedCandidate(io.cwd, io.env, frozen);
|
|
531
548
|
// Empty directories are invisible to Git trees — checkout-index cannot
|
|
@@ -602,9 +619,17 @@ async function stagedCheckCommand(io, options) {
|
|
|
602
619
|
return 0;
|
|
603
620
|
}
|
|
604
621
|
}
|
|
605
|
-
|
|
622
|
+
runtimeDoc = loadRuntimeConfigAt(checkoutDir, checkoutConfig.runtime);
|
|
606
623
|
if (runtimeDoc !== null) {
|
|
607
|
-
|
|
624
|
+
// R1-17: runtime.yml is a trusted-policy input hashed into
|
|
625
|
+
// the candidate digest, so an owner pin that matched the
|
|
626
|
+
// candidate revision (policyGate enforced) approves the
|
|
627
|
+
// requested reuse roots — the first commit introducing
|
|
628
|
+
// runtime.yml no longer deadlocks. Without a matching pin
|
|
629
|
+
// the committed base stays the only approver.
|
|
630
|
+
if (policyGate.status !== 'enforced') {
|
|
631
|
+
assertRuntimeReuseOwnerApproval(frozen.approvedReusePaths, runtimeDoc.prepare?.reuse ?? []);
|
|
632
|
+
}
|
|
608
633
|
const preparedRuntime = await prepareRuntime(io.cwd, checkoutDir, runtimeDoc, io, resolveStateDir(checkoutDir));
|
|
609
634
|
runtimeReuseDigest = preparedRuntime.reuseDigest;
|
|
610
635
|
runtimeReuseMounts = preparedRuntime.reuseMounts;
|
|
@@ -643,7 +668,17 @@ async function stagedCheckCommand(io, options) {
|
|
|
643
668
|
approvedPolicyDigest: options.approvedPolicyDigest,
|
|
644
669
|
verifierKeyring: options.verifierKeyring,
|
|
645
670
|
fixedCandidateTreeId: frozen.treeId,
|
|
646
|
-
...(options.diffScoped
|
|
671
|
+
...(options.diffScoped
|
|
672
|
+
? {
|
|
673
|
+
fixedChangedFiles: frozen.changedPaths,
|
|
674
|
+
// Resolved against the USER's repository BEFORE the
|
|
675
|
+
// chdir below: the base revision's objects live only
|
|
676
|
+
// there (the isolated checkout's HEAD is the staged
|
|
677
|
+
// tree), and the policy-input classifier needs the
|
|
678
|
+
// base text to recognize init's `.gitignore` block.
|
|
679
|
+
...(fixedBaseText !== null ? { fixedBaseText } : {}),
|
|
680
|
+
}
|
|
681
|
+
: {}),
|
|
647
682
|
runtimeReuseDigest,
|
|
648
683
|
runtimeReuseMounts,
|
|
649
684
|
runtimeReuseCheck: () => digestRuntimeReuseMounts(runtimeReuseMounts),
|
|
@@ -664,6 +699,17 @@ async function stagedCheckCommand(io, options) {
|
|
|
664
699
|
if (error instanceof StagedCandidateBlockError) {
|
|
665
700
|
return renderStagedBlock(io, error.causeCode, error.message, error.nextAction);
|
|
666
701
|
}
|
|
702
|
+
// Staged discovery hint (0.9.1): the candidate
|
|
703
|
+
// checkout holds TRACKED bytes only, so a test-
|
|
704
|
+
// discovery run that cannot find its dependencies
|
|
705
|
+
// fails with the raw runner error and no pointer —
|
|
706
|
+
// unless the runtime document already declares the
|
|
707
|
+
// dependency directories to link.
|
|
708
|
+
if (isStagedDiscoveryFailure(error) && !runtimeDeclaresReuse(runtimeDoc)) {
|
|
709
|
+
printFailure(io, error);
|
|
710
|
+
writeLine(io.stderr, STAGED_DISCOVERY_HINT);
|
|
711
|
+
return 2;
|
|
712
|
+
}
|
|
667
713
|
throw error;
|
|
668
714
|
}
|
|
669
715
|
finally {
|
|
@@ -692,6 +738,38 @@ function renderStagedBlock(io, cause, detail, nextAction) {
|
|
|
692
738
|
writeLine(io.stdout, `next action: ${nextAction}`);
|
|
693
739
|
return 1;
|
|
694
740
|
}
|
|
741
|
+
/**
|
|
742
|
+
* The staged-checkout dependency hint (0.9.1):
|
|
743
|
+
* appended to a test-discovery failure inside the
|
|
744
|
+
* staged candidate when the runtime document declares
|
|
745
|
+
* no `prepare.reuse` roots.
|
|
746
|
+
*/
|
|
747
|
+
export const STAGED_DISCOVERY_HINT = 'hint: the staged candidate checkout holds tracked files only — declare your dependency directories ' +
|
|
748
|
+
'in .gateforge/runtime.yml (prepare: { reuse: [node_modules] }), see REFERENCE "Staged runtime"';
|
|
749
|
+
/**
|
|
750
|
+
* Whether the error is a test-discovery failure inside
|
|
751
|
+
* the staged candidate: the pack's typed discovery
|
|
752
|
+
* error, or the usage error the CLI maps it to (its
|
|
753
|
+
* message names the playwright invocation that could
|
|
754
|
+
* not enumerate the candidate's tests).
|
|
755
|
+
*/
|
|
756
|
+
export function isStagedDiscoveryFailure(error) {
|
|
757
|
+
if (error instanceof TestDiscoveryError)
|
|
758
|
+
return true;
|
|
759
|
+
if (error instanceof UsageError) {
|
|
760
|
+
return /playwright --list|playwright CLI not found/.test(error.message);
|
|
761
|
+
}
|
|
762
|
+
return false;
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* Whether the candidate's runtime document declares at
|
|
766
|
+
* least one `prepare.reuse` dependency directory — the
|
|
767
|
+
* sanctioned bridge from the user repository into the
|
|
768
|
+
* staged checkout.
|
|
769
|
+
*/
|
|
770
|
+
export function runtimeDeclaresReuse(runtimeDoc) {
|
|
771
|
+
return (runtimeDoc?.prepare?.reuse ?? []).length > 0;
|
|
772
|
+
}
|
|
695
773
|
/**
|
|
696
774
|
* Names the report's exit-code line for what it is when a non-blocking
|
|
697
775
|
* mode softened the run's exit code.
|
|
@@ -982,7 +1060,14 @@ export async function runCheckGate(io, options) {
|
|
|
982
1060
|
// entry (E15) unless a resolved mapping covers it. The provider
|
|
983
1061
|
// identity is preserved throughout — an expanded run never stamps
|
|
984
1062
|
// `all-files` as the diff provider.
|
|
985
|
-
let scopeDecision = {
|
|
1063
|
+
let scopeDecision = {
|
|
1064
|
+
mode: 'all',
|
|
1065
|
+
changedFiles: [],
|
|
1066
|
+
expandedBecause: [],
|
|
1067
|
+
unmappedFiles: [],
|
|
1068
|
+
policyInputs: [],
|
|
1069
|
+
policyInputsOnly: false,
|
|
1070
|
+
};
|
|
986
1071
|
let mismatchBlocking = [];
|
|
987
1072
|
let scopeDiscoveryTimings;
|
|
988
1073
|
if (scopeAwareRun) {
|
|
@@ -1015,6 +1100,21 @@ export async function runCheckGate(io, options) {
|
|
|
1015
1100
|
const knownSourceFiles = [
|
|
1016
1101
|
...new Set(pipeline.graph.resources.flatMap((resource) => resource.id === null ? [] : sourcesByResourceId(pipeline.graph, pipeline.behaviorCatalog).get(resource.id) ?? [])),
|
|
1017
1102
|
];
|
|
1103
|
+
// 0.9.0 D2: the Gateforge-owned policy inputs of this change set are
|
|
1104
|
+
// classified here (check owns the candidate checkout; `scope.ts` stays
|
|
1105
|
+
// pure) so they never become unmapped product changes and their change
|
|
1106
|
+
// set can be recognized as product-behavior-neutral.
|
|
1107
|
+
// 0.9.1: the base-text reader reads a file at the base revision the
|
|
1108
|
+
// provider diffs against (HEAD for the staged diff, the merge/CI base
|
|
1109
|
+
// for the platform diffs), so the `.gitignore` engine-state block
|
|
1110
|
+
// `init` appends is recognized as wiring. Staged-candidate runs (a
|
|
1111
|
+
// frozen index) take the reader the orchestrator resolved against the
|
|
1112
|
+
// USER's repository BEFORE the process moved to the isolated checkout:
|
|
1113
|
+
// the checkout's HEAD is the staged tree, not the base, so the base
|
|
1114
|
+
// revision's objects are reachable only in the user's repository.
|
|
1115
|
+
const ownedInputs = gateforgeOwnedInputs(io.cwd, pipeline.changedFiles, config, fixedChangedFiles === undefined
|
|
1116
|
+
? changeBaseTextReader(providerIdentity, io.cwd, io.env) ?? undefined
|
|
1117
|
+
: options.fixedBaseText);
|
|
1018
1118
|
scopeDecision = computeEvaluationScope({
|
|
1019
1119
|
config,
|
|
1020
1120
|
changedFiles: pipeline.changedFiles,
|
|
@@ -1023,6 +1123,7 @@ export async function runCheckGate(io, options) {
|
|
|
1023
1123
|
mappingSidecar: sidecar !== null,
|
|
1024
1124
|
knownSourceFiles,
|
|
1025
1125
|
strictE2E: config.enforcement?.strictE2E === true,
|
|
1126
|
+
policyInputs: [...ownedInputs.keys()],
|
|
1026
1127
|
});
|
|
1027
1128
|
// CHANGE_UNMAPPED (plan §5.4, E15): strict mode blocks unclassified
|
|
1028
1129
|
// changes unless a resolved mapping covers the file (journey
|
|
@@ -1038,7 +1139,14 @@ export async function runCheckGate(io, options) {
|
|
|
1038
1139
|
'stay visible and blocking until mapped (strict E2E mode)',
|
|
1039
1140
|
location: { file, line: 1, col: 0 },
|
|
1040
1141
|
cause: 'CHANGE_UNMAPPED',
|
|
1041
|
-
|
|
1142
|
+
// 0.9.0 problem 26: the remediation names the step that actually
|
|
1143
|
+
// attributes the file. `gateforge explain <file>` prints what the file
|
|
1144
|
+
// is and what governs it (a discovered resource, a gate input, or an
|
|
1145
|
+
// unclassified change) so the owner can map, declare or detect it.
|
|
1146
|
+
nextAction: `Attributing '${file}' starts with \`gateforge explain ${file}\`, which prints what the file is ` +
|
|
1147
|
+
'and what governs it: map the detected resource, declare documentation folders with ' +
|
|
1148
|
+
'`gateforge init --docs-exclude <folders>`, or add the detection that owns the file. ' +
|
|
1149
|
+
'Never weaken the policy.',
|
|
1042
1150
|
}));
|
|
1043
1151
|
mismatchBlocking = [...mismatchBlocking, ...unmappedBlocking];
|
|
1044
1152
|
// The local-staged provider lists index changes, but discovery reads
|
|
@@ -1057,6 +1165,8 @@ export async function runCheckGate(io, options) {
|
|
|
1057
1165
|
changedFiles: scopeDecision.changedFiles,
|
|
1058
1166
|
expandedBecause: scopeDecision.expandedBecause,
|
|
1059
1167
|
unmappedFiles: scopeDecision.unmappedFiles,
|
|
1168
|
+
policyInputs: scopeDecision.policyInputs,
|
|
1169
|
+
policyInputsOnly: scopeDecision.policyInputsOnly,
|
|
1060
1170
|
};
|
|
1061
1171
|
mismatchBlocking = [
|
|
1062
1172
|
...mismatchBlocking,
|
|
@@ -1073,6 +1183,24 @@ export async function runCheckGate(io, options) {
|
|
|
1073
1183
|
}
|
|
1074
1184
|
}
|
|
1075
1185
|
}
|
|
1186
|
+
// 0.9.0 D2: the adopted baseline is a recorded, shrink-only statement of
|
|
1187
|
+
// pre-existing debt, not an owner risk acceptance, so it survives the
|
|
1188
|
+
// strict-E2E re-grade while a change set is provably product-behavior-
|
|
1189
|
+
// neutral: Gateforge-owned policy inputs only (the scope for those files is
|
|
1190
|
+
// unchanged — they keep expanding as gate-defining inputs exactly as
|
|
1191
|
+
// today). The forgiveness is granted only when the owner has pinned the
|
|
1192
|
+
// policy revision that governs those files: a mismatching pin still blocks
|
|
1193
|
+
// on its own, and with no pin today's reporting stays (adopted debt is
|
|
1194
|
+
// re-graded as blocking). An owner waiver is never forgiveness here.
|
|
1195
|
+
const adoptedBaselineSurvivesStrictE2E = diffScoped &&
|
|
1196
|
+
scopeDecision.policyInputsOnly &&
|
|
1197
|
+
evaluateApprovedPolicy(docsApprovalResolution ??
|
|
1198
|
+
resolveApprovedPolicyDigest({
|
|
1199
|
+
flag: options.approvedPolicyDigest,
|
|
1200
|
+
env: io.env,
|
|
1201
|
+
candidateCwd: io.cwd,
|
|
1202
|
+
candidateConfig: config,
|
|
1203
|
+
}), docsApprovalDigest ?? trustedPolicyDigestForConfig(io.cwd, config), config.enforcement?.strictE2E === true || hasOwnerExclusions).status === 'enforced';
|
|
1076
1204
|
// Static annotations are compared with generated sidecar entries. The
|
|
1077
1205
|
// advisory is deliberately separate from blockers for this warning-only
|
|
1078
1206
|
// release period; only the tracked sidecar and a verified receipt bind
|
|
@@ -1195,6 +1323,8 @@ export async function runCheckGate(io, options) {
|
|
|
1195
1323
|
witnessVerifierKeys: verifierKeyring?.keys.map((entry) => entry.key),
|
|
1196
1324
|
...(carriedEvidence === null ? {} : { carriedEvidence }),
|
|
1197
1325
|
baseline: adoptedBaseline,
|
|
1326
|
+
// 0.9.0 D2: see `adoptedBaselineSurvivesStrictE2E` above.
|
|
1327
|
+
adoptedBaselineSurvivesStrictE2E,
|
|
1198
1328
|
evidenceContext: {
|
|
1199
1329
|
expectedInputDigest: expectedDigest,
|
|
1200
1330
|
snapshotUnavailable,
|
|
@@ -1508,6 +1638,11 @@ export async function runCheckGate(io, options) {
|
|
|
1508
1638
|
// a joined endpoint pairs a proven response model with a read, so
|
|
1509
1639
|
// a repository without both packs renders byte-identically.
|
|
1510
1640
|
...responseFieldAdvisories(pipeline.endpointInventory.endpoints),
|
|
1641
|
+
// Unmatched by-id routes the owner graded as advisory (0.9.0,
|
|
1642
|
+
// owner decision D7). Same code, advisory channel, never blocking:
|
|
1643
|
+
// the entries are already out of `pipeline.policy.blocking`, so
|
|
1644
|
+
// the exit code and `check --changed` are untouched.
|
|
1645
|
+
...pipeline.unmatchedRouteAdvisories,
|
|
1511
1646
|
],
|
|
1512
1647
|
waiverCounts: evaluated.waiverCounts,
|
|
1513
1648
|
baseline: baselineReport,
|
|
@@ -1545,6 +1680,15 @@ export async function runCheckGate(io, options) {
|
|
|
1545
1680
|
}),
|
|
1546
1681
|
},
|
|
1547
1682
|
});
|
|
1683
|
+
// Unmatched by-id routes the owner graded as advisory (0.9.0, owner
|
|
1684
|
+
// decision D7): loud at the TOP of the text report, not buried in the
|
|
1685
|
+
// advisory tail, because a demoted finding must be impossible to miss.
|
|
1686
|
+
// The JSON document keeps them in `advisories` under the same code.
|
|
1687
|
+
if (format === 'text') {
|
|
1688
|
+
const banner = unmatchedRouteBannerLines(pipeline.unmatchedRouteAdvisories, pipeline.unmatchedRoutesMode);
|
|
1689
|
+
if (banner.length > 0)
|
|
1690
|
+
report = `${banner.join('\n')}\n${report}`;
|
|
1691
|
+
}
|
|
1548
1692
|
if (newDebt !== null) {
|
|
1549
1693
|
if (format === 'json') {
|
|
1550
1694
|
const document = JSON.parse(report);
|