Adds the Node strfry write policies used by the new public submission relay and by the approved-content sync on the members relay, for raucao/marco#97.
submission-policy.mjs keeps the submission relay open to all authors while applying the usual gates: a kind allowlist, content and tag bounds, per-IP and per-author token buckets, a short-window content dedupe, and a hellthread limit. It does no membership checks and no media analysis.
sync-policy.mjs is fail-closed. It accepts only events that arrived through strfry sync from the exact staging relay URL, with an allowed kind; everything else, including a wrong source type or an unset STAGING_RELAY_URL, is rejected and logged with observed-vs-expected source information.
Includes node:test coverage for both policies and a README documenting the environment variables and how strfry invokes them. The existing Deno policies (strfry-policy.ts, ldap-policy.ts, strfry-sync.ts) are untouched.
Note for the deployment workflow: chef fetches these files from the live branch, so master must be merged into live before the submission relay or the approved sync is converged.
Adds the Node strfry write policies used by the new public submission relay and by the approved-content sync on the members relay, for raucao/marco#97.
`submission-policy.mjs` keeps the submission relay open to all authors while applying the usual gates: a kind allowlist, content and tag bounds, per-IP and per-author token buckets, a short-window content dedupe, and a hellthread limit. It does no membership checks and no media analysis.
`sync-policy.mjs` is fail-closed. It accepts only events that arrived through `strfry sync` from the exact staging relay URL, with an allowed kind; everything else, including a wrong source type or an unset `STAGING_RELAY_URL`, is rejected and logged with observed-vs-expected source information.
Includes `node:test` coverage for both policies and a README documenting the environment variables and how strfry invokes them. The existing Deno policies (`strfry-policy.ts`, `ldap-policy.ts`, `strfry-sync.ts`) are untouched.
Note for the deployment workflow: chef fetches these files from the `live` branch, so `master` must be merged into `live` before the submission relay or the approved sync is converged.
Adds the Node write policies used by the new public submission relay and by
the approved-content sync on the members relay, for raucao/marco#97.
submission-policy.mjs keeps the submission relay open to all authors while
applying the usual gates: a kind allowlist, content and tag bounds, per-IP and
per-author token buckets, a short-window content dedupe, and a hellthread
limit. It does not do membership checks or media analysis.
sync-policy.mjs is fail-closed: it accepts only events that arrived through
strfry sync from the exact staging relay URL, with an allowed kind. Everything
else, including a wrong source type or an unset STAGING_RELAY_URL, is rejected
and logged with observed-vs-expected source information.
Includes node:test coverage for both policies and a README documenting the
environment variables and how strfry invokes them. The existing Deno policies
are untouched.
Note: chef fetches these files from the live branch, so master must be merged
into live before the submission relay or approved sync is converged.
The member bridge on the production relay is a strfry router stream group (dir = "down") that subscribes to the local submission relay and writes member-authored events into the production database. This policy is its pluginDown: it reuses ldap-policy.ts and accepts an event only when its author is an LDAP member (or a whitelisted pubkey).
Unlike strfry-policy.ts it does no hellthread/anti-duplication work and opens no Deno KV store, so it runs alongside the relay's own policy process without shared state.
Refs raucao/marco#97, kosmos/chef#705.
Drop the kind allowlist and event well-formedness checks from the
approved-content sync policy; content gating lives in the other
policies. The policy now only verifies type, sourceType, and
sourceInfo against STAGING_RELAY_URL.
The new README described the directory as mostly Node ESM and called the
pre-existing Deno policies "legacy", even though ldap-policy.ts is a shared
module reused by the new member bridge and strfry-policy.ts is the members
relay's current write policy. It also baked in internal deployment details
(Chef, strfry-1, /etc/*.conf paths, the staging relay's ZeroTier IP).
Document every file with its correct runtime (Deno vs Node 24 LTS), drop the
"legacy" label, and genericize the deployment examples. Cross-link the README
from docs/dev/nostr.md, and replace the remaining internal host/IP references
in sync-policy.mjs and its test with neutral placeholders.
raucao
merged commit f62a4598dd into master2026-11-18 10:00:17 +00:00
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.
Adds the Node strfry write policies used by the new public submission relay and by the approved-content sync on the members relay, for raucao/marco#97.
submission-policy.mjskeeps the submission relay open to all authors while applying the usual gates: a kind allowlist, content and tag bounds, per-IP and per-author token buckets, a short-window content dedupe, and a hellthread limit. It does no membership checks and no media analysis.sync-policy.mjsis fail-closed. It accepts only events that arrived throughstrfry syncfrom the exact staging relay URL, with an allowed kind; everything else, including a wrong source type or an unsetSTAGING_RELAY_URL, is rejected and logged with observed-vs-expected source information.Includes
node:testcoverage for both policies and a README documenting the environment variables and how strfry invokes them. The existing Deno policies (strfry-policy.ts,ldap-policy.ts,strfry-sync.ts) are untouched.Note for the deployment workflow: chef fetches these files from the
livebranch, somastermust be merged intolivebefore the submission relay or the approved sync is converged.f63cb85391to242577a6f6