@webpieces/pr-gate 0.4.849 → 0.4.850

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.849",
3
+ "version": "0.4.850",
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.849",
20
- "@webpieces/rules-config": "0.4.849",
19
+ "@webpieces/hook-runtime": "0.4.850",
20
+ "@webpieces/rules-config": "0.4.850",
21
21
  "inversify": "7.10.4",
22
22
  "reflect-metadata": "0.2.2",
23
- "@webpieces/tooling-common": "0.4.849",
24
- "@webpieces/repo-workflow-core": "0.4.849"
23
+ "@webpieces/tooling-common": "0.4.850",
24
+ "@webpieces/repo-workflow-core": "0.4.850"
25
25
  },
26
26
  "publishConfig": {
27
27
  "access": "public"
28
28
  },
29
29
  "devDependencies": {
30
- "@webpieces/tooling-testkit": "0.4.849"
30
+ "@webpieces/tooling-testkit": "0.4.850"
31
31
  },
32
32
  "types": "./src/index.d.ts",
33
33
  "bin": {
@@ -64,7 +64,7 @@ let ReviewerIdentityResolver = class ReviewerIdentityResolver {
64
64
  }
65
65
  const inHarness = HARNESS_ENV.filter((name) => (env[name] ?? '').trim() !== '');
66
66
  if (inHarness.length > 0)
67
- throw new tooling_common_1.InformAiError(this.unstampedRefusal(checklistId, inHarness));
67
+ throw new tooling_common_1.InformAiError(this.unstampedRefusal(cwd, checklistId, inHarness));
68
68
  return new ReviewerIdentity(verdict_provenance_1.HARNESS_TERMINAL, '', '', '');
69
69
  }
