feat: schema for cross-instance write path (#12) #63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/v7-schema-remote-contributions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #12. First slice of v7 (host-inbound-first), the foundation everything else writes to.
Migration
041_remote_contributions.sqlproject_collaborators.remote_actor_url— name an invited editor by their ActivityPub actor URL instead of a local user row:idx_pc_unique_remote_editor), mirroring the existing local-editor index — so one remote actor can edit several projects.chk_pc_editor_registered) now accepts a remote actor; newchk_pc_local_xor_remoteensures a row is local xor remote (viewer/commenter share links remain neither).remote_contributions— logs each inbound signed write activity and its disposition (pending/applied/rejected/conflict); doubles as the #11 conflict review queue. Includesap_activity_id(unique-when-present) so #10's inbox can process idempotently. Indexed for the review queue (project_id, status) and for #61's defederation sweep (remote_actor_url).Two deliberate deviations from the literal issue text
remote_actor_url"UNIQUE when not null"; implemented as per-project unique so a remote actor isn't limited to one project instance-wide (matches how local editors work).ap_activity_id(not in the issue's column list) — inbox idempotency is a near-certain need for #10, and migrations can't be edited after the fact.Verification (dev server)
[test] migration applied: 041_remote_contributions.sql).remoteContributions.test.ts— 9 schema tests (remote-editor accepted; missing-identity / both-identities / duplicate-actor rejected; same actor across projects allowed;activity_type/statuschecks;ap_activity_ididempotency).🤖 Generated with Claude Code