Repository navigation
feat(ai-tools): W15 Pax8 PR B — four-eyes order submit with pinned digest, supervised reconcile, approved-baseline billing CAS (#6785) - #10832
Conversation
#6785) Verify approved inputs inside the locked claim transaction, capture the integration and durable billing baselines, reopen provably unsent claims, and preserve remote success with billing_conflict when submit or reconcile loses the quantity CAS. Relax the existing baseline constraint for every line action (B1). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…#6785) Pin local order, billing and destination inputs; re-check live price and commitment evidence and verify the preview under the claim lock before isMock. Expose truthful estimated-cost and terminal-cancel approval copy, reopen unsent failures, and retain reconciliation hints for unknown remote outcomes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cover partner isolation, real intent content drift, claim-time rollback, approved billing quantity persistence and timeout reconciliation. Mock Pax8 only at client construction. Integration execution is deferred to CI; static guard-flip reading and the API test-project typecheck completed locally. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…#6785) Document four-eyes submit and supervised reconcile, add g116 and tier rows, and report the measured lazy-index delta against PR A. Keep every declared action in the bounded tool description and verify API/integration area gates. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…control/wave-6785-b
Strix Security ReviewWarning This pull request has 90 commits after the last Strix review ( ✅ No open security findings. PR summary: Adds four-eyes `submit` and supervised `reconcile` actions to the Pax8 AI order tool, a pinned effect digest binding the approved order content, a claim-time verification hook with integration-generation pinning, and an approved-baseline compare-and-swap before Pax8 results are written to contract-line billing quantities. Review summaryReviewed the Pax8 money surface added by this PR: the four-eyes Ruled out (8)
Review 1 on this PR · Reviewed by Strix |
Deploying breeze with
|
| Latest commit: |
97f3b0c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://65e02b14.breeze-9te.pages.dev |
| Branch Preview URL: | https://feature-6754-ai-full-control-j2w0.breeze-9te.pages.dev |
|
Review run: Verdict: the money path holds — one send per order (CAS claim with High (fix): H1 a post-send persist conflict discards Pax8's response (order id, subscription ids) with no log or Sentry event — the one piece of evidence reconcile would need; H2 Medium (fix): M1 claim-phase 409s (claim lost, integration unavailable, baseline not captured) are mapped to "reconcile any unknown write" although nothing was sent, and Type design (fix, mechanical): closed Tests (fix): integration case for the OD-1 CAS under a concurrent edit; real Dismissed: none. The |
…d billing conflicts Record vendor outcomes before persistence, distinguish unsent claim refusals, and audit failures and billing conflicts accurately. Tighten submit modes, claim bundles and digest contracts; cover repeat release and billing drift. Reopen unsent REST integration drift. Keep legacy missing baselines fail-closed and document the production inventory required before deployment. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Fix pass pushed as 1ffe12c (29 files): every item in the review summary is addressed — execution evidence (vendor order id, per-line subscription ids/states) is logged and captured before persistence and again on a persist failure; both persist paths return |
|
Head CI on 1ffe12c red in three jobs: the new scope integration suite is blocked by |
…isibility Discover the order organization under partner scope and authorize that single organization for the coherent preview evidence transaction. Preserve the missing-line blocker and reject organization drift before collecting evidence. Align the REST integration assertion with preserved vendor success and explicit line_missing billing conflicts, and classify the human-only submit refusal as an automation principal site. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Pushed ba49d45: the preview's repeatable-read transaction now carries the order's org/partner visibility (it previously opened with partner scope and no accessible orgs, so the linked contract line read came back empty and |
|
Land gate: head ba49d45 CI |
… 140000 collision) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Release-notes entry moved to the consolidated notes PR (see #10853 once opened) to stop merge-queue conflicts; no functional change. |
Resolution: - aiGuardrails.agentPrincipal.contract.test.ts: AGENT_HUMAN_ONLY_ACTIONS keeps this PR's manage_pax8_orders:submit; drops manage_groups:add_devices / remove_devices per main #10822 (#10149 moved them to supervised tier 3). - goldenPrompts.ts: keep both W15 PR B's g116 (Pax8 submit) and main's g117 (#10161 ticket merge). - goldenPrompts.test.ts: count 116 -> 117, keep both g116 and g117 assertions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…-01-18-170000) Rename 2027-01-18-141000-pax8-order-line-baseline-any-action.sql to 2027-01-18-189000 (after 170000 and 171000 on main) and update the pax8.test.ts reference. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Refreshed onto current Conflict resolution (merge commit
Migration rename ( Verification
Not enqueued. |
…contract) Adds aiAgentsPage.catalog.actions.manage_pax8_orders.reconcile in all 8 locales (the only key the contract reported missing). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Added picker label |
…-01-18-191000) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Main merged more migrations; unshipped migration moved to |
…26-11-01) (LanternOps#10853) Collects the `docs/release-notes/next-release-draft.md` entries from the in-flight PRs below into a single PR. Each of those PRs had its own change to this file removed (commit `chore(release-notes): move entry to the consolidated notes PR (#N)`) because pairwise EOF-append conflicts were cascading the merge queue into UNMERGEABLE. Bullet text is kept verbatim; each heading cites its source PR. Entries carried for: - LanternOps#10323 (appended to Self-Hosting / Upgrade Notes) - LanternOps#10775, LanternOps#10776, LanternOps#10779, LanternOps#10786, LanternOps#10806 (Agent) - LanternOps#10780, LanternOps#10800, LanternOps#10805, LanternOps#10816 (Devices and inventory) - LanternOps#10784, LanternOps#10813, LanternOps#10817, LanternOps#10820, LanternOps#10822 (AI tools), LanternOps#10832 (appended to the existing Pax8 W15 section) - LanternOps#10787, LanternOps#10790, LanternOps#10798 (Agreements, quotes and billing) - LanternOps#10791 (rewrites the existing Flows "Known differences from the Job" bullet) - LanternOps#10811, LanternOps#10823 (Security) - LanternOps#10830, LanternOps#10836, LanternOps#10837 (Alerts and PSA) - LanternOps#10793, LanternOps#10795, LanternOps#10797, LanternOps#10812, LanternOps#10814, LanternOps#10815, LanternOps#10818 (Settings, web, remote, software, deploy and backup) - LanternOps#10419 (AI tools — Wisp) Docs only; no functional change. Not enqueued — merge after the carried PRs so the entries describe shipped work, or earlier if the queue needs it (the entries are harmless ahead of time). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Todd Hebebrand <todd@lanternops.io> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Summary
W15 PR B: the money surface of the Pax8 AI tools.
manage_pax8_ordersgainssubmit(four-eyes, mandatory pinned digest, agent-human-only) andreconcile(supervised, MFA-gated), and the order-submit transaction gets the claim-time verification hook plus the OD-1 approved-baseline CAS onmanual_quantityfor REST and AI alike.submitOrder({ …, verifyClaim?, onPreflightFailure? })(defaults keep today's REST behaviour);claimOrderruns the hook inside the claim transaction aftervalidateDirectOrderLinesForSubmitand the duplicate-target check, and the bundle carries the integration generation;createClientrefusesPax8IntegrationGenerationChangedErrorwhen the live row's URL or credential ciphertext changed after the claim (quorum Q4);reopenUnsentOrderis a CAS onstatus='submitting', the claimedsubmittedAtand every linepending(quorum Q3). OD-1 (Todd 2026-10-31: A, REST too): every claimed line records the linked contract line'smanual_quantityasauthorized_baseline_quantityinside the claim transaction;persistSubmitResultsandpersistReconcileResultsCASmanual_quantity = authorized_baseline_quantity; a conflict keeps the remote outcome (succeeded) and flagsbilling_conflict, never overwriting (quorum Q6).actionIntents/pax8OrderDigest.tspins every local input of what is sent and billed (line quantity/sortOrder/provisioning/commitment, snapshot unitCost, derived active commitment, contract-line manualQuantity + unitPrice incl. new lines, contract-currency catalog price, company mapping, integration apiBaseUrl + credential ciphertext); unchanged by alastSeenAtbump, a token refresh or the claim's own draft→submitting transition. Preview exposespreviewDigest+submitWith; the release sequence (W15-D6) re-checks the digest, re-fetches dependencies for change AND cancel lines, runsverifyClaim, then isMock, then the send, then the CAS persist. Refusals:PRICE_CHANGED,COMMITMENT_CHANGED,PREVIEW_MISMATCH,COST_UNKNOWN,COMMITMENT_AMBIGUOUS,PREFLIGHT_FAILED(reopens, never marks failed), > 20 lines. The card says estimated (OD-2 accepted) and names every CANCEL as terminal with its commitment term (quorum Q7/Q8). Submit isAGENT_HUMAN_ONLY_ACTIONS(never a proposal: no idempotency key at Pax8, cancel is terminal); reconcile is supervised and MFA-gated (OD-3).aiToolsPax8OrderSubmitScope.integration.test.ts(Pax8 client mocked atcreatePax8ClientForIntegration): partner B cannot submit partner A's order; edit between intent and release →content_changed; edit between digest check and claim →PREVIEW_MISMATCH, order stilldraft; approved submit with mocked success writesmanual_quantity; mocked timeout →needs_reconcile, resolved byreconcile. Runs under the Integration Tests CI job.Plan amendment B1 (recorded on #6785)
pax8_order_lines_authorized_baseline_chk(2026-07-16) limited the approved baseline tochange_quantitylines, so cancel and quote-created new lines could not carry it across a timeout into reconcile. Migration2027-01-18-120000-pax8-order-line-baseline-any-action.sqlre-creates the CHECK asIS NULL OR >= 0(idempotent, writes no rows, the shipped 2026-07-16 file is untouched). No new column; export policy unchanged; Drizzle gains only a column comment.Index budget (W19 bounds, anchored to PR A's measured values)
Closes #6785
Refs #6754
Merge Danger
Door: one-way, small: one migration that only relaxes a CHECK. Behaviour door:
submitis reachable only through a two-person approval with a pinned digest, by humans, on a connection an admin has already configured; nothing submits on merge or deploy. REST behaviour changes in exactly one way: a billing edit during a Pax8 HTTP call is no longer overwritten (recorded asbilling_conflictinstead).Blast radius:
pax8OrderSubmitRepository.claimOrder(optional hook, default unchanged), the two persist paths (CAS), the AI tool class maps and effect-digest registry.Testing
Red first in each task.
check-migration-naming --against-ref origin/main: OK.git diff --check: clean.db:check-driftruns in CI (the implementer sandbox could not start the checker).Deploy note (from the review fix pass)
Before deploying, inventory production Pax8 order lines already
in_flightorneeds_reconcilewith a NULLauthorized_baseline_quantityon a non-change_quantityaction (cancel / new subscription). Such lines predate baseline capture for every action; on reconcile the CAS misses and the line is recordedbilling_conflict:baseline_missing(vendor success kept, billing edit preserved, orderpartially_failed, review guidance surfaced) rather than written blindly. Read-only inventory:Expect zero rows; any found need a human to compare vendor evidence against billing before deploy.
Needs Todd
Implemented by Codex (gpt-6.1-sol) under the orchestrator brief with one independent read-only review round applied; PR A review and Gate B decisions carried.
🤖 Generated with Claude Code