Skip to content

[codex] Keep session tokens target-local during COW merges#63

Merged
adamziel merged 12 commits into
trunkfrom
codex/clean-semantic-merge-gate
May 16, 2026
Merged

[codex] Keep session tokens target-local during COW merges#63
adamziel merged 12 commits into
trunkfrom
codex/clean-semantic-merge-gate

Conversation

@adamziel
Copy link
Copy Markdown
Contributor

What it does

Keeps WordPress wp_usermeta.session_tokens rows target-local during COW merges, records auditable target-kept decisions for those skipped auth-state rows, and tightens the semantic WordPress E2E gate so hidden merge conflicts fail the test instead of being tolerated.

Rationale

A real UI merge was succeeding at the CLI layer while the latest merge run was completed_with_conflicts because branch-local WordPress session tokens diverged between source and target. Session tokens are runtime authentication state, not portable site content, so importing them from a branch is both noisy and undesirable.

Implementation

  • Adds a target-local WordPress row classifier for wp_usermeta.meta_key = session_tokens.
  • Skips source changes and source-only rows for those session token records while writing target-kept merge decisions.
  • Adds focused PHP regression coverage for target/source token divergence and source-only token rows.
  • Requires the semantic WordPress object graph E2E merge to finish with status: completed and zero recorded conflicts.
  • Updates the merge reliability checklist to document the stricter clean-merge gate.

Testing instructions

Already run locally:

php -l scripts/cow/merge.php
php -l tests/cow/merge.php
php tests/cow/merge.php
make test-cow
bash -n tests/cow/e2e.sh
git diff --check

@adamziel
Copy link
Copy Markdown
Contributor Author

Added one more E2E guard on this PR: the independently banded WordPress post merge now requires an exact status: completed line and verifies the latest band-merge-source -> band-merge-target merge run has zero merge_conflicts rows. I also tightened the semantic graph status grep to exact-line matching so completed_with_conflicts cannot pass by prefix.\n\nFocused checks run after the change:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from be44d16 to bf52bf7 Compare May 15, 2026 22:01
@adamziel
Copy link
Copy Markdown
Contributor Author

Folded the reliability-matrix note into the clean banded-post gate commit and force-pushed the branch. Current PR #63 head: bf52bf7.\n\nFocused checks rerun:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added another semantic E2E assertion on this PR: after merging, the branch-local edited pages now have to preserve their exact edited block content and branch-specific author IDs, not merely exist by title. The reliability matrix now records that stronger page edit/delete evidence. Current PR #63 head: 1afc9c9.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added a second semantic media assertion: the E2E runtime now exposes post_parent for semantic posts, and the merged media checks require each attachment to keep its branch page parent in addition to the original/generated upload file checks. Current PR #63 head: 7a27c95.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added one more plugin-shaped graph assertion: semantic E2E now verifies the custom-table child JSON payload keeps the same parent ID as the child row and the parent graph. Current PR #63 head: 33ff854.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added a plugin-owned filesystem assertion: semantic E2E now checks the branch-specific plugin graph file contents, not only that the file exists. This strengthens the custom-table/JSON/serialized/file object graph coverage on this PR. Current PR #63 head: 5810a0b.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added a semantic option graph assertion: serialized and JSON option payloads now have to point to the branch's actual merged author/user ID, instead of only requiring a nonzero user reference. Current PR #63 head: 077ff40.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added setup-side validation for the semantic E2E fixture: before merge, each branch now proves its branch-local graph is coherent for attachment parent links, option/JSON option user refs, plugin child payload refs, and plugin file contents. That separates bad fixture setup from merge regressions. Current PR #63 head: 544c028.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added a real block/media semantic assertion: the runtime page now includes a core/image block referencing the branch media attachment, and both pre-merge and post-merge checks verify the block JSON still points at that attachment. Current PR #63 head: a184f11.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel
Copy link
Copy Markdown
Contributor Author

