Skip to content

Republish fault-isolation (#181) + block_layout partial-save guard (#189)#97

Merged
kennethphough merged 1 commit into
masterfrom
fix/republish-resilience-and-ide-save
Jun 1, 2026
Merged

Republish fault-isolation (#181) + block_layout partial-save guard (#189)#97
kennethphough merged 1 commit into
masterfrom
fix/republish-resilience-and-ide-save

Conversation

@kennethphough

Copy link
Copy Markdown
Member

Republish fault-isolation (#181) + block_layout partial-save guard (#189)

Two contained backend fixes (kyte-php v4.8.1), both diagnosed from the IDE/republish investigation.

#181 — republish is now fault-isolated

ApplicationController's republish_kyte_connect hook re-stamps every state=1 page across all of an app's sites. Previously it threw on the first page with missing KytePageData, aborting the whole batch — every later site/page kept the stale connect string (the half-migrated JWT-dashboard/HMAC-login state from the incident).

  • Each page is now re-stamped inside try/catch; failures are collected (page, s3key, site, reason), logged, and the loop continues.
  • The outcome is surfaced on the response as republish_summary (succeeded / failed / failures[]) so the caller (Shipyard) can show a real result instead of trusting a silent all-or-nothing hook.
  • Bonus bug: CloudFront invalidation ran once outside the sites loop → only the last site was invalidated. Moved inside the loop, so multi-site apps no longer leave other sites' caches stale.

#189 — partial content save no longer blanks block_layout

The KytePage update content-save unconditionally wrote block_layout, so a payload without it (the IDE sends only html/stylesheet/javascript) blanked an existing block-editor layout. It now only overwrites block_layout when actually provided. (The "IDE save didn't persist" half of #189 was already fixed by v4.8.0's guard relaxation.)

Verification

PHPStan clean; full phpunit in CI. Deployed to dev (v4.8.0 base): php-lint clean, app healthy, MCP list_applications + read_page confirmed working. The republish path's runtime behavior is best validated by an app republish on dev (auth_mode flip) — side-effecting, so left for manual confirmation.

🤖 Generated with Claude Code

…189)

#181 — ApplicationController republish_kyte_connect hook: re-stamp each
state=1 page inside try/catch, collect failures (page/s3key/site/reason),
log, and continue instead of throwing and aborting the batch (which stranded
later pages on the stale connect string). Surface a republish_summary
(succeeded/failed/failures) on the response. Move CloudFront invalidation
INSIDE the sites loop — it previously ran once outside, invalidating only the
last site, leaving multi-site apps' other caches stale.

#189 — KytePage update content-save now only overwrites KytePageData.block_layout
when block_layout is actually provided. A partial save (the IDE sends only
html/stylesheet/javascript) no longer blanks an existing block-editor layout.

CHANGELOG 4.8.1. PHPStan clean; full phpunit in CI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kennethphough
kennethphough merged commit a915040 into master Jun 1, 2026
4 checks passed
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