Skip to content

feat(jackin): require all path-aware aggregator checks; require 1 reviewer; strict up-to-date branch policy#14

Merged
donbeave merged 1 commit into
mainfrom
chore/jackin-required-checks-and-strictness
May 9, 2026
Merged

feat(jackin): require all path-aware aggregator checks; require 1 reviewer; strict up-to-date branch policy#14
donbeave merged 1 commit into
mainfrom
chore/jackin-required-checks-and-strictness

Conversation

@donbeave

@donbeave donbeave commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

Raise the merge gate for the jackin repo to match what the path-aware-workflow refactor in jackin-project/jackin#256 introduced. Three changes: list the new aggregator status checks as required, require one approving review, and turn on the strict up-to-date branch policy so a green CI run reflects the exact code that lands on main.

variables.tf — replace the single docs-link-check entry with a list of the four aggregator-style checks plus the renovate-config upstream verifier:

  • ci-required rolls up CI's changes, check, msrv, build-validator.
  • construct-required rolls up Construct Image's classifier, build matrix, and publish-manifest.
  • docs-required rolls up Docs' classifier, repo-link-check, docs-link-check, deploy.
  • docs-link-check is kept directly so the docs build is provably green against the PR diff (the docs deploy job is push-only and never runs on pull_request).
  • validate is the only job in the new renovate-validate.yml workflow — it asserts that the deb registry URL behind the MISE_VERSION customManager still resolves and still lists the mise package.
  • DCO (the cncf/dco2 app) stays required as the contribution gate.

Listing aggregators rather than the underlying jobs is deliberate — adding or removing a gated job inside any of those workflows in the future does not require a terraform change.

branch-protection.tf — bump required_approving_review_count from 0 to 1, and flip strict_required_status_checks_policy from false to true. The first ensures every PR has a human eyeball; the second forces the PR branch to be up-to-date with main before merge so the green CI run reflects exactly the code that lands.

Why now

The post-merge break in jackin-project/jackin#266 (ERROR: no builder "jackin-construct" found on main immediately after #256 merged) was caused by a workflow-level env-var leak that PR-time CI structurally cannot exercise — publish-manifest is push-only, so it never runs on pull_request. This terraform PR is the second half of the hardening: jackin-project/jackin#267 (sibling docs PR) codifies the rules that would have caught the original break in review and via a feature-branch smoke test, and this PR raises the floor on what GitHub will let merge in the first place.

What's deferred

  • Reusable-workflow dry-run: true inputs for the four push-only jobs (build-validator, publish-manifest, deploy, publish-preview) so the full job chain can be exercised in PR with side effects mocked. Higher cost / higher fidelity than the smoke-test rule shipped in #267; deferred until that rule plus this terraform-side raise prove insufficient.

Verify locally

git fetch -f origin chore/jackin-required-checks-and-strictness:refs/remotes/origin/chore/jackin-required-checks-and-strictness
git checkout -B chore/jackin-required-checks-and-strictness refs/remotes/origin/chore/jackin-required-checks-and-strictness
terraform fmt -check -diff variables.tf branch-protection.tf
terraform init -backend=false
terraform validate
terraform plan -target=github_repository_ruleset.protect_main -var-file=...

The plan output should show required_approving_review_count: 0 -> 1, strict_required_status_checks_policy: false -> true, and the new required_check entries on the jackin repository's protect_main ruleset only — no other repos affected.

…iewer; strict up-to-date branch policy

Raise the merge gate for the jackin repo so a green PR carries the
same guarantees the path-aware refactor in jackin-project/jackin#256
intended.

variables.tf — replace the single required check (`docs-link-check`)
with the four aggregator-style checks plus the renovate-config
upstream verification:

- `ci-required` rolls up CI / changes, check, msrv, build-validator.
- `construct-required` rolls up Construct Image's classifier, build
  matrix, and publish-manifest.
- `docs-required` rolls up Docs' classifier, repo-link-check,
  docs-link-check, deploy.
- `docs-link-check` is kept directly because the docs deploy is
  push-only, so on a `pull_request` event `docs-link-check` is
  the actual proof the docs build succeeds against the PR diff.
- `validate` is the only job in the new `renovate-validate.yml`
  workflow; it asserts the deb registry URL behind the MISE
  customManager still resolves and still lists the `mise` package.
