fix: Codex review findings — CPT seeding, site_audit, stdout (v3.8.2)#12
Conversation
…eachability, stdout hygiene (v3.8.2) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| @@ -1,4 +1,5 @@ | |||
| import os, sys, unittest | |||
| import io, os, sys, unittest, urllib.error | |||
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e4d2b23d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| out = {} | ||
| for taxonomy, values in (terms_dict or {}).items(): | ||
| tax_base = resolve_rest_base(base_url, auth, taxonomy) # taxonomy rest_base | ||
| tax_base = resolve_taxonomy_rest_base(base_url, auth, taxonomy) # taxonomy rest_base |
There was a problem hiding this comment.
Use taxonomy REST base when sending term IDs
When a taxonomy has a custom rest_base, this now correctly searches/creates terms through that base, but resolve_terms() still returns IDs keyed by the original taxonomy slug, so create_post() posts {'genre': [id]} instead of the REST field WordPress exposes, e.g. {'genres': [id]}. In that scenario the post can be created without the requested terms even though term resolution succeeded; return/store the IDs under tax_base (or otherwise preserve both route and payload key correctly) to make renamed taxonomy bases work end-to-end.
Useful? React with 👍 / 👎.
…low-up) resolve_terms returned ids under the taxonomy slug; create_post posts under the rest_base field, so a taxonomy with a custom rest_base (or built-in category/post_tag → categories/tags) attached no terms even though resolution succeeded. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses the open Codex review findings across PRs #5/#6/#9/#10.
sys.exit(1)(no longer aborts a whole batch); ACF/JetEngine + featured media route through the CPTrest_base(were silent no-ops on CPTs).rest_basevia/wp/v2/taxonomies/(was the post-type endpoint).site_audit: 4xx/5xx pages audited (status/headers/SEO) instead of "unreachable"; unreachable targets exit non-zero.WP_REQUIRE_HTTPS=1.🤖 Generated with Claude Code