Skip to content

feat(repo): enforce PR-first landing for main - #36

Merged
DaneSpiritGOD merged 1 commit into
mainfrom
feat/pr-first-landing
Oct 23, 2026
Merged

DaneSpiritGOD merged 1 commit into
mainfrom
feat/pr-first-landing

Conversation

@DaneSpiritGOD

Copy link
Copy Markdown
Owner

Summary

Enforce PR-first landing for main. Per ADR-0004, every change now enters via a pull request — direct pushes are disallowed (the repository admin keeps a pull_request bypass as an escape hatch for broken CI, not as the normal path). ADR-0004 fully supersedes ADR-0001.

This commit carries the repository-side half; the enforcement itself is already live on the GitHub ruleset (Protect main (PR + status checks)): allowed_merge_methods: ["squash"], admin bypass pull_request, required checks lint / type-check / test / build.

What this commit changes:

  • ci.yml: add a build job (web app via pnpm web build + md-web-cli bundle) so a broken bundle is caught on a PR, not after it lands.
  • sync-upstream.yml: run the md-web-cli unit tests before the verify gate, so a red gate never hides a CLI test regression; document the squash landing and the deferred merge-commit option in the header.
  • docs/adr/0004-pr-first-landing.md: new ADR recording the PR-first decision and its consequences.
  • docs/adr/0001-fork-local-workflow.md: marked superseded by ADR-0004.
  • AGENTS.md / GLOSSARY.md: replace the fork-local "direct-to-main" workflow with PR-first landing; Fork-local change → Fork-local package.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor
  • Documentation / workflow update
  • Test

Test Procedure

  • Ruleset updated and verified via the GitHub API (allowed_merge_methods=["squash"], bypass pull_request, checks lint,type-check,test,build).
  • pnpm wcli:verify gate is currently red (0/2 fixtures, see ADR-0003); the build job does not run the gate, so it is expected to pass.
  • ESLint passes on the changed files.
  • YAML structure of both workflows reviewed.

Related tracking: verify → required checks waits on the gate going green (see #33); landing upstream as a merge commit is deferred (see #34).

Pre-flight Checklist

  • Self-review of the diff
  • pnpm run lint passes
  • Tests added or updated when behavior changes
  • User-facing copy updated in zh-CN, zh-TW, en-US, and ja-JP when UI text changes
  • Docs updated when public API or contributor workflow changes

All changes now land on main through a pull request; direct pushes are
disallowed (admin keeps a pull_request bypass as an escape hatch). The
ruleset restricts merges to squash and requires lint, type-check, test,
and build. ADR-0004 supersedes ADR-0001 in full.

- add a build job to ci.yml (web app + md-web-cli)
- run sync-upstream unit tests before the verify gate
- write ADR-0004 and mark ADR-0001 superseded; update AGENTS.md, GLOSSARY.md

Landing upstream as a merge commit is deferred (see #34); adding verify
to required checks waits on the gate going green (see #33).
@DaneSpiritGOD
DaneSpiritGOD merged commit 01ff535 into main Oct 23, 2026
6 checks passed
@DaneSpiritGOD
DaneSpiritGOD deleted the feat/pr-first-landing branch October 23, 2026 13:34
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