Added the featured-image side of the semantic media graph: pages now store _thumbnail_id pointing at their branch attachment, and both pre-merge and post-merge checks verify that featured-media ref survives with the attachment row/files and image block ref. Current PR #63 head: b7cf09a.\n\nFocused checks run:\n\nbash\nbash -n tests/cow/e2e.sh\ngit diff --check\n

@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from bfae4e8 to 4a896ea Compare May 15, 2026 22:33
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 9e79fc8 to 6ae5170 Compare May 15, 2026 22:35
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 4a896ea to 7b8f639 Compare May 15, 2026 22:35
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 6ae5170 to 4aed0d3 Compare May 15, 2026 22:37
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 7b8f639 to d2f9940 Compare May 15, 2026 22:37
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 4aed0d3 to dd3d5a0 Compare May 15, 2026 22:50
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from d2f9940 to 7c1d74b Compare May 15, 2026 22:51
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from dd3d5a0 to 98723d6 Compare May 15, 2026 22:59
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 7c1d74b to 7a44463 Compare May 15, 2026 23:00
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 98723d6 to 985f483 Compare May 15, 2026 23:14
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 7a44463 to 68656df Compare May 15, 2026 23:14
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 985f483 to a4b4ed8 Compare May 15, 2026 23:28
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 68656df to 9951d1b Compare May 15, 2026 23:28
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from a4b4ed8 to e9ba15e Compare May 15, 2026 23:41
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 9951d1b to 9d9ac90 Compare May 15, 2026 23:41
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from e9ba15e to 3693fd1 Compare May 15, 2026 23:59
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 9d9ac90 to 61d1c34 Compare May 16, 2026 00:00
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 3693fd1 to 6c52c15 Compare May 16, 2026 00:11
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 61d1c34 to aa18023 Compare May 16, 2026 00:12
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 6c52c15 to e0b19cd Compare May 16, 2026 00:25
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from aa18023 to f0a9b11 Compare May 16, 2026 00:25
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from e0b19cd to 4326cff Compare May 16, 2026 00:42
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from f0a9b11 to deb4153 Compare May 16, 2026 00:42
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 4326cff to 854be38 Compare May 16, 2026 01:00
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from deb4153 to 33a66d7 Compare May 16, 2026 01:00
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from 854be38 to c8a0ac2 Compare May 16, 2026 01:15
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from 33a66d7 to fa1953a Compare May 16, 2026 01:15
@adamziel adamziel force-pushed the codex/e2e-routed-post-helper branch from c8a0ac2 to 87f8442 Compare May 16, 2026 01:33
@adamziel adamziel force-pushed the codex/clean-semantic-merge-gate branch from fa1953a to 750b865 Compare May 16, 2026 01:35
@adamziel adamziel changed the base branch from codex/e2e-routed-post-helper to trunk May 16, 2026 01:35
@adamziel adamziel merged commit ac5be0b into trunk May 16, 2026
3 of 6 checks passed
@JanJakes JanJakes mentioned this pull request May 16, 2026
adamziel pushed a commit that referenced this pull request May 16, 2026
## Release `v0.1.15`

Version bump and release metadata update for `v0.1.15`.

