Skip to content

chore: sync gitlinks - #76

Closed
charly-auto-merge[bot] wants to merge 2 commits into
mainfrom
sync/20260831-061110
Closed

charly-auto-merge[bot] wants to merge 2 commits into
mainfrom
sync/20260831-061110

Conversation

@charly-auto-merge

Copy link
Copy Markdown
Contributor

Automated sync of all umbrella submodule pins to policy B (charly's default-branch HEAD + charly's own gitlinks + per-repo default branches).

atrawog and others added 2 commits August 31, 2026 08:01
#73 fixed the gate so the sync finally reaches its PR step. That step then failed:

    pull request create failed: GitHub Actions is not permitted to create or
    approve pull requests (createPullRequest)

The obvious unblock is the org toggle `can_approve_pull_request_reviews`, and it
does work -- but marketplace's refresh.yml already warns against exactly that, in
as many words:

    Do NOT 'fix' it by enabling can_approve_pull_request_reviews
    -- that also lets workflows approve PRs.

The warning is right: the toggle bundles create with approve, and this org
auto-merges on a PASS verdict, so granting approve to every workflow is a
review-bypass surface.

refresh.yml already solves this properly by minting a short-lived GitHub App
token, and the org secrets it uses (CHARLY_AUTO_MERGE_APP_ID /
CHARLY_AUTO_MERGE_PRIVATE_KEY) are present. This adopts the identical pattern --
same SHA-pinned action, same secrets, same fallback -- so the umbrella stops
being the one repo that needed a security toggle to do what its sibling already
does safely.

The toggle was enabled earlier in the session to unblock the sync before this
pattern was found; it is turned back off, and the verification run below is with
it off, which is what proves the app token rather than the toggle is doing the
work.

Claude-Session: https://claude.ai/code/session_01Gf42A3bau77JigFYLALrnq
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 37ab6dea3e7e6ab7c82a41a18309a8741fd1bbb1 (branch: main)

Change class: config/workflow (.github/workflows/sync.yml) + submodule gitlink bumps (79 files).

Blocks

  1. A1 — scope mismatch / incomplete body. The PR title is "chore: sync gitlinks" and the body says only "Automated sync of all umbrella submodule pins to policy B". But the diff also contains a security-relevant workflow change — commit 089362b78551 ("fix(sync): open the PR with the org's bot app, not the default token") rewrites .github/workflows/sync.yml to mint a GitHub App token (actions/create-github-app-token@d72941d…), add a PAT fallback, and add a "Require a bot token" guard. This diff item is entirely absent from the body's accounting. A1 requires the Summary to account for every file/behavior in the diff; a diff item missing from the body's accounting is a defect. The author must add the workflow change to the body's summary, with its justification and how it was tested.

  2. T3/T4 — security-relevant change bundled without body justification. The workflow change alters token handling for opening PRs (a security gate). While the in-code comment carries a plausible rationale (default GITHUB_TOKEN cannot open PRs; enabling can_approve_pull_request_reviews would create a review-bypass surface), the PR body provides no justification, no testing evidence, and does not even acknowledge the change exists. A security-machinery change must carry a real, explicit justification in the body and be verified to strengthen/preserve the gates. The author must document this change in the body and state how it was validated.

Verdict: BLOCK


ollama/deepseek-v4-flash — pi-review-action.

View action run

@atrawog

atrawog commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Superseded, same branch-derivation artifact as #75. Dispatching sync.yml from fix/sync-uses-bot-app-token cuts the sync branch from that branch, so this diff carries the workflow change alongside 79 gitlink bumps — which is also why it drew the T3/T4 block for bundling a token-handling change without justification.

Its A1 block was real and is now fixed on that branch: the sync body names every moved gitlink instead of saying nothing. Re-dispatching to verify, then the clean sync comes from main.

