feat(contract): v4 social contract draft — indexOnly likes, single hashtag, author agreements - #323
Conversation
Built by scripts/build-v4-contract.py as a deterministic transform of the v3-topology contract: indexOnly like (byPost/byHashtagPost/byAuthorPost ranked chains preallocated, byAuthorTimePost notification index, byLiker membership) and lean likeReply; author + hashtag on post/reply with propertyAgreement bindings; tagAndTime listing index; postHashtag doctype deleted; token costs preserved. hashtag '' is a stand-in until upstream null-skip semantics ship (flip to optional + re-register before cutover). Registered as a draft on moutai: Aux325ifCRkYUteevirCv7ptHm3YB2g7PbMo8UjQwoz (consensus accepted the full PV14 indexOnly grammar; bots funded 1000 YAPP). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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 |
|
🕓 Ready for review — 4 ahead in queue (commit 7bd3875) |
|
Internal review note for the record: an independent code-review pass verified the transform is faithful (byte-identical carry-over of all untouched doctypes/config/tokens, collision-free positions, clean postHashtag deletion, no aliasing, idempotent script) and flagged the Disposition: intentional, not a defect — it is the enum form used by the upstream consensus-pinned reference fixture for indexOnly likes ( Two doc-drift findings (plan text contradicting the shipped byAuthorPost inclusion, and a stray 🤖 Posted autonomously by Claude on behalf of pasta. |
The Phase 1 experiment harness (PR #322) targeted throwaway contracts and is superseded by verify-v4.mjs; the results doc is the durable artifact (verbatim consensus errors, fee table, grammar findings) and belongs with the contract it shaped. #322 closes unmerged; branch feat/like-overhaul-phase1 stays on origin for reference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying yappr-v2 with
|
| Latest commit: |
7bd3875
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cd94e6f8.yappr-v2.pages.dev |
| Branch Preview URL: | https://feat-contract-v4.yappr-v2.pages.dev |
Deploying yappr with
|
| Latest commit: |
7bd3875
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f21a99b0.yappr.pages.dev |
| Branch Preview URL: | https://feat-contract-v4.yappr.pages.dev |
verify-v4.mjs rebases the 31-case v3 topology battery onto the registered v4 draft (Aux325if...) and adds the indexOnly like/likeReply surface: propertyAgreement 40127 in both '' -sentinel directions, ghost refs 40120, structural uniqueness 40105, the byAuthorPost trap-regression guard, batched terminal-in membership, ranked top-K (global / per-hashtag / '' pin / author pin) with zero-count-group filtering, unlike via full query-side tuple recovery (no create-returned Document), self-authorizing deletes, likeReply mirror, like-outlives-tombstone, and tagAndTime listing. 68/68 strict checks passed twice (second run on the dirty contract). Two evo-sdk 4.2.0-dev.5 landmines found and worked around (no contract defects): rs-sdk starts devnets at protocol version 12 and never ratchets past a failing proof, so the PV14 ranked-index grammar makes the v4 contract unreadable until a non-v4 proved query bumps the version; and mid-run devnet quorum rotations kill the trusted context's static quorum cache and ban every address, cured by a full reconnect behind a proxy handle. Both documented with verbatim errors in docs/V4_BATTERY_RESULTS.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3a67444 to
7bd3875
Compare
|
Battery landed: Two evo-sdk 4.2.0-dev.5 issues surfaced for upstream filing (details in the results doc): the devnet protocol-version ratchet requires one proved non-v4 warm-up query after connect() before any PV14-grammar contract read, and quorum rotation (~20min) permanently poisons a long-lived trusted context. Both have working mitigations in the battery and are flagged into the Phase 3 client work. The battery commit was independently code-reviewed within its authoring run (findings fixed and re-validated live). PR checklist is now complete. 🤖 Posted autonomously by Claude on behalf of pasta. |
What
Phase 2b of PLAN_LIKE_OVERHAUL.md: the contract v4 shape, produced by a deterministic, reviewable transform (
scripts/build-v4-contract.py) of the v3-topology contract:like→ indexOnly (entries are the rows; no stored body):byPost/byHashtagPost/byAuthorPostwith full ranked chains +preallocated,byAuthorTimePost [postAuthor, $createdAt, postId](notifications + unlike-tuple recovery; not preallocatable — the like's own timestamp isn't derivable from the post),byLiker(membership / my-likes). One-like-per-(post, owner) now falls out of structural uniqueness.likeReply→ indexOnly, lean (countable + notification + membership; no ranked).post.hashtag(+tagAndTimelisting index),postHashtagdoctype deleted — tagged posts become one write instead of two.''= untagged is a stand-in until the upstream null-skip release, at which point hashtag flips optional and this contract re-registers before any cutover.authoron post/reply (poster-attested = $ownerId), consensus-bound onto likes viarefersTo propertyAgreement— the denormalized copies can no longer be poisoned (40127).Live validation so far
Aux325ifCRkYUteevirCv7ptHm3YB2g7PbMo8UjQwoz— consensus accepted the full PV14 indexOnly grammar first try; bots funded 1000 YAPP on its token.feat/like-overhaul-phase2a, folds in via feat(experiments): indexOnly Phase 1 battery + results on moutai devnet #322's lineage): 3-property notification-index recovery end-to-end (multi-device unlike rebuilds its delete tuple from one query),byAuthorPostdoes NOT trip the one-like-per-author trap, author-pinned ranked queries work (zero-count groups filtered client-side).byAuthorPostis included per DESIGN_CREATOR_LEADERBOARD.md — index sets freeze at registration, and this keeps the leaderboard path open for the upstream prefix-level-ranked-aggregation ask while serving the profile Top tab server-side today.Landing on this branch before merge
scripts/verify-v4.mjs+docs/V4_BATTERY_RESULTS.md— the full battery (v3's 31 topology cases rebased onto v4 + the new indexOnly/agreement/ranked/recovery/tombstone-interplay suite) is being authored and run againstAux325if…right now; results push here when green.Not in this PR: no client changes, no
.env.devnetflip (a v3 client pointed at v4 queries doctypes that don't exist — cutover is Phase 3), and final registration waits for null-skip.🤖 Generated with Claude Code