70
70
  coordinatorRefusal(checklistId, aiType) {
@@ -74,13 +74,16 @@ let ReviewerIdentityResolver = class ReviewerIdentityResolver {
74
74
  + 'Spawn the reviewer subagent pnpm wp-review-upsert-pr names and hand it the instructions file; the\n'
75
75
  + 'reviewer submits its own verdict.';
76
76
  }
77
- unstampedRefusal(checklistId, harnessEnv) {
78
- return `${repo_workflow_core_1.WRITE_REVIEW_BIN} REFUSED: this process runs under an AI harness (${harnessEnv.join(', ')} set), but the\n`
79
- + `webpieces PreToolUse hook left no identity stamp for checklist "${checklistId}", so nothing can say whether a\n`
80
- + 'reviewer subagent or the coordinator is calling.\n\n'
81
- + `Run it as a plain Bash command the hook can read, naming the checklist literally:\n`
82
- + ` pnpm ${repo_workflow_core_1.WRITE_REVIEW_BIN} --checklist ${checklistId} <<'EOF' … EOF\n`
83
- + 'If it already was, the webpieces hooks are not installed in this harness: pnpm wp-install-ai-hooks.';
77
+ unstampedRefusal(cwd, checklistId, harnessEnv) {
78
+ return (`${repo_workflow_core_1.WRITE_REVIEW_BIN} REFUSED: this process runs under an AI harness (${harnessEnv.join(', ')} set), but the\n` +
79
+ `expected worktree has no usable identity stamp for checklist "${checklistId}", so nothing can say whether a\n` +
80
+ 'reviewer subagent or the coordinator is calling.\n\n' +
81
+ `Submission cwd: ${cwd}\nExpected stamp: ${this.stamps.stampPath(cwd, checklistId)}\n\n` +
82
+ 'The hook may have written a stamp in the session checkout instead of this worktree. Use a literal\n' +
83
+ 'leading cd to the absolute reviewed worktree path, then name the checklist literally:\n' +
84
+ ` cd '/absolute/reviewed-worktree' && pnpm ${repo_workflow_core_1.WRITE_REVIEW_BIN} --checklist ${checklistId} <<'EOF' … EOF\n` +
85
+ 'Do not rely on exec_command.workdir alone when the hook exposes only the session cwd. Check hook\n' +
86
+ 'delivery and its selected tree; reinstall hooks only if they are actually missing.');
84
87
  }
85
88
  };
86
89
  exports.ReviewerIdentityResolver = ReviewerIdentityResolver;
@@ -1 +1 @@
1
- {"version":3,"file":"reviewer-identity.js","sourceRoot":"","sources":["../../../../../../../packages/tooling/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K,CAAC,SAAS,CAAC,CAAC;QAC/F,CAAC;QACD,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACjG,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,IAAI,8BAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;QACjG,OAAO,IAAI,gBAAgB,CAAC,qCAAgB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,kBAAkB,CAAC,WAAmB,EAAE,MAAc;QAC1D,OAAO,GAAG,qCAAgB,iBAAiB,MAAM,uEAAuE;cAClH,iFAAiF,WAAW,mBAAmB;cAC/G,sGAAsG;cACtG,qGAAqG;cACrG,mCAAmC,CAAC;IAC9C,CAAC;IAEO,gBAAgB,CAAC,WAAmB,EAAE,UAA6B;QACvE,OAAO,GAAG,qCAAgB,oDAAoD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB;cAC/G,mEAAmE,WAAW,mCAAmC;cACjH,sDAAsD;cACtD,qFAAqF;cACrF,YAAY,qCAAgB,gBAAgB,WAAW,kBAAkB;cACzE,qGAAqG,CAAC;IAChH,CAAC;CACJ,CAAA;AA9BY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;6CAEA,+CAA0B;GADtD,wBAAwB,CA8BpC","sourcesContent":["import { InformAiError } from '@webpieces/tooling-common';\nimport { ReviewIdentityStampService, WRITE_REVIEW_BIN } from '@webpieces/repo-workflow-core';\nimport { injectable, bindingScopeValues } from 'inversify';\nimport { HARNESS_TERMINAL } from './verdict-provenance';\n\n/**\n * Env vars whose presence means an AI harness launched this process. Any one of them and there MUST be a\n * hook stamp — a harness-launched submission without one either bypassed the hook or ran where the hook is\n * not installed, and neither can say who is calling.\n */\nconst HARNESS_ENV = ['CLAUDECODE', 'CLAUDE_CODE_SESSION_ID', 'CODEX_SESSION_ID', 'CODEX_THREAD_ID'] as const;\n\n/** WHO is submitting a verdict. Data-only. */\nexport class ReviewerIdentity {\n harness: string;\n sessionId: string;\n agentId: string;\n agentType: string;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(harness: string, sessionId: string, agentId: string, agentType: string) {\n this.harness = harness;\n this.sessionId = sessionId;\n this.agentId = agentId;\n this.agentType = agentType;\n }\n}\n\n/**\n * Answers \"who is running `wp-write-review`?\" — and REFUSES the coordinating agent (issue #863).\n *\n * The mechanism, per harness, and why it is not the environment:\n * - CLAUDE CODE: a Bash child inherits `CLAUDE_CODE_SESSION_ID`, which is the PARENT session's id inside\n * a subagent too, and there is no agent id in the env at all. Env cannot tell a reviewer from its\n * coordinator.\n * - CODEX: `CODEX_SESSION_ID` / `CODEX_THREAD_ID` are exported, but nothing documents — and nothing here\n * has measured — that a spawned subagent gets its own thread id instead of the coordinator's.\n * - BOTH: the PreToolUse hook payload carries `agent_id`, empty for the main loop and set for a subagent,\n * on the same key in both harnesses. So the hook writes a {@link ReviewIdentityStamp} for each\n * checklist a `wp-write-review` command names, just before the command runs, and this consumes it.\n *\n * The plain-terminal story: with NO harness env and no stamp, the caller is a HUMAN at a terminal. That is\n * a legitimate reviewer, and the verdict is recorded with harness `terminal`. CI never submits verdicts —\n * `.webpieces/` is not in the repo, so there is nothing for CI to read or write here.\n *\n * NOT tamper-proof: an agent can scrub its env AND invoke the bin some way the hook does not recognise, or\n * forge a stamp file. That is deliberate, visible forgery in the transcript — the bar the rest of reviewer\n * provenance sets — rather than the one ordinary file write it used to take.\n *\n * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class ReviewerIdentityResolver {\n constructor(private readonly stamps: ReviewIdentityStampService) {}\n\n resolve(cwd: string, checklistId: string, env: NodeJS.ProcessEnv = process.env): ReviewerIdentity {\n const stamp = this.stamps.take(cwd, checklistId);\n if (stamp !== null) {\n if (this.stamps.isCoordinator(stamp)) throw new InformAiError(this.coordinatorRefusal(checklistId, stamp.aiType));\n return new ReviewerIdentity(stamp.aiType, stamp.sessionId, stamp.agentId, stamp.agentType);\n }\n const inHarness = HARNESS_ENV.filter((name: string): boolean => (env[name] ?? '').trim() !== '');\n if (inHarness.length > 0) throw new InformAiError(this.unstampedRefusal(checklistId, inHarness));\n return new ReviewerIdentity(HARNESS_TERMINAL, '', '', '');\n }\n\n private coordinatorRefusal(checklistId: string, aiType: string): string {\n return `${WRITE_REVIEW_BIN} REFUSED: the ${aiType} harness reports this call comes from the COORDINATING agent, not a\\n`\n + `reviewer subagent. The coordinator may never submit a reviewer's verdict for \"${checklistId}\" — not by this\\n`\n + 'bin, and not by writing the file (wp-finish-upsert-pr rejects a verdict this bin did not write).\\n\\n'\n + 'Spawn the reviewer subagent pnpm wp-review-upsert-pr names and hand it the instructions file; the\\n'\n + 'reviewer submits its own verdict.';\n }\n\n private unstampedRefusal(checklistId: string, harnessEnv: readonly string[]): string {\n return `${WRITE_REVIEW_BIN} REFUSED: this process runs under an AI harness (${harnessEnv.join(', ')} set), but the\\n`\n + `webpieces PreToolUse hook left no identity stamp for checklist \"${checklistId}\", so nothing can say whether a\\n`\n + 'reviewer subagent or the coordinator is calling.\\n\\n'\n + `Run it as a plain Bash command the hook can read, naming the checklist literally:\\n`\n + ` pnpm ${WRITE_REVIEW_BIN} --checklist ${checklistId} <<'EOF' … EOF\\n`\n + 'If it already was, the webpieces hooks are not installed in this harness: pnpm wp-install-ai-hooks.';\n }\n}\n"]}
1
+ {"version":3,"file":"reviewer-identity.js","sourceRoot":"","sources":["../../../../../../../packages/tooling/pr-gate/src/scripts/workflow/reviewer-identity.ts"],"names":[],"mappings":";;;;AAAA,8DAA0D;AAC1D,sEAA6F;AAC7F,yCAA2D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AY,EAAW,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACjG,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,IAAI,8BAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;QACtG,OAAO,IAAI,gBAAgB,CAAC,qCAAgB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEO,kBAAkB,CAAC,WAAmB,EAAE,MAAc;QAC1D,OAAO,GAAG,qCAAgB,iBAAiB,MAAM,uEAAuE;cAClH,iFAAiF,WAAW,mBAAmB;cAC/G,sGAAsG;cACtG,qGAAqG;cACrG,mCAAmC,CAAC;IAC9C,CAAC;IAEO,gBAAgB,CACpB,GAAW,EACX,WAAmB,EACnB,UAA6B;QAE7B,OAAO,CACH,GAAG,qCAAgB,oDAAoD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB;YAC9G,iEAAiE,WAAW,mCAAmC;YAC/G,sDAAsD;YACtD,mBAAmB,GAAG,qBAAqB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM;YACxF,qGAAqG;YACrG,yFAAyF;YACzF,gDAAgD,qCAAgB,gBAAgB,WAAW,kBAAkB;YAC7G,oGAAoG;YACpG,oFAAoF,CACvF,CAAC;IACN,CAAC;CACJ,CAAA;AAvCY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,sBAAU,EAAC,8BAAkB,CAAC,SAAS,CAAC;6CAEA,+CAA0B;GADtD,wBAAwB,CAuCpC","sourcesContent":["import { InformAiError } from '@webpieces/tooling-common';\nimport { ReviewIdentityStampService, WRITE_REVIEW_BIN } from '@webpieces/repo-workflow-core';\nimport { injectable, bindingScopeValues } from 'inversify';\nimport { HARNESS_TERMINAL } from './verdict-provenance';\n\n/**\n * Env vars whose presence means an AI harness launched this process. Any one of them and there MUST be a\n * hook stamp — a harness-launched submission without one either bypassed the hook or ran where the hook is\n * not installed, and neither can say who is calling.\n */\nconst HARNESS_ENV = ['CLAUDECODE', 'CLAUDE_CODE_SESSION_ID', 'CODEX_SESSION_ID', 'CODEX_THREAD_ID'] as const;\n\n/** WHO is submitting a verdict. Data-only. */\nexport class ReviewerIdentity {\n harness: string;\n sessionId: string;\n agentId: string;\n agentType: string;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(harness: string, sessionId: string, agentId: string, agentType: string) {\n this.harness = harness;\n this.sessionId = sessionId;\n this.agentId = agentId;\n this.agentType = agentType;\n }\n}\n\n/**\n * Answers \"who is running `wp-write-review`?\" — and REFUSES the coordinating agent (issue #863).\n *\n * The mechanism, per harness, and why it is not the environment:\n * - CLAUDE CODE: a Bash child inherits `CLAUDE_CODE_SESSION_ID`, which is the PARENT session's id inside\n * a subagent too, and there is no agent id in the env at all. Env cannot tell a reviewer from its\n * coordinator.\n * - CODEX: `CODEX_SESSION_ID` / `CODEX_THREAD_ID` are exported, but nothing documents — and nothing here\n * has measured — that a spawned subagent gets its own thread id instead of the coordinator's.\n * - BOTH: the PreToolUse hook payload carries `agent_id`, empty for the main loop and set for a subagent,\n * on the same key in both harnesses. So the hook writes a {@link ReviewIdentityStamp} for each\n * checklist a `wp-write-review` command names, just before the command runs, and this consumes it.\n *\n * The plain-terminal story: with NO harness env and no stamp, the caller is a HUMAN at a terminal. That is\n * a legitimate reviewer, and the verdict is recorded with harness `terminal`. CI never submits verdicts —\n * `.webpieces/` is not in the repo, so there is nothing for CI to read or write here.\n *\n * NOT tamper-proof: an agent can scrub its env AND invoke the bin some way the hook does not recognise, or\n * forge a stamp file. That is deliberate, visible forgery in the transcript — the bar the rest of reviewer\n * provenance sets — rather than the one ordinary file write it used to take.\n *\n * `@injectable(bindingScopeValues.Singleton)` so it is injected by type and drawn in the DI design.\n */\n@injectable(bindingScopeValues.Singleton)\nexport class ReviewerIdentityResolver {\n constructor(private readonly stamps: ReviewIdentityStampService) {}\n\n resolve(cwd: string, checklistId: string, env: NodeJS.ProcessEnv = process.env): ReviewerIdentity {\n const stamp = this.stamps.take(cwd, checklistId);\n if (stamp !== null) {\n if (this.stamps.isCoordinator(stamp)) throw new InformAiError(this.coordinatorRefusal(checklistId, stamp.aiType));\n return new ReviewerIdentity(stamp.aiType, stamp.sessionId, stamp.agentId, stamp.agentType);\n }\n const inHarness = HARNESS_ENV.filter((name: string): boolean => (env[name] ?? '').trim() !== '');\n if (inHarness.length > 0) throw new InformAiError(this.unstampedRefusal(cwd, checklistId, inHarness));\n return new ReviewerIdentity(HARNESS_TERMINAL, '', '', '');\n }\n\n private coordinatorRefusal(checklistId: string, aiType: string): string {\n return `${WRITE_REVIEW_BIN} REFUSED: the ${aiType} harness reports this call comes from the COORDINATING agent, not a\\n`\n + `reviewer subagent. The coordinator may never submit a reviewer's verdict for \"${checklistId}\" — not by this\\n`\n + 'bin, and not by writing the file (wp-finish-upsert-pr rejects a verdict this bin did not write).\\n\\n'\n + 'Spawn the reviewer subagent pnpm wp-review-upsert-pr names and hand it the instructions file; the\\n'\n + 'reviewer submits its own verdict.';\n }\n\n private unstampedRefusal(\n cwd: string,\n checklistId: string,\n harnessEnv: readonly string[],\n ): string {\n return (\n `${WRITE_REVIEW_BIN} REFUSED: this process runs under an AI harness (${harnessEnv.join(', ')} set), but the\\n` +\n `expected worktree has no usable identity stamp for checklist \"${checklistId}\", so nothing can say whether a\\n` +\n 'reviewer subagent or the coordinator is calling.\\n\\n' +\n `Submission cwd: ${cwd}\\nExpected stamp: ${this.stamps.stampPath(cwd, checklistId)}\\n\\n` +\n 'The hook may have written a stamp in the session checkout instead of this worktree. Use a literal\\n' +\n 'leading cd to the absolute reviewed worktree path, then name the checklist literally:\\n' +\n ` cd '/absolute/reviewed-worktree' && pnpm ${WRITE_REVIEW_BIN} --checklist ${checklistId} <<'EOF' … EOF\\n` +\n 'Do not rely on exec_command.workdir alone when the hook exposes only the session cwd. Check hook\\n' +\n 'delivery and its selected tree; reinstall hooks only if they are actually missing.'\n );\n }\n}\n"]}