Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
b197c59
Refactor/maintainability (#4)
TeoSlayer Feb 9, 2026
e63eb80
Preserve trust pairs and handshake state through node lifecycle
teovl Feb 9, 2026
e1f8a5b
Update install script to detect existing installs
teovl Feb 9, 2026
d0b8948
Support bare node IDs in all CLI commands
teovl Feb 9, 2026
4046553
v1.2.0: Webhooks, tags, beacon performance, registry persistence hard…
teovl Feb 10, 2026
ae68ccf
Documentation website, trust graph dashboard, registry IP update
teovl Feb 11, 2026
e0df41c
Add Polo dashboard and docs site links to README
teovl Feb 11, 2026
08448cf
Autoscaling beacon cluster: gossip mesh, 3-tier relay, health endpoint
teovl Feb 11, 2026
67e91ff
Registry-based dynamic peer discovery for beacon cluster
teovl Feb 11, 2026
2a47704
Research paper: emergent social structures in 626-agent trust network
teovl Feb 11, 2026
dad7b81
Fix install script: handle release binary naming (daemon vs pilot-dae…
teovl Feb 11, 2026
7d468aa
Dashboard cleanup, live badges, website network stats
teovl Feb 17, 2026
09c6b8d
[ImgBot] Optimize images (#3)
imgbot[bot] Feb 17, 2026
bbd2946
Task execution capability: opt-in flag for agents to advertise task r…
teovl Feb 17, 2026
4c6f5db
Rename Go module to github.com/TeoSlayer/pilotprotocol
teovl Feb 17, 2026
301fba8
feat: implement task submit service (#6)
Alexgodoroja Feb 18, 2026
b99f4c8
Fix module imports, dashboard security, release target
teovl Feb 18, 2026
a049bc4
feat: add polo score and display total nodes in dashboard (#7)
Alexgodoroja Feb 27, 2026
4c54cc0
Remove coverage badge from README (#9)
TeoSlayer Feb 27, 2026
0bc42c7
feat: build python sdk for pilotprotocol (#10)
Alexgodoroja Mar 11, 2026
3a19774
Website redesign: glassmorphic navbar, plans page, blog shaders
teovl Mar 11, 2026
bb3e144
Add CI/CD workflow, fix gitignore, update Makefile paths
teovl Mar 13, 2026
626726f
Fix package-lock.json sync, add Python SDK to docs nav
teovl Mar 13, 2026
86b4af5
Increase CI coverage timeout to 120s
teovl Mar 13, 2026
fa78463
Fix flaky TestRateLimiterHighRate on macOS CI
teovl Mar 13, 2026
acd8c2b
Harden daemon: fix timer leaks, cap unbounded maps, guard conn ID ove…
teovl Mar 15, 2026
f82ecae
Expand test suite to 683 tests (from 283)
teovl Mar 15, 2026
93a2cc9
Add version negotiation, MTU, and nonce management to spec
teovl Mar 15, 2026
f3367a6
Harden SDK: cap read size in CGO bindings and Python client
teovl Mar 15, 2026
940b519
Add Node.js SDK with TypeScript bindings and CI
teovl Mar 15, 2026
ad3889c
Website: responsive design, Go SDK quickstart, Python SDK blog post
teovl Mar 15, 2026
0255c48
Add _obj/ to gitignore
teovl Mar 15, 2026
b54883d
Add IETF Internet-Draft links to README
teovl Mar 16, 2026
5e1ca68
Add demo video and use site-hosted install URL in README
teovl Mar 16, 2026
4f10649
Use GIF for README demo (GitHub strips video tags)
teovl Mar 16, 2026
aea8c0e
Website: IETF blog post, newsletter form, install URL update
teovl Mar 21, 2026
d6b016a
Add Python SDK blog banner (png source)
teovl Mar 21, 2026
bebc313
Enterprise features: plans rename, blog posts, banners, playground, P…
teovl Mar 23, 2026
dbca8c3
Restructure repository: consolidate assets, remove duplicates, organi…
teovl Mar 23, 2026
569569a
Add automated rendezvous deployment pipeline
teovl Mar 23, 2026
a9193ae
Fix DashboardNode missing PoloScore field
teovl Mar 23, 2026
0c612d6
[ImgBot] Optimize images (#11)
imgbot[bot] Mar 23, 2026
e6a8685
Rename deploy branch to deploy/rendezvous, fix Python SDK Go version
teovl Mar 23, 2026
44768fc
Narrow Python SDK publish trigger to sdk/python/ only
teovl Mar 23, 2026
c566a05
Narrow Python SDK publish trigger to sdk/python/ only
teovl Mar 23, 2026
effd506
Activate network primitives, SYN trust gate, hostname privacy
teovl Mar 23, 2026
38f3b51
Test coverage push: 72% → 76%
teovl Mar 24, 2026
df69aea
Test coverage push #2: 76% → 78%
teovl Mar 24, 2026
b24b3ff
Remove dead updatePoloScores, add nameserver cleanup
teovl Mar 24, 2026
a6bcf2e
Test coverage push #3: 78% → 79%
teovl Mar 24, 2026
97a214e
Test coverage push #4: 79% → 79.5%
teovl Mar 24, 2026
f98b274
Require email for daemon startup, persist in account file
teovl Mar 24, 2026
e0a8013
Merge branch 'enterprise/phase-1'
teovl Mar 24, 2026
79cfab4
Fix email feature: config loading, flag forwarding, IPC rename
teovl Mar 25, 2026
aa0a5fa
Merge branch 'enterprise/phase-1'
teovl Mar 25, 2026
2d7346c
Sync web/public/install.sh with root install.sh
teovl Mar 25, 2026
80923a6
Phase 1 security hardening: trust gate for datagrams, SYN ordering
teovl Mar 25, 2026
d52c256
Add network admin tooling: delete-network, admin-token on rendezvous
teovl Mar 25, 2026
11e3521
Merge branch 'enterprise/phase-1'
teovl Mar 25, 2026
810769e
Bump CI test timeout from 60s to 120s
teovl Mar 25, 2026
cbb85d7
Fix TempDir cleanup race causing macOS CI failures
teovl Mar 25, 2026
06592f6
Add blog post: Private Networks Now in Testing
teovl Mar 25, 2026
6a606d7
Enterprise Phase 2: audit trail, webhook reliability, invite consent,…
teovl Mar 27, 2026
6df120c
Enterprise Phase 3: security hardening, RBAC, policies, key lifecycle…
teovl Mar 27, 2026
2b9d63d
Add release workflow with integration harness, skip flaky CI tests
teovl Mar 27, 2026
45b8bc8
Support release candidate installs via PILOT_RC=1
teovl Mar 27, 2026
758c5b4
Add blog post: Dry Run Test Post
TeoSlayer Mar 27, 2026
b421163
Add blog auto-publish system: webhook, CI deploy, dynamic sitemap
teovl Mar 27, 2026
7779376
Add blog post: Multi-agent system networking guide: 86.7% failure fix
TeoSlayer Mar 28, 2026
49286bb
Remove dry run test blog post
teovl Mar 29, 2026
bdce5e6
Add blog post: Advanced network automation: 7 tips for secure AI systems
TeoSlayer Mar 29, 2026
72c2176
Add blog post: Top AI networking challenges for decentralized systems
TeoSlayer Mar 30, 2026
f463fe7
Add MCP and P2P landing pages with supporting blog posts
teovl Mar 31, 2026
cb03e89
Enterprise control plane: admin token bypass, audit ring buffer, RBAC…
teovl Mar 31, 2026
8561938
Add Solutions dropdown to navbar, remove Research and Playground
teovl Mar 31, 2026
6ddf545
Update navbar across all pages: Solutions dropdown, remove Research/P…
teovl Mar 31, 2026
d9ef546
Add audit logging for polo score operations and enterprise flag changes
teovl Mar 31, 2026
5c6e751
Add audit logging for re-registration and stale node reaping
teovl Mar 31, 2026
7dabff8
Enrich list_nodes with polo_score/tags/public, fix audit network_id e…
teovl Mar 31, 2026
ba8881e
Add enterprise flag toggle test and concurrent polo score test
teovl Mar 31, 2026
e44b7f2
Add admin node management test: verify all 5 admin-token bypass paths
teovl Mar 31, 2026
c9b077b
Add audit log persistence across registry restarts
teovl Mar 31, 2026
b574ab5
Add admin-token bypass for deregister, enabling console node removal
teovl Mar 31, 2026
f422b59
Fix enterprise data loss on replication failover
teovl Mar 31, 2026
e7e99a9
Enrich stale reap audit context, add member ops and enterprise toggle…
teovl Mar 31, 2026
c9fd219
Enforce key expiry on heartbeat, enrich delete network audit
teovl Mar 31, 2026
bd3c694
Add invite cleanup on delete, clear key expiry, polo score bounds
teovl Mar 31, 2026
ea6055a
Add replication token validation test and list_nodes enriched fields …
teovl Mar 31, 2026
ab126a4
Extend per-network admin token test coverage
teovl Mar 31, 2026
e90a6f4
Add invite TTL expiry, enterprise toggle RBAC init, edge case tests
teovl Mar 31, 2026
160b611
Clean up invites on leave/kick, enrich audit with old/new values
teovl Mar 31, 2026
c9c30dc
Clean up enterprise state on deregister, test key rotation expiry
teovl Mar 31, 2026
5f7556f
Add ownership transfer handler with enterprise gating
teovl Mar 31, 2026
0561512
Add beacon audit, expand standby whitelist, chain transfer + capacity…
teovl Mar 31, 2026
6c1c257
Add edge case tests for RBAC promote/demote, SetTaskExec admin bypass
teovl Mar 31, 2026
8143d53
Enrich audit trail with old/new values for tags, task_exec, key expir…
teovl Mar 31, 2026
4fceebf
Add tag deduplication, expand error passthrough, edge case tests
teovl Mar 31, 2026
7ff31a9
Add enterprise state persistence test
teovl Mar 31, 2026
9b7d986
Add node ID overflow guard, max_members boundary validation, concurre…
teovl Mar 31, 2026
14f5e58
Add input validation: self-invite, description/ports limits, transfer…
teovl Mar 31, 2026
f5c54de
Expose enterprise policy in list_networks, add listing verification t…
teovl Mar 31, 2026
6c02907
Expand error passthrough, enrich kick audit with role, add error tests
teovl Mar 31, 2026
9ffdd32
Fix TOCTOU in invite handlers, reject fractional ports, add security …
teovl Mar 31, 2026
0e4acd8
Block owner from leaving network, clean RBAC on enterprise disable
teovl Mar 31, 2026
1359a71
Add port deduplication in policy, transfer-to-member and non-enterpri…
teovl Mar 31, 2026
cf972ce
Add hostname collision, validation, and node-ops-on-nonexistent tests
teovl Mar 31, 2026
76428bb
Add blog post: Decentralized communication protocols for AI developers
TeoSlayer Mar 31, 2026
1d68433
Revoke kicked member outgoing invites, cap key expiry at 10 years
teovl Mar 31, 2026
6e9d33f
Fix timing attack in join token, add auth edge case tests
teovl Mar 31, 2026
0d4b84d
Add backbone network protection for rename and enterprise operations
teovl Mar 31, 2026
e7dc558
Block joining backbone network, validate max_members bounds
teovl Mar 31, 2026
9e61aef
Revoke outgoing invites on deregister and leave-network
teovl Mar 31, 2026
f513f07
Reorder backbone check before RBAC in delete-network, add cleanup tests
teovl Mar 31, 2026
f85cb0b
Add created timestamp to list_networks, test policy port persistence
teovl Mar 31, 2026
5b6f238
Add concurrent enterprise operations stress test and self-kick test
teovl Mar 31, 2026
00e9d3b
Fix invite consumed before capacity check in handleRespondInvite
teovl Mar 31, 2026
e13f533
Add enterprise Prometheus metrics: networks, invites, RBAC, policy, keys
teovl Mar 31, 2026
44449cc
Add registry webhook dispatcher for audit event integration
teovl Mar 31, 2026
9f990e7
Add external identity integration via webhook verification
teovl Mar 31, 2026
bb456dc
Add enterprise CLI commands to pilotctl
teovl Mar 31, 2026
8713c05
Add enterprise provisioning, audit export, and IDP configuration
teovl Mar 31, 2026
b071eae
Add directory sync, blueprint persistence, and audit export
teovl Mar 31, 2026
9c8fae5
Add per-network Prometheus metrics, webhook DLQ, and enterprise statu…
teovl Mar 31, 2026
4eb8e48
Add 11 TDD integration tests for enterprise subsystems
teovl Mar 31, 2026
2da591b
Add built-in OIDC JWT validation and tighten integration tests
teovl Mar 31, 2026
c642485
Fix Solutions dropdown: add invisible hover bridge over gap
teovl Mar 31, 2026
bea6b31
Add RS256 JWT verification, JWKS caching, and ValidateToken client me…
teovl Mar 31, 2026
192162a
Remove networks from public dashboard
teovl Mar 31, 2026
4f7a2d1
Add missing blog banners for MCP and P2P posts
teovl Mar 31, 2026
0479ea8
Fix critical enterprise audit findings
teovl Mar 31, 2026
56844fc
docs: update, improve and simplify docs
Mar 31, 2026
f99e6d4
Add blog post: AI networking terminology explained: A2A, MCP, ANP pro…
TeoSlayer Apr 1, 2026
5b3823d
Merge pull request #55 from TeoSlayer/docs/web
TeoSlayer Apr 1, 2026
c4cfd57
Add blog post: Secure network infrastructure for AI agents: A practic…
TeoSlayer Apr 2, 2026
5b26457
[ImgBot] Optimize images
ImgBotApp Apr 2, 2026
1c94b4f
Add enterprise documentation section, update pricing, and fix navigation
teovl Apr 2, 2026
94d85d7
blog: add blog about scriptorium
Apr 3, 2026
c708b76
docs: update gateway docs
Apr 3, 2026
91922f2
Merge pull request #56 from TeoSlayer/imgbot
TeoSlayer Apr 3, 2026
a270e30
Merge pull request #57 from TeoSlayer/web/scriptorium
TeoSlayer Apr 3, 2026
0250a6f
Merge branch 'main' of github.com:TeoSlayer/pilotprotocol
teovl Apr 3, 2026
e01c541
Add blog post: What is protocol overlay? Fundamentals and practical i…
TeoSlayer Apr 3, 2026
69e329e
Add blog post: Decentralized networking: P2P solutions for AI archite…
TeoSlayer Apr 4, 2026
d68c433
Add blog post: Protocol wrapping for secure peer-to-peer AI systems
TeoSlayer Apr 5, 2026
5c4dbbb
Merge branch 'main' of github.com:TeoSlayer/pilotprotocol
teovl Apr 6, 2026
a1cad78
fix: add contact us section (#59)
Alexgodoroja Apr 6, 2026
0096548
Update homepage blog grid, fix corrupted UTF-8 descriptions, expand C…
teovl Apr 6, 2026
4e804c0
Merge branch 'main' of github.com:TeoSlayer/pilotprotocol
teovl Apr 6, 2026
56158c6
fix: point to correct email (#60)
Alexgodoroja Apr 6, 2026
ac571f8
fix: fix slack invite link (#61)
Alexgodoroja Apr 6, 2026
ef98617
Add blog post: Top encrypted tunnel advantages for P2P AI networks
TeoSlayer Apr 6, 2026
64c2780
Update IETF Internet-Drafts to revision 01
teovl Apr 6, 2026
de18185
Merge branch 'main' of github.com:TeoSlayer/pilotprotocol
teovl Apr 6, 2026
680327f
Fix IETF Makefile: preserve XML intermediates across builds
teovl Apr 6, 2026
26451dd
Add IETF revision 01 blog post, Homebrew install method
teovl Apr 6, 2026
a0f9270
Regenerate IETF revision 01 blog banner with current date
teovl Apr 6, 2026
f27ac3f
Add blog post: Overlay networking for automation: Secure AI agent sol…
TeoSlayer Apr 7, 2026
7180abb
Add blog post: Secure communication protocols for distributed AI systems
TeoSlayer Apr 8, 2026
2005c89
Ignore graph server artifacts, MCP config, survey outputs, and epheme…
teovl Apr 8, 2026
db0181a
Add Skill Zoo page, Homebrew install tab, migrate SKILLS.md to Astro
teovl Apr 8, 2026
97381fe
Add programmable policy engine for network governance
teovl Apr 8, 2026
e26efce
Fix ClawHub URL in Skill Zoo page to clawhub.ai/teoslayer
teovl Apr 8, 2026
fbb867f
Add Skill Zoo link to homepage navbar and footer
teovl Apr 8, 2026
9ad069b
Add Setups page, navigation links, and CI auto-deploy trigger
teovl Apr 9, 2026
7a89949
Add clickable skill pills and workflow section to Setups page
teovl Apr 9, 2026
b63b56e
Document setup manifests in configuration docs
teovl Apr 9, 2026
2065ea9
Add install command and ClawHub/Source links to Setups page
teovl Apr 9, 2026
0250455
Add member tags, network scaling, and webhook reliability improvements
teovl Apr 9, 2026
b14a84b
Add version support to daemon, gateway, and pilotctl
teovl Apr 9, 2026
9eff50e
Optimize test suite: 710s to under 50s
teovl Apr 9, 2026
8e13d4b
Update website: docs refresh, remove playground and plans pages
teovl Apr 9, 2026
12be2cb
Add binary protocol, WAL, member tags tests, Go SDK docs, and plans page
teovl Apr 9, 2026
43c3daa
Add data-exchange network policy and multi-network stream fix
teovl Apr 9, 2026
14c2514
Update website: navbar, topbar, and page styling tweaks
teovl Apr 9, 2026
c7c95a2
Add network memberships to pilotctl info output
teovl Apr 9, 2026
1094d3e
Implement feature agents (#62)
Alexgodoroja Apr 9, 2026
df10c1f
Feature/service agents (#63)
Alexgodoroja Apr 9, 2026
4102371
Add auto-updater sidecar, version reporting, network sync, and IPv6 fix
teovl Apr 9, 2026
ff5f32d
Add auto-updater to all install channels and simplify dashboard
teovl Apr 9, 2026
19bce8a
Restrict auto-updater to client binaries only
teovl Apr 9, 2026
ebe4240
Fix CI: update tests for simplified dashboard, fix Node SDK publish
teovl Apr 9, 2026
c1fd010
Fix badge test: remove tags and task-executors badges
teovl Apr 9, 2026
b607fe0
Add updater to CI build step
teovl Apr 9, 2026
e88a03b
Add workflow to auto-update Homebrew formula on release
teovl Apr 9, 2026
5cf8311
Add per-network dashboard stats with token authentication
teovl Apr 9, 2026
4264a34
Fix 8 resource exhaustion vulnerabilities (security phase 2)
teovl Apr 9, 2026
9bff152
Update README: test count 845 → 1047, remove stale tags badge
teovl Apr 9, 2026
315a8e6
Remove per-IP rate limiting from registry
teovl Apr 9, 2026
cb76a84
Clean up tracked files and update stale references
teovl Apr 9, 2026
a857cb4
Publish SDKs only on release, not on every commit
teovl Apr 9, 2026
0bfc0bb
Add per-network charts to dashboard and fix stats collector startup race
teovl Apr 9, 2026
ce669f1
Remove tui.py and move data-exchange-policy into configs/networks
teovl Apr 9, 2026
1eb1624
fix: remove command wrappers, add feedback service agent and refactor…
Alexgodoroja Apr 10, 2026
5eae9f6
Fix beacon TTL reaping too aggressively during reconnection
teovl Apr 9, 2026
b5eb53a
Fix tunnel key exchange stale cache, LAN dual-stack detection, and da…
teovl Apr 10, 2026
4aee186
Update per-network dashboard charts and stats collector
teovl Apr 10, 2026
d8ac9e5
Add blog post: Network tunnels in AI: Secure comms for autonomous agents
TeoSlayer Apr 10, 2026
ad1e6d9
Add trust decay policy engine and network provisioning CI
teovl Apr 11, 2026
4df6c1b
Add blog post: Understanding autonomous agent networking for distribu…
TeoSlayer Apr 11, 2026
767db6c
blog: replace service agent blog
Apr 12, 2026
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
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: "Pilot Protocol CodeQL config"

query-filters:
# False positive: DialTLSPinned uses InsecureSkipVerify with a
# VerifyPeerCertificate callback that enforces SHA-256 cert pinning,
# which is strictly stronger than CA-based trust.
- exclude:
id: go/disabled-certificate-check
116 changes: 116 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# GitHub Actions Workflows

This directory contains CI/CD workflows for the Pilot Protocol project.

## Workflow Overview

```mermaid
graph TD
A[Push to main/build/**] --> B[Tests Workflow]
B --> C[Unit Tests]
C --> D[Integration Tests]
D --> E[Test Summary]
E -->|Success| F[Publish Python SDK]
E -->|Failure| G[Stop - No Publish]
F --> H{Environment}
H -->|main branch| I[Publish to PyPI]
H -->|build/** branch| J[Publish to TestPyPI]
```

## Workflows

### 1. tests.yml (Tests)
**Triggers:** Push to `main`, `build/**`, `docs/**`, PRs to `main`

**Jobs:**
- **unit-tests**: Runs Go unit tests (`./tests/...`)
- Generates coverage report
- Uploads coverage artifact
- Timeout: 5 minutes

- **integration-tests**: Runs Docker integration tests
- Depends on: unit-tests
- Runs CLI tests (21 tests)
- Runs Python SDK tests (34 tests)
- Timeout: 10 minutes

- **test-summary**: Aggregates results
- Depends on: unit-tests, integration-tests
- Fails if any test suite fails
- Displays summary in GitHub UI

**Total Tests:** 55+ (Go unit tests + 21 CLI + 34 SDK integration tests)

### 2. publish-python-sdk.yml (Build and Publish Python SDK)
**Triggers:**
- Manual workflow dispatch
- Automatic after "Tests" workflow completes (on `main` or `build/**`)

**Dependencies:**
- ⚠️ **Requires "Tests" workflow to pass** before publishing
- Will NOT publish if any tests fail

**Jobs:**
- **check-tests**: Validates test workflow passed
- **setup**: Determines environment (production vs test)
- **build-wheels**: Builds for Linux and macOS
- **publish**: Publishes to PyPI or TestPyPI
- **test-install**: Verifies installation works

**Behavior:**
- `main` branch → Production PyPI
- `build/**` branches → TestPyPI
- Manual dispatch → Choose environment

### 3. codeql.yml (Security Analysis)
**Triggers:** Push to `main`, PRs, weekly schedule

**Purpose:** Security scanning using GitHub CodeQL

## Cost Information

✅ **All workflows use FREE GitHub-hosted runners for public repos:**
- `ubuntu-latest`: FREE
- `macos-latest`: FREE

**Total Cost: $0/month**

## Testing Locally

```bash
# Run all tests
make test

# Run integration tests only
cd tests/integration && make test

# Run unit tests only
go test -v ./tests/...
```

## Workflow Dependencies

```
Tests Workflow (tests.yml)
├─ Unit Tests (Go)
├─ Integration Tests (Docker: CLI + SDK)
└─ Test Summary
└─ (on success) triggers →
Publish Python SDK (publish-python-sdk.yml)
├─ Build Wheels
├─ Publish to PyPI/TestPyPI
└─ Verify Installation
```

## Key Features

1. **Test-First Publishing**: SDK only publishes after ALL tests pass
2. **Multi-Platform**: Builds Linux and macOS wheels
3. **Coverage Reports**: Automatic coverage generation and artifact upload
4. **Environment Safety**: Test environment (TestPyPI) for `build/**` branches
5. **Comprehensive Testing**: Unit + Integration (CLI + SDK) tests
6. **Free Runners**: Zero cost for public repository
152 changes: 152 additions & 0 deletions .github/workflows/apply-networks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Apply Network Configs

on:
push:
branches: [main]
paths:
- 'configs/networks/*.json'
workflow_dispatch:

concurrency:
group: apply-networks
cancel-in-progress: false

env:
PILOT_REGISTRY: "34.71.57.205:9000"

jobs:
detect:
name: Detect changes
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.diff.outputs.changed }}
deleted: ${{ steps.diff.outputs.deleted }}
has_changes: ${{ steps.diff.outputs.has_changes }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Detect changed and deleted configs
id: diff
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
# Manual run: apply all existing configs, no deletes
CHANGED=$(find configs/networks -name '*.json' | jq -R -s -c 'split("\n") | map(select(length > 0))')
DELETED="[]"
else
CHANGED=$(git diff --name-only --diff-filter=ACMR HEAD~1 HEAD -- 'configs/networks/*.json' | jq -R -s -c 'split("\n") | map(select(length > 0))')
DELETED=$(git diff --name-only --diff-filter=D HEAD~1 HEAD -- 'configs/networks/*.json' | jq -R -s -c 'split("\n") | map(select(length > 0))')
fi
echo "changed=$CHANGED" >> "$GITHUB_OUTPUT"
echo "deleted=$DELETED" >> "$GITHUB_OUTPUT"
if [ "$CHANGED" = "[]" ] && [ "$DELETED" = "[]" ]; then
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
echo "has_changes=true" >> "$GITHUB_OUTPUT"
fi
echo "Changed: $CHANGED"
echo "Deleted: $DELETED"

apply:
name: Apply
needs: detect
if: needs.detect.outputs.has_changes == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Build pilotctl
run: CGO_ENABLED=0 go build -o pilotctl ./cmd/pilotctl/

- name: Validate configs
if: fromJSON(needs.detect.outputs.changed)[0] != null
run: |
for f in ${{ join(fromJSON(needs.detect.outputs.changed), ' ') }}; do
echo "Validating $f..."
./pilotctl policy validate --file <(jq '.expr_policy' "$f") || {
echo "::error::Validation failed for $f"
exit 1
}
done

- name: Apply changed configs
if: fromJSON(needs.detect.outputs.changed)[0] != null
env:
PILOT_ADMIN_TOKEN: ${{ secrets.PILOT_ADMIN_TOKEN }}
run: |
FAILED=0
for f in ${{ join(fromJSON(needs.detect.outputs.changed), ' ') }}; do
NAME=$(jq -r '.name' "$f")
echo "Applying $f (network: $NAME)..."
if ./pilotctl provision "$f" -json; then
echo "Applied $NAME"
else
echo "::error::Failed to apply $f"
FAILED=1
fi
done
if [ "$FAILED" = "1" ]; then
exit 1
fi

- name: Delete removed networks
if: fromJSON(needs.detect.outputs.deleted)[0] != null
env:
PILOT_ADMIN_TOKEN: ${{ secrets.PILOT_ADMIN_TOKEN }}
run: |
FAILED=0
for f in ${{ join(fromJSON(needs.detect.outputs.deleted), ' ') }}; do
# Recover the name from the deleted file in the previous commit
NAME=$(git show HEAD~1:"$f" | jq -r '.name')
if [ -z "$NAME" ] || [ "$NAME" = "null" ]; then
echo "::warning::Could not extract name from deleted $f, skipping"
continue
fi
echo "Deleting network $NAME (from $f)..."
if ./pilotctl deprovision "$NAME" -json; then
echo "Deleted $NAME"
else
echo "::error::Failed to delete network $NAME"
FAILED=1
fi
done
if [ "$FAILED" = "1" ]; then
exit 1
fi

- name: Summary
if: always()
run: |
echo "## Apply Network Configs" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"

CHANGED='${{ needs.detect.outputs.changed }}'
DELETED='${{ needs.detect.outputs.deleted }}'

if [ "$CHANGED" != "[]" ]; then
echo "**Applied:**" >> "$GITHUB_STEP_SUMMARY"
echo "$CHANGED" | jq -r '.[]' | while read -r f; do
if [ -f "$f" ]; then
NAME=$(jq -r '.name' "$f")
echo "- \`$NAME\` ($f)" >> "$GITHUB_STEP_SUMMARY"
fi
done
fi

if [ "$DELETED" != "[]" ]; then
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "**Deleted:**" >> "$GITHUB_STEP_SUMMARY"
echo "$DELETED" | jq -r '.[]' | while read -r f; do
echo "- $f" >> "$GITHUB_STEP_SUMMARY"
done
fi

echo "" >> "$GITHUB_STEP_SUMMARY"
echo "**Triggered by:** ${{ github.actor }}" >> "$GITHUB_STEP_SUMMARY"
83 changes: 83 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI

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

jobs:
go:
name: Go (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Vet
run: go vet ./...

- name: Build
run: |
go build ./cmd/daemon
go build ./cmd/registry
go build ./cmd/beacon
go build ./cmd/rendezvous
go build ./cmd/pilotctl
go build ./cmd/nameserver
go build ./cmd/gateway
go build ./cmd/updater

- name: Test
run: go test -parallel 4 -count=1 -timeout 120s ./tests/ ./pkg/beacon/

- name: Coverage
if: matrix.os == 'ubuntu-latest'
run: |
cd tests && go test -parallel 4 -count=1 -coverprofile=coverage.out -covermode=atomic -timeout 120s
go tool cover -func=coverage.out | tail -1

website:
name: Website
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: web/package-lock.json

- name: Install
run: npm ci

- name: Build
run: npm run build

node-sdk:
name: Node SDK
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/node
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 22

- run: npm ci
- run: npm run build
- run: npm test
29 changes: 29 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "CodeQL"

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 6 * * 1" # weekly, Monday 6 AM UTC

jobs:
analyze:
name: Analyze Go
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read

steps:
- uses: actions/checkout@v4

- uses: github/codeql-action/init@v3
with:
languages: go
config-file: ./.github/codeql/codeql-config.yml

- uses: github/codeql-action/autobuild@v3

- uses: github/codeql-action/analyze@v3
Loading
Loading