Skip to content

fix(pr-pipeline): give the admission release point a 1-per-hour floor - #8798

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/admission-floor
Oct 21, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/admission-floor

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Closes #8793

Broker pin: melodic-software/azure-iac#68

Hold: a human merges this. It touches .github/** and docs/conventions/** (HIGH floor).

Summary

decide() in admission-window.mjs set the release point to admission-factor x merged24h x admission-window-hours / 24 with no floor. After a day with no lane merges the release point was 0, admissions held, no lane PR opened, and merges stayed at 0. Owner decision (2026-10-21 /planning:interview, relayed by Issue Triage): a floor of 1 admission per hour.

Fix

  • New limits.admission-min-per-hour (default 1, 0 to 100; 0 removes the floor) in pr-pipeline.yaml, the schema, resolve.mjs defaults and the README limits table.
  • decide(): allowed_per_hour = max(factor x hourly, min-per-hour), release_point = max(factor x merged24h x window / 24, min-per-hour x window). The rounding guard for whole release points is unchanged.
  • Note: admission-window.mjs has no workflow caller yet (README: "No lane reads it yet"); sessions that admit work run it by hand. refactor(pr-pipeline): fold the admission window into check-wip-cap with a queued-work count #8794 folds it into check-wip-cap and deletes it.

Verification

  • node --test .github/scripts/work-resolve-issue/admission-window.test.mjs: 12 pass. New: no merges leaves the floor open (23 admitted opens, 24 holds); the floor binds only under it (12 merges gives 24; floor 2 gives 48); floor 0 keeps the old hold. Two existing tests that check rounding and the factor set the floor to 0 so they still test what they name.
  • node --test .github/actions/resolve-config/resolve.test.mjs: 136 pass (default 1; -1 and 101 refused).
  • scripts/check-affected.sh --tests: 9 passed, 4 skipped. 1 failed only because this worktree has no root node_modules (check-html-assets: htmlhint not found); the unittest suite (2220) and every other suite passed.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01DZUxjJX2Sbu4ASZUPcwC3M

With no lane merges in 24 hours the release point was 0, so
admission-window.mjs held admissions, no lane PR opened, and merges stayed
at 0. limits.admission-min-per-hour (default 1) keeps the allowed rate at or
above 1 per hour, so the release point is at least the window in hours.

Closes #8793

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DZUxjJX2Sbu4ASZUPcwC3M
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 21, 2026 03:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T03:44:44.822126Z f201bd7 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.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed d46a76c41873c82ce8c7bab3bbe1f4f4ba8997c0: 0 finding(s), 0 as inline comments.

Security review: PR #8798 (head d46a76c)

No security findings.

The PR adds limits.admission-min-per-hour, a floor on the admission release point. It touches resolve.mjs, admission-window.mjs, their tests, the schema, pr-pipeline.yaml and the docs.

  • Config input: the new key comes from the checked-in pr-pipeline.yaml, which resolve-config validates against the schema. The schema bounds it to 0–100, and the resolve test covers -1 and 101 as rejections. It does not come from PR or issue text.
  • Shell and injection: admission-window.mjs still validates --repo against a strict owner/repo regex before use. The diff adds only numeric arithmetic, so it opens no command, path or injection surface.
  • Weakened limit: the change raises the admission cap on a zero-merge day from 0 to 1 × admission-window-hours, 24 with the default settings. That is a bounded owner decision, recorded in the PR, and it is configurable (0 removes the floor). Per the docs, no lane reads the script yet, so nothing acts on the new floor today.
  • Instruction surfaces: the diff deletes or softens no CLAUDE.md, AGENTS.md, rules file, skill or hook guardrail. I did not need the instruction exception register.
  • Actions hardening: no workflow files changed.

The only code that reads admission-factor is in files this PR touches, so the new key has no other consumer to update.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed d46a76c41873c82ce8c7bab3bbe1f4f4ba8997c0: 0 finding(s), 0 as inline comments.

No findings. I reviewed the full diff (8 files) against #8793 and found nothing to flag. I did not run the tests, so the pass counts in the PR body are author-claimed and unverified.

Checked against the acceptance criteria in #8793:

  • Floor in decide(): allowedPerHour is now max(factor × hourly, minPerHour), and the release point is max(factor × merged24h × window / 24, minPerHour × window). With 0 merges and the defaults the release point is 24, so admissions open. The toFixed(9) rounding guard is unchanged.
  • Zero-merge test: no merges in 24 h leaves the floor open checks 23 admitted is open and 24 is held. It would fail on the old code, where the release point was 0.
  • Floor value outside the code: admission-min-per-hour is in pr-pipeline.yaml, the schema (0 to 100, default 1), the resolve.mjs defaults and the README limits table. The limitsFromConfig loader passes it through to decide().
  • Existing tests: the rounding and factor tests now set minPerHour: 0, so they still test what they name. A separate test pins that a floor of 0 keeps the old hold.
  • Other changes: the changelog fragment and the resolve-config test (the default-limits value count and the rejection of -1 and 101) are consistent with the code.

The PR touches .github/** and docs/conventions/**, so the PR body's human-merge hold applies. I found no instructions embedded in the PR context file.

Lane-Activity: pr-unblock/resolve-conflicts
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 287d423 Oct 21, 2026
41 of 42 checks passed
@kyle-sexton
kyle-sexton deleted the fix/admission-floor branch October 21, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(pr-pipeline): give the admission release point a 1-per-hour floor

1 participant