Repository navigation
Restore scoped reads of stored creator-post comments - #1062
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Independent acceptance: PASS for the stored-comments source/synthetic contract at Separate Spec and Standards reviews covered all nine changed files with no material findings. I checked out the published commit in a clean isolated worktree and ran 21 independent HTTP cases through the real route, shared authentication/access logic, domain handler and query adapter, with synthetic credential/grant/account/Supabase transport boundaries. The cases verify API-key/Bearer parity, denied artist/organization access, creator-self and owning-organization reads, missing targets, linked-post ownership rather than commenter identity, post narrowing, empty social sets, five-field nullable projections, fixed-dataset pagination/order, bounded errors and preflight. Three deliberate ownership/order faults in the earlier private copy caused assertion failures; those expressions are unchanged in this head. A missing-count case also failed against the earlier false-zero fallback and passes with the published correction. Fresh exact-head snapshot: format, lint, compatibility, test and Vercel pass; Cubic completed neutral; CodeRabbit reports skipped/manual-review-required. No unresolved review threads. This is not a live PostgREST/permission or customer weekly-report proof. Public nullable-field/pagination/error documentation still needs its companion publication. Do not close all of Mono327/App2023 or claim Gatsby comment coverage from these tests. No merge, deployment, customer read/write or provider operation performed in this lane; coordinator owns the release decision. |
Restore the existing documented
GET /api/commentsworkflow for reading saved comments on a creator's linked posts. Authentication derives the caller, access is checked before content reads, and an optional stored-post UUID only narrows the authorized set. No scraping, provider work, writes or billing are added.Returns the five documented comment fields with saved nulls, exact scoped totals and timestamp/ID ordering. Pagination defaults to 1/10 and caps page size at 100; ambiguous inputs and unsupported offsets fail locally. Responses disable shared caching and storage failures return bounded errors.
Access reuses direct/shared-organization/Recoup-admin roster checks, with endpoint-local self-creator and owning-organization-key reads. Existing artist mutation permissions are unchanged. Missing/denied targets both return 403. The original
artist_account_idwire name is retained.Validation: 85 focused route/auth/roster/fan/query cases pass (33 new), plus 14 existing published-document/semantic cases; full ESLint, owned-file Prettier and diff checks pass. Real Supabase SDK URL/range/count serialization is checked behind an HTTP stub. One additional existing fan-schema suite cannot load locally because the shared dependency cache lacks ajv. Repository typecheck reports existing diagnostics outside these added files; no diagnostics in the added files at the checked revision. Locked-install CI and independent review remain required.
Existing work: Mono #327 and original app #2023; the shipped fan-date alternative (#1057/#1058/#1061) remains intact. The closed provider-scrape PR #480 is a different operation. The verification note records the contract, response nullability companion and limits.
Do not merge until independent review and coordinator approval. Public documentation needs a companion for nullable saved fields, bounded pagination and 401/403/500 responses. This PR does not close the whole reconciliation ticket or prove a live customer weekly-report journey.
Refs recoupable/mono#327, recoupable/app#2023.
Summary by cubic
Restores the documented
GET /api/commentsendpoint for reading stored comments on a creator's linked posts, without scraping, writes, or billing. Caller identity comes only from authentication, access is checked before any content read, and the optional storedpost_idnarrows only the authorized set.Behavior
commented_at DESC, id DESCordering.Access
artist_account_idwire name is retained.Written for commit 543dbdb. Summary will update on new commits.