Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

chore: enforce native stacked pull requests - #1

Merged
aletty merged 1 commit into
masterfrom
codex/stack-policy-v1
Sep 9, 2026
Merged

chore: enforce native stacked pull requests#1
aletty merged 1 commit into
masterfrom
codex/stack-policy-v1

Conversation

@aletty

@aletty aletty commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Dependent changes now use native GitHub stacks, while focused independent changes may use a standalone PR. Add shared Codex instructions, dependency declarations, a trusted metadata-only Stack policy controller, and the stack workflow runbook.

The controller validates native membership, immediate parents and ancestry, and rechecks open PRs after changes. It never checks out PR code. Branch protection is activated only after this setup lands and the controller succeeds.

Validation: policy unit and mocked-controller tests passed locally; existing repository CI must pass before merge.

Depends on: none

@aletty
aletty marked this pull request as ready for review September 9, 2026 01:11
@aletty
aletty merged commit bc6b3e3 into master Sep 9, 2026
@aletty
aletty deleted the codex/stack-policy-v1 branch September 9, 2026 01:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T01:18:10.400264Z e5f356e Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

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

pull_request_target:
types: [opened, reopened, synchronize, edited, closed, ready_for_review, converted_to_draft, stacked, unstacked]
push:
branches: ["master"]

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 Trigger reconciliation on the actual default branch

When this setup is installed on this repository's main trunk—the available repository refs contain main and no master—merging the setup PR cannot trigger this workflow through pull_request_target because the workflow was not yet on the default branch, and the post-merge push is excluded by this master-only filter. Consequently, the initial policy reconciliation does not run automatically and subsequent default-branch pushes remain uncovered; generate this filter from the audited default branch or allow pushes to any branch.

AGENTS.md reference: AGENTS.md:L10-L10

Useful? React with 👍 / 👎.

Comment on lines +30 to +31
const clean = (body || '').replace(/<!--[\s\S]*?-->/g, '').replace(/```[\s\S]*?```/g, '');
const lines = clean.split(/\r?\n/).filter(x => /^Depends on:/i.test(x.trim()));

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 Ignore all Markdown code blocks when parsing declarations

For PR bodies that include a tilde-fenced or four-space-indented example containing Depends on:, this parser treats the example as a real declaration because it strips only triple-backtick fences and then trims indentation. Such a body can have exactly one declaration outside code blocks as required by docs/stacked-prs.md, yet the policy rejects it for having multiple lines; parse Markdown code blocks consistently or also exclude these supported block forms.

Useful? React with 👍 / 👎.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant