Skip to content

Default PR batches to one canonical target - #458

Open
justin808 wants to merge 58 commits into
jg-codex/399-hierarchical-token-budgetsfrom
codex/402-canonical-task-pilot
Open

Default PR batches to one canonical target#458
justin808 wants to merge 58 commits into
jg-codex/399-hierarchical-token-budgetsfrom
codex/402-canonical-task-pilot

Conversation

@justin808

@justin808 justin808 commented Aug 26, 2026

Copy link
Copy Markdown
Member

Why

PR-batch currently permits broad multi-target supervision even when one user-visible task has one canonical issue or PR. That topology amplifies context, delegation, and correction costs and makes ownership harder to reason about.

This change makes one user-visible task map to one repository-qualified canonical issue or existing PR, one lane, one active maker by default, and at most one implementation PR. Multi-target supervision remains available only through an explicit, budgeted, rollback-safe exception.

What changed

Review path

  1. Start with skills/pr-batch/bin/canonical-task-control-test.rb for the accepted state machine and negative cases.
  2. Review skills/pr-batch/bin/canonical-task-control against those contracts.
  3. Check the synchronized wording in the two skills, workflow, and routing guide.

Stacked dependency

This PR is intentionally stacked on PR #426 (jg-codex/399-hierarchical-token-budgets) so #402 can proceed independently while consuming the real budget/usage contract. It must not merge into main yet. After #426 merges, this branch will be rebased or retargeted to current main, conflicts will be resolved here, and every exact-head validation/review/QA gate will be rerun.

Closes #402

@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: fc5f1c95c5

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control
Comment thread skills/pr-batch/SKILL.md Outdated

@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: 8d120c1a42

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control Outdated

@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: 02b3ee04b9

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control
Comment thread skills/pr-batch/bin/canonical-task-control Outdated

@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: 1384e39f4c

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control
Comment thread skills/pr-batch/bin/canonical-task-control Outdated

@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: 7a23847ee7

ℹ️ 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".

Comment on lines +1076 to +1077
reservation.fetch("rename").values.any? do |endpoint|
path == endpoint || path.start_with?("#{endpoint}/")

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 Detect ancestor paths around rename endpoints

When a rename reservation uses an endpoint such as lib/old/sub and another same-wave lane reserves or reports the ancestor path lib/old, this predicate returns false because it checks only whether the other path is equal to or below the endpoint. colliding_paths applies the same one-way test, so preflight can accept both lanes without the required max-one serialization even though the documented rename contract promises ancestor/descendant collision checks at both endpoints; compare both path.start_with?(endpoint + "/") and endpoint.start_with?(path + "/").

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Valid finding, but not fixed by this issue-402 lane. The required changes are in skills/plan-pr-batch/bin/batch-plan-preflight and its test, which are outside the explicit authorized envelope. Independent QA reproduces the bidirectional rename-ancestor collision gap. This thread remains unresolved pending the PR-426/base owner or explicit scope expansion; no waiver or merge-readiness claim is made.

@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: 3bfcc1787d

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control

@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: 05138ae9d2

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control Outdated
Comment thread skills/pr-batch/bin/canonical-task-control Outdated

@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: 5eb6fbb291

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control

@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: 2d30eee471

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control
Comment thread skills/pr-batch/bin/canonical-task-control Outdated

@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: a54dd1a5e6

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control

@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: c21eb551be

ℹ️ 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".

Comment thread skills/pr-batch/bin/canonical-task-control Outdated
@justin808

Copy link
Copy Markdown
Member Author

Review-status checkpoint for exact head e99b6b2dd7a9ca0e8a29462d10e2b1be1f3c287f:

  • This review pass fixed and resolved 17 in-scope findings after exact-head verification.
  • One valid finding remains intentionally unresolved: 3871728103 / PRRT_kwDOTBXFbs6c0LAu, the bidirectional rename-ancestor collision gap in skills/plan-pr-batch/bin/batch-plan-preflight and its test. Those paths are outside issue Default PR-batch to one canonical issue or PR per user-visible task #402’s authorized envelope; no waiver or merge-readiness claim is made.
  • Independent exact-head QA passed implementation acceptance: 379 runs, 52,778 assertions, 0 failures/errors/skips. Prompt-size, syntax, RuboCop, markdownlint, and diff checks passed.
  • CodeRabbit is successful at this head. Full bin/validate remains UNKNOWN under the explicit shared-validator hold, and the configured current-head Claude/Codex review is absent.
  • PR state remains DIRTY / CONFLICTING against the moved stacked base; dependency PR Enforce hierarchical token budgets for PR batches #426 and issue Enforce hierarchical token budgets with human checkpoints for PR batches #399 remain open.

This is a non-cutoff status because a valid review item is still pending. The next review pass must check all reviews, not only comments newer than this checkpoint.

merge_authority: none

@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: e99b6b2dd7

ℹ️ 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".

ownership = manifest["ownership"]
allowed_roles = %w[maker checker reviewer qa]
normalized_actors = ownership.values.map { |actor| canonical_identity(actor) }
unless (ownership.keys - allowed_roles).empty? && known_string?(ownership["maker"]) &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require a checker owner before accepting the manifest

When a launch manifest supplies ownership as only { "maker": "..." }, this condition passes because it merely rejects unknown role keys and requires the maker; it never requires a checker. If the remaining launch gates pass, validate_launch! can therefore authorize worker_spawn without the independent checker identity that the workflow contract says must exist before mutation. Require at least both the maker and checker ownership entries, while keeping reviewer/QA conditional if they are optional.

Useful? React with 👍 / 👎.

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