Skip to content

Preserve site fields, reduce apply work and prepare 0.9.11 - #196

Merged
noeltock merged 38 commits into
mainfrom
block-theme/performance
Oct 13, 2026
Merged

noeltock merged 38 commits into
mainfrom
block-theme/performance

Conversation

@noeltock

@noeltock noeltock commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Problem

Site apply could reset unmanaged page fields, first-install pattern media could fail during planning, and repeated source scans, snapshots and compilation made apply unnecessarily expensive. Dense executor code and duplicate tests made the safety boundaries harder to review. The theme/site work also needed current documentation and a 0.9.11 release candidate.

Solution

Preserve native WordPress fields and publication dates, remove repeated work, and keep source/ownership/uncertain-outcome guards. Remove compatibility for site formats that never shipped and duplicate tests while retaining unique safety coverage. Document all theme/site routes and prepare 0.9.11, retaining the pre1.0 policy.

Behaviour Read first Proof
Updates preserve unmanaged fields; floating drafts receive native publication time when published src/site/apply-wpcli.ts Executed PHP tests and real WordPress dated/floating/publish checks
Effects consume approved captured source; uploads verify their exact buffer src/site/apply.ts, src/site/media-import.ts Source/manifest replacement regressions, exact asset-root refusal and live source-read counts
Identity, ownership, held locks and unknown outcomes stay guarded src/site/input.ts, src/site/ownership.ts Canonical hash, pending pattern-media, reciprocal ownership and interruption tests
Avoid repeated compilation/snapshots/media hashing; retain Node bootstrap boundary src/site/compile.ts, src/site/wpcli.ts, src/index.ts Controlled apply measurement, read-script check and packed Node smoke
Separate tooling tests still run in CI/release; 0.9.11 docs match commands .github/workflows/ci.yml, skills/block-runner/references/SITE.md Advisor coverage review,43 tooling tests, runnable strict SiteIntent example and link checks

Diff

+2,333 −1,488 · 82 files. Much of apply/plan expands existing dense statements; the isolated formatting stage preserved TypeScript ASTs and embedded PHP literals.

 site apply
- wp_insert_post for both create and update
+ wp_update_post for updates; edit_date only when remaining a draft
- reread/hash every local asset before every effect
+ capture source document identities and check them before effects/completion
+ verify selected image bytes in PHP; keep full initial/final source checks
- repeated retain/media snapshots; whole-site mutation baselines
+ reuse verified snapshots; send selected entity/option baselines
- compile all patterns per definition; hash all library media
+ compile selected definitions once; hash owned/referenced media
- accept obsolete development identities/attachment/lock formats
+ require canonical source identity and version-qualified ownership
- exactly five proof pages; public failure-seeding flag
+ explicitly published bundles; negative controls stay internal
 tests and release
- duplicated assertions and all tooling suites in the default product run
+ retain unique checks; run tooling separately in full/skill/release CI
+ document theme/site contracts and prepare package 0.9.11

Testing & verification

Reviewed revision: 60f539e3672c0155163c14be3a13babbb4c6a99d · Node 22.23.1 · native checks: WordPress 7.1 / PHP 8.4.26.

  • Product npm run verify at 2931f93: passed 881 tests with four existing skips, plus Node/dependency support, typecheck, corpus hashes, build, private-reference scan and package inspection.
  • npm run test:tools at the 0.9.11 candidate: passed 43 tests. Advisor accepted the unique safety coverage retained by the trims. Its one CI finding is fixed: tooling runs once on the Node 22 full-CI leg, and in the independent skill/release routes.
  • Native WordPress checks passed for dated/floating draft preservation and draft publication. Author/excerpt/menu order survived; an old floating draft received the current publication time. Those mutation checks are pinned to the PHP-identical implementation revisions, not new0.9.11 editor acceptance.
  • Controlled five-page/three-pattern/ten-image apply at 3cb3e5c: 38.73 seconds, 129 WP-CLI processes. Image reads fell from 220 to 20 against the prior scan strategy using current native adapters. Tiny valid PNGs and one local sample; no production-scale timing claim.
  • Packed CLI/library reject Node 20 before dependency loading. Captured-source/source-manifest guards, exact asset-root validation, schema initialization and focused apply/PHP regressions passed at their implementation checkpoints.
  • Documentation checks passed 12 focused skill/Node/engine tests, 113 local links/anchors and a strict source-CLI compile of the exact minimal SiteIntent example with zero diagnostics. Theme/site command, mutation and proof boundaries were checked against source.
  • Exact 0.9.11 full release matrix passed from the clean candidate: product verification (881 tests/four existing skips), consumer archive builds, packed install, project/user skill installation and full generated-plugin WordPress 7.1 acceptance. Native Heading/Paragraph controls and hash-matched manual review remain retained with scoped editor accessibility exceptions. CI38355345009 passed Node 22.13/24, tooling, package-boundary, WordPress acceptance and scope at this exact candidate.

Not verified: performance on a large real media library, paid model benchmark, or a fresh full M3/editor/visual matrix with the published package. That test-site retest follows publication.

Risk / rollout

Noel explicitly lifted the merge hold and authorized merge/publish 0.9.11 after checks. All required candidate gates passed; the PR is ready to merge. No production-site apply is part of this release.

Only current site formats are accepted; obsolete development bundles require fresh compilation/planning. Complete local source/assets are checked at start/end. An unrelated asset edit may leave approved earlier effects completed but prevents a completed receipt; changed image bytes are never consumed.

Hard-stopped apply retains guarded manual lock reconciliation after every executor stops. Held tokens are never stolen; journals and native outcome evidence remain. No lease or recovery command is added. Node 20 support is dropped; supported range is 22.13 on 22.x or 24+.

Detection: native authority refusals, durable partial/unknown receipts and final full source/live comparison. Rollback: reconcile outstanding operations before reverting; reverting code does not undo completed WordPress effects.

@noeltock
noeltock marked this pull request as ready for review October 13, 2026 02:18
@noeltock
noeltock marked this pull request as draft October 13, 2026 02:26
Tests whose subject is scripts/ tooling now run with npm run test:tools.
Drops source-text and constant checks, duplicated receipt assertions and same-branch table rows; merges the lock-confirmation preview test into the profile test.
Drops subset and duplicate-layer authoring tests, folds the asset-form tests into one table, and makes the override-name and regeneration tests assert what their titles claim.
Drops repeated CLI spawns, inert table rows, PHP wording checks and assertions repeated across site tests.
Drops tests of their own stubs and of the WordPress parser, CLI tests repeating library coverage, and duplicate style, coverage and intent cases.
@noeltock noeltock changed the title Preserve site fields and reduce apply work Preserve site fields, reduce apply work and prepare0.9.11 Oct 13, 2026
@noeltock
noeltock marked this pull request as ready for review October 13, 2026 06:27
@noeltock noeltock changed the title Preserve site fields, reduce apply work and prepare0.9.11 Preserve site fields, reduce apply work and prepare 0.9.11 Oct 13, 2026
@noeltock
noeltock merged commit cbd019b into main Oct 13, 2026
8 checks passed
@noeltock
noeltock deleted the block-theme/performance branch October 13, 2026 06:32
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