Skip to content

[codex] Harden WP UI nonce E2E helper#49

Open
adamziel wants to merge 8 commits into
trunkfrom
codex/wp-ui-nonce-e2e-helper
Open

[codex] Harden WP UI nonce E2E helper#49
adamziel wants to merge 8 commits into
trunkfrom
codex/wp-ui-nonce-e2e-helper

Conversation

@adamziel
Copy link
Copy Markdown
Contributor

@adamziel adamziel commented May 15, 2026

Summary

  • harden the WP admin branch-action nonce lookup used by the COW E2E script
  • seed curl with the WordPress login/admin cookie flow before scraping the admin page
  • write extracted nonces through temp files so failures cannot be swallowed by command substitution
  • capture helper exit codes with set +e so the caller can dump admin/login HTML and logs
  • add controlled curl failures and fallback nonce parsing when nonce extraction fails

Why

The merged PR #46 CI run exposed a COW E2E failure before the WordPress admin branch-create request was submitted. The helper exited while extracting the branch UI nonce, but the command substitution path hid the page contents that would explain the failure. This keeps the test focused on branch behavior and makes auth, redirect, and markup failures diagnosable.

The first revisions still exited without useful diagnostics on Linux/macOS because errexit could leave from inside the helper before the caller printed dumps. This revision captures the helper status explicitly.

Validation

  • bash -n tests/cow/e2e.sh
  • git diff --check
  • prior local validation before split: umask 022; php tests/cow/branch_ui.php (25 assertions)
  • prior direct Node parser sanity check for both JSON and fallback nonce extraction paths

@adamziel adamziel force-pushed the codex/wp-ui-nonce-e2e-helper branch from a2960af to 627586d Compare May 15, 2026 15:00
@adamziel adamziel changed the base branch from codex/merge-reliability-hardening to trunk May 15, 2026 15:00
@adamziel adamziel force-pushed the codex/wp-ui-nonce-e2e-helper branch from 627586d to 959bca4 Compare May 15, 2026 15:12
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