Skip to content

Use Company-driven Poppy 0.3 approvals and preserve checkout links - #38

Merged
adewale merged 11 commits into
mainfrom
fix/poppy-03-approval-flow
Oct 30, 2026
Merged

adewale merged 11 commits into
mainfrom
fix/poppy-03-approval-flow

Conversation

@adewale

@adewale adewale commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

What

Send Poppy 0.3 task requests before Company confirmation, retain their durable identity through replay, and export private per-action diagnostics. Deliver complete result links without model transcription. Fixes #37. Targets the pinned 29 October 2026 Poppy 0.3 text, Operations 2 and Mediated Sign-In 1.

Why

Our preliminary card asked about an HTTP request before the Company supplied its terms; its intermediate notice could start another model turn. Operations 2 §§1, 4–6 instead lets the Company choose confirmation boundaries.

The live export showed two operation IDs and two 201s without an intervening user-message turn. Missing bodies, order IDs and checkout URLs prevent attributing duplicate live orders/payments or the exact link failure. The truncation and replay defects below are independently reproduced, not explanations asserted for that incident.

How

  • Record task dispatch and every coalesced call before sending. Return the original outcome after settlement, decline, revisions and restart; current MCP annotations cannot bypass a recorded call. Fresh attempts get immutable decision IDs, so delayed clicks cannot claim a later attempt.
  • Bind returned terms to the actual transport authority. Only a known invalid_session refusal may advance an unapproved task's Session, with account and withdrawal generation unchanged. Recovery republishes committed pending terms without dispatching or deciding them.
  • No backwards compatibility: approval storage is version 3 with explicit bindings/generations. Old preliminary-card forms are refused, not migrated. Current-flow tests replace the deleted legacy fixtures without reducing generated histories or safety oracles. File disclosure and website forms retain separate consent.
  • Keep complete approved results; bound hostile link labels and remove directional controls. Preserve exact HTTPS anchor attributes and show an isolated destination. Summary links stay inert; checkout is never opened automatically.
  • Activity selects recent events or one action. Separate buffers retain 50 recently logged flows, each 200 events/256 KiB. Exports exclude stored requests/results and unrelated protocol logs. Link-rejection reasons and authenticated-client equality reports contain counts/indexes/booleans only—no URL values, signed queries/fragments or hashes. Shared unit context and missing pruned history are disclosed.

Testing

  • CI test and CI interop both passed at 0121c85.
  • 2,124 tests passed in 117 files, all five suites and the documentation check, in the main checkout; none skipped. npm run typecheck and npm run check:spec passed. Locale was explicitly en_US.UTF-8; PR Classify unavailable live interop scenarios on Poppy 0.4 #29's locale change is not included.
  • 16 actual SIGKILL cases: eight approval boundaries, six initial-task boundaries, real Pi MCP settlement, and an unsafe replay negative control. Independent Company processes/ledgers survive PDA restart.
  • Interop receipts: 10 own-project cells and D/SD/OU against pinned Print with Poppy demo, all required-supported, with zero failures or protocol warnings. No live store or payment action.
  • Regressions failed for coalesced replay, annotation-change replay, response-depth wrapping, hostile labels, missing file/batch capture and an ended turn losing in-flight diagnostics. Replacing transport bindings with current account state made both authority-race tests fail; restoring the fix made them pass. All eight model properties pass the default 100 cases.
  • Real Chromium clicks passed desktop OpenAPI and mobile MCP, reload/reconciliation, matching scoped exports and exact source/resolved anchor equality. The earlier CI foreign-text assertion's cause is not established; its test now synchronizes on the actual refusal, and the separate logger lifetime race has deterministic red/green evidence.
  • Independent re-reviews and dispositions: no new lifecycle/authority blocker; the diagnostics review's P2 file-consent omission was reproduced and fixed.

Visual evidence

Claim: the first approval contains the Company's exact terms and price, not a preliminary HTTP request. Activity can now export that action separately.

Input/fixture: the same jacket-exchange prompt and browser fixture, including a synthetic checkout URL beyond 2,000 response characters. The baseline receives the identical test-only response fixture.

Baseline SHA: 4c92a2d890d771feedf7a8fc7274d86644626f70.
Current SHA: 0121c85e4a92349f5b99f9c7d1b8ee2212f331b2.
Rendered application/fixture SHA: f8400012a2d17a1f4d05095a98c615ce2be5d48e; the later commit adds evidence/docs only. Receipt, source-tree equality and image hashes.

Before Current Reviewer cue
Before: the first card asks about a POST without the Company's price Current: the first card contains the Company's jacket-exchange terms and price Read the first decision. Browser receipts record two clicks before, one now; zero effects before terms approval and one afterward/reload.

New scoped export surface (unsupported at baseline; no fabricated before image):

Desktop Activity selects a completed action with copy and download controls

Mobile Activity keeps the action selector and both export controls visible

Inspect the selected scope and enabled download control. Current checkout-link capture and assertions verify the exact encoded anchor without following it. Regenerate using the recorded commands; the existing renderer tests, transport regressions and strict Company ledger are the independent checks.

Limitation: identities, model and Companies are synthetic. Equality is client-reported telemetry, not server proof of navigation. Browser uncaught errors and strict Company violations/warnings are zero; the local helper prints an RPC-stub disposal warning. None of this verifies live OAuth, checkout or payment, or identifies the live malformed URL.

Risk and rollout

A Company may perform a routine task without another per-write click; keeping it within the User's task remains a model responsibility, not something types prove. The model still cannot approve Company operations. Unknown-outcome holds remain conservative; full automatic same-approval recovery under Ops §7 is not added. Older pending approvals must be requested afresh, without interpreting historical uncertainty as a failed action.

No production order/payment action, schema reset, key rotation or configuration change. PR #29 and its stash are untouched.

Deployment — 30 October 2026

Merged as 4ecbeb99c8e8dbce5449329f5ba5b5b4dea04283, whose tree exactly matches the checked PR head. npm run deploy completed for poppydemoagent.dev.

  • Worker version: db0ed1b7-6043-4439-b0bf-a118b0ef8a5e, serving 100% of traffic; deployment bc825cf8-c43f-41bc-a9b2-e779e59e5241.
  • Public pages and CSP, deployed application-asset SHA-256 equality, canonical identity/public keys, sign-in options, unauthenticated refusals, and canonical-host redirects passed.
  • Fresh signed-out Chromium rendering passed on desktop/mobile, with both sign-in links and zero uncaught errors.
  • Authenticated Company journeys and checkout/payment remain unverified in production. No order or payment was attempted during these checks. Existing old-format pending approvals are refused rather than migrated; uncertainty is not evidence that an earlier action failed.

@adewale
adewale merged commit 4ecbeb9 into main Oct 30, 2026
2 checks passed
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.

Use Company terms for 0.3 approval and preserve checkout results

1 participant