Skip to content

fix(ci): review lane warnings, loosened-check criterion and clearer lane reports - #16709

Merged
kyle-sexton merged 7 commits into
mainfrom
fix/review-lane-warnings-and-lane-reports
Nov 17, 2026
Merged

kyle-sexton merged 7 commits into
mainfrom
fix/review-lane-warnings-and-lane-reports

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

No related issue: a batch of owner-decided behavior fixes to the review lanes and lane reports, dispatched from a session as one pull request.

Summary

Seven of nine decided fixes to the review lanes and lane reports. Workflow wiring (which reusable a caller uses, credential legs, gate jobs) is unchanged. Top-level PR comment relay is not in this PR: it needs an owner decision on a trust boundary (see Related). Lane workflow header blocks were dropped: each line restated lane-rules.json or the file's on: block, and the comment lint (ADR 0110) blocks them.

Fix

  • Fallback warning. pr-review-main.yml's review-fallback leg emits a ::warning annotation, naming the lane and why the subscription leg handed it on, once the fallback credential is present. The leg still reviews. The hosted lanes' fallback lives in the pinned ci-workflows reusable and is not changed here.
  • Loosened-check criterion in the CI code-review lane. plugins/review/skills/code-review/SKILL.md applies skills/quality-gate/context/loosened-check.md to every changed file. The lane runs no settings script, so it takes the verdict and patterns from prompt value lines when the wrapper writes them, else fail with no consumer entries. The closing-issue text is the only spec. pr-review-main's criteria.txt now copies the criterion beside the skill, and the copy step creates a destination's parent, so the relative link resolves in its data directory. loosened-check.md and reference/config.md list the lane among the criterion's appliers.
  • Readable review summaries. code-review folds its Pre-existing (advisory): and manifest <field>: lines into one <details> block after the findings. The block comes before the Verifier dropped line, which stays last. security-review folds its manifest <field>: lines the same way and keeps critical-findings: <n> outside the block. Each line still starts with its marker, so the follow-ups sweep and the merge gate read it unchanged.
  • One model id per eval workflow. pr-run-plugin-evals.yml and maintenance-measure-skill-edit-pass.yml each name EVAL_MODEL and EVAL_JUDGE_MODEL once, in a workflow-level env:. Each probe and run reads them from there; before this, the two files held 15 copies.
  • Required body sections. report-outcome.mjs reads pr_body_required_sections from the default branch's docs/conventions/source-control.yaml with yq, as trackerBindingText reads the tracker. It adds a non-empty ## <name> section for each required name the lane's PR body lacks. An unreadable file or key changes nothing.
  • Claim comment run link. The issue lane's lease comment (claim --lease-only --session-id run-<id>, pr-run-activity-read.yml) adds Claimed by [workflow run <id>](<run url>) below the marker when GITHUB_SERVER_URL is set. wit_lease_json already reads past a trailing footer, and CONTRACT.md records it.
  • Testing a lane change from its branch. docs/conventions/pr-pipeline/README.md gains "Testing a lane change from its branch", which covers gh workflow run <workflow>.yml --ref <branch> and its three limits. First, only the workflow file comes from the branch, since .base is main's tip. Second, a lanes-token mint is refused workflow-modified while the caller differs from main. Third, a dispatcher-sent run must name the default branch.

Verification

  • node --test --test-concurrency=4 on each touched node suite passed: pr-review-main/workflow.test.mjs and credential-legs.test.mjs (fallback warning step, leg equality, criteria copy), work-resolve-issue/report-outcome.test.mjs (new required-sections cases), the plugin-eval and measure-skill-edit suites, and the workflow-scanning suites (model-job-permissions, callers, pr-merge/workflow, setup-runner-isolation, check-signed-commits, check-wip-cap, lane-run-report/post).
  • plugins/work-items/tools/work-item-tracker/adapters/github/lease-coordination.test.sh passed, including new run-link cases: a run lease links its run and still parses, while a session lease and a non-https server value add nothing. Its gh stub routes a POST whose body links a run to the comment branch.
  • scripts/check-comment-lint.sh over the whole PR diff (HEAD_SHA at the pushed head, BASE_REF=main) exited 0 with no finding.
  • The --ref behavior was checked against GitHub's Manually running a workflow page, request-lane-token/README.md ("A workflow file the PR changes") and check-trusted-trigger/README.md ("Rules"). No live dispatch was run.
  • Not verified: the hosted review lanes reading loosened-check.md through ${CLAUDE_PLUGIN_ROOT} depends on the ci-workflows reusable installing the review plugin, which this repository does not show.

