Build and verify Go backend, data model, auth, and API contract slices for Mote.
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use this skill for repository foundation, PostgreSQL schema and migrations, auth, permission enforcement, canonical URL rules, and Go API endpoints.
None.
mission.md, AGENTS.md, .factory/library/architecture.md, .factory/library/environment.md, and the relevant validation IDs in validation-contract.md.go test ./...curlverification.commandsRun (for example a curl against a running server in the degraded and/or healthy state). Test/build output alone is not sufficient for those features..factory/services.yaml, then include exact commands and observations.{
"salientSummary": "Implemented the Mote permission update endpoint plus enforcement for private/public-readable/public-commentable/public-editable. Added table-driven integration tests for anonymous and non-member callers and verified denied writes do not persist.",
"whatWasImplemented": "Added permission mode columns and update logic, wired owner-only PATCH /api/workspaces/:workspaceSlug/motes/:moteId/permissions, enforced read/comment/append checks on show/comment/append handlers, and documented the deterministic auth-vs-authz-vs-not-found response behavior for downstream CLI/web workers.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{
"command": "go test ./internal/... ./cmd/...",
"exitCode": 0,
"observation": "Permission and auth integration tests passed."
},
{
"command": "curl -sf -X PATCH http://127.0.0.1:3100/api/workspaces/james/motes/m_123/permissions -H 'Authorization: Bearer ...' -d '{"mode":"public-commentable"}'",
"exitCode": 0,
"observation": "Returned the updated mode and subsequent anonymous comment succeeded while append stayed forbidden."
}
],
"interactiveChecks": []
},
"tests": {
"added": [
{
"file": "internal/motes/permissions_integration_test.go",
"cases": [
{
"name": "public_commentable_allows_comment_but_denies_append",
"verifies": "Anonymous and non-member callers can comment but cannot append in public-commentable mode."
},
{
"name": "denied_append_does_not_persist_entry",
"verifies": "Permission-denied writes leave no partial entry behind."
}
]
}
]
},
"discoveredIssues": []
}