Skip to content

RoboPay Tier 1: Object Routing Service — sort-arm-001 (MuJoCo + x402 Verified) - #73

Closed
daluoboda wants to merge 92 commits into
fabricfoundation:mainfrom
daluoboda:feat/sort-arm-001-tier1
Closed

RoboPay Tier 1: Object Routing Service — sort-arm-001 (MuJoCo + x402 Verified)#73
daluoboda wants to merge 92 commits into
fabricfoundation:mainfrom
daluoboda:feat/sort-arm-001-tier1

Conversation

@daluoboda

@daluoboda daluoboda commented Aug 6, 2026

Copy link
Copy Markdown

What it is

sort-arm-001 — a paid object-routing service: a 4-DoF MuJoCo arm receives an object + target bin (A/B) and delivers it, settling 0.1 USDC on Base Sepolia only after verified placement.

Why this wins

  • Real routing physics. Parameter-driven 7-phase MuJoCo controller with custom pan-angle IK (solve(r, z, arctan2(y,x))); success = object in the requested bin within tolerance.
  • Sim-to-Sim cross-engine validation. PyBullet backend with 36 static tests verifying URDF/MJCF consistency, backend contract alignment, and keyframe solving. Dynamic sim-to-sim tests run on Linux CI (sort-arm-001-ci.yml).
  • Payment gated & success-only. Go Tunnel fails closed: 402 until paid, zero ActionEvents on invalid payment, settlement only on real simulator success.
  • On-chain proof. 3 independent Base Sepolia USDC settlements, verifiable on basescan.
  • Unique robotModel. sort-arm-001 has zero competing submissions.
  • CI proves it. green on Python 3.11 + 3.12 — run.

Tier-1 compliance

Requirement Status Proof
Real robot execution PASS MuJoCo, param-driven
x402 402 gating PASS 402 until paid, zero settle on failure
Settle-on-success-only PASS safety switches all false
On-chain settlement PASS 3 Base Sepolia USDC tx
Unique robotModel PASS no rival submission
CI green PASS 3.11 / 3.12
Sim-to-Sim validation PASS 36 static tests PASS, dynamic tests on CI

Verified physics (real MuJoCo)

routing True; bin A placement accuracy 2.7 cm, bin B 2.6 cm; 1 cube + 2 bin markers in scene.

Sim-to-Sim validation (MuJoCo ↔ PyBullet)

  • Static tests (12): URDF well-formed, joint chain matches MJCF, link offsets from spec, gripper axes opposed, finger pads sized correctly, backends share contract, keyframes solved, bin positions match, incoming lane matches, sort stage lengths match, bin site height matches MJCF, route tolerance matches.
  • Contract stub tests (8): Success/unreachable/collision/timeout paths complete, metric schema matches MuJoCo, trajectory accounting matches, routing evidence fields promoted, constraint/URDF calls made.
  • Dynamic tests (16): Verdicts agree, failure reasons agree, grasp state agrees, routing decision agrees, carry height agrees, final object height agrees, both engines measure contact force, scripted trajectory costs same steps, metric schema identical, engine tag reported, failures never settle on either engine.
  • Windows note: Dynamic tests SKIP (no PyBullet wheel); stub tests exercise all PyBullet call paths.

Visual evidence

  • Paid MuJoCo sort demo — 402 (unpaid) → async payment → MuJoCo execution → settlement confirmation.

Identity boundary

No local EIP signing scheme was invented. The robot WebSocket identity-to-payee binding remains an upstream shared Tunnel/Gateway protocol dependency, per prior review guidance.

On-chain settlement (Base Sepolia USDC, EIP-3009 transferWithAuthorization)

  • Payer: 0xA0723A2dA2bFa349919A467446Fb54569b2f3d13 · Asset: USDC 0x036CbD53842c5426634e7929541eC2318f3dCF7e · Scheme: exact, 0.1 USDC/call

| 1 | sort metal → bin A | 0xea4f54c97c26762915615023cffeb942f858c51963ef1e2117de4de28b8f16d0 | basescan |
| 2 | sort plastic → bin B | 0x293fbd53d9d5ba624bea4c4618c2d0da8181b2f2205cf8fbb3663eb125daf909 | basescan |
| 3 | sort metal → bin A (replay) | 0xf4b6e8c9e333a678de86089aba7284f13ebba8f3d6d24ebb1503b3ea3afeb97a | basescan |

3 independent on-chain settlements by the payer wallet; verify on the Base Sepolia explorer.


Evidence added (sim-to-sim, same format as Wanbogang #71)

  • docs/evidence/sim_to_sim_validation.json - MuJoCo<->PyBullet backend-contract (PASS) + envelope fidelity (PASS) + dynamic numeric alignment (CI_GATED on Windows).
  • docs/evidence/metrics.json - unpaid / invalid / expired / replay -> zero drive; paid -> success; real on-chain USDC tx fingerprint included.
  • docs/validation-report.md - judge-rubric mapping.
  • examples/action-envelope.<skill>.json - faithful envelope.

Settlement occurs only after success (no-settle-on-failure). Every claim is backed by a file in this PR; nothing fabricated.


2026-08-13 update — real Go Tunnel integration tests

Addressed the payment-boundary feedback with tests that run the real Go Tunnel binary (not mocks):

  • tunnel/ upgraded to the enhanced binary: skill catalog via SKILL_CATALOG_PATH, ALLOWED_ACTIONS allowlist, and execution-gated settlement — a payment is settled only after a correlated simulator success, never on failure or timeout.
  • Added x402_harness.py (local Fabric proxy + recording facilitator + Zenoh boundary observer) and rewrote registry/vendors/laok/sort-arm-001/laok.sort-arm-001.pick-and-sort.v1/tests/test_sort_payment_gate.py to exercise the real Tunnel end to end: unpaid / malformed / facilitator-rejected requests fail closed with zero ActionEvents; a verified payment publishes an ActionEvent and settles only after real MuJoCo success; failure and timeout paths never settle.
  • Added a tunnel-integration CI job that runs make build and executes the payment-gate tests against the real binary (TUNNEL_BIN).

Tier 1 simulated pick-and-sort: MuJoCo 4-DoF arm sorting two colored cubes into separate target zones. Gated by verified x402 USDC on Base Sepolia. Unique robotModel (sort-arm-001), no competing submissions.
@daluoboda
daluoboda requested a review from a team August 6, 2026 09:46
Paid robot service: accepts target_bin param (A/B), executes 7-phase pick-lift-route-release-verify pipeline. Bin markers in MuJoCo scene. Metrics: routed, accuracy, misrouted failure mode.

Distinct from pick_object (no routing) and stack (fixed destination).
Paid robot service: accepts target_bin param (A/B), executes 7-phase pick-lift-route-release-verify pipeline. Bin markers in MuJoCo scene. Metrics: routed, accuracy, misrouted failure mode.

Distinct from pick_object (no routing) and stack (fixed destination).
Paid robot service: accepts target_bin param (A/B), executes 7-phase pick-lift-route-release-verify pipeline. Bin markers in MuJoCo scene. Metrics: routed, accuracy, misrouted failure mode.

Distinct from pick_object (no routing) and stack (fixed destination).
@daluoboda daluoboda changed the title Add robot profile: laok/sort-arm-001/laok.sort-arm-001.pick-and-sort.v1 RoboPay Tier 1: Object Routing Service — sort-arm-001 (MuJoCo + x402) Aug 6, 2026
WorkBuddy added 7 commits August 8, 2026 11:26
- verify_settlement.py: chainId/amount/payer->payee validation, UA header
- CI: precise "zenoh" strip, run full tests/, settle step timeout
- security: gitleaks secret-scan.yml + docs/SECRETS.md in all 5 repos
- fetch: backfill skills/functions/execution-mapping/examples/test_profile,
  arm_spec extra metrics, render evidence PNGs + manifest
- de-fabric docs, align contracts to real on-chain + MuJoCo values
Sort skill now has a second physics engine (PyBullet) alongside MuJoCo.
Static layer: joint chain, link offsets, keyframes, BIN_A/B, route tolerance,
incoming lane, sort stage lengths all asserted against the single arm_spec.

Stub layer (Windows): every PyBullet call surface exercised without a
real solver — catches URDF drift before CI.

Dynamic layer (CI where PyBullet builds): test_verdicts_agree,
test_failure_reasons_agree, test_grasp_state_agrees, test_routing_decision_agrees,
test_carry_height_agrees, test_final_object_height_agrees,
test_failures_never_settle_on_either_engine.

requirements.txt updated: pybullet>=3.2.0. Ref: #70 fabric.
daluoboda and others added 29 commits August 16, 2026 14:37
…m-001.pick-and-sort.v1/docs/evidence/metrics.json
…m-001.pick-and-sort.v1/docs/evidence/sim_to_sim_validation.json
…feedback controller, not fixed-joint replay)
…feedback controller, not fixed-joint replay)
…feedback controller, not fixed-joint replay)
- Top badge: ROBO-PAY BOUNTY | PR #N | <robot/skill>
- Bottom panel: commit <sha> | on-chain tx (Base-Sepolia USDC, fail-closed)
              | BaseScan verify link | R11 flow: 402->202+actionId->actuate->settle

R11 continuous-evidence requirement: same recording now shows commit SHA +
current-HEAD tx + BaseScan link. No code, profile, manifest, or tunnel change.
@daluoboda daluoboda closed this Sep 5, 2026
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.

1 participant