Related

  • Top-level PR comment relay is not in this PR. relayUpstream (.github/scripts/pr-unblock/feedback-dispatch.mjs) accepts only a pull_request_review_comment relay run and authenticates its PR from run facts. An issue_comment run cannot supply those facts, and address-feedback works only review threads, which a top-level comment does not have. Either route is an owner decision.

🤖 Generated with Claude Code

kyle-sexton and others added 5 commits November 17, 2026 01:10
…ane reports

- pr-review-main's fallback leg emits a warning annotation when the
  fallback token reviews a lane; the leg itself is unchanged.
- The CI code-review lane applies the loosened-check criterion.
- Review summaries fold advisory and manifest lines into one <details>
  block.
- Each eval workflow names its model and judge model once, in env.
- report-outcome adds any pr_body_required_sections section the lane's PR
  body lacks.
- intake-reenter's release claim comment links its run.
- Each lane workflow in lane-rules.json opens with a fixed summary block
  (lane, purpose, triggers, stage), checked against lane-rules.json and
  the file's on: events.
- The pr-pipeline convention documents testing a lane change with
  gh workflow run --ref and what such a run does not exercise.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed-check criterion

- The issue lane's lease comment (claim --session-id run-<id>) adds a
  readable link to its run below the marker; the intake-reenter record
  is left as it was.
- pr-review-main copies the loosened-check criterion beside the lane's
  skill, so the relative link resolves in its data directory.
- The code-review fold sits before the verifier line, which stays last.
- The required-sections test writes to a temp directory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… stub

A lease comment's body can now hold a run URL, which the stub's run-status
branch would otherwise match before the comment branch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 17, 2026 06:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T06:33:46.094316Z 25557b0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

kyle-sexton and others added 2 commits November 17, 2026 01:40
… blocks

The Lane/Does/Trigger/Stage header blocks restated lane-rules.json and each
file's on: block, so they and their test go. The comments added beside the
fallback warning, the eval model env, the required-sections helpers, the
lease run link and their tests go too: the code says what they said. The
fallback warning step moves after the managed-settings step so each leg's
shared steps stay byte-equal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ttings

Placed after the managed-settings step so the steps the three legs share stay
byte-equal, which workflow.test.mjs checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg handoff
Run job success
Activity step skipped
Commits pushed none (read lane)
Run 44031467686

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 4b1621014a87677111729fb005d1c500aaa9200b: read 18 of 18 changed file(s); 0 finding(s), 0 as inline comments.

CI code review: PR #16709

I read every hunk of all 18 changed files in .claude-lane/pr.diff. I found nothing that blocks the merge and nothing advisory.

What I checked

  • Fallback warning (pr-review-main.yml): steps.credential.outputs.fallback-reason is an output the fallback leg's credential step already exposes; the same leg's report steps read it. The new step runs only when steps.credential.outputs.present == 'true', and the value reaches the shell through env: rather than being written into the script. In workflow.test.mjs, the leg-equality assertion now skips one step, and only that step by its name. The new test pins that step's condition, its position and its output, and checks that the key and subscription legs do not have it.
  • Criteria copy: in the three copy loops, mkdir -p "${dest%/*}" creates the parent directory, so the new nested quality-gate/context/loosened-check.md destination resolves. The existing lines in criteria.txt behave as before. The criteria-change awk (line 279) picks up the new source path, so a change to it triggers a new review.
  • Run link on the lease comment (claim.sh):
    • wit_lease_json (lib/lease.sh:17-24) stops at the first -->, so text after the marker does not change the lease it reads.
    • The renew and supersede writers in common.sh:445,469 rewrite the marker without the link, as CONTRACT.md now says.
    • The run id and GITHUB_SERVER_URL are both checked against a strict pattern before the link is built. The test includes a server value written to inject a second link and checks it adds nothing.
    • The test stub sends a POST whose body contains /actions/runs/ to the comment branch, not the run-status branch.
  • Required body sections (report-outcome.mjs): the default path .base/docs/conventions/source-control.yaml follows the existing TRACKER_CONFIG default. If the file, yq or the key is missing, nothing is added. Headings are matched without regard to case. Only lines that start with ## count as headings, and the model's text in the body is quoted (quoted(...)) or bulleted, so it cannot pose as a heading. The repository's list today (Summary, Fix, Verification, Related) matches the sections both decide and reusePlan already write, so current PR bodies come out unchanged.
  • Eval workflows: all 15 hard-coded model ids now read the workflow-level EVAL_MODEL / EVAL_JUDGE_MODEL, with the same values as before.
  • Skill text: the <details> blocks leave each Pre-existing (advisory):, manifest <field>: and critical-findings: line starting with its marker, so anything that looks for those markers at the start of a line still finds them. The Verifier dropped line stays last.