atrawog added a commit that referenced this pull request Aug 31, 2026
With the App token in place the workflow finally opened a PR that CI could see
(#76). It was immediately BLOCKed:

    A1 — scope mismatch / incomplete body. The PR title is "chore: sync gitlinks"
    and the body says only "Automated sync of all umbrella submodule pins to
    policy B".

79 submodules moved and the body named none of them. A one-line body cannot
satisfy "every diff item accounted for", so the automation would have kept
producing unmergeable PRs — the same defect class marketplace's refresh.yml has,
where a count stood in for an accounting.

The body now:

- names every moved gitlink, captured from `git diff --cached --name-only` after
  staging so the list is exactly what commits
- explains what those entries ARE -- submodule pointers, whose content was gated
  by each owning repo's own pr-validator before tagging, and which this PR
  therefore cannot review and does not restate
- states the gate (`scripts/verify-pins.sh`, which fails closed on a dangling
  pin, a dirty submodule, or a policy-B violation) and the producer
- carries no `Assisted-by:` footer, with the reason given inline: A1 requires it
  on an AI-authored body, this one is emitted by a fixed block with no model in
  the loop, and inventing a model name to satisfy the pattern would be the false
  claim the rule exists to prevent

`git add -A` is deliberately kept before the capture. sync-gitlinks.sh already
stages each bumped gitlink, but dropping the add would silently narrow what the
sync commits to whatever the script happened to stage.

Claude-Session: https://claude.ai/code/session_01Gf42A3bau77JigFYLALrnq
@atrawog atrawog closed this Aug 31, 2026
@atrawog atrawog mentioned this pull request Aug 31, 2026
atrawog added a commit that referenced this pull request Aug 31, 2026
…an pass A1 (#78)

* fix(sync): open the PR with the org's bot app, not the default token

#73 fixed the gate so the sync finally reaches its PR step. That step then failed:

    pull request create failed: GitHub Actions is not permitted to create or
    approve pull requests (createPullRequest)

The obvious unblock is the org toggle `can_approve_pull_request_reviews`, and it
does work -- but marketplace's refresh.yml already warns against exactly that, in
as many words:

    Do NOT 'fix' it by enabling can_approve_pull_request_reviews
    -- that also lets workflows approve PRs.

The warning is right: the toggle bundles create with approve, and this org
auto-merges on a PASS verdict, so granting approve to every workflow is a
review-bypass surface.

refresh.yml already solves this properly by minting a short-lived GitHub App
token, and the org secrets it uses (CHARLY_AUTO_MERGE_APP_ID /
CHARLY_AUTO_MERGE_PRIVATE_KEY) are present. This adopts the identical pattern --
same SHA-pinned action, same secrets, same fallback -- so the umbrella stops
being the one repo that needed a security toggle to do what its sibling already
does safely.

The toggle was enabled earlier in the session to unblock the sync before this
pattern was found; it is turned back off, and the verification run below is with
it off, which is what proves the app token rather than the toggle is doing the
work.

Claude-Session: https://claude.ai/code/session_01Gf42A3bau77JigFYLALrnq

* fix(sync): the sync PR body cannot pass A1 — name every moved gitlink

With the App token in place the workflow finally opened a PR that CI could see
(#76). It was immediately BLOCKed:

    A1 — scope mismatch / incomplete body. The PR title is "chore: sync gitlinks"
    and the body says only "Automated sync of all umbrella submodule pins to
    policy B".

79 submodules moved and the body named none of them. A one-line body cannot
satisfy "every diff item accounted for", so the automation would have kept
producing unmergeable PRs — the same defect class marketplace's refresh.yml has,
where a count stood in for an accounting.

The body now:

- names every moved gitlink, captured from `git diff --cached --name-only` after
  staging so the list is exactly what commits
- explains what those entries ARE -- submodule pointers, whose content was gated
  by each owning repo's own pr-validator before tagging, and which this PR
  therefore cannot review and does not restate
- states the gate (`scripts/verify-pins.sh`, which fails closed on a dangling
  pin, a dirty submodule, or a policy-B violation) and the producer
- carries no `Assisted-by:` footer, with the reason given inline: A1 requires it
  on an AI-authored body, this one is emitted by a fixed block with no model in
  the loop, and inventing a model name to satisfy the pattern would be the false
  claim the rule exists to prevent

`git add -A` is deliberately kept before the capture. sync-gitlinks.sh already
stages each bumped gitlink, but dropping the add would silently narrow what the
sync commits to whatever the script happened to stage.

Claude-Session: https://claude.ai/code/session_01Gf42A3bau77JigFYLALrnq

---------

Co-authored-by: atrawog <[email protected]>
@aitrawog
aitrawog deleted the sync/20260831-061110 branch November 1, 2026 19:13
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