Skip to content

test(api): the tagged-post ad conformance floor (D55) — the ads lane's foundation (3.25.0) - #701

Merged
jacoby149 merged 1 commit into
devfrom
jacoby149/tagged-post-ad-conformance
Aug 28, 2026
Merged

test(api): the tagged-post ad conformance floor (D55) — the ads lane's foundation (3.25.0)#701
jacoby149 merged 1 commit into
devfrom
jacoby149/tagged-post-ad-conformance

Conversation

@jacoby149

Copy link
Copy Markdown
Owner

What

The ads lane's foundation item: pin the tagged-post ad conformance (D55) with api/tests/test_ads.py.

An ad is a posts doc tagged ad (a leaf-typed offer + a status), not a service — so the API has zero ad-specific branches, and the conformance is that the ad post is indistinguishable from a post except its tag + body fields.

The 5 tests

  1. Create — the ad post is written through the existing /v3/create on posts (no ads service, no new endpoint) with tags=["ad"] + the leaf-typed offer + status in the body, attached to the creator's followers group.
  2. Feed readread_documents_in_groups over the followers group returns the ad interleaved with normal posts: same shape, same keys, the ad fields are the only delta.
  3. I3 — a non-follower is an access failure (D42 403) and the document query never runs, so the ad is never returned.
  4. status — a plain body field the read does not filter: a paused ad comes back exactly like an active one (curation + the renderer filter client-side, D51).
  5. SQL-level pin — the feed read query selects the tags column but filters on neither tags nor status (status is a body field, not a column — it cannot be filtered in SQL at all).

Notes

  • No production code changed — the API already treats ad posts as posts (verified: no offer / ad-tag branches in api/app/v3/).
  • Gates the catalog + composer (both read this).
  • 795 API tests green, ruff clean.

KB: knowledge/knowledge-base/web10-v3/social/ads.md (D55) + ads-catalog.md.

…s foundation (3.25.0)

An ad is a posts doc tagged ad (leaf-typed offer + status), not a service —
the API has zero ad-specific branches, so the conformance is that the ad post
is indistinguishable from a post except its tag + body fields. Pinned by
api/tests/test_ads.py (5 tests): create through the existing posts CRUD, the
feed read returns it interleaved with posts, I3 (a non-follower gets nothing),
and status is a plain body field the read does not filter (D51). Plus a
SQL-level pin: the feed read query filters on neither tags nor status.

No production code changed. 795 API tests green, ruff clean.
@jacoby149
jacoby149 merged commit a67ecd5 into dev Aug 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant