Create Object API (Note/Article only for now) - #73
Open
2chanhaeng wants to merge 5 commits into
Open
Conversation
Implement the [#9](#9) with Note and Article storage, authenticated createObject, Relay object queries, ActivityPub dispatch, and paginated synthetic Create activities in local actor outboxes. AI provenance: The human user provided Fable with the scope and ideas for the implementation and had them draft a plan. The user read the draft, corrected any problematic parts, and had Astra handle the implementation. This session verified those changes and ran Claude Code with claude-fable-5 in a read-only review loop. After that, the human user read and verified. Automated validation: mise run check; mise run test including the full build (73 GraphQL and 3 model tests); mise run dev startup and HTTP GraphQL Object introspection. Assisted-by: Claude Code:claude-fable-5-1 Assisted-by: Codex:gpt-6-astra
Keep the pre-existing mise.local.toml ignore rule separate from the ActivityPub object feature. AI provenance: The user requested a Fable review loop. Codex reviewed and committed this existing working-tree change separately after Fable noted that it was unrelated to the feature. Codex did not author the rule. No human manual verification was confirmed. Repository checks passed. Assisted-by: Codex:gpt-6
- Rename `/users/<ACTOR_ID>/objects/<OBJECT_ID>` to `/users/<ACTOR_ID>/<OBJECT_ID>` - Rename `ASObject` to `APObject`
Brand the objects.id and objects.actorId columns with the Uuid type in @drfed/models so that Drizzle queries on the objects table require Uuid values instead of plain strings. Add validateUuid to @drfed/models/uuid as a type guard and route all UUID generation and validation in @drfed/graphql through that module instead of importing uuid directly. Cast the actor identifier in the outbox dispatcher and the test fixture values to Uuid, and declare the seed actor identifiers as const so they satisfy the branded column types. Also clarify the description of the GraphQL Object.uuid field. AI provenance: The human user authored and verified every code change in this commit. AI assistance was limited to analyzing the error messages emitted by mise run check and to drafting this commit message. Assisted-by: Claude Code:claude-fable-5-1
dodok8
reviewed
Sep 12, 2026
sij411
reviewed
Sep 13, 2026
| FOLLOWERS: { value: "followers" }, | ||
| } as const, | ||
| }); | ||
| const ObjectRef = builder.drizzleNode("objects", { |
Member
There was a problem hiding this comment.
Is it intentional that Actor.objects excludes deleted objects while node/nodes still return their contents?
So the object still belongs to its actor through actorId, and Object.actor still resolved that relationship. but only excluded from the actor's object list.
|
|
||
| function toCreate(ctx: Context<unknown>, object: ActivityPubObject): Create { | ||
| return new Create({ | ||
| id: new URL(`${object.iri}/activity`), |
Member
There was a problem hiding this comment.
Should we register a Create dispatcher for this URL? As far as i know, Fedify doesn't automatically serve activities returned by the outbox. so fetching this ID could return 404.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #9.
Adds an objects table (Note/Article; visibility public/unlisted/followers) with its migration.
GraphQL gains a createObject mutation for authenticated instance members, a Relay Object node, and an Actor.objects connection with totalCount.
Fedify side implements an object dispatcher at /users/{identifier}/{id} (Tombstone when deleted; followers-only objects not served) and a paginated outbox of synthetic Create activities (20 per page).
Side change: ignore mise.local.toml.
Verified with mise run check, mise run test (73 GraphQL, 3 models), and mise run dev startup.
AI Disclosure: Ideas presented by a human user were refined into a plan through Claude Code (claude-fable-5-1), and the draft plan was verified and partially modified by the user. It was implemented via Codex (gpt-6-astra), and after initial verification by Claude Code (claude-fable-5-1), it was manually reviewed, verified, and partially modified by a human.