Skip to content

Expose stable Interactor constructor metadata - #322

Draft
cowboyd wants to merge 1 commit into
mainfrom
codex/interactor-metadata
Draft

Expose stable Interactor constructor metadata#322
cowboyd wants to merge 1 commit into
mainfrom
codex/interactor-metadata

Conversation

@cowboyd

@cowboyd cowboyd commented Sep 4, 2026

Copy link
Copy Markdown
Member

Motivation

The compiler and future test-runner adapters need a stable way to discover Interactor and matcher constructors at runtime. Inferring that information from private implementation details or callable shape would make those consumers fragile and tightly coupled to core internals.

Approach

Attach frozen, versioned metadata to constructors using globally registered symbols. Expose public metadata readers and type guards, populate cumulative action and filter metadata as Interactors are composed, and brand both built-in and custom matcher constructors.

Alternate Designs

Inspecting function properties or private builder state was considered, but that would couple consumers to implementation details and could incorrectly identify structurally similar functions. A global registry was also avoided because metadata should travel with each constructor and work across duplicate package instances.

Possible Drawbacks or Risks

The metadata shape becomes a compatibility surface. A metadata version and strict readers make incompatible revisions detectable, while package-qualified global symbol keys reduce collision risk.

TODOs and Open Questions

None within this layer of the stack.

Learning

Symbol.for() allows independently loaded copies of @interactors/core to agree on metadata keys without introducing mutable global registry state.

Screenshots

Not applicable; this is a runtime API change.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Package Changes Through f4af822

There are 1 changes which include @interactors/core with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@interactors/core 1.0.1 1.1.0
@interactors/keyboard 1.0.1 1.0.2
@interactors/html 1.0.1 1.0.2
@interactors/material-ui 5.0.0 5.0.1

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Deploy Preview Ready!

Improve your UI testing experience and make maintenance easier. Interactors are composable page objects that work across Jest, Cypress, and more.
Improve your UI testing experience and make maintenance easier. Interactors are composable page objects that work across Jest, Cypress, and more.

@cowboyd cowboyd changed the title codex/interactor metadata Expose stable Interactor constructor metadata Sep 4, 2026
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