Remove native Polymarket integration - #107
Conversation
|
@josh-richardson Could you resolve conflicts so we can see the real changeset delta? Also, does this automatically install the Polymarket petal? If not, I think we should handle that as part of / before merging this PR, i.e. the ability to have a defined list of "pre-installed" Petals. |
37131ea to
4812c01
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes Bloom’s native Polymarket integration and replaces the default “Polymarket available out-of-the-box” experience with a pinned, pre-installed external Polymarket Petal provisioned during bloom init (and ensured before bloom serve). It also keeps the wallet [polymarket] policy schema for the external Petal while deleting native CLI/VFS/daemon/state/attestation paths.
Changes:
- Introduces a typed, pinned pre-installed Petal catalog (starting with Polymarket) and provisioning logic executed during init/serve.
- Removes the native
bloom-polymarketcrate and all first-party Polymarket CLI, VFS handler/mount/state, and signing/attestation plumbing. - Updates documentation and tests to reflect
/petals/polymarket/as the Polymarket surface and to enforce absence ofbloom polymarket//polymarket.
Reviewed changes
Copilot reviewed 56 out of 59 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| TESTING.md | Removes bloom-polymarket from testing examples. |
| README.md | Updates VFS surface docs to reference Polymarket via petals/polymarket/. |
| QUICKSTART.md | Removes native Polymarket CLI onboarding guidance; points to installed Petal docs. |
| EXAMPLES.md | Replaces native Polymarket walkthrough with Petal-based usage. |
| docs/specs/2026-07-20-preinstalled-polymarket-petal.md | Adds an implementation spec for pre-installed Petals + native Polymarket removal. |
| docs/polymarket-integration.md | Deletes the native Polymarket integration document. |
| docs/parity/VFS_CLI_PARITY_LEDGER.md | Reframes parity ledger as a historical snapshot and notes Petal supersession. |
| docs/architecture/Sealed Approvals.md | Updates Sealed Approval architecture text to be Petal-centric vs native Polymarket-specific. |
| docs/architecture/Interaction Modes.md | Updates interaction-mode examples to refer to installed Polymarket Petal under /petals/. |
| docs/architecture/Agent-native Documentation.md | Updates agent-facing documentation conventions to treat external Petal docs as authoritative. |
| crates/bloom/tests/cli.rs | Updates CLI tests for pre-installed opt-out behavior and for absence of polymarket subcommand. |
| crates/bloom/src/github_source.rs | Adds pinned pre-installed Petal catalog + provisioning/verification logic for init/serve. |
| crates/bloom/Cargo.toml | Drops bloom-polymarket dependency from the bloom crate. |
| crates/bloom-vfs/src/handlers/wallets.rs | Removes Polymarket-derived role addresses from addresses.json and related wiring/tests. |
| crates/bloom-vfs/src/handlers/outbox.rs | Removes Polymarket mention from outbox identity documentation. |
| crates/bloom-vfs/src/handlers/mod.rs | Removes the native Polymarket handler module/export. |
| crates/bloom-vfs/src/handlers/defi.rs | Removes Polymarket deposit-wallet receiver classification and related wiring/docs. |
| crates/bloom-vfs/src/docs/README.md | Updates VFS docs to include installed Petals and remove native Polymarket references. |
| crates/bloom-vfs/src/docs/examples.md | Updates examples to use /petals/polymarket/README.md instead of /polymarket. |
| crates/bloom-vfs/src/docs/agent-guidance.md | Updates agent guidance to treat Polymarket as an installed Petal surface. |
| crates/bloom-vfs/Cargo.toml | Drops bloom-polymarket dependency from bloom-vfs. |
| crates/bloom-proto/src/polymarket_policy.rs | Retains only the Polymarket wallet-policy schema (no native evaluation logic). |
| crates/bloom-proto/src/lib.rs | Stops re-exporting native Polymarket policy evaluator/types; keeps PolymarketPolicy. |
| crates/bloom-proto/src/hyperliquid_policy.rs | Removes doc coupling to the removed polymarket policy evaluator. |
| crates/bloom-proto/src/home.rs | Removes HomeDir::polymarket_dir() (native state directory). |
| crates/bloom-proto/src/defi_policy.rs | Removes Polymarket receiver-class variant and updates docs/tests accordingly. |
| crates/bloom-proto/src/config.rs | Removes [polymarket] runtime config; adds/validates [petals] preinstalled with legacy opt-out migration. |
| crates/bloom-proto/src/ceremony.rs | Removes Polymarket-specific ceremony intent kinds. |
| crates/bloom-proto/src/capability.rs | Removes Polymarket venue references from capability model. |
| crates/bloom-polymarket/src/wallet.rs | Deleted: native Polymarket wallet-call builders. |
| crates/bloom-polymarket/src/types.rs | Deleted: native Polymarket DTOs/domain types. |
| crates/bloom-polymarket/src/trade.rs | Deleted: native Polymarket trade primitives. |
| crates/bloom-polymarket/src/testutil.rs | Deleted: native Polymarket scripted HTTP test server. |
| crates/bloom-polymarket/src/signing.rs | Deleted: native Polymarket sealed-approval signing helpers. |
| crates/bloom-polymarket/src/signer.rs | Deleted: native Polymarket signing seam + header construction. |
| crates/bloom-polymarket/src/relayer.rs | Deleted: native Polymarket relayer client implementation. |
| crates/bloom-polymarket/src/lib.rs | Deleted: native Polymarket crate public API and error types. |
| crates/bloom-polymarket/src/gamma.rs | Deleted: native Gamma API client. |
| crates/bloom-polymarket/src/eip712.rs | Deleted: native EIP-712 typed data + contract constants. |
| crates/bloom-polymarket/src/data.rs | Deleted: native Data API client. |
| crates/bloom-polymarket/src/creds.rs | Deleted: native CLOB credential store. |
| crates/bloom-polymarket/src/ceremony.rs | Deleted: native Polymarket onboarding ceremony payload generator. |
| crates/bloom-polymarket/src/builder_creds.rs | Deleted: native builder API credential storage/types. |
| crates/bloom-polymarket/Cargo.toml | Deleted: native Polymarket crate manifest. |
| crates/bloom-mount/src/adapter.rs | Removes Polymarket path from mount adapter tests. |
| crates/bloom-daemon/src/lib.rs | Removes native Polymarket VFS mounting/wiring and related tests. |
| crates/bloom-daemon/src/ipc.rs | Removes Polymarket sealed-approval path handling and Polymarket-specific unlock intent logic/tests. |
| crates/bloom-daemon/Cargo.toml | Drops bloom-polymarket dependency from the daemon crate. |
| crates/bloom-auth-api/src/lib.rs | Removes first-party Polymarket attestation schema/constants and registry support. |
| Cargo.toml | Removes crates/bloom-polymarket from the workspace and workspace dependencies. |
| Cargo.lock | Removes bloom-polymarket entries and dependency edges. |
| .github/workflows/ci.yml | Removes Polymarket-related secrets and ignored-test package selection from CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f8d47d3f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6581785d21
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
bloom initand beforebloom serve.bloom-polymarketcrate,bloom polymarketCLI,/polymarketVFS handler, daemon mount/configuration, daemon-owned venue state, and first-party Polymarket attestation path.[polymarket]policy schema consumed by the external Petal.Why
The external Polymarket Petal now has parity through Bloom's generic HTTP, chain-read, storage, outbox, signing, and Sealed Approval host contracts. Retaining the native implementation would create two venue owners and two authority paths. The replacement must also be present by default, rather than requiring an undocumented manual install.
This branch was reconstructed directly on current
master. Work already squash-merged through the Petal-platform PR is no longer shown as new, so the changeset now reflects the real delta.Provisioning and migration
[petals] preinstalled = ["polymarket"].bloom initandbloom serveinstall the trusted repository at immutable commit1ffb267a1e1d4acd137c184806c20cc98d20a3f4.[petals] preinstalled = []is a persistent opt-out.[polymarket] enabled = falseconfigs retain that opt-out until an explicit newpetals.preinstalledlist is provided./petals/polymarket/; there is no native/polymarket/subtree orbloom polymarketCLI.Checks
cargo fmt --all -- --checkgit diff --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspace --all-targets --no-fail-fastcargo test --workspace --doc --no-fail-fastcargo build --release -p bloom --all-features --lockedChecklist
/petals/polymarket/