Repository navigation
docs(spec): community spec — user recipes, Explore, challenges, Tables, API, mocks - #150
Conversation
User recipes, Explore, challenges and battles, Tables, identity/safety, backend/client architecture, mocks in words, taste events, and three implementation slices, drafted on top of the overhaul SPEC. Contracts: 24 JSON Schemas, 33 operations, 31 example fixtures, and a stdlib-only check.py that validates every example against its schema, manifest coverage, and OpenAPI/manifest sync (exit 0). Co-authored-by: obvious-autobuild[bot] <262744130+obvious-autobuild[bot]@users.noreply.github.com>
Review round (0 blockers, 8 majors, 4 minors, 2 nits), all addressed:
- renumber sections gap-free ascending (challenges 4, tables 5,
identity 6, backend 7, app 8, mocks 9, events 10, slices 11) and
re-point every cross-reference, including contract schema descriptions
- vote path in prose matches the contract (PUT /v1/challenges/{id}/vote
with entryId; DELETE = removeVote)
- Explore candidate cap stated consistently (500 server-side before
ranking, max 100 cards per response)
- outbox gains the report operation so offline reports are never dropped
- OpenAPI now declares error responses (422/429/503 publish, 409
entries/tables/votes, 429 reports, 403 moderation) against error schema
- quarantined_rights defined in prose (rights re-verification on reopen)
- FitLine.state extended to the overhaul's five fit states
- evidence appendix cites real refs (PR #104/#106 branch heads, stage-0
planning path)
- moderation decision path, RecipeRef community value, invite-mock
section ref, and publication-state spelling note corrected
Co-authored-by: obvious-autobuild[bot] <262744130+obvious-autobuild[bot]@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 review (Obvious, Autobuild + Max) Reviewed at head Verdict: changes neededOne major finding (the OpenAPI document is not valid OpenAPI 3.1, and three implementation slices pin to it), three minor. The prose SPEC itself is in strong shape: every "verbatim" citation I traced held, and the contract examples pass a reference JSON Schema validator with zero failures. Findings (by severity)1. Major —
2. Minor — two dangling "section N.N" cross-references, contradicting the body's "0 unresolved" claim.
3. Minor —
4. Minor — the PR body says "Base:
Verified (commands → results)
Couldn't verify
|
Round-2 review (comment 6199518876), all four findings addressed, each
with a check that fails before its fix:
- Major: openapi.yaml was not valid OpenAPI 3.1 - all 41 schema values
were bare strings. Rewritten to Schema Objects ({$ref: ...}); check.py
now rejects string-valued schema keys (failed with 41 errors before
the rewrite, passes after).
- Minor: two dangling prose cross-references (SPEC.md:78 section 7.5,
:187 section 10.5). check.py now lints both the §N.N and prose
section/forms (failed with 2 errors before, passes after). A same-class
audit found six more wrong-target refs left by the renumber (lines 68,
76, 87, 115, 134, 217), all repointed. :187 now cites the real source:
section 9.5's mock copy, with the overhaul mock's aggregate rule named.
- Minor: check.py now enforces pattern, minLength/maxLength and
minimum/maximum/exclusiveMinimum on examples. Mutation control: the
old checker passed a 500-char name (maxLength 60) and a pattern-
breaking entryId with exit 0; the new checker fails both; restored
examples pass.
- Minor: PR body said Base: main; the PR targets alpha. Fixed in the
body.
Co-authored-by: obvious-autobuild[bot] <262744130+obvious-autobuild[bot]@users.noreply.github.com>
Every OpenAPI 3.1 Response Object now carries a required description (33 success responses were missing one), and every path template variable is declared as a required path parameter (15 paths, 22 undeclared occurrences), fixing both findings from openapi-spec-validator. check.py: response objects without descriptions, path parameters not declared, and the YAML-subset reader's block-sequence branch precedence are now all enforced/fixed. Runs fail-first before each fix.
Community spec: user recipes, Explore, challenges and battles, Tables, API, mocks
Base:
alpha· Implements the community packet of the overhaul SPEC (docs/spec/overhaul-20261011/SPEC.mdon branchdocs/spec-overhaul-20261011) · Draft PR, for review only — not for merge.What changed and why
Adds
docs/spec/community/:SPEC.md(~620 lines, 13 sections) — the community round of the overhaul, specified end to end:alpha).ExploreRankingverbatim: 0.6 fit + 0.4 taste with 0.5 neutral prior, 6 dp, 5-level tie-break), fit lines,cookedByfloor of 10, cold-start catalog mix, no likes/followers/profiles.draft→open→voting→closed), six types with campus reserved, one-vote-per-account movable votes, self-vote exclusion, no live tallies, 24 h vote-age rule, web links readable without the app, PR kitchen-knowledge: challenge packs (budget, food-bank, seasonal, use-it-up) #116 packs frozen by reference, waste tracking reserved.fla1./flr1., 15-min/30-day, family revocation); content-hash-bound moderation; fail-closed screening (503); mutual blocks; 10/day reports; resumable deletion. PR Community backend: scaffold, identity, Explore with moderation #104's 18+ publishing gate is extended to every sharing surface.backend/communitybun package (overrides the overhaul's "module inside gemini-agent" per the packet brief — LeChef work must not share a deploy surface with moderation), Firestore store; iOSCommunityMigrations, share-preview builder, offline outbox with idempotent retry, feed caches, contract-tested API client.mocks/community.htmlverbatim).contracts/— the community API as machine-checked artifacts: 24 JSON Schemas, 33 operations (openapi.yaml), 31 example fixtures,manifest.json, andcheck.py(stdlib-only) that validates every example against its schema, manifest coverage, OpenAPI/manifest sync, schema-object shape, constraint fields, and spec cross-references.A load-bearing assumption is stated up front in the SPEC: the packet assumes a small, trusted-by-default community produces enough shared recipes and opted-in cook data for Explore to feel alive without moderation volume beyond one operator — with the evidence that would confirm or break it after the first month.
Review rounds
1b48421): verified every substantive claim against the repo — PR Community backend: scaffold, identity, Explore with moderation #104 mechanics (shared/sessionCore.ts,explore/publications.ts,config.tsfloors/limits,safety/deletion.ts), PR feat(community): FLCommunityCore — sharing, challenges, taste profile, user recipes, Explore ranking #106's formula and fixtures, PR kitchen-knowledge: challenge packs (budget, food-bank, seasonal, use-it-up) #116's pack files, PR Personal cookbook: store, transaction service, and flow-check (M1) #71's editor, all overhaul quotes and mock copy (verbatim matches). All 14 findings (0 blockers, 8 majors, 4 minors, 2 nits) fixed in commit0fd6113: gap-free section renumbering with all refs re-pointed (including schema descriptions), vote path prose/contract alignment, Explore cap consistency, outboxreportoperation, OpenAPI error responses (422/429/503/409/403) against the error schema,quarantined_rightsdefined, FitLine extended to the overhaul's five states, and real refs in the evidence appendix.2f9ebea): the 41 bare-string OpenAPI schema values converted to Schema Objects ($refmappings — the checker now rejects bare strings and records the fail-first state: 43 findings before the fix, including the 2 dangling prose references at SPEC.md lines 78/187, also fixed); prose section-reference audit extended tocheck.py(§-style and "section N.N" forms both linted; further wrong-target refs for migrations, 18+ gate, preview builder, taste events, and event logging corrected); constraint validation added to the checker (pattern/minLength/maxLength/minimum/maximum/exclusiveMinimum) — mutation-tested: the pre-fix checker accepted a voteentryIdviolating its pattern and a table name overmaxLength, the post-fix checker rejects both.56acb07, driven byopenapi-spec-validatoron this PR's contracts): every Response Object now carries its requireddescription(33 added; the checker recorded 33 failures first), and every path template variable is declared as a required path parameter (15 templated paths, 22 undeclared occurrences; the checker recorded 22 failures first). Fixing the path parameters exposed a real bug in the checker's YAML-subset reader — it parsed block sequences as nested mappings because the mapping branch won on deeper indents — fixed by giving the sequence branch precedence.check.pyfails first on each new rule, passes after the fix.How I checked it
python3 docs/spec/community/contracts/check.py→ exit 0:OK - 24 schemas, 33 operations, 31 example files, OpenAPI 3.1 in sync.at head56acb07.python3 -m openapi_spec_validator(openapi-spec-validator 0.7.4, the reference OpenAPI 3.1 validator) → exit 0 on the dereferenced document at head56acb07. The validator cannot dereference the contracts' canonical$idbase URL (https://fridgeluck.dev, an unregistered domain) over the network, so validation ran on a copy with every external$refinlined from the localschemas/files (sibling-preserving, recursion-depth-guarded; 0 unresolved$refs remain before validation). Structural validity of the raw document — operation/response/parameter/schema-object rules — is what this pass certifies; fetching the$idURLs is future work for when the domain is live.json.loadover all 24) and validate their 31 example fixtures under Draft 2020-12 with a referencing registry over the schemas'$ids.1b48421and on56acb07(run 38798361297).What I could not check
fridgeluck.devURLs resolve (they are the spec's canonical namespace, not a live host).What I assumed
backend/communitypackage.🔗 Obvious Project · 🧵 Obvious Thread · 🔀 Obvious PR Artifact