Skip to content

[codex] Cover stale termmeta semantic references#174

Merged
adamziel merged 1 commit into
trunkfrom
codex/termmeta-semantic-validator
May 16, 2026
Merged

[codex] Cover stale termmeta semantic references#174
adamziel merged 1 commit into
trunkfrom
codex/termmeta-semantic-validator

Conversation

@adamziel
Copy link
Copy Markdown
Contributor

What it does

Adds a focused WordPress semantic validator regression for wp_termmeta.term_id references. The fixture covers a source branch deleting a term while the target edits scalar and JSON termmeta rows that still point at that term.

Rationale

wp_termmeta.term_id is the ownership edge from term metadata to its WordPress term. A row-level merge can preserve target metadata edits and apply the source term delete, but that leaves orphaned term metadata unless a semantic validator reports the stale owner for review.

Implementation

The new discovered validator scans termmeta rows with term_id > 0, verifies the referenced term row still exists, and emits plugin-wp-termmeta-missing-term findings. The test asserts that the term delete remains staged, target scalar and JSON metadata edits remain visible, and plugin audit output identifies the missing term, stale term_id field, and JSON metadata row.

The merge reliability matrix now records termmeta owner coverage alongside existing taxonomy relationship/parent, postmeta, usermeta, menu, media, comment, and option reference coverage.

Testing instructions

php -l tests/cow/wp_semantic_validator.php
make test-cow-wp-semantic-validator
make test-cow-semantic-fast
npm run check
git diff --check

@adamziel adamziel merged commit dc920d5 into trunk May 16, 2026
5 checks passed
@adamziel adamziel deleted the codex/termmeta-semantic-validator branch May 16, 2026 14:00
@adamziel adamziel mentioned this pull request May 16, 2026
adamziel added a commit that referenced this pull request May 16, 2026
## Release `v0.1.22`

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

**Changelog draft:**
* Document v0.1.21 release gate evidence
([#162](#162))
* Cover taxonomy menu reference validation
([#163](#163))
* Cover navigation block reference validation
([#164](#164))
* Cover media filesize drift validation
([#165](#165))
* Cover generated media filesize drift validation
([#166](#166))
* Cover missing media metadata validation
([#167](#167))
* Cover stale post_parent semantic references
([#168](#168))
* Cover stale term parent semantic references
([#169](#169))
* Cover stale post author semantic references
([#170](#170))
* Cover stale menu parent semantic references
([#171](#171))
* Cover stale usermeta semantic references
([#172](#172))
* Cover stale postmeta semantic references
([#173](#173))
* Cover stale termmeta semantic references
([#174](#174))
* Cover stale term taxonomy semantic references
([#175](#175))

**Full changelog:**
v0.1.21...release/v0.1.22

## Next steps

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

Merging will automatically build ForkPress binaries, create a GitHub
release, and update the Homebrew formula.
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