No Reviewers
Labels
Clear labels
area/ai-pipeline
area/auth
area/billing
area/correlation
area/discord
area/frontend
area/governance
area/growth
area/infra-deploy
area/legal
area/map
area/mqtt
area/node-ota
area/osint
area/recording-audio
area/sdr-radio
area/transcription
board
board:agenda
minutes:draft
minutes:final
role:ceo
role:cfo
role:cio
role:ciso
role:cmo
role:coo
role:cto
Scene/entity extraction, summarizer, AI providers, embeddings
AuthN/Z, roles, tenancy/org scoping, API keys, credentials
Plans, entitlements, AI spend accounting and caps
Incident correlation, linking, lifecycle, severity, corr_debug
Discord bot, radio bots, voice streams, bot tokens, webhooks
Web UI: Next.js app and the edge-node local dashboard
Board process, minutes, unattended runner, agent tooling
Go-to-market, outreach, cold email, discovery conversations
CI/CD, VM, registry, Firestore rules/indexes deploy, Terraform/Caddy
ToS, retention, licences/DAAs, CAN-SPAM, E&O, name suppression
Live map: pins, paths, tiles, legend, geocoding
Node-C2 MQTT, checkins, commands, node sweeper, dynsec
Node install, enrollment, OTA updater, image skew
External feeds: cameras, 511, ADS-B, AIS, outages, and their licences
Call capture, boundaries, PulseAudio, ring buffer, trimming, attribution
OP25 decode, SDR hardware/tuning, conventional, second SDR, mesh radio
STT, transcript correction, place verification, name accuracy
Board process: minutes and board-filed items
Needs board scoping at the next sitting; CEO removes the label once scoped
One exec pre-read, closed by CEO
CEO ruling; open until enacted
Filed by the CEO
Filed by the CFO
Filed by the CIO
Filed by the CISO
Filed by the CMO
Filed by the COO
Filed by the CTO
kind
behavior-bug
Wrong product behavior; the instrument reads it correctly
kind
measurement-bug
Corrupts the recording/instrument (debug data, evals, health checks), not behavior
priority
p0
Drop everything: prod broken, live exposure, or owner-ruled P0
priority
p1
Next up: blocks a gate, a customer, or core incident quality
priority
p2
Normal: real defect or planned work, schedule in turn
priority
p3
Low: minor, cosmetic, or someday
status
blocked
Waiting on an external party, spend, or another issue
status
in-progress
Branch or PR open against it
status
needs-decision
Waiting on an owner or board ruling before work
status
needs-info
Root cause or repro unknown; needs a reading first
type
bug
Something built is wrong: code, data, or a measurement
type
chore
Maintenance, refactor, tests, pinning, cleanup: no user-visible change
type
decision
A ruling to make or record: board minutes, owner calls, legal reviews
type
docs
Docs, runbooks, CLAUDE.md, skills, SOPs
type
feature
New capability or an extension of an existing one
type
security
Security, privacy, credential or tenant-isolation exposure
type
tracking
Tracker, checklist, initiative or punch-list spanning several changes
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: logan/server-26#216
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes server-26#203 and server-26#204. Companion edge PR: logan/node-26
feat/discord-system(node-26#25). Merge both together — this server no longer sends raw-tokendiscord_joincommands, and the new edge ignores them, so Discord radio is down between the two merges until the node takes its OTA update.What changed
c2-core
internal/discord_leases.py+internal/discord_streams.py(the WIP commit) wired in. Each token lease is a Firestore transaction: one node per token, one stream per (token, guild), a re-join reuses the lease.routers/discord.py:POST /discord/streams,GET /discord/streams/{id},POST /discord/guilds/{id}/stop,GET /discord/guilds/{id}/overview(service key or admin);PUT /discord/guilds/{id}/link(admin);GET /discord/node/{node}/tokens/{id}(the node's own key, and only the lease holder gets the token).nodes/{id}/discord/desiredcarries token ids, never token strings. C2 subscribes tonodes/+/discord/actual. A per-node publish lock keeps the retained list the newest one, and the reconciler retries publishes that failed (#204 item 3).seqthat dropped it and reports it logged out, or after the node has been offline forDISCORD_LEASE_OFFLINE_RELEASE_SECONDS(600). The sweeper and C2 startup no longer release leases./nodes/{id}/commandmapsdiscord_join/discord_leaveonto streams (node pinned).CommandPayload.preferred_token_idis now kept (#204 item 1)./tokens: the list is admin-only (#204 item 6). Tokens are validated on add against Discord'susers/@me(a 401 is refused) and getguild_ids/application_id/invite_url. NewPOST /tokens/{id}/refresh. Flush uses a transactional force-release and republishes desired state.discord_guilds. An unlinked guild falls back toDISCORD_UNLINKED_GUILD_ORG_ID(defaultfounding, which keeps today's deployment working). See #213.discord bot
/join,/leave,/statusand autocomplete are scoped to the calling guild's org./leavestops only this server's streams (optionalchannel)./joinand/leaverequire Manage Channels by default and can be reassigned under Integrations./joinedits its reply with the node's real result (connected, or an error such as "not in this server" with invite links). Added apersistentoption. Fixed the/helpcopy (no Icecast).Tests
552 passed, 3 warnings(baseline on main: 525 passed). That includes 27 new tests intests/test_discord_leases.py. They run real concurrent transactions againsttests/fake_firestore.py, an optimistic-commit fake that re-checks every read. A mutation check confirmed the race tests fail when conflict detection is removed.Not done
fs.transactional,collection.stream(transaction=)) is untested against the live SDK. Only the fake has run it./drb link) and no admin UI for streams/bots. The tokens page doesn't show the new fields yet. The non-admin systems-page token picker now gets 403.tg_filter) is still a phase-2 seam, always None.🤖 Generated with Claude Code
c2-core - discord_streams/discord_leases wired in: POST /discord/streams, POST /discord/guilds/{id}/stop, GET /discord/guilds/{id}/overview, GET /discord/streams/{id}, PUT /discord/guilds/{id}/link (admin), GET /discord/node/{node}/tokens/{id} (node key, lease holder only). - Retained nodes/{id}/discord/desired (token ids, never token strings), nodes/+/discord/actual subscribed and handled; per-node publish lock keeps the retained list the newest; failed publishes retried by the reconciler. - Tokens freed only after the node acks logout (or offline past discord_lease_offline_release_seconds) - sweeper and C2 startup no longer release leases. - /nodes/{id}/command discord_join/leave map onto streams; CommandPayload keeps preferred_token_id. /tokens: admin-only list, validate on add against Discord, refresh, flush via transactional force release. - Guild -> org via discord_guilds, unlinked guilds fall back to DISCORD_UNLINKED_GUILD_ORG_ID (default "founding"). - tests/fake_firestore.py: optimistic-transaction fake; 27 lease/race tests. discord bot - /join, /leave, /status, autocomplete scoped to the calling guild; /leave never touches another server; Manage Channels default permission; /join edits its reply with the node's real result; /help copy fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Adversarial review pushed
03ba7eaon this branch:reconcile_onceonly walked desired=on streams, so a token leftreleasingby/leavewhile its node was offline (or a deleted node) never returned to the pool until the node came back. It now sweeps leased tokens on nodes that are offline or deleted past the lease grace. For a deleted node, the grace is measured from its lastdiscord/actualreport.publish_desiredstampedrelease_seqafter building the list. A stop landing between the two could be freed by an ack for a list that still held the stream. It now stamps first.Added 3 regression tests, and each one fails on
a31a8df. c2-core suite: 555 passed.