Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
88 changes: 88 additions & 0 deletions .github/workflows/verify-implementations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Verify Implementations

on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
plan01-rust:
name: Plan01 Rust Core DSP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run tests
working-directory: implementations/01-ultrasonic-data-transfer/core-dsp
run: cargo test --all-targets --all-features

plan02-go:
name: Plan02 Signaling Server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: Run tests
working-directory: implementations/02-nearby-connections/nearby-card-drop/signaling-server
run: go test ./...

plan03-rust:
name: Plan03 Fountain + Tools
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run fountain-core tests
working-directory: implementations/03-animated-qr-visual-handshake/fountain-core
run: cargo test --all-targets --all-features
- name: Build replay benchmark
working-directory: implementations/03-animated-qr-visual-handshake/tools/replay-benchmark
run: cargo build --release
- name: Run QR frame generator smoke
run: |
python3 implementations/03-animated-qr-visual-handshake/tools/qr-frame-generator/generate_frames.py \
--text "hello" --frame-size 3 --transfer-id test --output /tmp/qr_frames.txt
test -s /tmp/qr_frames.txt

plan04-go:
name: Plan04 Relayer Go
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: Run relayer unit tests
working-directory: implementations/04-web3-sbt-contacts/backend-relayer
run: go test ./...
- name: Run relayer HTTP e2e script
working-directory: implementations/04-web3-sbt-contacts
run: ./scripts/relayer_e2e.sh

plan04-solidity:
name: Plan04 Solidity Foundry
runs-on: ubuntu-latest
env:
FOUNDRY_PROFILE: ci
steps:
- uses: actions/checkout@v5
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Show forge version
run: forge --version
- name: Run forge build
working-directory: implementations/04-web3-sbt-contacts/contracts
run: forge build
- name: Run forge tests
working-directory: implementations/04-web3-sbt-contacts/contracts
run: forge test -vv
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
spec&expectations.md
/implementations/01-ultrasonic-data-transfer/core-dsp/target/debug
/implementations/01-ultrasonic-data-transfer/core-dsp/target
/implementations/03-animated-qr-visual-handshake/fountain-core/target
/implementations/02-nearby-connections/nearby-card-drop/signaling-server/signaling-server
/implementations/04-web3-sbt-contacts/backend-relayer/backend-relayer
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# XDevice-infocard

This repository now organizes four implementation directions for cross-platform business-card exchange.
Cross-platform business-card exchange initiatives with plan docs and implementation scaffolds.

## Plan Folders
## Current State (2026-05-07)
- Parallel multi-agent completion round finished.
- Coordinator verification passed for all runnable Rust/Go modules.
- CI/CD pipeline is in place for cross-plan checks, including Foundry Solidity tests on GitHub runners.

1. `plans/01-ultrasonic-data-transfer`
- Focus: Near-field ultrasonic transfer with shared Rust DSP core.
- Detailed plan: `plans/01-ultrasonic-data-transfer/IMPLEMENTATION_PLAN.md`
## Completion Docs
- `docs/PARALLEL_COMPLETION_PROGRESS.md`
- `docs/COMPLETION_REPORT.md`
- `docs/CI_CD_PIPELINE.md`
- `docs/plans/IMPLEMENTATION_DASHBOARD.md`

2. `plans/02-nearby-connections`
- Focus: Google Nearby Connections with Flutter + native bridges.
- Detailed plan: `plans/02-nearby-connections/IMPLEMENTATION_PLAN.md`
## Plan Docs
- Canonical plans: `docs/plans`
- Progress tracker: `docs/plans/PROGRESS_TRACKER.md`

3. `plans/03-animated-qr-visual-handshake`
- Focus: Animated QR streaming with Rust fountain-code recovery.
- Detailed plan: `plans/03-animated-qr-visual-handshake/IMPLEMENTATION_PLAN.md`
## Implementations
- `implementations/01-ultrasonic-data-transfer`
- `implementations/02-nearby-connections`
- `implementations/03-animated-qr-visual-handshake`
- `implementations/04-web3-sbt-contacts`

4. `plans/04-web3-sbt-contacts`
- Focus: Web3 SBT identity/contact graph with Go relayer.
- Detailed plan: `plans/04-web3-sbt-contacts/IMPLEMENTATION_PLAN.md`

## Source Note
The plan content is derived from `spec&expectations.md` and expanded into implementation-oriented execution documents.
## Source
Initial strategy and expectations are defined in `spec&expectations.md`.
19 changes: 19 additions & 0 deletions docs/AGENT_EXECUTION_STATUS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Agent Execution Status

Date: 2026-05-07
Coordinator: Main agent

## Objective
Complete remaining high-priority implementation tasks in parallel across all 4 plans, then verify and document outcomes.

## Worker Allocation
- Worker Plan 01: `implementations/01-ultrasonic-data-transfer`
- Worker Plan 02: `implementations/02-nearby-connections`
- Worker Plan 03: `implementations/03-animated-qr-visual-handshake`
- Worker Plan 04: `implementations/04-web3-sbt-contacts`

## Live Status
- Plan 01 worker: Completed (FSK-like modem + tests)
- Plan 02 worker: Completed (Flutter scaffold + bridge schema + signaling extensions)
- Plan 03 worker: Completed (frame generator + replay benchmark + tests)
- Plan 04 worker: Completed (EIP-712-like signable flow + tests)
41 changes: 41 additions & 0 deletions docs/CI_CD_PIPELINE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# CI/CD Pipeline

## Goal
Remove local-environment blockers by shifting verification to deterministic CI jobs.

## Workflow
- File: `.github/workflows/verify-implementations.yml`
- Triggers:
- `push` to `main`
- `pull_request`
- `workflow_dispatch`

## Jobs
1. `plan01-rust`
- Runs `cargo test` for `implementations/01-ultrasonic-data-transfer/core-dsp`.

2. `plan02-go`
- Runs `go test ./...` for signaling server.

3. `plan03-rust`
- Runs `cargo test` for `fountain-core`.
- Builds replay benchmark tool.
- Runs QR frame generator smoke check.

4. `plan04-go`
- Runs `go test ./...` for backend relayer.
- Runs bind-based relayer E2E script (`scripts/relayer_e2e.sh`) in GitHub runner.

5. `plan04-solidity`
- Installs Foundry with `foundry-rs/foundry-toolchain@v1`.
- Runs `forge build` and `forge test` for contracts.

## Local Fallback Scripts
- Solidity without local Foundry install:
- `implementations/04-web3-sbt-contacts/scripts/solidity_test_via_docker.sh`
- Relayer E2E without port binding:
- `implementations/04-web3-sbt-contacts/scripts/relayer_e2e_no_bind.sh`

## Blockers Addressed
- `forge/solc` missing locally: covered by CI Foundry job and Docker script.
- sandbox port-bind restriction locally: covered by CI bind-capable E2E and local no-bind fallback script.
59 changes: 59 additions & 0 deletions docs/COMPLETION_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Completion Report (Final Parallel Round)

Date: 2026-05-07
Coordinator: Main agent

## High-Level Result
All requested unfinished tasks were implemented concurrently where non-conflicting and then verified centrally.

## Plan 01 (Ultrasonic)
Completed in repo:
- FSK-like tone modem with selectable demodulation method (`Correlator` and `Goertzel`).
- Adaptive threshold/noise-floor handling.
- Extended tests for noise tolerance, corruption behavior, demod path consistency.
- UniFFI generation helper script + integration checklist docs.

Verification:
- `cargo test` PASS (14 tests).

## Plan 02 (Nearby)
Completed in repo:
- Flutter skeleton metadata/doc flow (`pubspec`, app/docs artifacts).
- Machine-readable bridge contract schema + matrix docs.
- Dart method-channel adapter stub aligned to contract.
- Signaling server lifecycle features: offer/answer/session polling/session delete, TTL expiry, cleanup endpoint + tests.

Verification:
- `go test ./...` PASS.

## Plan 03 (Visual/Fountain)
Completed in repo:
- Codec upgraded from single-parity to deterministic mixed-repair symbol strategy with peeling decode support.
- Added scanner/player contract docs and payload parser tool.
- Replay benchmark enhanced for multiple drop-rate recovery reporting.
- Added tests for multi-loss recovery and payload-end zero-byte correctness.

Verification:
- `cargo test` PASS (11 tests).

## Plan 04 (Web3/SBT)
Completed in repo:
- Deterministic EIP-712 digest utilities.
- RPC abstraction + mock/in-memory default and integration wiring in relayer.
- Stronger signable payload validation and submit flow checks.
- Expanded tests for digest determinism, validation failures, and RPC integration behavior.
- Foundry config/tests and CI path already added previously.

Verification:
- `go test ./...` PASS.

## CI/CD and Blocker Mitigation
Implemented:
- GitHub Actions workflow for cross-plan verification, including Foundry job.
- Docker fallback script for Solidity tests when local `forge/solc` absent.
- No-bind relayer verification script for sandbox environments.

## Remaining External Constraints (Not code gaps)
- Local execution of Solidity tests requires `forge/solc` installed (CI covers this path).
- Bind-based local HTTP E2E depends on environment permission to open listening ports.
- True production sign-off still requires physical iOS/Android device validation.
23 changes: 23 additions & 0 deletions docs/PARALLEL_COMPLETION_PROGRESS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Parallel Completion Progress

Date: 2026-05-07
Coordinator: Main agent

## Objective
Drive all remaining unfinished tasks to completion as far as technically feasible in-repo, using parallel non-conflicting workers.

## Worker Outcomes
- Plan 01 worker: Completed (Goertzel demod + adaptive threshold + UniFFI helper)
- Plan 02 worker: Completed (Flutter skeleton artifacts + bridge schema + signaling TTL/cleanup)
- Plan 03 worker: Completed (LT-like mixed repair symbols + peeling decode + tooling)
- Plan 04 worker: Completed (EIP-712 digest + RPC abstraction + integration tests)

## Coordinator Verification
- `implementations/01-ultrasonic-data-transfer/core-dsp`: `cargo test` PASS (14 passed)
- `implementations/02-nearby-connections/nearby-card-drop/signaling-server`: `go test ./...` PASS
- `implementations/03-animated-qr-visual-handshake/fountain-core`: `cargo test` PASS (11 passed)
- `implementations/04-web3-sbt-contacts/backend-relayer`: `go test ./...` PASS

## Notes
- This round completed all in-repo engineering tasks that were feasible without external hardware/network dependencies.
- Remaining gaps are execution-environment dependent (mobile device runtime verification, local forge availability, sandbox port-binding limits).
Loading
Loading