Skip to content

fix(e2e): share-verification probe reads rendered state and the full hash (#1279) - #1280

Merged
juan294 merged 1 commit into
developfrom
fix/share-verification-probe
Sep 3, 2026
Merged

juan294 merged 1 commit into
developfrom
fix/share-verification-probe

Conversation

@juan294

@juan294 juan294 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

profile.share-verification (deep mode only) failed on every deployment for two reasons, found by /prodplaybook v2.29.5:

  1. Negative assertions ran against the whole verify-page HTML, which ships its translation dictionary for hydration, so "Invalid hash" and "Not found" are present on every verified page.
  2. The hash regex tried {8} before {32} and captured the first 8 characters of the 32-character hash, then verified a hash that does not exist.

Changes

  • e2e/helpers/probe-html.ts (new, pure): hasRenderedText matches a label only as a text node between tags; verifyHashFromHtml extracts the longest hash with a trailing boundary. 9 unit tests, including the dictionary-string and 8-of-32 negative cases.
  • assertShareVerification uses both, and on failure writes the response body to the test output directory and attaches it to the report.

Verification

  • Unit tests, typecheck, lint clean.
  • Deep probes against production v2.29.5 with this helper: 6/6 passed.

Fixes #1279

🤖 Generated with Claude Code

https://claude.ai/code/session_01NnfhmLrHFuLNnHFKcZ3f7m

…he full hash (#1279)

Two defects in the deep-mode probe made it fail on every deployment:

1. `not.toContain("Invalid hash")` / `not.toContain("Not found")` ran
   against the whole verify-page HTML, which ships its translation
   dictionary for hydration, so both strings are present on every
   verified page.
2. The hash pattern `([0-9a-f]{8}|[0-9a-f]{16}|[0-9a-f]{32})` tried the
   shortest alternative first, so a 32-character hash was captured as
   its first 8 characters and the probe verified a hash that does not
   exist.

`probe-html.ts` (pure, unit-tested) matches labels as rendered text
nodes and extracts the longest hash with a boundary. The probe attaches
the response body to disk and to the report when an assertion on it
fails, so the transient seen once after the v2.29.5 deploy is
diagnosable next time.

Verified against production v2.29.5: six of six deep scenarios pass.

Fixes #1279

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NnfhmLrHFuLNnHFKcZ3f7m
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
chapa Ready Ready Preview Sep 3, 2026 7:48pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Bundle Size Report

Directory Raw Gzipped
.next/static 2.5M
.next/server 68M
Total .next 205M
.next/static/chunks JS 2040 KB 672 KB

Measured at commit aeeaa83

@juan294
juan294 merged commit 428aecd into develop Sep 3, 2026
26 checks passed
@juan294
juan294 deleted the fix/share-verification-probe branch September 3, 2026 19:52

This branch was successfully deployed

1 active deployment
Preview 52574a7c Deployed Sep 3, 2026 by vercel[bot]
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.

Deep probe profile.share-verification fails on every deployment: negative assertions match the serialized i18n dictionary

1 participant