Probe — the publish gate for Lenser projects¶
Probe is Acumen's AI-driven behavioural test runner. When you customise a screen with Lenser (e.g. "make this field required"), Lensmith automatically generates a ProbeSpec — a short YAML scenario that verifies your customisation works on a real screen. Click Publish and Probe runs the spec first: pass and your project goes live, fail and publication is blocked until you fix it or override with a recorded reason.
You can also run any spec on demand from the dedicated Probe screen (top-level nav, peer of Lenser).
TL;DR
Probe is the seatbelt for Lens overrides. You don't write tests — Lensmith writes them for you. Publishing runs them; failures block publishing.
When Probe runs¶
| Situation | Does Probe run? | How |
|---|---|---|
| You publish a Lenser project | Yes — automatically. | Click Publish in the project. Probe runs every linked spec. |
| You want a sanity check before publishing | Yes | In the Lenser project's Publication card, click the ↻ icon next to the spec. |
| You want to run a spec ad-hoc | Yes | /probe → click the row → Run now tab → Start run. |
| You want a test for a base Acumen screen (no Lens involvement) | Phase 2 — not yet. | Specs are currently authored only via Lensmith inside Lenser projects. |
| You want load testing / performance | No. | Probe is for behaviour, not load. |
A run typically takes 30–90 seconds.
The two screens¶
1. The Probe management screen — /probe¶
The top-level sidebar entry Probe lists every ProbeSpec in your tenant.
| Column | What it shows |
|---|---|
| Slug | Machine name. Stable across renames. |
| Name | Human-readable name. |
| Screen | Acumen screen the spec targets (e.g. fs.license.detail). |
| Lenser project | Which project authored the spec (if any). |
| Last run | Timestamp of the most recent run. |
| Status | Pill: passed · failed · running · pending · error · not run. |
Click any row to open the detail drawer with three tabs:
- YAML — read-only view of the spec's content. This is what the runner LLM reads.
- Run history — last 50 runs across every trigger (manual, publish-gate, Claude Code session). Each row shows status, trigger source, tenant, and timestamp.
- Run now — minimal trigger pane. Click Start run to execute the spec against your current tenant using the env-configured base URL. The page auto-jumps to Run history so you can watch the new pending run appear.
The run-history list updates when you click Refresh in the screen header or re-open the drawer.
2. The Probe results panel inside a Lenser project¶
Open any Lenser project (sidebar → Lenser → click a project). Scroll to the Publication card. The Probe results section lists every spec linked to this project with the same status pills and ↻ run-now buttons.
Click the chevron to expand a spec row and you'll see a per-scenario result tree:
- Green left-border = scenario passed
- Red left-border = scenario failed
- Per-assertion ✓ / ✗ icons with the assertion description
- For failed assertions:
expectedandactualvalues + a 📸 Screenshot link - A collapsible LLM transcript at the bottom — what the runner agent decided and observed during the run. Useful for understanding why a flaky assertion failed.
The publish gate¶
The whole reason Probe exists. When you click Publish in a Lenser project, the backend:
- Looks up every ProbeSpec linked to this project.
- Runs each one against your current tenant.
- If any spec fails → publication is blocked. The Publish panel shows a red banner listing the blocking specs and their statuses.
- If all specs pass → publication proceeds normally.
Overriding the gate¶
Sometimes you'll need to publish despite a failure (the spec is wrong, the test environment is degraded, etc.). When the gate blocks, the panel shows an inline override box:
- Type a reason in the text field — required (
test env downorspec is staleworks). - Click Publish with override.
- The publication goes through. Your reason is recorded permanently in the version history.
Overrides are auditable but not gated
Anyone with publish rights can override. Use it sparingly — every override is visible in the project's version history and in tenant-level audits.
Where ProbeSpecs come from (Phase 1)¶
You don't write ProbeSpecs by hand. They're generated for you:
- When you chat with Lensmith inside a Lenser project and accept the proposed operations, Lensmith also generates a corresponding ProbeSpec that verifies the customisation took effect. The spec is saved to the project automatically.
- The spec's YAML is visible in the management screen's YAML tab.
What gets auto-verified today (Phase 1):
| Override property | Auto-generated assertion |
|---|---|
read_only: true / false |
assert_field_state(disabled / enabled) |
value: <X> |
assert_field_value(== X) |
required: true |
assert_field_state(visible) (proxy until Lens emits data-required) |
| Other properties | Comment-only — "no auto-verifier yet" |
Editing or deleting a spec¶
Phase 1 doesn't expose YAML editing in the UI — the YAML view is read-only. To tweak a spec:
- Adjust the underlying Lenser overrides (Lensmith may re-generate). Recommended.
- Or hit the API directly:
PATCH /api/probe/specs/{id}. See the developer API reference.
A standalone authoring UI is on the Phase 2 roadmap.
What screens Probe can test today¶
For Probe to drive a screen reliably, the screen must emit certain HTML attributes that the runner uses as selectors. Atlas (Acumen's renderer) is responsible for emitting them.
| Element | Required attribute | Verified in Phase 1? |
|---|---|---|
| Every form field | data-lens-path="<field_path>" on the container |
✅ Lens-rendered screens |
| Every validation error | data-lens-error="<field_name>" |
✅ Lens-rendered screens |
| Every toolbar action | data-acumen-action="save\|delete\|..." |
✅ via RecordToolbar |
This means Phase 1 reliably targets Lens-rendered screens (fs.license.detail and the 14 Getting-Started wizard screens that have rulebook entries). Other screens — anything still using YamlPageRenderer or FinancialDocumentPage — are not test-ready yet. The audit is on the Phase 2 roadmap.
If you try to run a spec against a non-ready screen, expect failures with actual: not-found for most assertions.
Reading a failed run¶
Open the spec → Run history → click the failed run (or use the Probe results panel inside the project for assertion-level detail). For each failed assertion:
- Look at
expectedvsactual. They're stringified — usually the cause is obvious. - Click 📸 Screenshot to see what the page looked like at failure time.
- Open the LLM transcript to see the runner's reasoning trail.
Common patterns:
- "filled X, value didn't update" → MUI controlled-input dirty-tracking issue. Re-run usually works (was a known bug, fixed during Phase 1).
- "no save endpoint hit" → the toolbar button is missing
data-acumen-actionon the screen. - "field not found" → an Atlas attribute audit gap (the screen doesn't emit
data-lens-path).
Run cost and rate limits¶
Each run spends a small amount with the configured AI provider (DeepSeek by default, ~$0.001–0.005 per run depending on scenario count). Per-run runtime is 30–90 seconds. Runs queue on the API worker, so triggering many simultaneously will serialise them.
Quick reference¶
| I want to… | Go here |
|---|---|
| See all specs | /probe |
| Trigger a manual run | /probe → row → Run now → Start run |
| See assertion-level detail for a failure | Lenser project → Publication card → spec row chevron |
| Publish a project | Lenser project → Publication card → Publish (gate runs automatically) |
| Override a blocked publication | Type reason in the override box → Publish with override |
| Check what a spec actually tests | /probe → row → YAML tab |
| Audit a publication's override history | Lenser project → version history (override reason recorded per version) |