Other notes

  • Closing issue: none. The PR says it has no related issue, so there are no acceptance criteria to check.
  • Plugin manifests: no plugin.json or marketplace.json is changed, so there are no manifest lines. The changelog bumps (review minor, work-items and pr-pipeline patch) fit the changes.
  • Embedded instructions: none found in the PR context or the prior-findings files.
  • Author's claims: the test runs and lint results in the PR description are the author's and I did not verify them; this lane has no shell and ran nothing. The author also says that whether the hosted lanes can read loosened-check.md through ${CLAUDE_PLUGIN_ROOT} is unverified.
  • Spend: none. The new step only prints a line, and the eval model ids keep their values.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 4b1621014a87677111729fb005d1c500aaa9200b: read 18 of 18 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #16709

No security issues found. I read all 18 changed files in full in .claude-lane/pr.diff. Several of them match trusted paths (pr-review-main.yml, .github/scripts/pr-review-main/**, work-resolve-issue/report-outcome.mjs, pr-run-plugin-evals.yml, maintenance-measure-skill-edit-pass.yml and plugins/review/skills/security-review/**). Matching a trusted path is not a finding.

What I checked:

  • pr-review-main.yml fallback warning step. The step passes matrix.lane and steps.credential.outputs.fallback-reason through env: and quotes them in echo. No ${{ }} expression reaches run:. The step runs only under steps.credential.outputs.present == 'true'. It reads no secret and prints only the name FALLBACK_CLAUDE_CODE_OAUTH_TOKEN, never its value. The workflow's credential legs, gate jobs and permissions are unchanged.
  • pr-review-main.yml copy step. The new mkdir -p "${dest%/*}" uses a destination built from criteria.txt. The step reads that file from .base, which is main's tip, so a PR head cannot add copy lines. The added criteria.txt line copies a file that is already in the review plugin.
  • report-outcome.mjs requiredSections / withRequiredSections.
    • yq runs through execFileSync with fixed arguments and no shell. The YAML goes in on stdin, with a timeout and a maxBuffer cap.
    • The config path defaults to .base/docs/conventions/source-control.yaml, the default branch, so PR content does not reach it.
    • Section names must match ^[A-Za-z0-9][A-Za-z0-9 ._/-]{0,59}$, and the text appended under each one is fixed.
    • A missing file or unreadable output returns [] and changes nothing.
  • claim.sh run-link footer.
    • The run id must match ^[1-9][0-9]{0,19}$, and the session id must be exactly run-<id>.
    • GITHUB_SERVER_URL must match ^https://[A-Za-z0-9.-]+$, so Markdown or URL injection through it is rejected. The test covers http://x) [y](https://z.
    • The footer goes after the --> that closes the lease marker, so readers take the lease from the marker alone. wit_lease_json reading past the footer is tested.
    • owner and repo were already in the API path before this change.
  • Eval workflows. A workflow-level env: now names the same two model ids, and every use is quoted. The model, cost cap and run count are unchanged, and no permission or trigger changed.
  • Review skill text (instruction-surface lens).
    • code-review/SKILL.md adds the loosened-check criterion. It reads the verdict and patterns only from lines the wrapper writes in the prompt, else uses fail. This adds a rule and removes none.
    • security-review/SKILL.md only moves manifest <field>: summary lines into a <details> block and keeps critical-findings: <n> outside it.
    • The gate's reader still finds both lines. clear-escalations.mjs matches ^\s*?critical-findings: (\d{1,6})?\s*$ per line (clear-escalations.mjs#L536).
    • adjudicate-feedback.mjs matches manifest dependencies: flag on an inline comment's first line (adjudicate-feedback.mjs#L169), and inline comments are not folded.
    • No standing instruction is deleted or narrowed. I did not read the instruction exception register; it was not needed because nothing was removed.
  • Trust controls. Nothing here widens a control: the trusted-trigger check, lanes token scope, kill switch, merge holds and runner isolation are unchanged. The new README section only describes the existing limits on runs dispatched from a branch.
  • Manifests. No .claude-plugin manifest changed.

PR context. The description contains no instructions aimed at this lane.

Spend. Unchanged. The eval workflows keep the same models and caps, and the fallback warning step makes no model call.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 1af4762 Nov 17, 2026
82 of 83 checks passed
@kyle-sexton
kyle-sexton deleted the fix/review-lane-warnings-and-lane-reports branch November 17, 2026 07:22
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant