Skip to content

New recipe: Browser Automation: Invoice Drafts and Web Research - #119

Open
AKT_18 (arunt14) wants to merge 4 commits into
mainfrom
recipe/browser-automation-invoice-and-research
Open

AKT_18 (arunt14) wants to merge 4 commits into
mainfrom
recipe/browser-automation-invoice-and-research

Conversation

@arunt14

@arunt14 AKT_18 (arunt14) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Nick Brady approved the PR; all inline review threads are resolved.
  • The recipe remains offline-first and does not include credentials, tenant-specific configuration, or real invoice data.
  • Nick identified these non-blocking fast-follow items: confirm the preview snapshot's observed-URL contract with a real response and fixture; support/correlate native GA remote_function_call evidence; preserve distinct session identity in redacted evidence; and attempt/report session closure after request or stream failures.

Validation

  • Recipe tests: 135 passed. Notebook schema and cleared-output checks passed.
  • GitHub CI passed registry validation, preview-token routing, site build, accessibility, and CodeQL checks for Actions, JavaScript/TypeScript, and Python.
  • No fresh live Foundry/MCP run was performed. In particular, the observed-URL metadata format in a real preview snapshot is not yet confirmed; live-path verification remains a follow-up.

Remaining confirmations

  • Confirm completion of the internal authoring workflow and any required Internal Recipe Proposal or maintainer waiver. The guidance was reviewed, but workflow completion has not been verified.
  • Confirm whether Nick's review satisfies the repository's Foundry PM, engineering, or DX product-review requirement.
  • Run the notebook end-to-end with live Foundry/MCP. Offline validation passed, but live execution remains unverified; Nick approved the PR with the technical follow-ups above.

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
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Preview

A live preview of this PR is available at:
https://microsoft-foundry.github.io/forgebook/preview/pr-119/

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

@arunt14 AKT_18 (arunt14) left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review

@arunt14
AKT_18 (arunt14) marked this pull request as ready for review October 23, 2026 06:46
@arunt14
AKT_18 (arunt14) requested a review from a team as a code owner October 23, 2026 06:46
Updated cost estimation logic to handle deployment-specific pricing.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

AKT_18 (arunt14) and others added 2 commits November 9, 2026 12:47
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants