Skip to content

wire gensyn axl decision gossip transport#22

Merged
AnkanMisra merged 1 commit intomainfrom
feat/gensyn-axl-gossip
May 3, 2026
Merged

wire gensyn axl decision gossip transport#22
AnkanMisra merged 1 commit intomainfrom
feat/gensyn-axl-gossip

Conversation

@AnkanMisra
Copy link
Copy Markdown
Owner

@AnkanMisra AnkanMisra commented May 3, 2026

Summary

  • Adds src/transport/axlGossip.ts (AxlGossipTransport) and src/transport/noopGossip.ts (NoopGossip) implementing a new GossipTransport trait. Every BLOCK decision is published to the local Gensyn AXL bridge node so co-operating ChainShield gates on other machines can react over the AXL mesh without a centralised relay.
  • Wires the transport into DecisionEngine via a new optional gossip?: GossipTransport option. The broadcast happens at the end of handleRemediation, after the playbook runner and notification channels, so the verdict and remediation are already settled when the mesh sees them.
  • Composition root in src/risk-gate/server.ts reads AXL_BASE_URL and falls back to NoopGossip when unset, so existing standalone deployments behave identically.
  • Soft-failure across the board: 5xx responses, network errors, and HTML error bodies are caught and logged via logger.warn. The risk gate never fails because AXL is offline.

Files

  • New: src/transport/axlGossip.ts, src/transport/noopGossip.ts, tests/axlGossip.test.ts
  • Changed: src/core/engine.ts, src/risk-gate/server.ts, .env.example, README.md, tests/engineRemediation.test.ts

Test plan

  • bun run typecheck:server (zero errors)
  • bun test (109 pass / 0 fail, 19 new expect calls across 8 new specs)
  • bun run build (server + astro static)
  • CI emoji scan locally (no banned bytes)
  • NoopGossip fallback verified: existing 99 specs still pass without configuring AXL_BASE_URL
  • Engine integration: gossip is called on BLOCK, never on ALLOW or REQUIRE_HUMAN_CONFIRMATION
  • Soft-failure: 5xx, network error, and HTML error bodies are logged but never thrown

Notes

  • Default endpoint is http://127.0.0.1:9002/api/v1/mcp/publish. The exact AXL HTTP path may need a one-line tweak when validated against a running node; the rest of the module (auth-less POST, JSON { topic, payload: { decision, policy } } body, soft-failure) is stable across the documented AXL surface.
  • The publish call is awaited so blocked decisions reach the mesh before the API response returns; because GossipTransport.broadcast never throws, this awaiting is safe.

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying chainshield with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2355889
Status: ✅  Deploy successful!
Preview URL: https://159447ac.chainshield.pages.dev
Branch Preview URL: https://feat-gensyn-axl-gossip.chainshield.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

Warning

Rate limit exceeded

@AnkanMisra has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 10 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b9659138-3c29-4321-ae44-e5b034743c11

📥 Commits

Reviewing files that changed from the base of the PR and between ee1b5ea and 2355889.

📒 Files selected for processing (8)
  • .env.example
  • README.md
  • src/core/engine.ts
  • src/risk-gate/server.ts
  • src/transport/axlGossip.ts
  • src/transport/noopGossip.ts
  • tests/axlGossip.test.ts
  • tests/engineRemediation.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/gensyn-axl-gossip

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 19 minutes and 10 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@AnkanMisra AnkanMisra merged commit 2cb681c into main May 3, 2026
3 checks passed
@AnkanMisra AnkanMisra deleted the feat/gensyn-axl-gossip branch May 3, 2026 12:52
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