Skip to content

fix(content): an Author or Contributor syncs their own posts again - #4

Merged
leemour merged 2 commits into
mainfrom
fix/content-roles
Nov 19, 2026
Merged

leemour merged 2 commits into
mainfrom
fix/content-roles

Conversation

@leemour

@leemour leemour commented Nov 19, 2026

Copy link
Copy Markdown
Member

Task

FIND-2812: with an Author or Contributor sign-in, sync stopped copying posts after the first run.

Why

WordPress refuses both roles the pages list with a private status: HTTP 400, with 403 inside details. The post kind reads posts and pages, so that refusal failed the whole kind. Every later run started again at the pages call, so edits on the site never reached the copy.

What

  • cli-core 0.710.0 (#3154) adds optional.needs.
  • Config: the pages call needs capabilities.edit_pages. Without it, the call is skipped with the gap "only an editor or administrator reads the pages". Pages check edit_others_pages; posts keep edit_others_posts.
  • Docs, README and skill say what each role gets now:
    • Both roles: their own posts, no pages, and a full re-read on each sync.
    • Both roles: a post that leaves their view stays in the copy as it was.
    • The roadmap item is done.
  • Tests:
    • One per role through the CLI against the fake: pages are never asked for, the sync is complete, and an edit after the first sync arrives.
    • The template's generic test: a call whose needs is lacked is never sent.

Testing

  • Lint, typecheck, docs:check, generate:check and test:matrix:check pass. Vitest with one worker: 402 tests pass; the content contract file now has 39.
  • Live, Docker WordPress 6.9.4 only (wc-c2, never a real site), file credential storage in a temp folder, keyring out of reach:
    • editor1: complete.
    • author1: complete, own posts copied, a title edit made through wp-cli arrived on the second sync, gap edit_pages.
    • contrib: the same with their own draft.

The release (0.1.1+) waits for the owner's npm trusted-publisher step; this PR does not release.

🤖 Generated with Claude Code

leemour and others added 2 commits November 19, 2026 14:05
WordPress refuses both roles the pages list with a private status (HTTP 400,
403 inside), and that refusal failed the whole post sync: after the first
run, edits on the site never reached the copy. cli-core 0.710.0 adds
optional.needs: the pages call now needs capabilities.edit_pages and is
skipped with a gap otherwise; pages check edit_others_pages, not
edit_others_posts.

Docs say what each role gets now, the roadmap item is done, and a test per
role syncs through the CLI against the fake: the pages are never asked for,
and an edit made after the first sync arrives.

Checked live on the Docker WordPress 6.9.4 (author1, contrib): sync is
complete, own posts in the copy, a title edit through wp-cli arrives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d's needs test

Review: for these roles every sync reads all their posts again, and a post
that leaves their view stays in the copy as it was. The trash claim was not
checked live and is gone. The generic seed test (a call's needs lacked is
never sent) joins the role tests, as cli-template seeds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​wirecat/​cli-core@​0.707.0 ⏵ 0.710.097 +1100100 +19670

View full report

@leemour
leemour merged commit 991254b into main Nov 19, 2026
16 checks passed
@leemour
leemour deleted the fix/content-roles branch November 19, 2026 13:13
@leemour leemour mentioned this pull request Nov 19, 2026
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