@webpieces/pr-gate 0.4.887 โ 0.4.888
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webpieces/pr-gate",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.888",
|
|
4
4
|
"description": "Gated PR system: 3-point squash-merge, merge validation gate, and red/yellow/green PR dashboard. Standalone scripts, no Nx dependency required.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@inversifyjs/binding-decorators": "1.1.5",
|
|
19
|
-
"@webpieces/hook-runtime": "0.4.
|
|
20
|
-
"@webpieces/rules-config": "0.4.
|
|
19
|
+
"@webpieces/hook-runtime": "0.4.888",
|
|
20
|
+
"@webpieces/rules-config": "0.4.888",
|
|
21
21
|
"inversify": "7.10.4",
|
|
22
22
|
"reflect-metadata": "0.2.2",
|
|
23
|
-
"@webpieces/tooling-common": "0.4.
|
|
24
|
-
"@webpieces/repo-workflow-core": "0.4.
|
|
23
|
+
"@webpieces/tooling-common": "0.4.888",
|
|
24
|
+
"@webpieces/repo-workflow-core": "0.4.888"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@webpieces/tooling-testkit": "0.4.
|
|
30
|
+
"@webpieces/tooling-testkit": "0.4.888"
|
|
31
31
|
},
|
|
32
32
|
"types": "./src/index.d.ts",
|
|
33
33
|
"bin": {
|
|
@@ -287,7 +287,8 @@ let Dashboard = class Dashboard {
|
|
|
287
287
|
lines.push(new review_identity_renderer_1.ReviewIdentityRenderer().renderAuthor(input.author.harness, input.author.model, false));
|
|
288
288
|
lines.push('');
|
|
289
289
|
const flags = this.nonGreenFlags(input);
|
|
290
|
-
|
|
290
|
+
if (flags.length > 0)
|
|
291
|
+
lines.push('Non-green Flags (full list in first comment to avoid large git logs)');
|
|
291
292
|
for (const flag of flags)
|
|
292
293
|
lines.push(`- ${flag}`);
|
|
293
294
|
// ALWAYS the last bullet, green case included. Without it the compact body reads as the whole
|
|
@@ -367,7 +368,7 @@ let Dashboard = class Dashboard {
|
|
|
367
368
|
}
|
|
368
369
|
if (input.disables.eslintCount > 0)
|
|
369
370
|
flags.push(`ESLint Disables Added: ๐ก ${input.disables.eslintCount} line(s)`);
|
|
370
|
-
//
|
|
371
|
+
// Passing reviews are implicit in main's history; only non-green verdicts belong here.
|
|
371
372
|
//
|
|
372
373
|
// SUPPRESSED replaces those N bullets with exactly ONE, whatever N is. Not because the per-reviewer
|
|
373
374
|
// bullets would lie โ `checklistStatusText` was already hardened against a false "passed" โ but
|
|
@@ -380,6 +381,8 @@ let Dashboard = class Dashboard {
|
|
|
380
381
|
flags.push(`Checklists โ ${this.suppressedTail(input.suppressedChecklistCount)}`);
|
|
381
382
|
}
|
|
382
383
|
for (const row of input.checklists) {
|
|
384
|
+
if (row.status === rules_config_1.CK_PASS)
|
|
385
|
+
continue;
|
|
383
386
|
flags.push(`Checklist โ ${row.title}: ${this.checklistStatusText(row)}`);
|
|
384
387
|
}
|
|
385
388
|
if (input.notBriefed.length > 0)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/dashboard/dashboard.ts"],"names":[],"mappings":";;;;AAAA,yEAAoE;AACpE,0DAAuP;AACvP,yCAA2D;AAG3D;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAG,iCAAiC,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG,0DAA0D,CAAC;AAEzF;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,kFAAkF,CAAC;AAE1G,MAAa,UAAU;IAC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sourcesContent":["import { ReviewIdentityRenderer } from './review-identity-renderer';\nimport { GateDefinition, WEBPIECES_DISABLE, PrSummary, CK_PASS, CK_WARN, CK_OVERRIDDEN, CK_ORANGE_FIXED, CK_FAIL, CK_MISSING, HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_KEY_TURN_OFF_ALL_REVIEWERS, HOTFIX_AUDIT_BANNER } from '@webpieces/rules-config';\nimport { injectable, bindingScopeValues } from 'inversify';\nimport { AuthorIdentity } from './author-identity';\n\n/**\n * Hidden marker on the FULL-DASHBOARD comment โ the \"1st comment\" the PR description points at โ so\n * finish PATCHes its own comment on every push instead of appending a new one, exactly like the checklist\n * comment (see ChecklistCommentRenderer, which owns the 2nd).\n *\n * This comment did not exist before the PR description became the git-log body: the dashboard WAS the\n * description. Moving it here is what keeps a risk table out of every squash commit on main.\n */\nexport const DETAIL_COMMENT_MARKER = '<!-- webpieces-pr-detail v1 -->';\n\n/**\n * Footer on the full-dashboard comment. Names the tooling by REPO URL so a reader landing on a\n * generated comment in any consumer repo can find what generated it.\n *\n * It deliberately no longer asserts \"build ran via nx affected โ not self-attested\": that sentence was\n * hard-coded and therefore wrong on every repo whose `buildCommand` is not nx. The build command is now\n * named for real, from config, in the PR-body footer โ see {@link Dashboard.renderPrBody}.\n */\nconst DETAIL_COMMENT_FOOTER = 'Generated by https://github.com/deanhiller/webpieces-ts ';\n\n/**\n * The last bullet of the PR description, and therefore of every squash commit body.\n *\n * Positional (\"1st\"/\"2nd\") on purpose โ it is what a reader of `git log` can actually act on, far more\n * useful than naming an HTML marker they cannot see. On a PR opened by an OLDER release the checklist\n * comment already exists, so the dashboard comment lands second and this reads one off for that PR's\n * remaining life; it is cosmetic and self-corrects on the next PR.\n */\nconst DETAIL_POINTER = '(Full dashboard in 1st comment, reviewer checklist in 2nd โ kept out of git log)';\n\nexport class GateResult {\n name: string;\n warningColor: string; // 'yellow' | 'red' โ the color shown WHEN files matched (green is implicit)\n matchedFiles: string[];\n\n constructor(name: string, warningColor: string, matchedFiles: string[]) {\n this.name = name;\n this.warningColor = warningColor;\n this.matchedFiles = matchedFiles;\n }\n}\n\n// One row for a consumer review checklist the branch triggered. `status` is the resolved verdict (one of\n// CK_PASS | CK_WARN | CK_OVERRIDDEN | CK_FAIL | CK_MISSING | CK_BAD_FORMAT); `detail` is the reviewer\n// output / override justification. A row is always PASS/WARN/OVERRIDDEN by the time it renders โ a failed,\n// missing or unreadable verdict throws before the dashboard is built. Rendered into the PR body so the\n// verdict reaches the server โ the PR body is the artifact of the local flow that leaves the checkout\n// (alongside the HMAC gate token that proves the flow ran).\nexport class ChecklistRow {\n title: string; // the checklist id (= reviewer subagent name)\n status: string; // CK_* verdict\n detail: string; // reviewer output / override justification (surfaced for OVERRIDDEN)\n\n constructor(title: string, status: string, detail = '') {\n this.title = title;\n this.status = status;\n this.detail = detail;\n }\n}\n\n/**\n * One severity bucket of the rolled-up **Checklists** dashboard row: its emoji, the words that describe it,\n * and which checklists landed in it. Data-only.\n *\n * A bucket knows whether it should NAME its members: the non-green ones do (a reader has to know WHICH\n * reviewer to go read), the passed bucket does not (a list of what went fine is noise on a one-line row).\n */\nclass RollupBucket {\n label: string; // 'blocking' | 'overridden' | 'with concerns' | 'passed'\n emoji: string;\n named: boolean; // list the checklist ids on the row, or report a bare count\n titles: string[];\n\n constructor(label: string, emoji: string, named: boolean) {\n this.label = label;\n this.emoji = emoji;\n this.named = named;\n this.titles = [];\n }\n}\n\nexport class DisableCounts {\n webpiecesCount: number;\n eslintCount: number;\n webpiecesRules: string[];\n\n constructor(webpiecesCount: number, eslintCount: number, webpiecesRules: string[]) {\n this.webpiecesCount = webpiecesCount;\n this.eslintCount = eslintCount;\n this.webpiecesRules = webpiecesRules;\n }\n}\n\nexport class DashboardInput {\n title: string;\n gateResults: GateResult[];\n disables: DisableCounts;\n buildPassed: boolean;\n forkPoint: string;\n featureHead: string;\n mainHead: string;\n review: PrSummary; // AI-authored risk/violations/summary (from summary.json)\n checklists: ChecklistRow[]; // consumer checklists this branch triggered; [] for non-adopting repos\n /**\n * `commands.pr-gate.buildCommand` VERBATIM, named in the PR-body footer so `git log` records WHICH\n * command vouched for the commit. Read from config rather than hard-coded because the footer used to\n * assert \"build ran via nx affected\" on every repo, including those whose buildCommand is not nx.\n *\n * REQUIRED, with no default, and `checklists` lost its `= []` for the same reason. A defaulted\n * `buildCommand: string = ''` let every pre-existing 9-argument construction keep compiling while\n * silently rendering a footer that claims nothing โ an absence that quietly means \"no build was\n * named\", which is the widening-by-omission the compatibility policy calls out. Making it required\n * means every caller states what vouched for the commit, and the empty string stays available for a\n * repo that genuinely has no build command, but only when someone writes it down.\n */\n buildCommand: string;\n /**\n * How many checklists WOULD have run but were disabled by either the project policy\n * (`reviewerAgents: 0`) or the machine kill switch โ required ones included. `0` means no matching\n * checklist was suppressed; it is NOT a way of saying \"no checklist matched\", which\n * `checklists.length === 0` already says.\n *\n * The two states are byte-identical in `checklists` (both empty) and that is precisely the defect this\n * field closes: without it, a PR whose four REQUIRED reviewers were switched off is indistinguishable\n * in `main`'s history from a docs-only typo fix that legitimately matched nothing. REQUIRED with no\n * default, for the reason `buildCommand` is: a defaulted `0` would let every existing construction\n * keep compiling while asserting, silently, that nothing was suppressed.\n */\n suppressedChecklistCount: number;\n author: AuthorIdentity;\n hotfix: boolean;\n /**\n * Checklists the final diff matches that were never briefed, because a review round had already started\n * when a later commit first triggered them (issue #1053). NON-BLOCKING and informational: the checklist\n * set is frozen at the briefing. Assigned after construction; empty on most PRs.\n */\n notBriefed: string[];\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n title: string,\n gateResults: GateResult[],\n disables: DisableCounts,\n buildPassed: boolean,\n forkPoint: string,\n featureHead: string,\n mainHead: string,\n review: PrSummary,\n checklists: ChecklistRow[],\n buildCommand: string,\n suppressedChecklistCount: number,\n author: AuthorIdentity,\n hotfix: boolean,\n ) {\n this.title = title;\n this.gateResults = gateResults;\n this.disables = disables;\n this.buildPassed = buildPassed;\n this.forkPoint = forkPoint;\n this.featureHead = featureHead;\n this.mainHead = mainHead;\n this.review = review;\n this.checklists = checklists;\n this.buildCommand = buildCommand;\n this.suppressedChecklistCount = suppressedChecklistCount;\n this.author = author;\n this.hotfix = hotfix;\n this.notBriefed = [];\n }\n}\n\n/** Renders the PR-gate dashboard markdown (gates ร changed files, disables, risk, 3-point hashes). */\n@injectable(bindingScopeValues.Singleton)\nexport class Dashboard {\n // Disabled gates are in-file examples (JSON has no comments) โ skip them entirely.\n computeGateResults(gates: GateDefinition[], changedFiles: string[]): GateResult[] {\n return gates\n .filter((gate: GateDefinition): boolean => !gate.disabled)\n .map((gate: GateDefinition): GateResult => {\n const matched = changedFiles.filter((file: string): boolean => this.matchesAny(gate.patterns, file));\n return new GateResult(gate.name, gate.warningColor, matched);\n });\n }\n\n // Count disables ADDED in this PR by scanning added (`+`) lines of the diff patch. Rule-aware:\n // reports the names written in each directive, including newly declared and client-owned rules.\n countAddedDisables(patch: string): DisableCounts {\n let webpiecesCount = 0;\n let eslintCount = 0;\n const rules = new Set<string>();\n\n for (const line of patch.split('\\n')) {\n if (!line.startsWith('+') || line.startsWith('+++')) continue;\n if (line.includes(WEBPIECES_DISABLE)) {\n webpiecesCount += 1;\n const directive = line.slice(line.indexOf(WEBPIECES_DISABLE) + WEBPIECES_DISABLE.length).split('--')[0];\n for (const named of directive.split(',')) {\n const token = named.trim();\n if (/^[a-z][a-z0-9-]*$/.test(token)) rules.add(token);\n }\n }\n if (line.includes('eslint-disable')) eslintCount += 1;\n }\n return new DisableCounts(webpiecesCount, eslintCount, Array.from(rules).sort());\n }\n\n /**\n * The FULL dashboard โ every row (green included), the whole summary, the 3-point hash points.\n *\n * This is the **1st PR comment**, not the PR description. It used to be the description, and that is\n * exactly what put it into main's history: GitHub's `squash_merge_commit_message: PR_BODY` copies the\n * description verbatim into the squash commit, so every `git log` entry carried the risk table, the\n * hash points and the gate token. The description now holds {@link renderPrBody}'s compact form, and\n * everything long-form lives here where a reader can open it and `git log` never sees it.\n *\n * Machine-facing content belongs HERE too โ this comment carries the HMAC gate token. That is the\n * whole rule that keeps the description clean: an HTML comment is invisible in rendered markdown but\n * perfectly visible in `git log`, so nothing hidden may live in the description.\n */\n renderDetailComment(input: DashboardInput): string {\n const lines: string[] = [];\n if (input.hotfix) {\n lines.push(HOTFIX_AUDIT_BANNER, '');\n }\n lines.push('## ๐ฆ PR Gate Dashboard');\n lines.push('');\n for (const line of this.riskLines(input.review)) lines.push(line);\n lines.push(new ReviewIdentityRenderer().renderAuthor(input.author.harness, input.author.model));\n lines.push(`**Build (${input.hotfix ? 'hotfix-ci: build + test only' : 'nx affected'}):** ${input.buildPassed ? '๐ข Passed' : '๐ด Failed'}`);\n for (const result of input.gateResults) lines.push(this.gateLine(result));\n lines.push(this.disableLine(input.disables));\n const eslintEmoji = input.disables.eslintCount === 0 ? '๐ข No' : `๐ก ${input.disables.eslintCount} line(s)`;\n lines.push(`**ESLint Disables Added:** ${eslintEmoji}`);\n // ONE rolled-up row for ALL triggered consumer checklists โ a worst-of colour and a count, sitting\n // with the other status rows. It used to be one row PER checklist, each inlining that checklist's\n // whole verdict/override paragraph: on a six-checklist PR that was the same ~90-word override\n // repeated six times, burying the signal rows above it โ and every word of it was already in the\n // checklist COMMENT, per reviewer, in full. ALWAYS emitted, including the zero case: \"no reviewer\n // looked at this PR\" is a fact a reader must be told, and an absent row silently reads as a green\n // all-clear (see checklistRollupLine).\n lines.push(input.hotfix ? '**Checklists:** โซ BYPASSED by /hotfix/ convention ยท 0 reviewer agents ran' : this.checklistRollupLine(input.checklists, input.suppressedChecklistCount));\n if (input.notBriefed.length > 0) lines.push(this.notBriefedLine(input.notBriefed));\n lines.push('');\n if (input.review.summary.trim() !== '') {\n lines.push('### Summary');\n lines.push(input.review.summary.trim());\n lines.push('');\n }\n lines.push('### ๐ 3-Point Hash Points');\n lines.push(`- Fork point (A): \\`${input.forkPoint.slice(0, 12)}\\``);\n lines.push(`- Feature HEAD (B): \\`${input.featureHead.slice(0, 12)}\\``);\n lines.push(`- Main HEAD (C): \\`${input.mainHead.slice(0, 12)}\\``);\n lines.push('');\n // A /hotfix/ branch is posted by its own command (issue #1057); the footer names the poster.\n lines.push(`<sub>๐ค ${DETAIL_COMMENT_FOOTER} ${input.hotfix ? 'wp-upsert-hotfix-pr' : 'wp-finish-upsert-pr'}</sub>`);\n return lines.join('\\n');\n }\n\n /**\n * The PR DESCRIPTION โ which is also, byte for byte, the squash-commit body that lands in main.\n *\n * โโโ Why one string serves both โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n * There used to be two: a long dashboard in the description and this compact form passed to\n * `gh pr merge --body-file`. That made the good `git log` reachable ONLY through an explicit\n * `--body-file` merge, because every other route (the GitHub Merge button, a bare `gh pr merge`)\n * takes its body from the repo's `squash_merge_commit_message`, and on `PR_BODY` that copied the\n * whole dashboard into history. Two repos ran that way for months.\n *\n * Making the DESCRIPTION the compact form inverts it: `PR_BODY` now yields exactly the right commit,\n * so the UI button, a bare `gh pr merge`, `wp-land-pr` and finish's own auto-merge all converge on\n * identical bytes. It rests on two GitHub repo settings โ `squash_merge_commit_title: PR_TITLE` and\n * `squash_merge_commit_message: PR_BODY` โ which are NOT a consumer's job: they are server-side, so no\n * config key can express them, and SquashSettingsEnforcer pins them on every run. That convergence is\n * the point, and `pr-body-is-merge-body.spec.ts` pins it.\n *\n * โโโ The shape, and why each part earns its line โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n * The URL leads, BARE โ no caption. It used to carry `(for git log)`, which was aimed at a reader on\n * the PR page (where the link is redundant, being the page you are already on) and was meant to stop\n * them deleting it. But this string is also the squash-commit body, so that caption landed verbatim in\n * `main`'s history on every commit, forever, to serve one transient reading. In `git log` a bare URL\n * is self-evidently the way back and needs no explanation. The permanent surface wins.\n * Then the risk score (always). Then ONLY the non-green flags, under a heading that SAYS the full list\n * is in the 1st comment โ a `git log` reader has no page to glance at, so the heading has to carry\n * that itself rather than leaving \"why is this list short?\" to the pointer bullet alone. Then the\n * summary capped at 4 sentences, then the footer naming the build command that vouched for it.\n *\n * The hidden gate-token marker is appended AFTER this by the caller, so it is the very last line of\n * the description and therefore of the commit. It stays an HTML comment โ invisible on the PR page,\n * visible in `git log` โ which is a deliberate accepted trade: the alternative was reshaping a live\n * CI-critical surface that two consumer repos verify on every PR, to save one line of history.\n */\n renderPrBody(input: DashboardInput, prUrl: string): string {\n const lines: string[] = [];\n if (input.hotfix) {\n lines.push(HOTFIX_AUDIT_BANNER, '');\n }\n if (prUrl !== '') {\n lines.push(prUrl);\n lines.push('');\n }\n lines.push(`Risk: ${this.riskBar(input.review.riskScore)} ${input.review.riskScore}/100 ${input.review.riskEmoji} (${input.review.riskLevel})`);\n lines.push(new ReviewIdentityRenderer().renderAuthor(input.author.harness, input.author.model, false));\n lines.push('');\n const flags = this.nonGreenFlags(input);\n lines.push(flags.length === 0 ? 'Flags: ๐ข all green' : 'Non-green Flags (full list in first comment to avoid large git logs)');\n for (const flag of flags) lines.push(`- ${flag}`);\n // ALWAYS the last bullet, green case included. Without it the compact body reads as the whole\n // record, and the reader never learns that every green row, the full summary and each reviewer's\n // output are one click away.\n lines.push(`- ${DETAIL_POINTER}`);\n const summary = this.firstSentences(input.review.summary.trim(), 4);\n if (summary !== '') {\n lines.push('');\n lines.push(summary);\n }\n lines.push('');\n lines.push(this.prBodyFooter(input.buildCommand, input.hotfix));\n return this.gitLogSafe(lines.join('\\n'));\n }\n\n /**\n * Makes THIS renderer own the invariant `wp-land-pr` checks: the compact body carries no markdown\n * heading and no table pipe.\n *\n * It is applied to the WHOLE joined string rather than to each author-supplied field, on purpose.\n * Every field this body interpolates โ the review summary, an override justification, a checklist\n * title, a disabled rule name, `commands.pr-gate.buildCommand` โ is text this package did not write,\n * and a `|` reaches all of them for entirely ordinary non-markdown reasons: a TypeScript union\n * (`'open' | 'paused'`), a regex alternation, a quoted shell pipeline, an OR in prose. Sanitizing at\n * the single exit point means a field added later is covered without anyone remembering to wrap it,\n * and none of this renderer's own literals contain either marker, so nothing of ours changes.\n *\n * Before this, `wp-finish-upsert-pr` would happily POST such a body and report success, and then\n * `wp-land-pr` refused those exact bytes โ two commands in one flow disagreeing about what the\n * renderer produces, with a refusal that blamed an old release and prescribed re-running finish,\n * which re-rendered the identical pipe from the unchanged `summary.json`. An infinite loop costing a\n * CI cycle per turn.\n *\n * `ยฆ` (BROKEN BAR) rather than `\\|`: this string's home is `git log` in a terminal, where a\n * backslash is literal punctuation and a markdown escape means nothing. The substitution is visible\n * and reads correctly; the full, unaltered text is one click away in the 1st comment, which this\n * body's last bullet always points at. `##` collapses to `#` for the same reason โ a heading in a\n * summary is markdown a plain-text history cannot carry either.\n */\n private gitLogSafe(body: string): string {\n return body.replace(/\\|/g, '\\u00a6').replace(/#{2,}/g, '#');\n }\n\n /**\n * The footer, naming the build command from `commands.pr-gate.buildCommand` VERBATIM.\n *\n * No backticks: this string's primary home is `git log` in a terminal, where markdown ticks are\n * literal punctuation. \"run locally\" is the honest claim โ this is the LOCAL gate's receipt, and the\n * server-side proof is the gate token in the 1st comment, not this sentence.\n */\n private prBodyFooter(buildCommand: string, hotfix: boolean): string {\n const cmd = buildCommand.trim();\n const ran = cmd === '' ? '' : ` (${cmd} run locally)`;\n // A /hotfix/ branch is posted by its own command (issue #1057); the footer names the poster.\n const poster = hotfix ? 'wp-upsert-hotfix-pr' : 'wp-finish-upsert-pr';\n return `Generated by webpieces-ts ${poster}${ran}`;\n }\n\n // Every dashboard row that is NOT green, as a flat bullet list for the commit body. Green rows\n // (build passed, gate did not match, zero disables/violations) are intentionally omitted.\n private nonGreenFlags(input: DashboardInput): string[] {\n const flags: string[] = [];\n if (input.hotfix) {\n flags.push('โ ๏ธ HOTFIX โ reviews, ticket enforcement, Webpieces rules, ESLint, and format checks bypassed; compilation and tests ran');\n }\n if (!input.buildPassed) flags.push('Build (nx affected): ๐ด Failed');\n if (input.review.violations.length > 0) flags.push(`Pattern Violations: ๐ก ${input.review.violations.length} violation(s)`);\n for (const result of input.gateResults) {\n if (result.matchedFiles.length === 0) continue;\n const emoji = result.warningColor === 'red' ? '๐ด' : '๐ก';\n flags.push(`${result.name}: ${emoji} ${result.matchedFiles.length} file(s)`);\n }\n if (input.disables.webpiecesCount > 0) {\n const which = input.disables.webpiecesRules.length > 0 ? ` โ ${input.disables.webpiecesRules.join(', ')}` : '';\n flags.push(`Webpieces Disables Added: ๐ก ${input.disables.webpiecesCount} line(s)${which}`);\n }\n if (input.disables.eslintCount > 0) flags.push(`ESLint Disables Added: ๐ก ${input.disables.eslintCount} line(s)`);\n // A triggered checklist is noteworthy in main's history โ carry each into the commit body.\n //\n // SUPPRESSED replaces those N bullets with exactly ONE, whatever N is. Not because the per-reviewer\n // bullets would lie โ `checklistStatusText` was already hardened against a false \"passed\" โ but\n // because with the kill switch on there are NO rows at all, and a body with no `Checklist โ `\n // bullets is byte-identical to a PR that legitimately matched zero checklists (a docs-only typo\n // fix). Without this line, \"four REQUIRED reviewers were killed by a flag\" and \"nothing applied\n // here\" are indistinguishable in main's history forever. One compact bullet, in the existing\n // style โ the loud version belongs in stage โก's output and the 1st comment, not in `git log`.\n if (input.suppressedChecklistCount > 0) {\n flags.push(`Checklists โ ${this.suppressedTail(input.suppressedChecklistCount)}`);\n }\n for (const row of input.checklists) {\n flags.push(`Checklist โ ${row.title}: ${this.checklistStatusText(row)}`);\n }\n if (input.notBriefed.length > 0) flags.push(`Checklists โ ${this.notBriefedLine(input.notBriefed)}`);\n return flags;\n }\n\n /**\n * The ONE informational line for checklists first triggered after the review was briefed (issue #1053).\n * โช and \"not blocking\" both, so it can be read neither as a pass nor as something the PR still owes.\n */\n private notBriefedLine(ids: readonly string[]): string {\n return `โช not reviewed (not blocking): ${ids.join(', ')} โ first triggered after the review was briefed`;\n }\n\n // Emoji + words for a checklist verdict, shared by the dashboard row and the commit-body flag.\n // Every state is matched EXPLICITLY and the fallthrough names the status it did not recognize. The\n // previous `return '๐ข passed'` fallthrough meant any newly-added verdict rendered as a clean pass on\n // both the PR body and main's commit history until someone noticed โ exactly the wrong default.\n private checklistStatusText(row: ChecklistRow): string {\n if (row.status === CK_OVERRIDDEN) {\n const why = row.detail.trim() !== '' ? ` โ override: ${row.detail.trim()}` : '';\n return `๐ OVERRIDDEN${why}`;\n }\n if (row.status === CK_ORANGE_FIXED) return `๐ ${row.detail}`;\n if (row.status === CK_WARN) return '๐ก passed with concerns';\n if (row.status === CK_FAIL) return '๐ด FAILED review';\n if (row.status === CK_MISSING) return 'โช not reviewed';\n if (row.status === CK_PASS) return '๐ข passed';\n return `โช unknown verdict (${row.status})`;\n }\n\n // First `max` sentences of `text`. A sentence ends at `. ! ?` ONLY when followed by whitespace or\n // end-of-string, so interior dots in filenames/paths/versions (dependencies.json, runtime-graph.ts,\n // 0.4.447) do NOT split โ and, unlike a greedy `[^.!?]+` regex, no text is ever dropped when such a\n // dot appears (that footgun silently deleted the run of prose up to the next real boundary). Keeps\n // the commit body scannable; the full summary still lives in the PR-body dashboard.\n private firstSentences(text: string, max: number): string {\n if (text === '') return '';\n const sentences: string[] = [];\n let start = 0;\n for (let i = 0; i < text.length && sentences.length < max; i++) {\n const ch = text[i];\n const isTerminator = ch === '.' || ch === '!' || ch === '?';\n const next = text[i + 1];\n if (isTerminator && (next === undefined || /\\s/.test(next))) {\n sentences.push(text.slice(start, i + 1).trim());\n start = i + 1;\n }\n }\n // Trailing text with no terminator still counts as a sentence (up to the cap).\n if (sentences.length < max && start < text.length) {\n const tail = text.slice(start).trim();\n if (tail !== '') sentences.push(tail);\n }\n return sentences.join(' ').trim();\n }\n\n // Self-contained glob matcher (** , * , ?) so pr-gate needs no extra runtime dependency.\n private globToRegex(pattern: string): RegExp {\n let re = '';\n let i = 0;\n while (i < pattern.length) {\n const ch = pattern[i];\n if (ch === '*' && pattern[i + 1] === '*') {\n re += '.*';\n i += 2;\n if (pattern[i] === '/') i += 1;\n continue;\n }\n if (ch === '*') {\n re += '[^/]*';\n i += 1;\n continue;\n }\n if (ch === '?') {\n re += '[^/]';\n i += 1;\n continue;\n }\n if ('.+^$(){}|[]\\\\'.includes(ch)) {\n re += '\\\\' + ch;\n i += 1;\n continue;\n }\n re += ch;\n i += 1;\n }\n return new RegExp('^' + re + '$');\n }\n\n private matchesAny(patterns: string[], file: string): boolean {\n for (const pattern of patterns) {\n if (this.globToRegex(pattern).test(file)) return true;\n }\n return false;\n }\n\n private gateLine(result: GateResult): string {\n if (result.matchedFiles.length === 0) return `**${result.name}:** ๐ข No`;\n const emoji = result.warningColor === 'red' ? '๐ด' : '๐ก';\n return `**${result.name}:** ${emoji} Yes (${result.matchedFiles.length} file(s))`;\n }\n\n /**\n * The ONE rolled-up **Checklists:** row, coloured worst-of across every checklist that ran, in the same\n * shape as its neighbours (`**Build (nx affected):** ๐ข Passed`). Counts and names only โ never a line\n * of reviewer output or override justification, which is the whole reason this row exists.\n */\n private checklistRollupLine(rows: readonly ChecklistRow[], suppressedCount: number): string {\n // FIRST, and ahead of the zero-ran case below, which would say \"no review checklist matched this\n // PR\" โ false here, and the one sentence that would turn a kill switch into an all-clear. โซ is a\n // colour no verdict uses, so it cannot be mistaken for a pass, a warning or a refusal.\n if (suppressedCount > 0) return this.suppressedChecklistLine(suppressedCount);\n const buckets = this.rollupBuckets(rows);\n const filled = buckets.filter((b: RollupBucket): boolean => b.titles.length > 0);\n // NO reviewer ran โ the SKIPPED icon, never green. Green claims something was checked and came back\n // clean; โช says nobody looked, which is what a reader has to be able to tell apart at a glance.\n if (filled.length === 0) {\n return '**Checklists:** โช 0 ran โ no review checklist matched this PR ยท see the checklist comment';\n }\n const allPassed = filled.length === 1 && !filled[0].named;\n const detail = allPassed ? 'all passed' : filled.map((b: RollupBucket): string => this.bucketPhrase(b)).join(', ');\n return `**Checklists:** ${filled[0].emoji} ${rows.length} ran โ ${detail} ยท per-checklist detail in the checklist comment`;\n }\n\n /**\n * The four severity buckets, WORST FIRST, so `filled[0]` is the roll-up colour: red beats orange beats\n * yellow beats green. The colours are the same vocabulary the comment already uses (see verdictEmoji).\n *\n * OVERRIDDEN is deliberately NOT folded into passed: an override is a human knowingly accepting a red\n * verdict, and a dashboard that painted that green would hide the single most review-worthy thing on\n * the PR. The blocking bucket is the FALLTHROUGH โ CK_FAIL, CK_MISSING, CK_BAD_FORMAT and any verdict\n * added later all land there, matching summary.json's own \"not pass|warn|overridden โ refuse\" rule\n * rather than a second list that could silently drift green.\n */\n /**\n * The full-dashboard row for a suppressed PR. Verbose is FINE here โ this lands in the PR's 1st\n * comment, not in `git log`.\n */\n private suppressedChecklistLine(suppressedCount: number): string {\n return `**Checklists:** ${this.suppressedTail(suppressedCount)}` + ' ยท NO reviewer subagent ran on this PR โ use a positive reviewerAgents value and disable the machine kill switch to get them back';\n }\n\n /**\n * The ONE sentence both the dashboard row and the commit-body bullet are built from, so the two can\n * never disagree about what was switched off or by what.\n *\n * Every part of it earns its place in `main`'s permanent history:\n * โข the COUNT, because \"suppressed 4\" and \"0 applicable\" are different facts and both must be\n * tellable apart forever โ an absent bullet says the second while meaning the first;\n * โข \"required included\", because otherwise it reads as an optional-only skip, which it is not;\n * โข both supported controls, because this compact input carries the count but not the source.\n * โซ is deliberately outside the verdict palette (๐ข๐ก๐ด๐ โช are all taken by checklistStatusText), so\n * nothing here can be mistaken for a verdict a reviewer actually returned.\n */\n private suppressedTail(suppressedCount: number): string {\n return `โซ ALL ${suppressedCount} SUPPRESSED (required included) by ` + `reviewer policy (reviewerAgents: 0 or ${HOME_KEY_TURN_OFF_ALL_REVIEWERS} in ` + `~/${HOME_CONFIG_DIR}/${HOME_CONFIG_FILE})`;\n }\n\n private rollupBuckets(rows: readonly ChecklistRow[]): RollupBucket[] {\n const blocking = new RollupBucket('blocking', '๐ด', true);\n const orangeFixed = new RollupBucket('orange, author-fixed (not re-reviewed)', '๐ ', true);\n const overridden = new RollupBucket('overridden', '๐ ', true);\n const warned = new RollupBucket('with concerns', '๐ก', true);\n const passed = new RollupBucket('passed', '๐ข', false);\n for (const row of rows) {\n if (row.status === CK_PASS) passed.titles.push(row.title);\n else if (row.status === CK_WARN) warned.titles.push(row.title);\n else if (row.status === CK_ORANGE_FIXED) orangeFixed.titles.push(row.title);\n else if (row.status === CK_OVERRIDDEN) overridden.titles.push(row.title);\n else blocking.titles.push(row.title);\n }\n return [blocking, orangeFixed, overridden, warned, passed];\n }\n\n // `2 overridden (a, b)` for the buckets a reviewer must act on; a bare `3 passed` for the one they need\n // no list of. Names are capped so a many-checklist repo still gets a ONE-LINE row.\n private bucketPhrase(bucket: RollupBucket): string {\n if (!bucket.named) return `${bucket.titles.length} ${bucket.label}`;\n return `${bucket.titles.length} ${bucket.label} (${this.compactNames(bucket.titles)})`;\n }\n\n private compactNames(titles: readonly string[]): string {\n const max = 4;\n if (titles.length <= max) return titles.join(', ');\n return `${titles.slice(0, max).join(', ')} +${titles.length - max} more`;\n }\n\n // 10-cell risk bar colored by band (๐ฉ โค25, ๐จ โค50, ๐ง โค75, ๐ฅ >75), at least one filled cell.\n private riskBar(score: number): string {\n const clamped = Math.max(0, Math.min(100, score));\n const cell = clamped <= 25 ? '๐ฉ' : clamped <= 50 ? '๐จ' : clamped <= 75 ? '๐ง' : '๐ฅ';\n const filled = Math.max(1, Math.min(10, Math.round(clamped / 10)));\n return cell.repeat(filled) + 'โฌ'.repeat(10 - filled);\n }\n\n // RISK section (the AI half): Risk Score bar, Risk Level, Pattern Violations.\n private riskLines(review: PrSummary): string[] {\n const violations = review.violations.length;\n const violationLine = violations === 0 ? '๐ข No' : `๐ก Yes (${violations} violation(s))`;\n return [\n `**Risk Score:** ${this.riskBar(review.riskScore)} **${review.riskScore}/100** ${review.riskEmoji}`,\n new ReviewIdentityRenderer().render(review.agent, review.model, 'Summary agent'),\n `**Risk Level:** ${review.riskEmoji} **${review.riskLevel}**`,\n `**Pattern Violations:** ${violationLine}`,\n ];\n }\n\n private disableLine(disables: DisableCounts): string {\n if (disables.webpiecesCount === 0) return '**Webpieces Disables Added:** ๐ข No';\n const which = disables.webpiecesRules.length > 0 ? ` โ ${disables.webpiecesRules.join(', ')}` : '';\n return `**Webpieces Disables Added:** ๐ก ${disables.webpiecesCount} line(s)${which}`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../../../../packages/tooling/pr-gate/src/dashboard/dashboard.ts"],"names":[],"mappings":";;;;AAAA,yEAAoE;AACpE,0DAAuP;AACvP,yCAA2D;AAG3D;;;;;;;GAOG;AACU,QAAA,qBAAqB,GAAG,iCAAiC,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,qBAAqB,GAAG,0DAA0D,CAAC;AAEzF;;;;;;;GAOG;AACH,MAAM,cAAc,GAAG,kFAAkF,CAAC;AAE1G,MAAa,UAAU;IACnB,IAAI,CAAS;IACb,YAAY,CAAS,CAAC,4EAA4E;IAClG,YAAY,CAAW;IAEvB,YAAY,IAAY,EAAE,YAAoB,EAAE,YAAsB;QAClE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;CACJ;AAVD,gCAUC;AAED,yGAAyG;AACzG,sGAAsG;AACtG,2GAA2G;AAC3G,uGAAuG;AACvG,sGAAsG;AACtG,4DAA4D;AAC5D,MAAa,YAAY;IACrB,KAAK,CAAS,CAAC,8CAA8C;IAC7D,MAAM,CAAS,CAAC,eAAe;IAC/B,MAAM,CAAS,CAAC,qEAAqE;IAErF,YAAY,KAAa,EAAE,MAAc,EAAE,MAAM,GAAG,EAAE;QAClD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CACJ;AAVD,oCAUC;AAED;;;;;;GAMG;AACH,MAAM,YAAY;IACd,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M,CAAC,SAAS,IAAI;YAC7D,2BAA2B,aAAa,EAAE;SAC7C,CAAC;IACN,CAAC;IAEO,WAAW,CAAC,QAAuB;QACvC,IAAI,QAAQ,CAAC,cAAc,KAAK,CAAC;YAAE,OAAO,qCAAqC,CAAC;QAChF,MAAM,KAAK,GAAG,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnG,OAAO,oCAAoC,QAAQ,CAAC,cAAc,WAAW,KAAK,EAAE,CAAC;IACzF,CAAC;CACJ,CAAA;AApbY,8BAAS;oBAAT,SAAS;IADrB,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;GAC5B,SAAS,CAobrB","sourcesContent":["import { ReviewIdentityRenderer } from './review-identity-renderer';\nimport { GateDefinition, WEBPIECES_DISABLE, PrSummary, CK_PASS, CK_WARN, CK_OVERRIDDEN, CK_ORANGE_FIXED, CK_FAIL, CK_MISSING, HOME_CONFIG_DIR, HOME_CONFIG_FILE, HOME_KEY_TURN_OFF_ALL_REVIEWERS, HOTFIX_AUDIT_BANNER } from '@webpieces/rules-config';\nimport { injectable, bindingScopeValues } from 'inversify';\nimport { AuthorIdentity } from './author-identity';\n\n/**\n * Hidden marker on the FULL-DASHBOARD comment โ the \"1st comment\" the PR description points at โ so\n * finish PATCHes its own comment on every push instead of appending a new one, exactly like the checklist\n * comment (see ChecklistCommentRenderer, which owns the 2nd).\n *\n * This comment did not exist before the PR description became the git-log body: the dashboard WAS the\n * description. Moving it here is what keeps a risk table out of every squash commit on main.\n */\nexport const DETAIL_COMMENT_MARKER = '<!-- webpieces-pr-detail v1 -->';\n\n/**\n * Footer on the full-dashboard comment. Names the tooling by REPO URL so a reader landing on a\n * generated comment in any consumer repo can find what generated it.\n *\n * It deliberately no longer asserts \"build ran via nx affected โ not self-attested\": that sentence was\n * hard-coded and therefore wrong on every repo whose `buildCommand` is not nx. The build command is now\n * named for real, from config, in the PR-body footer โ see {@link Dashboard.renderPrBody}.\n */\nconst DETAIL_COMMENT_FOOTER = 'Generated by https://github.com/deanhiller/webpieces-ts ';\n\n/**\n * The last bullet of the PR description, and therefore of every squash commit body.\n *\n * Positional (\"1st\"/\"2nd\") on purpose โ it is what a reader of `git log` can actually act on, far more\n * useful than naming an HTML marker they cannot see. On a PR opened by an OLDER release the checklist\n * comment already exists, so the dashboard comment lands second and this reads one off for that PR's\n * remaining life; it is cosmetic and self-corrects on the next PR.\n */\nconst DETAIL_POINTER = '(Full dashboard in 1st comment, reviewer checklist in 2nd โ kept out of git log)';\n\nexport class GateResult {\n name: string;\n warningColor: string; // 'yellow' | 'red' โ the color shown WHEN files matched (green is implicit)\n matchedFiles: string[];\n\n constructor(name: string, warningColor: string, matchedFiles: string[]) {\n this.name = name;\n this.warningColor = warningColor;\n this.matchedFiles = matchedFiles;\n }\n}\n\n// One row for a consumer review checklist the branch triggered. `status` is the resolved verdict (one of\n// CK_PASS | CK_WARN | CK_OVERRIDDEN | CK_FAIL | CK_MISSING | CK_BAD_FORMAT); `detail` is the reviewer\n// output / override justification. A row is always PASS/WARN/OVERRIDDEN by the time it renders โ a failed,\n// missing or unreadable verdict throws before the dashboard is built. Rendered into the PR body so the\n// verdict reaches the server โ the PR body is the artifact of the local flow that leaves the checkout\n// (alongside the HMAC gate token that proves the flow ran).\nexport class ChecklistRow {\n title: string; // the checklist id (= reviewer subagent name)\n status: string; // CK_* verdict\n detail: string; // reviewer output / override justification (surfaced for OVERRIDDEN)\n\n constructor(title: string, status: string, detail = '') {\n this.title = title;\n this.status = status;\n this.detail = detail;\n }\n}\n\n/**\n * One severity bucket of the rolled-up **Checklists** dashboard row: its emoji, the words that describe it,\n * and which checklists landed in it. Data-only.\n *\n * A bucket knows whether it should NAME its members: the non-green ones do (a reader has to know WHICH\n * reviewer to go read), the passed bucket does not (a list of what went fine is noise on a one-line row).\n */\nclass RollupBucket {\n label: string; // 'blocking' | 'overridden' | 'with concerns' | 'passed'\n emoji: string;\n named: boolean; // list the checklist ids on the row, or report a bare count\n titles: string[];\n\n constructor(label: string, emoji: string, named: boolean) {\n this.label = label;\n this.emoji = emoji;\n this.named = named;\n this.titles = [];\n }\n}\n\nexport class DisableCounts {\n webpiecesCount: number;\n eslintCount: number;\n webpiecesRules: string[];\n\n constructor(webpiecesCount: number, eslintCount: number, webpiecesRules: string[]) {\n this.webpiecesCount = webpiecesCount;\n this.eslintCount = eslintCount;\n this.webpiecesRules = webpiecesRules;\n }\n}\n\nexport class DashboardInput {\n title: string;\n gateResults: GateResult[];\n disables: DisableCounts;\n buildPassed: boolean;\n forkPoint: string;\n featureHead: string;\n mainHead: string;\n review: PrSummary; // AI-authored risk/violations/summary (from summary.json)\n checklists: ChecklistRow[]; // consumer checklists this branch triggered; [] for non-adopting repos\n /**\n * `commands.pr-gate.buildCommand` VERBATIM, named in the PR-body footer so `git log` records WHICH\n * command vouched for the commit. Read from config rather than hard-coded because the footer used to\n * assert \"build ran via nx affected\" on every repo, including those whose buildCommand is not nx.\n *\n * REQUIRED, with no default, and `checklists` lost its `= []` for the same reason. A defaulted\n * `buildCommand: string = ''` let every pre-existing 9-argument construction keep compiling while\n * silently rendering a footer that claims nothing โ an absence that quietly means \"no build was\n * named\", which is the widening-by-omission the compatibility policy calls out. Making it required\n * means every caller states what vouched for the commit, and the empty string stays available for a\n * repo that genuinely has no build command, but only when someone writes it down.\n */\n buildCommand: string;\n /**\n * How many checklists WOULD have run but were disabled by either the project policy\n * (`reviewerAgents: 0`) or the machine kill switch โ required ones included. `0` means no matching\n * checklist was suppressed; it is NOT a way of saying \"no checklist matched\", which\n * `checklists.length === 0` already says.\n *\n * The two states are byte-identical in `checklists` (both empty) and that is precisely the defect this\n * field closes: without it, a PR whose four REQUIRED reviewers were switched off is indistinguishable\n * in `main`'s history from a docs-only typo fix that legitimately matched nothing. REQUIRED with no\n * default, for the reason `buildCommand` is: a defaulted `0` would let every existing construction\n * keep compiling while asserting, silently, that nothing was suppressed.\n */\n suppressedChecklistCount: number;\n author: AuthorIdentity;\n hotfix: boolean;\n /**\n * Checklists the final diff matches that were never briefed, because a review round had already started\n * when a later commit first triggered them (issue #1053). NON-BLOCKING and informational: the checklist\n * set is frozen at the briefing. Assigned after construction; empty on most PRs.\n */\n notBriefed: string[];\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n title: string,\n gateResults: GateResult[],\n disables: DisableCounts,\n buildPassed: boolean,\n forkPoint: string,\n featureHead: string,\n mainHead: string,\n review: PrSummary,\n checklists: ChecklistRow[],\n buildCommand: string,\n suppressedChecklistCount: number,\n author: AuthorIdentity,\n hotfix: boolean,\n ) {\n this.title = title;\n this.gateResults = gateResults;\n this.disables = disables;\n this.buildPassed = buildPassed;\n this.forkPoint = forkPoint;\n this.featureHead = featureHead;\n this.mainHead = mainHead;\n this.review = review;\n this.checklists = checklists;\n this.buildCommand = buildCommand;\n this.suppressedChecklistCount = suppressedChecklistCount;\n this.author = author;\n this.hotfix = hotfix;\n this.notBriefed = [];\n }\n}\n\n/** Renders the PR-gate dashboard markdown (gates ร changed files, disables, risk, 3-point hashes). */\n@injectable(bindingScopeValues.Singleton)\nexport class Dashboard {\n // Disabled gates are in-file examples (JSON has no comments) โ skip them entirely.\n computeGateResults(gates: GateDefinition[], changedFiles: string[]): GateResult[] {\n return gates\n .filter((gate: GateDefinition): boolean => !gate.disabled)\n .map((gate: GateDefinition): GateResult => {\n const matched = changedFiles.filter((file: string): boolean => this.matchesAny(gate.patterns, file));\n return new GateResult(gate.name, gate.warningColor, matched);\n });\n }\n\n // Count disables ADDED in this PR by scanning added (`+`) lines of the diff patch. Rule-aware:\n // reports the names written in each directive, including newly declared and client-owned rules.\n countAddedDisables(patch: string): DisableCounts {\n let webpiecesCount = 0;\n let eslintCount = 0;\n const rules = new Set<string>();\n\n for (const line of patch.split('\\n')) {\n if (!line.startsWith('+') || line.startsWith('+++')) continue;\n if (line.includes(WEBPIECES_DISABLE)) {\n webpiecesCount += 1;\n const directive = line.slice(line.indexOf(WEBPIECES_DISABLE) + WEBPIECES_DISABLE.length).split('--')[0];\n for (const named of directive.split(',')) {\n const token = named.trim();\n if (/^[a-z][a-z0-9-]*$/.test(token)) rules.add(token);\n }\n }\n if (line.includes('eslint-disable')) eslintCount += 1;\n }\n return new DisableCounts(webpiecesCount, eslintCount, Array.from(rules).sort());\n }\n\n /**\n * The FULL dashboard โ every row (green included), the whole summary, the 3-point hash points.\n *\n * This is the **1st PR comment**, not the PR description. It used to be the description, and that is\n * exactly what put it into main's history: GitHub's `squash_merge_commit_message: PR_BODY` copies the\n * description verbatim into the squash commit, so every `git log` entry carried the risk table, the\n * hash points and the gate token. The description now holds {@link renderPrBody}'s compact form, and\n * everything long-form lives here where a reader can open it and `git log` never sees it.\n *\n * Machine-facing content belongs HERE too โ this comment carries the HMAC gate token. That is the\n * whole rule that keeps the description clean: an HTML comment is invisible in rendered markdown but\n * perfectly visible in `git log`, so nothing hidden may live in the description.\n */\n renderDetailComment(input: DashboardInput): string {\n const lines: string[] = [];\n if (input.hotfix) {\n lines.push(HOTFIX_AUDIT_BANNER, '');\n }\n lines.push('## ๐ฆ PR Gate Dashboard');\n lines.push('');\n for (const line of this.riskLines(input.review)) lines.push(line);\n lines.push(new ReviewIdentityRenderer().renderAuthor(input.author.harness, input.author.model));\n lines.push(`**Build (${input.hotfix ? 'hotfix-ci: build + test only' : 'nx affected'}):** ${input.buildPassed ? '๐ข Passed' : '๐ด Failed'}`);\n for (const result of input.gateResults) lines.push(this.gateLine(result));\n lines.push(this.disableLine(input.disables));\n const eslintEmoji = input.disables.eslintCount === 0 ? '๐ข No' : `๐ก ${input.disables.eslintCount} line(s)`;\n lines.push(`**ESLint Disables Added:** ${eslintEmoji}`);\n // ONE rolled-up row for ALL triggered consumer checklists โ a worst-of colour and a count, sitting\n // with the other status rows. It used to be one row PER checklist, each inlining that checklist's\n // whole verdict/override paragraph: on a six-checklist PR that was the same ~90-word override\n // repeated six times, burying the signal rows above it โ and every word of it was already in the\n // checklist COMMENT, per reviewer, in full. ALWAYS emitted, including the zero case: \"no reviewer\n // looked at this PR\" is a fact a reader must be told, and an absent row silently reads as a green\n // all-clear (see checklistRollupLine).\n lines.push(input.hotfix ? '**Checklists:** โซ BYPASSED by /hotfix/ convention ยท 0 reviewer agents ran' : this.checklistRollupLine(input.checklists, input.suppressedChecklistCount));\n if (input.notBriefed.length > 0) lines.push(this.notBriefedLine(input.notBriefed));\n lines.push('');\n if (input.review.summary.trim() !== '') {\n lines.push('### Summary');\n lines.push(input.review.summary.trim());\n lines.push('');\n }\n lines.push('### ๐ 3-Point Hash Points');\n lines.push(`- Fork point (A): \\`${input.forkPoint.slice(0, 12)}\\``);\n lines.push(`- Feature HEAD (B): \\`${input.featureHead.slice(0, 12)}\\``);\n lines.push(`- Main HEAD (C): \\`${input.mainHead.slice(0, 12)}\\``);\n lines.push('');\n // A /hotfix/ branch is posted by its own command (issue #1057); the footer names the poster.\n lines.push(`<sub>๐ค ${DETAIL_COMMENT_FOOTER} ${input.hotfix ? 'wp-upsert-hotfix-pr' : 'wp-finish-upsert-pr'}</sub>`);\n return lines.join('\\n');\n }\n\n /**\n * The PR DESCRIPTION โ which is also, byte for byte, the squash-commit body that lands in main.\n *\n * โโโ Why one string serves both โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n * There used to be two: a long dashboard in the description and this compact form passed to\n * `gh pr merge --body-file`. That made the good `git log` reachable ONLY through an explicit\n * `--body-file` merge, because every other route (the GitHub Merge button, a bare `gh pr merge`)\n * takes its body from the repo's `squash_merge_commit_message`, and on `PR_BODY` that copied the\n * whole dashboard into history. Two repos ran that way for months.\n *\n * Making the DESCRIPTION the compact form inverts it: `PR_BODY` now yields exactly the right commit,\n * so the UI button, a bare `gh pr merge`, `wp-land-pr` and finish's own auto-merge all converge on\n * identical bytes. It rests on two GitHub repo settings โ `squash_merge_commit_title: PR_TITLE` and\n * `squash_merge_commit_message: PR_BODY` โ which are NOT a consumer's job: they are server-side, so no\n * config key can express them, and SquashSettingsEnforcer pins them on every run. That convergence is\n * the point, and `pr-body-is-merge-body.spec.ts` pins it.\n *\n * โโโ The shape, and why each part earns its line โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n * The URL leads, BARE โ no caption. It used to carry `(for git log)`, which was aimed at a reader on\n * the PR page (where the link is redundant, being the page you are already on) and was meant to stop\n * them deleting it. But this string is also the squash-commit body, so that caption landed verbatim in\n * `main`'s history on every commit, forever, to serve one transient reading. In `git log` a bare URL\n * is self-evidently the way back and needs no explanation. The permanent surface wins.\n * Then the risk score (always). Then ONLY the non-green flags, under a heading that SAYS the full list\n * is in the 1st comment โ a `git log` reader has no page to glance at, so the heading has to carry\n * that itself rather than leaving \"why is this list short?\" to the pointer bullet alone. Then the\n * summary capped at 4 sentences, then the footer naming the build command that vouched for it.\n *\n * The hidden gate-token marker is appended AFTER this by the caller, so it is the very last line of\n * the description and therefore of the commit. It stays an HTML comment โ invisible on the PR page,\n * visible in `git log` โ which is a deliberate accepted trade: the alternative was reshaping a live\n * CI-critical surface that two consumer repos verify on every PR, to save one line of history.\n */\n renderPrBody(input: DashboardInput, prUrl: string): string {\n const lines: string[] = [];\n if (input.hotfix) {\n lines.push(HOTFIX_AUDIT_BANNER, '');\n }\n if (prUrl !== '') {\n lines.push(prUrl);\n lines.push('');\n }\n lines.push(`Risk: ${this.riskBar(input.review.riskScore)} ${input.review.riskScore}/100 ${input.review.riskEmoji} (${input.review.riskLevel})`);\n lines.push(new ReviewIdentityRenderer().renderAuthor(input.author.harness, input.author.model, false));\n lines.push('');\n const flags = this.nonGreenFlags(input);\n if (flags.length > 0) lines.push('Non-green Flags (full list in first comment to avoid large git logs)');\n for (const flag of flags) lines.push(`- ${flag}`);\n // ALWAYS the last bullet, green case included. Without it the compact body reads as the whole\n // record, and the reader never learns that every green row, the full summary and each reviewer's\n // output are one click away.\n lines.push(`- ${DETAIL_POINTER}`);\n const summary = this.firstSentences(input.review.summary.trim(), 4);\n if (summary !== '') {\n lines.push('');\n lines.push(summary);\n }\n lines.push('');\n lines.push(this.prBodyFooter(input.buildCommand, input.hotfix));\n return this.gitLogSafe(lines.join('\\n'));\n }\n\n /**\n * Makes THIS renderer own the invariant `wp-land-pr` checks: the compact body carries no markdown\n * heading and no table pipe.\n *\n * It is applied to the WHOLE joined string rather than to each author-supplied field, on purpose.\n * Every field this body interpolates โ the review summary, an override justification, a checklist\n * title, a disabled rule name, `commands.pr-gate.buildCommand` โ is text this package did not write,\n * and a `|` reaches all of them for entirely ordinary non-markdown reasons: a TypeScript union\n * (`'open' | 'paused'`), a regex alternation, a quoted shell pipeline, an OR in prose. Sanitizing at\n * the single exit point means a field added later is covered without anyone remembering to wrap it,\n * and none of this renderer's own literals contain either marker, so nothing of ours changes.\n *\n * Before this, `wp-finish-upsert-pr` would happily POST such a body and report success, and then\n * `wp-land-pr` refused those exact bytes โ two commands in one flow disagreeing about what the\n * renderer produces, with a refusal that blamed an old release and prescribed re-running finish,\n * which re-rendered the identical pipe from the unchanged `summary.json`. An infinite loop costing a\n * CI cycle per turn.\n *\n * `ยฆ` (BROKEN BAR) rather than `\\|`: this string's home is `git log` in a terminal, where a\n * backslash is literal punctuation and a markdown escape means nothing. The substitution is visible\n * and reads correctly; the full, unaltered text is one click away in the 1st comment, which this\n * body's last bullet always points at. `##` collapses to `#` for the same reason โ a heading in a\n * summary is markdown a plain-text history cannot carry either.\n */\n private gitLogSafe(body: string): string {\n return body.replace(/\\|/g, '\\u00a6').replace(/#{2,}/g, '#');\n }\n\n /**\n * The footer, naming the build command from `commands.pr-gate.buildCommand` VERBATIM.\n *\n * No backticks: this string's primary home is `git log` in a terminal, where markdown ticks are\n * literal punctuation. \"run locally\" is the honest claim โ this is the LOCAL gate's receipt, and the\n * server-side proof is the gate token in the 1st comment, not this sentence.\n */\n private prBodyFooter(buildCommand: string, hotfix: boolean): string {\n const cmd = buildCommand.trim();\n const ran = cmd === '' ? '' : ` (${cmd} run locally)`;\n // A /hotfix/ branch is posted by its own command (issue #1057); the footer names the poster.\n const poster = hotfix ? 'wp-upsert-hotfix-pr' : 'wp-finish-upsert-pr';\n return `Generated by webpieces-ts ${poster}${ran}`;\n }\n\n // Every dashboard row that is NOT green, as a flat bullet list for the commit body. Green rows\n // (build passed, gate did not match, zero disables/violations) are intentionally omitted.\n private nonGreenFlags(input: DashboardInput): string[] {\n const flags: string[] = [];\n if (input.hotfix) {\n flags.push('โ ๏ธ HOTFIX โ reviews, ticket enforcement, Webpieces rules, ESLint, and format checks bypassed; compilation and tests ran');\n }\n if (!input.buildPassed) flags.push('Build (nx affected): ๐ด Failed');\n if (input.review.violations.length > 0) flags.push(`Pattern Violations: ๐ก ${input.review.violations.length} violation(s)`);\n for (const result of input.gateResults) {\n if (result.matchedFiles.length === 0) continue;\n const emoji = result.warningColor === 'red' ? '๐ด' : '๐ก';\n flags.push(`${result.name}: ${emoji} ${result.matchedFiles.length} file(s)`);\n }\n if (input.disables.webpiecesCount > 0) {\n const which = input.disables.webpiecesRules.length > 0 ? ` โ ${input.disables.webpiecesRules.join(', ')}` : '';\n flags.push(`Webpieces Disables Added: ๐ก ${input.disables.webpiecesCount} line(s)${which}`);\n }\n if (input.disables.eslintCount > 0) flags.push(`ESLint Disables Added: ๐ก ${input.disables.eslintCount} line(s)`);\n // Passing reviews are implicit in main's history; only non-green verdicts belong here.\n //\n // SUPPRESSED replaces those N bullets with exactly ONE, whatever N is. Not because the per-reviewer\n // bullets would lie โ `checklistStatusText` was already hardened against a false \"passed\" โ but\n // because with the kill switch on there are NO rows at all, and a body with no `Checklist โ `\n // bullets is byte-identical to a PR that legitimately matched zero checklists (a docs-only typo\n // fix). Without this line, \"four REQUIRED reviewers were killed by a flag\" and \"nothing applied\n // here\" are indistinguishable in main's history forever. One compact bullet, in the existing\n // style โ the loud version belongs in stage โก's output and the 1st comment, not in `git log`.\n if (input.suppressedChecklistCount > 0) {\n flags.push(`Checklists โ ${this.suppressedTail(input.suppressedChecklistCount)}`);\n }\n for (const row of input.checklists) {\n if (row.status === CK_PASS) continue;\n flags.push(`Checklist โ ${row.title}: ${this.checklistStatusText(row)}`);\n }\n if (input.notBriefed.length > 0) flags.push(`Checklists โ ${this.notBriefedLine(input.notBriefed)}`);\n return flags;\n }\n\n /**\n * The ONE informational line for checklists first triggered after the review was briefed (issue #1053).\n * โช and \"not blocking\" both, so it can be read neither as a pass nor as something the PR still owes.\n */\n private notBriefedLine(ids: readonly string[]): string {\n return `โช not reviewed (not blocking): ${ids.join(', ')} โ first triggered after the review was briefed`;\n }\n\n // Emoji + words for a checklist verdict, shared by the dashboard row and the commit-body flag.\n // Every state is matched EXPLICITLY and the fallthrough names the status it did not recognize. The\n // previous `return '๐ข passed'` fallthrough meant any newly-added verdict rendered as a clean pass on\n // both the PR body and main's commit history until someone noticed โ exactly the wrong default.\n private checklistStatusText(row: ChecklistRow): string {\n if (row.status === CK_OVERRIDDEN) {\n const why = row.detail.trim() !== '' ? ` โ override: ${row.detail.trim()}` : '';\n return `๐ OVERRIDDEN${why}`;\n }\n if (row.status === CK_ORANGE_FIXED) return `๐ ${row.detail}`;\n if (row.status === CK_WARN) return '๐ก passed with concerns';\n if (row.status === CK_FAIL) return '๐ด FAILED review';\n if (row.status === CK_MISSING) return 'โช not reviewed';\n if (row.status === CK_PASS) return '๐ข passed';\n return `โช unknown verdict (${row.status})`;\n }\n\n // First `max` sentences of `text`. A sentence ends at `. ! ?` ONLY when followed by whitespace or\n // end-of-string, so interior dots in filenames/paths/versions (dependencies.json, runtime-graph.ts,\n // 0.4.447) do NOT split โ and, unlike a greedy `[^.!?]+` regex, no text is ever dropped when such a\n // dot appears (that footgun silently deleted the run of prose up to the next real boundary). Keeps\n // the commit body scannable; the full summary still lives in the PR-body dashboard.\n private firstSentences(text: string, max: number): string {\n if (text === '') return '';\n const sentences: string[] = [];\n let start = 0;\n for (let i = 0; i < text.length && sentences.length < max; i++) {\n const ch = text[i];\n const isTerminator = ch === '.' || ch === '!' || ch === '?';\n const next = text[i + 1];\n if (isTerminator && (next === undefined || /\\s/.test(next))) {\n sentences.push(text.slice(start, i + 1).trim());\n start = i + 1;\n }\n }\n // Trailing text with no terminator still counts as a sentence (up to the cap).\n if (sentences.length < max && start < text.length) {\n const tail = text.slice(start).trim();\n if (tail !== '') sentences.push(tail);\n }\n return sentences.join(' ').trim();\n }\n\n // Self-contained glob matcher (** , * , ?) so pr-gate needs no extra runtime dependency.\n private globToRegex(pattern: string): RegExp {\n let re = '';\n let i = 0;\n while (i < pattern.length) {\n const ch = pattern[i];\n if (ch === '*' && pattern[i + 1] === '*') {\n re += '.*';\n i += 2;\n if (pattern[i] === '/') i += 1;\n continue;\n }\n if (ch === '*') {\n re += '[^/]*';\n i += 1;\n continue;\n }\n if (ch === '?') {\n re += '[^/]';\n i += 1;\n continue;\n }\n if ('.+^$(){}|[]\\\\'.includes(ch)) {\n re += '\\\\' + ch;\n i += 1;\n continue;\n }\n re += ch;\n i += 1;\n }\n return new RegExp('^' + re + '$');\n }\n\n private matchesAny(patterns: string[], file: string): boolean {\n for (const pattern of patterns) {\n if (this.globToRegex(pattern).test(file)) return true;\n }\n return false;\n }\n\n private gateLine(result: GateResult): string {\n if (result.matchedFiles.length === 0) return `**${result.name}:** ๐ข No`;\n const emoji = result.warningColor === 'red' ? '๐ด' : '๐ก';\n return `**${result.name}:** ${emoji} Yes (${result.matchedFiles.length} file(s))`;\n }\n\n /**\n * The ONE rolled-up **Checklists:** row, coloured worst-of across every checklist that ran, in the same\n * shape as its neighbours (`**Build (nx affected):** ๐ข Passed`). Counts and names only โ never a line\n * of reviewer output or override justification, which is the whole reason this row exists.\n */\n private checklistRollupLine(rows: readonly ChecklistRow[], suppressedCount: number): string {\n // FIRST, and ahead of the zero-ran case below, which would say \"no review checklist matched this\n // PR\" โ false here, and the one sentence that would turn a kill switch into an all-clear. โซ is a\n // colour no verdict uses, so it cannot be mistaken for a pass, a warning or a refusal.\n if (suppressedCount > 0) return this.suppressedChecklistLine(suppressedCount);\n const buckets = this.rollupBuckets(rows);\n const filled = buckets.filter((b: RollupBucket): boolean => b.titles.length > 0);\n // NO reviewer ran โ the SKIPPED icon, never green. Green claims something was checked and came back\n // clean; โช says nobody looked, which is what a reader has to be able to tell apart at a glance.\n if (filled.length === 0) {\n return '**Checklists:** โช 0 ran โ no review checklist matched this PR ยท see the checklist comment';\n }\n const allPassed = filled.length === 1 && !filled[0].named;\n const detail = allPassed ? 'all passed' : filled.map((b: RollupBucket): string => this.bucketPhrase(b)).join(', ');\n return `**Checklists:** ${filled[0].emoji} ${rows.length} ran โ ${detail} ยท per-checklist detail in the checklist comment`;\n }\n\n /**\n * The four severity buckets, WORST FIRST, so `filled[0]` is the roll-up colour: red beats orange beats\n * yellow beats green. The colours are the same vocabulary the comment already uses (see verdictEmoji).\n *\n * OVERRIDDEN is deliberately NOT folded into passed: an override is a human knowingly accepting a red\n * verdict, and a dashboard that painted that green would hide the single most review-worthy thing on\n * the PR. The blocking bucket is the FALLTHROUGH โ CK_FAIL, CK_MISSING, CK_BAD_FORMAT and any verdict\n * added later all land there, matching summary.json's own \"not pass|warn|overridden โ refuse\" rule\n * rather than a second list that could silently drift green.\n */\n /**\n * The full-dashboard row for a suppressed PR. Verbose is FINE here โ this lands in the PR's 1st\n * comment, not in `git log`.\n */\n private suppressedChecklistLine(suppressedCount: number): string {\n return `**Checklists:** ${this.suppressedTail(suppressedCount)}` + ' ยท NO reviewer subagent ran on this PR โ use a positive reviewerAgents value and disable the machine kill switch to get them back';\n }\n\n /**\n * The ONE sentence both the dashboard row and the commit-body bullet are built from, so the two can\n * never disagree about what was switched off or by what.\n *\n * Every part of it earns its place in `main`'s permanent history:\n * โข the COUNT, because \"suppressed 4\" and \"0 applicable\" are different facts and both must be\n * tellable apart forever โ an absent bullet says the second while meaning the first;\n * โข \"required included\", because otherwise it reads as an optional-only skip, which it is not;\n * โข both supported controls, because this compact input carries the count but not the source.\n * โซ is deliberately outside the verdict palette (๐ข๐ก๐ด๐ โช are all taken by checklistStatusText), so\n * nothing here can be mistaken for a verdict a reviewer actually returned.\n */\n private suppressedTail(suppressedCount: number): string {\n return `โซ ALL ${suppressedCount} SUPPRESSED (required included) by ` + `reviewer policy (reviewerAgents: 0 or ${HOME_KEY_TURN_OFF_ALL_REVIEWERS} in ` + `~/${HOME_CONFIG_DIR}/${HOME_CONFIG_FILE})`;\n }\n\n private rollupBuckets(rows: readonly ChecklistRow[]): RollupBucket[] {\n const blocking = new RollupBucket('blocking', '๐ด', true);\n const orangeFixed = new RollupBucket('orange, author-fixed (not re-reviewed)', '๐ ', true);\n const overridden = new RollupBucket('overridden', '๐ ', true);\n const warned = new RollupBucket('with concerns', '๐ก', true);\n const passed = new RollupBucket('passed', '๐ข', false);\n for (const row of rows) {\n if (row.status === CK_PASS) passed.titles.push(row.title);\n else if (row.status === CK_WARN) warned.titles.push(row.title);\n else if (row.status === CK_ORANGE_FIXED) orangeFixed.titles.push(row.title);\n else if (row.status === CK_OVERRIDDEN) overridden.titles.push(row.title);\n else blocking.titles.push(row.title);\n }\n return [blocking, orangeFixed, overridden, warned, passed];\n }\n\n // `2 overridden (a, b)` for the buckets a reviewer must act on; a bare `3 passed` for the one they need\n // no list of. Names are capped so a many-checklist repo still gets a ONE-LINE row.\n private bucketPhrase(bucket: RollupBucket): string {\n if (!bucket.named) return `${bucket.titles.length} ${bucket.label}`;\n return `${bucket.titles.length} ${bucket.label} (${this.compactNames(bucket.titles)})`;\n }\n\n private compactNames(titles: readonly string[]): string {\n const max = 4;\n if (titles.length <= max) return titles.join(', ');\n return `${titles.slice(0, max).join(', ')} +${titles.length - max} more`;\n }\n\n // 10-cell risk bar colored by band (๐ฉ โค25, ๐จ โค50, ๐ง โค75, ๐ฅ >75), at least one filled cell.\n private riskBar(score: number): string {\n const clamped = Math.max(0, Math.min(100, score));\n const cell = clamped <= 25 ? '๐ฉ' : clamped <= 50 ? '๐จ' : clamped <= 75 ? '๐ง' : '๐ฅ';\n const filled = Math.max(1, Math.min(10, Math.round(clamped / 10)));\n return cell.repeat(filled) + 'โฌ'.repeat(10 - filled);\n }\n\n // RISK section (the AI half): Risk Score bar, Risk Level, Pattern Violations.\n private riskLines(review: PrSummary): string[] {\n const violations = review.violations.length;\n const violationLine = violations === 0 ? '๐ข No' : `๐ก Yes (${violations} violation(s))`;\n return [\n `**Risk Score:** ${this.riskBar(review.riskScore)} **${review.riskScore}/100** ${review.riskEmoji}`,\n new ReviewIdentityRenderer().render(review.agent, review.model, 'Summary agent'),\n `**Risk Level:** ${review.riskEmoji} **${review.riskLevel}**`,\n `**Pattern Violations:** ${violationLine}`,\n ];\n }\n\n private disableLine(disables: DisableCounts): string {\n if (disables.webpiecesCount === 0) return '**Webpieces Disables Added:** ๐ข No';\n const which = disables.webpiecesRules.length > 0 ? ` โ ${disables.webpiecesRules.join(', ')}` : '';\n return `**Webpieces Disables Added:** ๐ก ${disables.webpiecesCount} line(s)${which}`;\n }\n}\n"]}
|