Skip to content

PR_26179_OWNER_011-pr-branching-model-docs#255

Merged
ToolboxAid merged 1 commit into
mainfrom
PR_26179_OWNER_011-pr-branching-model-docs
Jun 28, 2026
Merged

PR_26179_OWNER_011-pr-branching-model-docs#255
ToolboxAid merged 1 commit into
mainfrom
PR_26179_OWNER_011-pr-branching-model-docs

Conversation

@ToolboxAid

Copy link
Copy Markdown
Owner

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.md now owns the canonical Independent PR vs Stacked PR model.
  • Independent PRs must start from synchronized main.
  • Stacked PRs may start from the documented previous PR branch only when there is a direct dependency.
  • Stacked PRs must document stack order, previous dependency, next dependency when known, starting branch, and merge order.
  • Stacked PRs must be reviewed and merged in dependency order.
  • Codex must HARD STOP when the requested PR model does not match the current/start branch.

Updated Documents

  • dev/build/ProjectInstructions/addendums/pr_workflow.md
  • dev/build/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md
  • dev/build/ProjectInstructions/addendums/branch_lock_governance.md
  • dev/build/ProjectInstructions/addendums/branch_context_governance.md
  • dev/build/ProjectInstructions/standards/CODEX_WORKFLOW_COMMANDS.md
  • dev/build/ProjectInstructions/TEAM_START_COMMANDS.md

ZIP

  • dev/workspace/zips/PR_26179_OWNER_011-pr-branching-model-docs_delta.zip

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept per-PR stack records

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 👍 / 👎.

Comment on lines +60 to +61
- 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@ToolboxAid ToolboxAid merged commit 7aa9ab3 into main Jun 28, 2026
1 check passed
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