PR_26179_OWNER_011-pr-branching-model-docs#255
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32f6d675d0
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - Do not create a PR branch unless current branch is `main`, worktree is clean, `main...origin/main` is `0 0`, and `HEAD` SHA matches the published EOD SHA. | ||
| - Identify the PR branching model before creating or continuing a PR branch. | ||
| - Independent PRs and new stacked workstreams start from current `main`. | ||
| - Dependent Stacked PRs may start from the documented previous PR branch only when a direct dependency and dependency order are documented in `dev/build/ProjectInstructions/addendums/pr_workflow.md`. |
There was a problem hiding this comment.
This gate requires the specific direct dependency and dependency order to be documented in pr_workflow.md, but the new canonical stacked-PR rules in that file only define generic governance and say the actual stack order, previous dependency, starting branch, and merge order belong in Stacked PR reports. For any real dependent stack documented in its PLAN/report or OWNER command, this wording still forces a hard stop unless the governance file is edited for every stack, blocking the stacked workflow this change is trying to allow.
Useful? React with 👍 / 👎.
| - Stacked PRs may start from the previous PR branch when there is a direct dependency. | ||
| - Stacked PRs must document the dependency order before BUILD begins. |
There was a problem hiding this comment.
Reconcile the unconditional main-start gate
The new stacked-PR allowance lets a dependent PR start from the documented previous branch, but this same file still has the existing Next Day Start gate later on saying no team creates a PR branch until the current branch is main with the EOD SHA. In the dependent-stack case, agents that read both sections will still hard-stop or treat the instructions as conflicting, so the bottom gate needs to delegate to the model-specific gate or explicitly exempt dependent Stacked PRs.
Useful? React with 👍 / 👎.
| Use a Stacked PR only when the PR has a direct dependency on the previous PR branch. | ||
|
|
||
| Rules: | ||
| - Stacked PRs may start from the previous PR branch when there is a direct dependency. |
There was a problem hiding this comment.
Specify the stacked PR target branch
The stacked rules only tell agents to start the dependent branch from the previous PR branch; unlike the Independent PR section, they never define which base/target branch to use when opening the draft PR. In a real stack opened before the prior dependency merges, defaulting the PR target to main makes the later PR review include the prior PR's commits as well, defeating the per-PR dependency-order review this model is trying to enforce.
Useful? React with 👍 / 👎.
| HARD STOP when: | ||
| - an Independent PR is requested but the current/start branch is not `main` | ||
| - a Stacked PR is requested but the current/start branch is not the documented previous PR branch | ||
| - the request does not say whether the PR is Independent or Stacked and the start branch is not clearly valid |
There was a problem hiding this comment.
Hard-stop when the model is omitted on main
This hard-stop only fires for an omitted model when the start branch is not clearly valid, but main is valid for both an Independent PR and the first PR in a new stack. In that common start-from-main case, BUILD can proceed without knowing whether to create an independent PR or the first stacked workstream PR, so the required dependency/reporting/merge-order records can be skipped before the stack exists.
Useful? React with 👍 / 👎.
| Stop and report before changing files when: | ||
|
|
||
| - current branch does not match the expected branch | ||
| - requested PR branching model does not match the current/start branch |
There was a problem hiding this comment.
Allow continuation on the active PR branch
For branch continuation or review fixes after a PR branch already exists, the current branch is the active PR branch, not the original starting branch (main for Independent PRs or the previous branch for Stacked PRs). This new stop condition compares the requested model to the current/start branch without exempting an already-created active PR branch, so a valid continuation on PR_<name> can hard-stop even when the previous branch-creation gate was satisfied.
Useful? React with 👍 / 👎.
PR_26179_OWNER_011-pr-branching-model-docs Report
Purpose
Define Independent PRs and Stacked PRs in active Project Instructions.
Scope
Documentation/governance only. No implementation code, runtime files, API files, database files, or product pages changed.
Governance Outcome
pr_workflow.mdnow owns the canonical Independent PR vs Stacked PR model.main.Updated Documents
dev/build/ProjectInstructions/addendums/pr_workflow.mddev/build/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.mddev/build/ProjectInstructions/addendums/branch_lock_governance.mddev/build/ProjectInstructions/addendums/branch_context_governance.mddev/build/ProjectInstructions/standards/CODEX_WORKFLOW_COMMANDS.mddev/build/ProjectInstructions/TEAM_START_COMMANDS.mdZIP
dev/workspace/zips/PR_26179_OWNER_011-pr-branching-model-docs_delta.zip