Repository navigation
New recipe: Browser Automation: Invoice Drafts and Web Research - #119
AKT_18 (arunt14) wants to merge 4 commits into
Conversation
Include an offline-first notebook, scoped companion and regression tests, synthetic fixtures, architecture diagram, and recipe/author metadata. Preserve synthetic PDF bytes with scoped binary attributes on Windows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7eb79d57-9712-4cd7-a653-cbb6979c0b92
🔍 PreviewA live preview of this PR is available at: |
There was a problem hiding this comment.
🟡 Changes recommended
Evidence checks do not establish the inspected page’s identity, and cost estimates use unverified deployment pricing.
2 open issues
What changed in this PR
Adds a draft Forgebook recipe teaching evidence-verified browser automation with Microsoft Foundry and Playwright Workspaces MCP. It pairs an offline-first notebook with a recipe-scoped Python companion; publication approval and fresh cloud validation remain pending.
Changes:
- Demonstrates synthetic invoice drafting and bounded three-source research.
- Adds typed contracts, evidence checks, request budgeting, setup/cleanup helpers, and offline regression tests.
- Registers the recipe and author, with a synthetic demo form and architecture diagram.
| File | Description |
|---|---|
registry.yaml |
Registers the recipe and tags. |
notebooks/media/browser-automation-invoice-and-research/01-evidence-led-architecture.svg |
Illustrates workflows and verification gates. |
notebooks/data/browser-automation-invoice-and-research/tests/test_notebook.py |
Tests offline execution and live preflight checks. |
notebooks/data/browser-automation-invoice-and-research/tests/test_diagnostics.py |
Tests diagnostics, evidence, and session handling. |
notebooks/data/browser-automation-invoice-and-research/tests/test_contracts.py |
Tests contracts, scope restrictions, and budgets. |
notebooks/data/browser-automation-invoice-and-research/scripts/summarize_run.py |
Summarizes verification outcomes and usage. |
notebooks/data/browser-automation-invoice-and-research/scripts/render_demo.py |
Renders a fresh form marker. |
notebooks/data/browser-automation-invoice-and-research/scripts/host_demo.ps1 |
Provisions synthetic-form hosting. |
notebooks/data/browser-automation-invoice-and-research/scripts/diagnose_bat.py |
Gates live validation behind a marker probe. |
notebooks/data/browser-automation-invoice-and-research/scripts/create_mcp_connection.ps1 |
Creates a managed-identity MCP connection. |
notebooks/data/browser-automation-invoice-and-research/scripts/cleanup_demo.ps1 |
Deletes inventoried demo resources. |
notebooks/data/browser-automation-invoice-and-research/scripts/__init__.py |
Defines the helper-script package. |
notebooks/data/browser-automation-invoice-and-research/requirements.txt |
Pins companion dependencies. |
notebooks/data/browser-automation-invoice-and-research/README.md |
Documents companion setup and operation. |
notebooks/data/browser-automation-invoice-and-research/instructions.md |
Defines draft-only and read-only agent instructions. |
notebooks/data/browser-automation-invoice-and-research/demo-form/invoice-entry.html |
Supplies nine-field readback and a submission counter. |
notebooks/data/browser-automation-invoice-and-research/bat_recipe/workflows.py |
Orchestrates invoice drafting and research synthesis. |
notebooks/data/browser-automation-invoice-and-research/bat_recipe/runner.py |
Manages agents, requests, budgets, and artifacts. |
notebooks/data/browser-automation-invoice-and-research/bat_recipe/paths.py |
Anchors assets and restricts artifact locations. |
notebooks/data/browser-automation-invoice-and-research/bat_recipe/evidence.py |
Checks page state, provenance, scope, and sessions. |
notebooks/data/browser-automation-invoice-and-research/bat_recipe/contracts.py |
Defines typed inputs, outputs, and validation rules. |
notebooks/data/browser-automation-invoice-and-research/bat_recipe/browser_evidence.py |
Normalizes and validates browser tool evidence. |
notebooks/data/browser-automation-invoice-and-research/bat_recipe/__init__.py |
Defines the companion package. |
notebooks/data/browser-automation-invoice-and-research/assets/expected_invoice_result.json |
Supplies expected synthetic invoice values. |
notebooks/data/browser-automation-invoice-and-research/.gitignore |
Excludes local configuration and caches. |
notebooks/data/browser-automation-invoice-and-research/.gitattributes |
Preserves PDF fixture bytes. |
notebooks/data/browser-automation-invoice-and-research/.env.example |
Provides placeholder live configuration. |
notebooks/browser-automation-invoice-and-research.ipynb |
Teaches the offline-first workflow and optional cloud run. |
authors.yaml |
Adds the recipe author profile. |
Review effort: Balanced
AKT_18 (arunt14)
left a comment
There was a problem hiding this comment.
Please review
Updated cost estimation logic to handle deployment-specific pricing. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Nick Brady (nicholasdbrady)
left a comment
There was a problem hiding this comment.
Request changes — 77/100. This recipe presents a useful evidence-led browser pattern with reusable contracts and careful safeguards. Before publishing, bind invoice and research claims to snapshots of the exact browser-observed URLs, require source evidence for empty research results, handle supported stream response shapes with useful redacted diagnostics, and clearly distinguish the GA Browser Automation Tool from the preview remote MCP integration. Preserve regression tests for unvisited pages, missing snapshots, and incorrect URLs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>`nCopilot-Session: 053546bc-02a7-4710-be20-4c488b4c8d05
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 053546bc-02a7-4710-be20-4c488b4c8d05
Nick Brady (nicholasdbrady)
left a comment
There was a problem hiding this comment.
Thanks for the updates to stream parsing, URL-bound evidence checks, empty-result evidence, diagnostics, and GA/preview labeling. Approving this revision, with the remaining items recommended for a fast-follow PR rather than holding this PR:
- Confirm the preview snapshot's observed-URL contract against a real response and add a representative fixture; the verifier currently requires metadata absent from a captured preview snapshot.
- Support and correlate the native GA remote_function_call / remote_function_call_output evidence types before describing that route as verified. Keep the current unverified label until then.
- Preserve session identity through redaction with stable, distinct aliases so persisted-evidence checks cannot confuse different sessions.
- Explicitly attempt browser-session closure after stream/request failures, and report any session whose closure cannot be confirmed.
Please retain focused regression coverage for these cases. This approval does not mean the remaining live-path issues are resolved.


Browser Automation: Invoice Drafts and Web Research
Add a notebook-first Forgebook recipe for validating a synthetic invoice form without submitting it and researching public sources with evidence-backed synthesis.
The contribution includes the notebook, a recipe-scoped Python companion and tests, synthetic fixtures/demo form, an architecture diagram, and registry/author metadata. The invoice workflow verifies all nine fields, a fresh page marker, zero submission attempts, and browser-session closure. The research workflow gathers bounded source-backed findings and date excerpts, records limitations, and synthesizes results without inventing evidence.
Review status
remote_function_callevidence; preserve distinct session identity in redacted evidence; and attempt/report session closure after request or stream failures.Validation
Remaining confirmations