$ node --experimental-strip-types --test examples/pr-reviewer/tests/pr-state.test.ts
✔ reviewAuthorAllowlistDecision lets configured authors through (1.108641ms)
✔ reviewAuthorAllowlistDecision skips authors not in the allowlist (0.667156ms)
✔ reviewAuthorAllowlistDecision skips unresolved authors when configured (0.164998ms)
✔ reviewAuthorAllowlistDecision leaves unset allowlists open to everyone (0.107551ms)
✔ resolveAuthorLogin prefers normalized meta author shapes (0.131065ms)
✔ readPr does not treat check-run sender as the PR author (0.194062ms)
✔ readPr uses the pull request opener as author when present (0.084648ms)
✔ readPr falls back to sender login for PR-shaped payloads when opener login is missing (0.084738ms)
✔ readPr surfaces the draft flag so the draft gate can hold off (0.105387ms)
✔ matchesConflictDirective fires only on an explicit fix/resolve-conflicts ask (0.323043ms)
✔ commentBody / commenterLogin read the issue_comment payload defensively (0.141424ms)
✔ readPr reads a PR from an issue_comment payload when the issue is a pull request (0.109033ms)
✔ readPr ignores an issue_comment on a plain issue (no pull_request marker) (0.051827ms)
✔ isAuthorizedConflictCommander never takes the order from a bot (0.060704ms)
✔ isAuthorizedConflictCommander fails closed to the PR author when no trust lists are configured (0.071263ms)
✔ isAuthorizedConflictCommander gates on APPROVERS/REVIEW_AUTHORS and the PR author (0.053039ms)
✔ conflictResolveHarnessPrompt keeps the no-git boundary and the safety/escape-hatch rules (0.336168ms)
✔ labelNames normalizes github label arrays defensively (0.12829ms)
✔ readPr resolves issue labeled payloads for pull requests in any AgentWorkforce repo (0.084858ms)
✔ evaluateMergeOnGreenState requires label, green checks, and requested bot approvals (0.58329ms)
✔ rollupFromCheckSummary maps the adapter check summary to gate-ready rollups (0.244537ms)
✔ deriveReviewDecision flags CHANGES_REQUESTED from the latest review per author (0.145151ms)
✔ reviewHarnessPrompt forbids git except the explicit restore-only carve-out (0.378347ms)
✔ reviewHarnessPrompt keeps fixes within the PR scope and verifies CI-deep (0.166301ms)
✔ reviewHarnessPrompt limits auto-edits to mechanical changes (0.063078ms)
✔ reviewHarnessPrompt forbids safety-default and lifecycle edits (0.058008ms)
✔ reviewHarnessPrompt forbids self-justifying test edits (0.095399ms)
✔ reviewHarnessPrompt only allows READY after checks complete, pass, and the PR is mergeable (0.153086ms)
✔ prReadyStateAllowsHumanReview downgrades READY while a check is pending (0.058309ms)
✔ prReadyStateAllowsHumanReview requires mergeable PRs with only completed passing checks (0.067576ms)
✔ prReadyStateAllowsHumanReview never reports a merged or closed PR ready (0.073016ms)
✔ prReadyStateAllowsHumanReview treats an empty (not-yet-registered) check rollup as not ready (0.052659ms)
✔ prReadyStateAllowsHumanReview allows a no-CI repo (empty rollup) only when GitHub reports CLEAN (0.039043ms)
✔ prReadyStateAllowsHumanReview treats skipped checks as non-blocking (0.059902ms)
✔ prReadyStateAllowsHumanReview holds back drafts and changes-requested PRs (0.091942ms)
✔ reviewHarnessPrompt requires accounting for each bot/reviewer comment with a location (0.193081ms)
✔ reviewHarnessPrompt tells the harness to run build/test serially (0.074329ms)
✔ harnessOutputTail keeps the END of the output and drops empties (0.073277ms)
✔ shouldSkipReview applies the four gates in order and returns null to proceed (0.245449ms)
✔ resolveAuthorLogin reads REST's user.login when meta.author is absent (0.055724ms)
✔ prReviewStateFromRest maps a REST pull, check-runs and reviews onto the gate state (0.228046ms)
✔ prFromInput takes owner/repo/number, or a PR-shaped event, and refuses shell-unsafe coordinates (0.612795ms)
✔ shellWord quotes one word, including embedded quotes (0.064451ms)
✔ HARNESS_RESOURCE_ENV holds the test run to one worker under the sandbox heap cap (0.139741ms)
✔ prFromInput refuses an event that names a different PR than the configured one (0.197639ms)
✔ mergeRefusal only lets an approval merge the approved, green, mergeable head (0.438069ms)
✔ commit statuses count toward READY alongside check runs (0.17652ms)
✔ protectedPathRefusal names the first human-owned path and lets ordinary sources through (0.853875ms)
✔ testCommand is pinned from input, defaults to npm test, and must be one line (0.142085ms)
✔ the exported handle carries the three PR trigger handlers (0.104656ms)
ℹ tests 50
ℹ suites 0
ℹ pass 50
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 167.400148
