Rename post authors to credited contacts #142

Closed
opened 2026-06-16 20:25:25 -05:00 by erik · 2 comments
Owner

Goal

Rename the existing contact-backed post "author" relationship to credited-contact terminology so the model clearly separates local post authorship/publishing from external content credit.

The local post author/publisher is the template site's primary ActivityPub actor. The existing authorIds / authors fields and post_authors table currently point to contacts, so they should be renamed to credit terminology before implementing ActivityPub actor local-author display.

Requirements

  • Rename the post contact relationship from author terminology to credit terminology throughout the template site.
  • Use these target API/model concepts unless implementation discovers a better consistent project convention:
    • authorIds -> creditContactIds
    • authors -> creditedContacts
    • post_authors -> post_credits or another clearly credit-named table
  • Preserve the existing meaning: credited contacts are optional contacts associated with a post for external/source/content credit.
  • Do not treat credited contacts as the local post author/publisher.
  • Allow credited contacts on all post types (article, link, and note), defaulting to an empty list.
  • Public UI must label these contacts as Credit / Credits or equivalent, not as a local by author line.
  • Preserve existing data through a migration or compatible schema transition.
  • Update TypeScript types, service logic, API route validation, OpenAPI schemas, and tests to use credit terminology.
  • Decide whether to keep temporary backward-compatible request aliases for authorIds; if kept, document them as legacy/deprecated and add tests. If not kept, document the breaking API rename clearly.
  • Update docs/identity-model.md to reflect the resolved naming and remove or revise the current mismatch/follow-up language.
  • Update relevant API/spec/template documentation so the distinction is clear:
    • local post author/publisher = primary ActivityPub actor
    • credited contacts = external/content/source credit metadata
    • admin/API/CLI identities = management authentication only
  • Keep this task focused on the rename/model cleanup. Do not implement ActivityPub actor bylines as part of this task except where needed to avoid misleading credited-contact labels.

Acceptance criteria

  • Post create/update/list/get code uses creditContactIds and creditedContacts terminology for contact-backed credits.
  • Database schema/migrations use credit terminology for the post-to-contact credit relationship and preserve existing data.
  • Authenticated posts API accepts and returns the new credit fields according to the chosen compatibility policy.
  • OpenAPI/API docs describe credited contacts as external/content credit metadata, not local post authorship.
  • Public post UI no longer renders contact-backed credits as a local by author line.
  • Credited contacts work for article, link, and note posts and default to an empty list when omitted.
  • docs/identity-model.md is updated to reflect the new names and remaining follow-up decisions.
  • Tests cover create/update/list/get behavior for credited contacts and public UI labeling.
  • Relevant lint/typecheck/test/pre-PR checks pass.

Dependencies

  • Depends on task-64ef67ae for the identity model documentation context.
