| DOC | ||
| include | ||
| smoketest | ||
| src | ||
| .gitignore | ||
| README.md | ||
| rebar.config | ||
| smoketest.py | ||
Build Aktor in Erlang/Mnesia as a black-box behavioural clone of snac2 at the ActivityPub boundary.
snac2 is the oracle.
Do not port snac2 internals. Do not implement ActivityPub from the abstract specification. Imitate the observable ActivityPub behaviour of snac2.
When in doubt, prefer observed snac2 behaviour over protocol interpretation.
Aktor/Erlang must behave like snac2 when exchanging ActivityPub with the Fediverse.
This includes:
- WebFinger discovery
- Actor representation
- inbox behaviour
- outbox behaviour
- object representation
- followers/following collections
- HTTP Signatures as used for ActivityPub delivery
- remote actor fetching
- Follow/Accept behaviour
- Create(Note) behaviour
- Delete behaviour
- Like behaviour
- Announce behaviour
- Undo behaviour
- replies
- delivery to remote inboxes
- processing of incoming remote activities
- Mastodon API subset required by Tusky
- Mastodon-compatible OAuth application/token flow
Local UI/admin requirements:
- user config panel
- instance config panel
Use Erlang/OTP, Cowboy, and Mnesia. Mnesia replaces snac2 file storage. Internal implementation may differ completely.
Use snac2 as the behavioural reference: for each ActivityPub interaction, observe what snac2 accepts, stores, emits, ignores, rejects, or delivers, then reproduce the same externally visible ActivityPub behaviour in Aktor/Erlang.
Use curl smoke tests as compatibility gates. Use EAL5+ discipline:
- small steps
- explicit fixtures
- no broad rewrites
- no speculative protocol interpretation
- no improvements that change ActivityPub-visible behaviour
Do not implement full Mastodon. Do not generalise beyond the snac2 ActivityPub compatibility surface.
Success: Aktor/Erlang shows the same practical ActivityPub behaviour as snac2: remote servers can discover users, follow them, receive posts, send replies, likes and boosts, and Tusky can log in, read timelines, and create posts.
Testing and runtime rules
The project is tested inside a Docker container, so a working Dockerfile is required.
Runtime configuration must be read entirely from environment variables. Do not require interactive setup, local config files, or manual post-install steps for tests.
For every implemented API or protocol endpoint, add a dedicated curl-based smoke test script in the appropriate test folder.
Smoke tests are used to verify externally visible behaviour and to prevent regressions during development.
Rules:
- every new API endpoint must have a matching smoke test
- every protocol-facing change must update or add smoke tests
- smoke tests must be runnable against the Docker container
- tests should validate observable behaviour, not internal implementation details
- keep smoke tests simple, explicit, and reproducible
Use snac2 as behavioural reference: https://codeberg.org/grunfink/snac2
Codex may clone it read-only as reference:
git clone https://codeberg.org/grunfink/snac2.git /tmp/snac2-reference