Skip to content

Remove native Polymarket integration - #107

Merged
josh-richardson merged 9 commits into
masterfrom
feat/remove-polymarket-native
Jul 21, 2026
Merged

Remove native Polymarket integration#107
josh-richardson merged 9 commits into
masterfrom
feat/remove-polymarket-native

Conversation

@josh-richardson

@josh-richardson josh-richardson commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a typed, pinned list of pre-installed Petals, with Polymarket as the default.
  • Provision configured pre-installed Petals during bloom init and before bloom serve.
  • Delete the duplicate native bloom-polymarket crate, bloom polymarket CLI, /polymarket VFS handler, daemon mount/configuration, daemon-owned venue state, and first-party Polymarket attestation path.
  • Keep the wallet [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

  • Fresh defaults use [petals] preinstalled = ["polymarket"].
  • bloom init and bloom serve install the trusted repository at immutable commit 1ffb267a1e1d4acd137c184806c20cc98d20a3f4.
  • Existing matching provenance is retained; conflicting ownership, source, commit, or package provenance fails closed without overwrite.
  • [petals] preinstalled = [] is a persistent opt-out.
  • Existing [polymarket] enabled = false configs retain that opt-out until an explicit new petals.preinstalled list is provided.
  • Polymarket is exposed at /petals/polymarket/; there is no native /polymarket/ subtree or bloom polymarket CLI.

Checks

  • cargo fmt --all -- --check
  • git diff --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace --all-targets --no-fail-fast
  • cargo test --workspace --doc --no-fail-fast
  • cargo build --release -p bloom --all-features --locked
  • ignored live source-contract test against the exact pinned Polymarket commit, including clone, build, install, provenance, and route dispatch

Checklist

  • Default, explicit opt-out, legacy opt-out migration, validation, provenance mismatch, and idempotency coverage
  • Native CLI and VFS absence covered
  • Wallet Polymarket policy retained
  • Active user, agent, architecture, testing, and CI documentation updated to /petals/polymarket/
  • Generic Petal Sealed Approval and host-signing invariants retained; venue-specific authority removed

Base automatically changed from feat/local-petal-plugins to master July 16, 2026 14:27
@GavinPacini

Copy link
Copy Markdown
Contributor

@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.

@josh-richardson
josh-richardson force-pushed the feat/remove-polymarket-native branch from 37131ea to 4812c01 Compare July 20, 2026 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-polymarket crate 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 of bloom 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.

Comment thread crates/bloom-vfs/src/docs/README.md
Comment thread README.md Outdated
@josh-richardson
josh-richardson marked this pull request as ready for review July 21, 2026 09:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/bloom/src/main.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/bloom-vfs/src/docs/README.md
@josh-richardson
josh-richardson merged commit 177342b into master Jul 21, 2026
10 checks passed
@josh-richardson
josh-richardson deleted the feat/remove-polymarket-native branch July 21, 2026 11:46
@josh-richardson josh-richardson mentioned this pull request Jul 21, 2026
21 tasks
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.

3 participants