Closed-Loop Verification ๐
BrowserTrack features an automated closed-loop verification engine for both runtime bug fixes and visual layout fixes.
๐ Bug Fix Verification (verify_incident)
#
When an agent fixes a code bug, it triggers verify_incident:
- Browser Reload: Reloads the active browser tab (or navigates to the incident route).
- Error Monitoring: Watches for the incident fingerprint during an observation window (e.g. 2000ms).
- Probe Evaluation: Evaluates custom verification probes:
no_incident: Confirms zero runtime errors occurred.element_exists: Checks if a specific selector exists in the DOM.element_visible: Confirms the target is rendered and visible.text_contains: Asserts expected text content.route_is: Verifies current SPA route.
- After Screenshot: Automatically captures an after-fix screenshot.
- Verdict: Returns
VERIFIED,FAILED, orINCONCLUSIVE.
// Example MCP call
await client.callTool("verify_incident", {
incidentId: "inc_19a31a28",
expect: [
{ type: "no_incident" },
{ type: "element_visible", selector: "#user-card" }
]
});
๐ Layout & Visual Note Verification (verify_note)
#
When an agent modifies CSS or HTML to resolve visual feedback, it triggers verify_note:
- Target Element Inspection: Queries element visibility, bounding rect, and computed styles.
- Viewport Overflow Probe: Checks if
rect.right > viewportWidthor if container has unintended horizontal scroll. - Geometry Diff: Calculates before vs after dimensional delta (
widthDiff,heightDiff,overflowFixed). - After Screenshot: Captures an updated visual snapshot.
- Verdict & Auto-Resolution: If all checks pass and overflow is eliminated, returns
VERIFIED.
// Example MCP call
await client.callTool("verify_note", {
noteId: "note_30a89599",
observationWindowMs: 1000
});