Skip to content

Gate pull request intake on a lead's request for the work - #368

Closed
rocklambros wants to merge 31 commits into
integrationfrom
fix/362-pr-intake-gate
Closed

rocklambros wants to merge 31 commits into
integrationfrom
fix/362-pr-intake-gate

Conversation

@rocklambros

@rocklambros rocklambros commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

This replaces the intake bot's two bash steps with one Python gate, tools/pr_intake.py, that queues a pull request no maintainer asked for, reading that from a lead's review or hand clear, the author's merged record, an assignment, a claim on a help wanted issue, or an editorial tick on the documentation lane. The bot owns the status:needs-triage label, keeps one comment per pull request edited in place, turns auto-merge off where the design names the harm, and lists the queue on the health issue, where the roadmap monitor raises the lead alarm when the nightly sweep fails. Enforcement stays off until two repository variables arm it, so a merge changes nothing beyond today's behavior, and the design, its premortem, and the plan are committed under design/ with the design's Amendments section recording every change made since version 3.0.

Which issue does this implement

Part of #362

  • This is an editorial correction on the documentation lane (typo, grammar, link, formatting) with no change in meaning, so it needs no issue

Base branch

  • integration, because this touches the specification, schemas, a reference
    implementation, an adapter, tests, or CI
  • main, because every changed path is on the documentation lane allowlist in
    CONTRIBUTING.md

It changes workflows, tools, and tests, so it lands on integration and reaches main by promotion.

Type of change

  • Specification change (schema, hooks, events, AgBOM)
  • Reference implementation or adapter
  • Documentation
  • Tooling or CI
  • Governance (licensing, security policy, contributor docs)

I tested this

  • I synced my branch with the base branch before opening this
  • uv run pytest -v passes on my machine
  • uv run mkdocs build --strict passes on my machine
  • uv run pytest -q: 1222 passed, 1 skipped.
  • uv run mkdocs build --strict: built with no warnings.
  • uv run --locked --only-group zizmor zizmor .github/workflows/: exit 14, 2 high findings (github-app), both in .github/workflows/board-reconcile.yml, which this branch does not change and which is identical on integration. The three workflows this branch changes (pr-intake.yml, roadmap-sync.yml, monitor-roadmap.yml) report no findings. The zizmor workflow runs with --no-exit-codes, so CI does not fail on these.

Checklist

  • Commits are signed off with git commit -s (required by the DCO)
  • Prose follows STYLE.md
  • No secrets, tokens, or internal URLs in the diff

Security

  • This change has no security impact

The workflow runs on pull_request_target, so it holds the base repository's token on fork pull requests. These are the controls around that token.

  • permissions: {} sits at the top of pr-intake.yml. The one job holds contents: read, pull-requests: write, and issues: read, each commented with its use.
  • The job checks out the pull request's base ref with persist-credentials: false, never the head. Its if admits pull request events only against main, integration, or release/*, the ruleset-protected bases, so only code a lead approved runs beside the token.
  • Every gh call goes through tools/gh_runner.py: absolute /usr/bin/gh, a minimal environment, and an allowlist with one argv shape per operation. No title, body, path, or login from a pull request reaches argv, a shell, or a workflow command. The allowlist refuses -f, -F, --jq, -q, -t, and --template in every position.
  • Every comment and label body goes to gh on stdin as JSON.
  • The bot finds its own comment by its exact login plus a marker, and parses state only from that comment's first line with a strict pattern, so a contributor's comment cannot forge state.
  • No ${{ }} appears inside any run:, and zizmor reports no findings on the three workflows this branch changes.

Rollout

The owner accepted the deviation on 2026-10-30. The line is in the design under "The owner writes one line here".

The checklist below is posted on issue #362 after merge and ticked there. Undo order at any step: unset PR_INTAKE_ENFORCED, then dispatch mode=retract.

Open items

Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
The queue label and the bot's own unlabel no longer enter the hash, so a write is not followed by a redundant re-render. The data line records cleared_at so a lead's second clear after a push is honored, and the claimed and issues values are capped so decide is total on any facts.

Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
… dry run, and retract

Signed-off-by: rocklambros <rock@rockcyber.com>
… and stamp seen with the bot's write time

Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
… comments

Signed-off-by: rocklambros <rock@rockcyber.com>
…ails

Signed-off-by: rocklambros <rock@rockcyber.com>
…and GOVERNANCE

Signed-off-by: rocklambros <rock@rockcyber.com>
… text, and pin its numbers to the gate

Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
…pull request

Signed-off-by: rocklambros <rock@rockcyber.com>
…t's age

Signed-off-by: rocklambros <rock@rockcyber.com>
…holder constant

Signed-off-by: rocklambros <rock@rockcyber.com>
…ks an approval

Signed-off-by: rocklambros <rock@rockcyber.com>
…tly sweep

Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
… as the sweep ref

Signed-off-by: rocklambros <rock@rockcyber.com>
…read edges

Signed-off-by: rocklambros <rock@rockcyber.com>
…d edits

Signed-off-by: rocklambros <rock@rockcyber.com>
…dy to match

Signed-off-by: rocklambros <rock@rockcyber.com>
… later legacy run does not post it twice

Signed-off-by: rocklambros <rock@rockcyber.com>
@acs-board-reconciler acs-board-reconciler Bot moved this from Needs triage to In progress in ACS Project Tracker Oct 30, 2026
Signed-off-by: rocklambros <rock@rockcyber.com>
Signed-off-by: rocklambros <rock@rockcyber.com>
@rocklambros

Copy link
Copy Markdown
Collaborator Author

Replaced by PR #406, a much smaller check with no rollout.

@rocklambros rocklambros closed this Nov 1, 2026
@github-project-automation github-project-automation Bot moved this from In progress to Done in ACS Project Tracker Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant