Skip to content

fix(dispatcher): a refused sync status leaves a PR, not a bare branch - #306

Merged
Ardnived merged 1 commit into
mainfrom
claude/contract-sync-attest
Nov 22, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/contract-sync-attest

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • contracts-sync now opens the sync PR before posting its sydevs / contract-sync status. A refused status still fails the job, but no longer strands a pushed branch with no PR.
  • Records the permission attest needs — Commit statuses: write on each contractSync consumer — beside attest in dispatcher.yml and in the SYDEVS_BOT_PAT row of docs/routine-setup.md.

Part of #305. The root cause is the token, which this PR cannot change: SYDEVS_BOT_PAT needs Commit statuses read and write on WeMeditateWeb, SahajAtlasWeb and SahajAtlasWordpress.

Failure this prevents

Since #280 added attest (merged 2026-11-19 23:30Z), every contract sync has pushed claude/chore-sync-contracts and then 403ed on POST /statuses, before gh pr create. The 403 is pinned to attest, not to the PR call:

  • No sydevs / contract-sync status exists on WeMeditateWeb@3626cc1 or on the current head 806e63f.
  • The last sync PRs, WeMeditateWeb#306 and SahajAtlasWeb#439, were opened 22:34Z on 2026-11-19, an hour before feat(dispatcher): approve a contract sync that matches its source #280 merged. gh pr create worked with this token; the status call is new.
  • Both consumers' sync branches are 1 commit ahead of main right now (from SahajCloud#1218, run 45078199691), with no PR.

With this order, the same token gap would have left a draft PR in each consumer for a person to review, not a branch nobody sees.

Test results

  • node --test dispatcher/test/*.test.mjs: 399 pass, 0 fail. The step's shell is not under test; the change is a reorder of one call.
  • dispatcher.yml parses as YAML.

Notes for reviewer

🤖 Generated with Claude Code

contracts-sync posted its commit status before `gh pr create`, so when
SYDEVS_BOT_PAT could not write statuses the job pushed the sync branch and
died before opening the PR. Every sync since #280 added `attest` has done
this in both consumers: no `sydevs / contract-sync` status exists on any
sync commit since, and the last sync PRs (WeMeditateWeb#306,
SahajAtlasWeb#439) were opened an hour before #280 merged.

Open the PR first, then attest. A refused status still fails the job, but
leaves a PR a person can review. contracts-verify also fires on the status
event, so the order costs no approval once the token can write it.

Record the missing Commit statuses permission beside `attest` and in the
routine-setup PAT table.

Part of #305.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-bot

sydevs-bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved for Ardnived, who wrote it: GitHub refuses an author's own approval. CI is green and the automated review has run. Enable auto-merge when you want it merged: the queue tests it against its base. 🤖 Written by the sydevs autonomous loop — see what this is

@sydevs-bot

sydevs-bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Adversarial review skipped: 2 file(s), 18 changed line(s), under review.skipWhen. Say @sydevs-bot review to force one.

🤖 sydevs dispatcher

@sydevs-bot sydevs-bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 22, 2026
@Ardnived
Ardnived added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 69c5eb8 Nov 22, 2026
15 checks passed
@Ardnived
Ardnived deleted the claude/contract-sync-attest branch November 22, 2026 23:28
@sydevs-bot sydevs-bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants