0a73063c76
Topology array order mismatch (critical bug): - CDP browser script iterates elements in document order (querySelectorAll), but solver accesses topology arrays by selector-resolution order. - Fix: add subjectIds array to TopologyRecord tracking the backendNodeId at each document-order position; remapTopologyIds now reorders all 6 topology arrays before remapping backendNodeIds to solver IDs. - Fallback: when subjectIds is missing (cached pre-fix data), falls back to simple remap without reordering. Unary inStackingContext compilation: - compileCanonicalClauseToFormula treated inStackingContext as always binary, creating referenceBinding with undefined selector for unary assertions. - Fix: add (inStackingContext && !clause.reference) to unaryPredicate/isUnary. Hard test fixture (fixtures package): - 29-element geometric fixture with 10 scenarios - 57 assertions (54 spatial + 3 topology) all pass end-to-end
imhotep-playwright
Playwright integration layer for Imhotep. Provides page wrapping, CDP-backed geometry extraction, runtime pooling, property-based test runners, renderer adapters, and preset assertion contracts.
Key Exports
| Export | Description |
|---|---|
imhotep(page, opts) |
Attach Imhotep to a Playwright page |
imhotepComponent(id, opts) |
Property-run entry for rendered components |
imhotepStory(url, opts) |
Property-run entry for Storybook stories |
imhotepFixture(path, opts) |
Property-run entry for fixture files |
test, expect, imhotepFixtures |
Playwright test fixtures |
ContextPool, PagePool, Semaphore |
Pooled runtime for multi-worker testing |
touchTarget through modalContainment |
Reusable assertion presets |