Repository navigation
test(e2e): API REST journeys (posts and votes) - #1167
Merged
Merged
Conversation
mortondev
force-pushed
the
test/product-e2e-harness
branch
from
November 20, 2026 10:20
b16d3d9 to
aa14deb
Compare
mortondev
force-pushed
the
test/product-e2e-api-rest
branch
3 times, most recently
from
November 20, 2026 11:16
e5c343f to
c11cb28
Compare
mortondev
force-pushed
the
test/product-e2e-api-rest
branch
from
November 20, 2026 11:31
c11cb28 to
7448bed
Compare
Product-suite specs for /api/v1/posts and the vote routes: list paging and filters, reads behind read:feedback and post.view_private, create with its side effects (auto-vote, author subscription, activity, post.created), admin overrides and import mode, PATCH per-field gates, delete, merge, the scope and Contributor matrices, the vote toggle and proxy votes. Six quarantined tests pin product bugs (QUARANTINE.md, API REST posts and votes).
Count only this post's webhook deliveries (the webhook is workspace-wide), search the whole workspace by a word no other post carries, and leave the order of an unknown sort unpinned.
mortondev
force-pushed
the
test/product-e2e-api-rest
branch
from
November 20, 2026 11:41
7448bed to
aba3607
Compare
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.
Product-suite e2e journeys for the REST v1 posts and vote routes (sub-area API-R, part 1 of 4). Based on the harness PR #1150; retarget to main once it merges.
Sibling PRs cover the rest of API-R and API-K: feedback taxonomy (comments, moderation, boards, statuses, tags, roadmaps, suggestions, apps), content (changelog, status page, help center, settings, platform), and people plus keys.
Where the specs live
The inventory names
tests/api/*.spec.ts, but the product config has noapimodule folder, so these live inapps/web/e2e/tests/platform/with the inventory's file names. Helpers:apps/web/e2e/product/api-rest.ts. No shared harness file is changed.Covered
tests/platform/rest-posts.spec.ts@smoke: API-R-009 (create: 201 shape, auto-vote, author subscription, activity,post.created), API-R-022 (status change: webhook, activity, subscriber email in Mailpit, bell; repeat is a no-op)@core: API-R-001, 004, 010 (only the part both rules agree on), 011, 014, 016, 018, 025, 031, 033, 103 (one test per scope set), 104; quarantined: 026, 027@nightly: API-R-002, 003, 005, 006, 007, 008, 020, 021, 023, 024, 029, 032, 034; quarantined: 012, 013, 028tests/platform/rest-votes.spec.ts@core: API-R-035, 039@nightly: API-R-037, 038, 040, 041 (validation), 042, 043; quarantined: 041 (unknown voter)Not pinned:
post.set_author), API-R-019 (plan-cap 402 body), API-R-036 (REST vote needspost.vote_on_behalf, MCP needs none), the default-status half of API-R-010, and the "nopost.votedfor proxy votes" half of API-R-039.Every test was broken once: wrong expected values plus a wrong error code in
expectError. Every test went red.Quarantined (product bugs,
QUARANTINE.md› Product suite: API REST (posts and votes))PATCH /posts/:idwith{}(or unknown fields only) checks no permission and no scope and returns the full post, so aread:chatkey reads any post (routes/api/v1/posts/$postId.ts:31-38,:117)post.view_privateon every PATCHdomains/posts/post.service.ts:480-486)post.service.ts:271-276)post.service.ts:148,:393-394)deletedAtfilterpost.service.ts:379-383)routes/api/v1/posts/$postId.vote.proxy.ts:43-63)Not reproduced: the inventory's "malformed JSON is a 500" (API-R-020). On this build the routes answer 400
BAD_REQUEST, so API-R-020 is a plain passing test.Other findings
member. Only the Owner role maps toadmin(domains/api-keys/workspace-key-role.ts:50-55). So import mode,authorPrincipalIdand backdating never work for an Admin workspace key, only for an admin's personal key or an Owner workspace key. The tests use an admin's personal key for those. This may be an owner question.Local runs
Fresh database,
rest-postsandrest-votestogether,--workers=2 --retries=0, three runs in a row: 40 passed and the 6 quarantined tests failed, every run. No flaky results.CI
PR run 44653618180: product-smoke and product-core (4 shards) pass. All 20
@smoke/@coretests here ran, and none was flaky. Nightly dispatch 44654840949: product-core, product-isolated and product-smoke pass, and none was flaky.