## Goal Rename the existing contact-backed post "author" relationship to credited-contact terminology so the model clearly separates local post authorship/publishing from external content credit. The local post author/publisher is the template site's primary ActivityPub actor. The existing `authorIds` / `authors` fields and `post_authors` table currently point to contacts, so they should be renamed to credit terminology before implementing ActivityPub actor local-author display. ## Requirements - Rename the post contact relationship from author terminology to credit terminology throughout the template site. - Use these target API/model concepts unless implementation discovers a better consistent project convention: - `authorIds` -> `creditContactIds` - `authors` -> `creditedContacts` - `post_authors` -> `post_credits` or another clearly credit-named table - Preserve the existing meaning: credited contacts are optional contacts associated with a post for external/source/content credit. - Do not treat credited contacts as the local post author/publisher. - Allow credited contacts on all post types (`article`, `link`, and `note`), defaulting to an empty list. - Public UI must label these contacts as `Credit` / `Credits` or equivalent, not as a local `by` author line. - Preserve existing data through a migration or compatible schema transition. - Update TypeScript types, service logic, API route validation, OpenAPI schemas, and tests to use credit terminology. - Decide whether to keep temporary backward-compatible request aliases for `authorIds`; if kept, document them as legacy/deprecated and add tests. If not kept, document the breaking API rename clearly. - Update `docs/identity-model.md` to reflect the resolved naming and remove or revise the current mismatch/follow-up language. - Update relevant API/spec/template documentation so the distinction is clear: - local post author/publisher = primary ActivityPub actor - credited contacts = external/content/source credit metadata - admin/API/CLI identities = management authentication only - Keep this task focused on the rename/model cleanup. Do not implement ActivityPub actor bylines as part of this task except where needed to avoid misleading credited-contact labels. ## Acceptance criteria - [ ] Post create/update/list/get code uses `creditContactIds` and `creditedContacts` terminology for contact-backed credits. - [ ] Database schema/migrations use credit terminology for the post-to-contact credit relationship and preserve existing data. - [ ] Authenticated posts API accepts and returns the new credit fields according to the chosen compatibility policy. - [ ] OpenAPI/API docs describe credited contacts as external/content credit metadata, not local post authorship. - [ ] Public post UI no longer renders contact-backed credits as a local `by` author line. - [ ] Credited contacts work for `article`, `link`, and `note` posts and default to an empty list when omitted. - [ ] `docs/identity-model.md` is updated to reflect the new names and remaining follow-up decisions. - [ ] Tests cover create/update/list/get behavior for credited contacts and public UI labeling. - [ ] Relevant lint/typecheck/test/pre-PR checks pass. ## Dependencies - Depends on task-64ef67ae for the identity model documentation context.
Author
Owner

Synced from todu comment by @todu on 2026-06-17T01:38:46.188Z

PR review

PR #143 reviewed and approved.

Acceptance criteria

  • 9 total
  • 9 met
  • 0 missing

Verification

  • ./scripts/pre-pr.sh passed locally.
  • Forgejo Actions run #198 passed (build-lint-test).

Result

No blocking issues or warnings. Ready for human merge approval.

_Synced from todu comment by @todu on 2026-06-17T01:38:46.188Z_ ## PR review PR #143 reviewed and approved. ### Acceptance criteria - 9 total - 9 met - 0 missing ### Verification - `./scripts/pre-pr.sh` passed locally. - Forgejo Actions run #198 passed (`build-lint-test`). ### Result No blocking issues or warnings. Ready for human merge approval.
erik 2026-06-16 20:47:11 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-06-17T01:44:56.739Z

Close gate summary

Readiness: READY

Evidence:

  • PR #143 is merged into main at bfef694 (Rename post authors to credited contacts).
  • Repository state is clean.
  • Post model/service/API route code uses creditContactIds, creditedContacts, and post_credits for contact-backed credits.
  • Migration 020_rename_post_authors_to_credits.sql renames post_authors to post_credits; migration tests verify data preservation and final schema.
  • API/OpenAPI/docs describe credited contacts as external/content/source credit metadata and explicitly reject legacy authorIds.
  • Public UI renders Credit/Credits instead of by for contact-backed credits.
  • Tests cover create/update/list/get credited contacts, all post types, defaults when omitted, UI labeling, and migration behavior.
  • Prior PR review comment reports ./scripts/pre-pr.sh passed locally and Forgejo Actions run #198 passed (build-lint-test).
_Synced from todu comment by @todu on 2026-06-17T01:44:56.739Z_ ## Close gate summary Readiness: READY Evidence: - PR #143 is merged into `main` at `bfef694` (`Rename post authors to credited contacts`). - Repository state is clean. - Post model/service/API route code uses `creditContactIds`, `creditedContacts`, and `post_credits` for contact-backed credits. - Migration `020_rename_post_authors_to_credits.sql` renames `post_authors` to `post_credits`; migration tests verify data preservation and final schema. - API/OpenAPI/docs describe credited contacts as external/content/source credit metadata and explicitly reject legacy `authorIds`. - Public UI renders `Credit`/`Credits` instead of `by` for contact-backed credits. - Tests cover create/update/list/get credited contacts, all post types, defaults when omitted, UI labeling, and migration behavior. - Prior PR review comment reports `./scripts/pre-pr.sh` passed locally and Forgejo Actions run #198 passed (`build-lint-test`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#142
No description provided.