Skip to content

feat(amp-semantic): add package contracts and interaction capture - #2079

Draft
jxiwang wants to merge 6 commits into
mainfrom
codex/semantic-review-interactions
Draft

jxiwang wants to merge 6 commits into
mainfrom
codex/semantic-review-interactions

Conversation

@jxiwang

@jxiwang jxiwang commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Introduce the standalone @amplitude/amp-semantic package contracts and capture click, field, and submit facts. Interaction targets use replay DOM identity and privacy policy; field capture avoids raw input values. Share activity signals with autocapture for click-outcome fallback and mirror accepted frustration analytics into semantic events.

This slice contains the original interaction workstream plus the common package scaffold. Later interaction states, checkbox state, keyboard shortcuts, and resource failures are in the final integration slice.

Related: SRAI-55, SRAI-59, SRAI-66.

Review stack

This is a draft review slice of the amp-semantic work. Review in order: interactions → lifecycle → page-feedback → integration. The final codex/semantic-review-integration tree is identical to the tested codex/amp-semantic tree after removing temporary capture diagnostics. Existing implementation workstream branches are preserved.

Do not merge these slices independently yet. The final integration PR supplies the runtime entry point, shared helpers, complete schema, lockfile registration, and later refinements. Intermediate slices are not independently buildable/releasable. Before promoting the stack, arrange independently green boundaries or land the complete stack together.

Validation on the complete integration tree

Node 24.22.1 / pnpm 11.28.5:

  • Passed frozen-lockfile install, pnpm docs:check, pnpm lint (30 projects), and pnpm lint:deps.
  • Passed @amplitude/amp-semantic ES5/ESM build and replay SDK/plugin ES5/ESM builds.
  • Passed 148 semantic unit tests, 18 replay adapter/identity tests, and all 22 Chromium integration tests. Focused unit commands used --coverage=false; this does not satisfy the coverage gate.
  • pnpm test fails the new semantic package's inherited 100% coverage thresholds (statements 90.8%, branches 81.65%, functions 85.86%, lines 94.18%). All 148 semantic assertions pass; dependent tasks were not all run after that failure.
  • pnpm test:examples fails because the configured jest.setup.examples.js is absent from this checkout.
  • pnpm build emitted the replay plugin bundles but did not exit; its idle Rollup process was stopped after more than ten minutes. Full repository build is not verified.

These are draft blockers, not green CI. Node 22/26 and current-main integration still need CI validation. Results above apply to the complete stack, not each intermediate branch.

Checklist

  • Conventional commit PR title.
  • Breaking change: No intended public API break; semantic capture is opt-in.
  • Resolve validation blockers before marking ready.

@jxiwang

jxiwang commented Nov 11, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded for merging by the clean, buildable stack: package/runtime scaffold #2120 (merged), interaction capture #2153, keys #2154, and resource errors #2155. The old branch remains available as a reference. click-outcome was removed from v0. The amp-event mirror is deferred until an accepted analytics-event signal can be supplied by the host; the recorder in this draft has no Session Replay SDK producer.

This branch has not been deployed

No deployments
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