**Changelog draft:**
* Fix Homebrew tap update detection
* Document release and install paths
* Document latest aarch64 mac release gate evidence
([#62](#62))
* Harden WP UI nonce E2E helper
([#49](#49))
* Use routed WP helper for E2E post creation
([#60](#60))
* Keep session tokens target-local during COW merges
([#63](#63))
* Cover remote cache branch merge E2E
([#61](#61))
* Add fast COW merge smoke gate
([#64](#64))
* Document latest merge release gate evidence
([#65](#65))
* Cover pre-metadata Git push crash recovery
([#66](#66))
* Document fast COW Git merge gates
([#67](#67))
* Cover Git-created pre-list crash E2E
([#68](#68))
* Cover incomplete generated media metadata
([#69](#69))
* Add focused COW ID-band gate
([#70](#70))
* Add focused COW stale-audit gate
([#71](#71))
* Add focused COW schema review gate
([#72](#72))
* Add focused COW plugin validator gate
([#73](#73))
* Add focused COW filesystem gate
([#74](#74))
* Add focused COW explicit ID gate
([#75](#75))
* Add focused COW branch birth gate
([#76](#76))
* Expand focused COW filesystem gate
([#77](#77))
* Expand focused COW media validator gate
([#78](#78))
* Expand focused COW stale audit gate
([#79](#79))
* Expand focused COW plugin validator gate
([#80](#80))
* Expand focused COW schema review gate
([#81](#81))
* Expand focused COW ID-band gate
([#82](#82))
* Expand focused COW media validator gate
([#83](#83))
* Expand focused COW schema dependency gate
([#84](#84))
* Expand focused COW filesystem symlink gate
([#85](#85))
* Expand focused COW branch birth cleanup gate
([#86](#86))
* Expand focused COW plugin validator contract gate
([#87](#87))
* Expand focused COW explicit ID gate
([#88](#88))
* Expand focused COW stale audit gate
([#89](#89))
* Add focused COW WordPress semantic validator gate
([#90](#90))
* Expand focused COW WordPress semantic validator gate
([#91](#91))
* Expand focused COW WordPress media reference gate
([#92](#92))
* Expand focused COW WordPress image block gate
([#93](#93))
* Expand focused COW WordPress term relationship gate
([#94](#94))
* Expand focused COW WordPress option reference gate
([#95](#95))
* Expand focused COW plugin serialized validator gate
([#96](#96))
* Expand focused COW media unsafe path gate
([#97](#97))
* Expand focused COW branch birth file-base gate
([#98](#98))
* Expand focused COW plain IPK ID-band gate
([#99](#99))
* Expand focused COW schema trigger ordering gate
([#100](#100))
* Expand focused COW stale audit keyless gate
([#101](#101))
* Expand focused COW stale audit missing row gate
([#102](#102))
* Expand focused COW media unsafe path gate
([#103](#103))
* Expand focused COW media duplicate ownership gate
([#104](#104))
* Expand focused COW media invalid metadata gate
([#105](#105))
* Expand focused COW media missing generated-file gate
([#106](#106))
* Expand focused COW plugin JSON reference gate
([#107](#107))
* Expand focused COW media dimension drift gate
([#108](#108))
* Expand focused COW media generated filename gate
([#109](#109))
* Expand focused COW filesystem directory delete gate
([#110](#110))
* Add fast router branch action gate
([#111](#111))
* Expand focused filesystem binary conflict gate
([#112](#112))
* Expand focused branch birth file-base gate
([#113](#113))
* Expand focused explicit ID band gate
* Expand focused media metadata gate
* Expand focused stale audit semantic gate
* Expand focused plugin file validator gate
* Expand focused schema dependency gate
* Expand focused ID-band reuse gate
* Expand focused media metadata gate
* Expand focused filesystem symlink gate
* Expand focused stale audit option gate
* Expand focused stale audit identity gate
* Expand focused schema index gate
* Add focused branch UI test gates
* Expand focused stale audit semantic gate
* Add page merge smoke regression
* Add semantic fast COW test target
* Add WordPress comment reference validator coverage
* Document comment validator finding shape
* Cover plugin validator source evidence drift
* Clarify stale audit plugin and schema boundaries
* Add schema index stale audit evidence
* Add schema object stale audit evidence
* Add schema table restore stale audit evidence
* Add schema table rebuild stale audit evidence

**Full changelog:**
v0.1.14...release/v0.1.15

## Next steps

1. **Review** the changes in this pull request.
2. **Push** any additional edits to this branch (`release/v0.1.15`).
3. **Merge** this pull request to publish `v0.1.15`.

Merging will automatically build ForkPress binaries, create a GitHub
release, and update the Homebrew formula.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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