Skip to content

docs(order-compute): egress hang warning, legacy names, cap units, zone shape, x402 version - #17

Open
GigaHierz wants to merge 1 commit into
mainfrom
docs/order-compute-runtime-behaviour
Open

GigaHierz wants to merge 1 commit into
mainfrom
docs/order-compute-runtime-behaviour

Conversation

@GigaHierz

Copy link
Copy Markdown
Contributor

Why

Two reports from completed e2-micro rentals (#5 on macOS, #9 on Linux) list things the skill either under-states or does not say:

What

skills/order-compute/SKILL.md only.

  • Egress paragraph is now a bold warning with two timeout examples.
  • A note after the setup command that the cpay names are expected.
  • Cap paragraph: amount is in dollars; the "USDC" wording is cosmetic; a USDT purchase is governed by the same cap.
  • x402 version note at the end of the CLI section.
  • "Collect the result": observed latency range, and take zone from the paid response, not the poll.

Not in this PR: the cross-wallet funding note (#9, item 5) is in #15, and the receipts limitation (#9, item 4) is already documented and tracked upstream. The CLI wording fixes themselves (cap message, legacy label, zone normalisation) are filed upstream; this PR documents the current behaviour so agents stop misreading it today.

Verification

  • npm pack @celo/buy@0.5.0dist/commands/accounts.js writes the cap via setDailySpendCap(name, atomic.toString()) and prints fmtAmount(atomic, 6, 'USDC'); no token is stored.
  • dist/commands/setup.js prints stored in OS keychain (legacy service=cpay).
  • Unpaid POST https://usebuy.ai/gcloud/vm today returns "x402Version":1.
  • PR ci: check the skill against the deployed gateway, not a branch #10's check-against-gateway.mjs passes on this branch (prices and types unchanged).

Closes #5, closes #9.

🤖 Generated with Claude Code

…ne shape

- Egress: a blocked port hangs rather than refusing, inside a paid lease.
  Say so in bold and tell scripts to wrap every outbound call in `timeout`.
- `setup` prints `legacy service=cpay` and instances are named `cpay-*`;
  say both are expected so an agent does not conclude it hit a different
  product.
- The daily cap is stored as token-less atomic units; the "USDC" in the
  confirmation does not mean a USDT purchase is exempt or refused.
- This gateway's 402 is x402 v1; Celo's facilitator speaks v2.
- Paid response and poll response differ on `zone`; key on status fields.
- Observed latency for the paid leg and first `done`.

Closes #5, closes #9.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@olanrewajuakeem

Copy link
Copy Markdown

Reporter of #5 here — the egress rewrite is exactly right, and making the hang the headline rather than a clause is the important change. The 15–45s range matches what I measured: 28.95s wall clock on macOS for buy curl → paid response, with a cold npx --yes resolution included.

Two things I'd add, both about the hang:

1. The failure table has no row for "script hung past the lease." The new warning says the poll never reaches done — but every other row in that table answers "charged?", and this path doesn't appear at all. An agent that misses the warning pays, provisions, hangs for the full hour, and gets nothing. Is that refundable? What should it report? Right now the most expensive failure mode is the only one without an entry.

2. A per-call timeout still leaves one unguarded call able to consume the lease. Worth suggesting a bound on the whole script as well — e.g. prefixing with timeout 3000 — so a script that stalls exits while the lease still has time to return partial output, rather than being killed by expiry with nothing retained.

Both are cheap to document, and both turn a silent loss into a reported one.

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

Labels

None yet

Projects

None yet

2 participants