- `DCO` (cncf/dco2 GitHub App) stays required as the contribution
  gate.

Adding aggregators rather than the underlying jobs is deliberate —
the next time someone adds or removes a gated job inside an existing
workflow, branch protection does not need a terraform change.

branch-protection.tf — two related changes:

- `required_approving_review_count` from 0 to 1. Today an agent
  could open and merge without any human eyeball; raising to 1
  ensures every PR goes through review. Combined with squash-merge,
  the merge commit still lands as a single change.
- `strict_required_status_checks_policy` from false to true. The PR
  branch must be up-to-date with main before the merge is allowed,
  so a green CI run reflects exactly the code that lands on main
  rather than the code as it looked when the PR was opened. This
  closes the "two individually-green PRs become red when combined"
  failure mode.

The combined effect is forward-looking hardening against the class
of break that surfaced in jackin-project/jackin#266 (post-merge
red `main`). On its own it would not have prevented that
specific issue (publish-manifest is push-only and never ran on the
PR), but it materially raises the floor: every PR now provably
ran every aggregator check against the actual merge state, with
a human reviewer signing off, before the squash button becomes
clickable.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented May 9, 2026

Copy link
Copy Markdown

donbeave added a commit to jackin-project/jackin that referenced this pull request May 9, 2026
… rules (#267)

Codify two CI-merge-safety rules in `PULL_REQUESTS.md` plus a one-line cross-reference in `AGENTS.md`. The recent #256#266 incident exposed a class of break invisible to PR-time CI: a workflow-level env var (`BUILDX_BUILDER`) leaked into the `publish-manifest` job, where docker buildx read it as the default-builder selection and failed at runtime — but only on push to main, because that job is push-only and never runs on a `pull_request` event.

Three rules now live in `PULL_REQUESTS.md`. First, third-party-CLI env vars (`BUILDX_BUILDER`, `DOCKER_BUILDKIT`, `GH_TOKEN`/`GITHUB_TOKEN`, `KUBECONFIG`, `AWS_PROFILE`, `RUSTUP_TOOLCHAIN`, `npm_config_*`) must be scoped to the consuming job; workflow-level `env:` is reserved for in-house naming/paths. Second, registry / production publishing must hard-gate on main — the `is_publish` flag pattern from `construct.yml` is the canonical shape, and PRs / feature-branch dispatches must build-and-verify only, never publish. Third, push-only / main-only / `workflow_run`-gated jobs (`build-validator`, `publish-manifest`, `deploy`, `publish-preview`) must be smoke-tested via `gh workflow run --ref <feature-branch>` before requesting merge, since PR-time CI structurally cannot exercise them.

A companion terraform PR (jackin-project/jackin-github-terraform#14) raises the matching protection-rule changes — required-status-check list, single approving review, strict up-to-date branch policy.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
@donbeave donbeave merged commit 4ae18f7 into main May 9, 2026
2 checks passed
@donbeave donbeave deleted the chore/jackin-required-checks-and-strictness branch May 9, 2026 10:02
donbeave added a commit that referenced this pull request May 9, 2026
…ntainer repo

The previous PR (#14) raised `required_approving_review_count` from
0 to 1 as part of the post-#266 hardening, on the assumption that a
human reviewer would be available before each merge. The repo is
operated by a single maintainer, and GitHub does not let the PR
author approve their own pull request, so the rule blocks every
merge instead of gating it.

Revert to `required_approving_review_count = 0`. The remaining
hardening from #14 stays in place: `strict_required_status_checks_policy = true`
ensures the green CI run reflects the exact code that lands on
main, and the expanded required-status-check list (`ci-required`,
`construct-required`, `docs-required`, `docs-link-check`,
`validate`, `DCO`) gives every gated workflow a hard gate at the
GitHub layer.

Add a code comment naming the constraint so a future change does
not silently re-flip the knob without checking whether the project
has gained additional reviewers in the meantime.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave added a commit that referenced this pull request May 9, 2026
…ntainer repo (#15)

Revert `required_approving_review_count` from 1 back to 0 on the `jackin` repo's `protect_main` ruleset. The previous change in #14 raised it under the assumption a human reviewer would always be available, but the repo is operated by a single maintainer and GitHub does not let a PR author approve their own pull request — the rule blocks every merge instead of gating it.

The other improvements from #14 stay in place: `strict_required_status_checks_policy = true` ensures every PR runs CI against the actual merge state, and the expanded required-status-check list still gives every gated workflow a hard gate at the GitHub layer. A code comment names the solo-maintainer constraint so a future change does not silently re-flip the knob.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave added a commit to jackin-project/jackin that referenced this pull request May 9, 2026
Capture an invariant that has been silently shaping recent decisions but was nowhere written down: jackin has exactly one human contributor, and GitHub does not let a PR author approve their own pull request. The previous CI hardening round (jackin-project/jackin-github-terraform#14) raised `required_approving_review_count` to 1 on the assumption a second reviewer was available — they are not — and the resulting trap blocked every merge until it was reverted in jackin-project/jackin-github-terraform#15.

Add a 'Project staffing: solo maintainer' section at the top of `AGENTS.md` naming the constraint and the four downstream consequences: branch protection cannot require an approving review; "get a second pair of eyes" is not an available pre-merge step (pre-merge confidence comes from CI, the path-aware aggregator status checks, the strict up-to-date branch policy, and the agent following PULL_REQUESTS.md); multi-agent review is the load-bearing substitute for the missing second human, not optional polish; and for irreversible or high-blast-radius changes the agent should prefer asking the operator to confirm one more time over assuming green CI is sufficient.

The rule retires when the project gains additional human reviewers.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave added a commit to jackin-project/jackin that referenced this pull request May 18, 2026
… rules (#267)

Codify two CI-merge-safety rules in `PULL_REQUESTS.md` plus a one-line cross-reference in `AGENTS.md`. The recent #256#266 incident exposed a class of break invisible to PR-time CI: a workflow-level env var (`BUILDX_BUILDER`) leaked into the `publish-manifest` job, where docker buildx read it as the default-builder selection and failed at runtime — but only on push to main, because that job is push-only and never runs on a `pull_request` event.

Three rules now live in `PULL_REQUESTS.md`. First, third-party-CLI env vars (`BUILDX_BUILDER`, `DOCKER_BUILDKIT`, `GH_TOKEN`/`GITHUB_TOKEN`, `KUBECONFIG`, `AWS_PROFILE`, `RUSTUP_TOOLCHAIN`, `npm_config_*`) must be scoped to the consuming job; workflow-level `env:` is reserved for in-house naming/paths. Second, registry / production publishing must hard-gate on main — the `is_publish` flag pattern from `construct.yml` is the canonical shape, and PRs / feature-branch dispatches must build-and-verify only, never publish. Third, push-only / main-only / `workflow_run`-gated jobs (`build-validator`, `publish-manifest`, `deploy`, `publish-preview`) must be smoke-tested via `gh workflow run --ref <feature-branch>` before requesting merge, since PR-time CI structurally cannot exercise them.

A companion terraform PR (jackin-project/jackin-github-terraform#14) raises the matching protection-rule changes — required-status-check list, single approving review, strict up-to-date branch policy.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
donbeave added a commit to jackin-project/jackin that referenced this pull request May 18, 2026
Capture an invariant that has been silently shaping recent decisions but was nowhere written down: jackin has exactly one human contributor, and GitHub does not let a PR author approve their own pull request. The previous CI hardening round (jackin-project/jackin-github-terraform#14) raised `required_approving_review_count` to 1 on the assumption a second reviewer was available — they are not — and the resulting trap blocked every merge until it was reverted in jackin-project/jackin-github-terraform#15.

Add a 'Project staffing: solo maintainer' section at the top of `AGENTS.md` naming the constraint and the four downstream consequences: branch protection cannot require an approving review; "get a second pair of eyes" is not an available pre-merge step (pre-merge confidence comes from CI, the path-aware aggregator status checks, the strict up-to-date branch policy, and the agent following PULL_REQUESTS.md); multi-agent review is the load-bearing substitute for the missing second human, not optional polish; and for irreversible or high-blast-radius changes the agent should prefer asking the operator to confirm one more time over assuming green CI is sufficient.

The rule retires when the project gains additional human reviewers.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Co-authored-by: Claude <noreply@anthropic.com>
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.

1 participant