Skip to content

Atlas attribute contract

This is the single most important architectural constraint for Probe to work reliably.

Atlas must emit data-lens-path attributes on every rendered control and data-lens-error attributes on every validation error element.

Without these attributes, cc will produce brittle selectors that break on any UI change. This is non-negotiable — it must be implemented in Atlas before any Probe runs are attempted on a given screen.


Required attributes

Form fields

Every field Atlas renders must carry data-lens-path (the dotted field address used in ProbeSpecs) and data-lens-field (the original field name, useful for error correlation).

<input
  data-lens-path="form.license.expiration_date"
  data-lens-field="ExpirationDate"
  id="edExpirationDate"
/>

Validation errors

Every validation error element must carry both data-lens-error (the field name) and data-lens-path (the same dotted path as the field it relates to).

<div
  class="validation-error"
  data-lens-error="ExpirationDate"
  data-lens-path="form.license.expiration_date"
>
  Expiration Date is required.
</div>

This lets Probe correlate the visible error with the field path it was asserting against.

Toolbar actions

Every toolbar button must carry data-acumen-action with the canonical verb:

<button
  data-acumen-action="save"
  class="toolbar-btn"
>
  Save
</button>

The RecordToolbar component already emits this attribute for the standard verbs (save, delete, cancel, …). Custom screens that don't use RecordToolbar are responsible for their own attribute emission.


Why selectors-by-attribute, not by class

cc selects elements using these attributes — not CSS classes, not text content, not positional selectors. This makes Probe runs immune to UI restyling: the attributes are tied to the Lens node identity, not the visual presentation.

Class names rot. Text changes for i18n. Position changes when a layout is tweaked. data-lens-path only changes when the underlying field address changes — and when it does, every linked ProbeSpec needs updating regardless.


What Phase 1 reliably targets

Probe can drive any screen that emits the contract correctly. As of Phase 1:

Screen group Status
fs.license.detail ✅ Lens-rendered, contract-emitting
Getting Started wizard (14 screens with rulebook entries) ✅ Lens-rendered, contract-emitting
Screens still using YamlPageRenderer ❌ Not test-ready — attribute audit pending (Phase 2 §6.5)
FinancialDocumentPage ❌ Not test-ready — attribute audit pending (Phase 2 §6.5)

If you run a spec against a non-ready screen, expect failures with actual: not-found for most assertions.


Auditing a screen

To check whether a screen is contract-compliant before authoring a ProbeSpec for it:

  1. Open the screen in dev tools.
  2. Confirm every form field's container has data-lens-path.
  3. Trigger a validation error and confirm the error element has data-lens-error.
  4. Hover the toolbar buttons — every action should have data-acumen-action.

If any of these are missing, the fix is in Atlas (or the screen's bespoke renderer), not in Probe.


See also