v1.1.0: pooled runtime, 959 tests, production hardening (0 squash)

This commit is contained in:
John Dvorak
2025-08-15 10:00:00 -07:00
commit 92deb689cd
321 changed files with 79170 additions and 0 deletions
+118
View File
@@ -0,0 +1,118 @@
name: Bug Report
description: Report a bug or unexpected behavior
title: "bug: "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug in Imhotep. Please fill out the details below.
- type: input
id: version
attributes:
label: Imhotep version
placeholder: e.g. 1.1.0
validations:
required: true
- type: dropdown
id: package
attributes:
label: Affected package
options:
- imhotep (umbrella)
- imhotep-playwright
- imhotep-dsl
- imhotep-solver
- imhotep-extractor
- imhotep-cdp
- imhotep-core
- imhotep-geometry
- imhotep-reporter
- imhotep-state
- imhotep-topology
- imhotep-cli
- imhotep-fixtures
- imhotep-bench
validations:
required: true
- type: dropdown
id: category
attributes:
label: Category
options:
- spatial relations
- size assertions
- dense DSL
- fluent API
- FOL / quantifiers
- CDP extraction
- solver / evaluation
- property testing
- CLI / scaffolding
- reporter / diagnostics
- performance
- CI / build
- documentation
validations:
required: true
- type: textarea
id: repro
attributes:
label: Reproduction
description: Minimal code or dense DSL to reproduce the bug.
render: ts
placeholder: |
import { imhotep } from 'imhotep'
const ui = await imhotep(page)
ui.expect('.a').to.be.leftOf('.b')
await ui.checkAll()
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What should happen?
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
description: What happens instead?
validations:
required: true
- type: textarea
id: diagnostics
attributes:
label: Diagnostics / error output
description: Paste any error messages, diagnostic JSON, or stack traces.
render: text
validations:
required: false
- type: textarea
id: fixture
attributes:
label: HTML fixture
description: If applicable, the minimal HTML needed to reproduce.
render: html
validations:
required: false
- type: input
id: environment
attributes:
label: Environment
description: OS, Node.js version, Playwright version, browser
placeholder: e.g. Ubuntu 22.04, Node 20, Playwright 1.59, Chromium
validations:
required: false
+74
View File
@@ -0,0 +1,74 @@
name: Feature Request
description: Propose a new feature or enhancement
title: "feat: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for proposing a feature. Describe it below.
- type: dropdown
id: scope
attributes:
label: Scope
options:
- new spatial relation
- new size assertion
- new dense DSL syntax
- new fluent API method
- new quantifier / FOL feature
- new preset / contract pack
- new state materializer
- new extractor adapter
- new reporter feature
- new CLI command
- new property testing feature
- performance optimization
- developer experience
- documentation
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: What problem does this solve? What use case does it enable?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed API / syntax
description: Show how the feature would be used (fluent API, dense DSL, or CLI).
render: ts
placeholder: |
// Fluent API example
ui.expect('.card').to.be.within(50, 'px').of('.target')
// Dense DSL example
'.card' within 50px of '.target'
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you've considered or workarounds you currently use.
validations:
required: false
- type: textarea
id: acceptance
attributes:
label: Acceptance criteria
description: What test cases should pass for this to be done?
placeholder: |
1. Dense DSL parses 'within Npx of <selector>' syntax
2. Solver evaluates proximity correctly with Npx tolerance
3. Diagnostics report actual distance when check fails
validations:
required: false
+38
View File
@@ -0,0 +1,38 @@
## Summary
<!-- Brief description of the change and why. -->
## Checklist
- [ ] Build passes (`npm run build`)
- [ ] Type check passes (`npm run typecheck`)
- [ ] Unit tests pass (`npm test`)
- [ ] E2E tests pass (`npx playwright test`)
- [ ] External smoke test passes (`npm run test:external-smoke`)
- [ ] Benchmarks not regressed (`npm run test -w imhotep-bench`)
- [ ] No new lint warnings (`npm run lint`)
- [ ] If changing public API: CHANGELOG updated
- [ ] If adding new package feature: SKILLS.md updated
## Packages changed
<!-- Check all that apply -->
- [ ] imhotep-core
- [ ] imhotep-geometry
- [ ] imhotep-cdp
- [ ] imhotep-dsl
- [ ] imhotep-extractor
- [ ] imhotep-state
- [ ] imhotep-reporter
- [ ] imhotep-solver
- [ ] imhotep-topology
- [ ] imhotep-playwright
- [ ] imhotep (umbrella)
- [ ] imhotep-fixtures
- [ ] imhotep-cli
- [ ] imhotep-bench
## Testing
<!-- How was this change tested? Include relevant test commands or scripts. -->
+88
View File
@@ -0,0 +1,88 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: https://gitea.com/actions/checkout@v4
- uses: https://gitea.com/actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- run: npm ci
- run: npm run lint
build:
runs-on: ubuntu-latest
steps:
- uses: https://gitea.com/actions/checkout@v4
- uses: https://gitea.com/actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npm run typecheck
- uses: https://gitea.com/actions/upload-artifact@v4
with:
name: dist
path: |
packages/*/dist
packages/*/tsconfig.tsbuildinfo
unit:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- uses: https://gitea.com/actions/checkout@v4
- uses: https://gitea.com/actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- uses: https://gitea.com/actions/download-artifact@v4
with:
name: dist
- run: npm test
- run: npm run test:integration --workspaces --if-present
e2e:
needs: [build, lint, unit]
runs-on: ubuntu-latest
steps:
- uses: https://gitea.com/actions/checkout@v4
- uses: https://gitea.com/actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- run: npm ci
- uses: https://gitea.com/actions/download-artifact@v4
with:
name: dist
- name: Cache Playwright browsers
uses: https://github.com/actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('package.json') }}
- run: npx playwright install chromium
- run: npm run test:e2e -w imhotep-fixtures
- run: npm run test:external-smoke
- run: npm run test --workspace=imhotep-bench
- run: |
for pkg in packages/*/; do
name=$(node -p "require('./${pkg}package.json').name")
if [ -d "${pkg}dist" ]; then
echo "Packing $name..."
(cd "$pkg" && npm pack)
fi
done