Implement BrowserAutomationReceipt and visible automation session controls#27
Implement BrowserAutomationReceipt and visible automation session controls#27Copilot wants to merge 3 commits into
Conversation
…on controls - Add schemas/browser-automation-receipt.schema.json with full receipt contract - Add examples/browser-automation-receipt.example.json fixture - Add automation/automation-session-ui.yaml for visible session surface - Add policy/automation-receipt-policy.yaml for runtime governance rules - Update runtime/playwright-smoke.mjs to emit automation receipts on start/end/deny - Add scripts/bearbrowser-verify-automation-receipt.py with 6 acceptance-criteria tests - Update docs/runtime-automation.md to document receipt lifecycle and revocation" Agent-Logs-Url: https://github.com/SourceOS-Linux/BearBrowser/sessions/15431771-da06-4027-a77d-45212fbaa98c Co-authored-by: mdheller <21163552+mdheller@users.noreply.github.com>
…ipt helper Agent-Logs-Url: https://github.com/SourceOS-Linux/BearBrowser/sessions/15431771-da06-4027-a77d-45212fbaa98c Co-authored-by: mdheller <21163552+mdheller@users.noreply.github.com>
Review: useful governance surface, but contract alignment is required before mergeThis PR adds the right product surfaces: a receipt schema/fixture, policy rules, visible session UI spec, runtime event hooks, and a verification script. That is directionally correct. Blocking remediation before ready/merge:
Recommendation: keep the UI/policy/runtime work, but add a small adapter layer that emits the SourceOS contract payload exactly, then validate the canonical example plus generated lifecycle examples. |
Clean replay of #27 onto current main after #34 landed the Workspace Operation Plane contract and sidecar-status fix. Adds BrowserAutomationReceipt schema and example, automation receipt policy, visible session UI spec, runtime automation docs, Playwright smoke receipt emission, and automation receipt verifier. Validated on PR head 987d982 with Feature Plane Validation, Trust Surface, BearBrowser shell validation, automation wrapper validation, manifest validation, packaging, parity, branding, BearHistory, credential broker, binary build, and distribution workflows passing.
|
Closing after capture/replay. Replacement PR #35 landed the intended BrowserAutomationReceipt and visible session controls payload on current Merged replacement commit: Content carried forward:
Content intentionally omitted: none. The original branch was unmergeable and failed the older sidecar-status workflow path; #35 replayed the payload onto current main after #34 fixed that workflow. |
Browser automation transports could operate without any user-visible ownership, permission scope, or revocation path. This PR introduces a receipt-backed governance layer that makes every automation session explicit, visible, and revocable.
Schema & fixture
schemas/browser-automation-receipt.schema.json— JSON Schema 2020-12 definition enforcing stable receipt URN (urn:srcos:receipt:browser-automation:<hex>), transport enum, permission scope, origin,userVisible: true,revocable: true,policyDecisionRef, and conditionalrevokedAt(required whenstatus = revoked).examples/browser-automation-receipt.example.json— Fixture that validates against the schema.Policy & UI surface
policy/automation-receipt-policy.yaml— Runtime rules: receipt required before transport starts; no owner → reject; no policy decision → reject; orphan events → quarantine, never silently accepted; compact receipt refs in logs (full topology only in explicit debug mode).automation/automation-session-ui.yaml— Visible session surface spec: always-on badge/panel showing owner, transport, tab scope, permissions, origin, receipt ID, and a one-click revoke control that terminates the transport, invalidates the session token, setsrevokedAt, and emits a provenance event.Runtime integration
runtime/playwright-smoke.mjsnow generates a receipt URN at session start and emitsbrowser.automation.receiptevents at every lifecycle transition:All provenance events carry
automationReceiptIdfor compact cross-referencing.Verification
scripts/bearbrowser-verify-automation-receipt.pyvalidates receipt files against the schema contract and includes a built-in--self-testcovering all acceptance criteria:ownerRefrevokedAtrevokedAtpolicyDecisionRef)