Feature 07: releases, stars, watches (docs/features/07) #18

Merged
crueber merged 2 commits from feat/releases into main 2026-09-04 06:38:55 +00:00
Owner

Implements docs/features/07_releases_stars.md end to end: internal/releases (headers, two-step asset upload, monotonic latest pointer + self-healing scan, autodraft, publish fan-out via internal/notify) + internal/social (stars, watcher reads, counters, starred lists, fork-counter seam). Asset bytes on the new server.RepoRoutes chain (14.3 routing note, static uncompressed group, SWR+ETag on JSON). P6 gates (create=write, release-delete=maintain). UI pages (releases list/detail/new, star toggle) + releases.js/social.js SDK, dark+light themes. No task kinds (import hook named only). Tests: releases 99.8%, social 99.7%, -race clean, make cover gate green, e2e green, live compose proof (tag→release→asset sha-verified→latest→delete-repair, star/fork counters). E8 evidence entry. Tracks #13 — do not merge.

Implements docs/features/07_releases_stars.md end to end: internal/releases (headers, two-step asset upload, monotonic latest pointer + self-healing scan, autodraft, publish fan-out via internal/notify) + internal/social (stars, watcher reads, counters, starred lists, fork-counter seam). Asset bytes on the new server.RepoRoutes chain (14.3 routing note, static uncompressed group, SWR+ETag on JSON). P6 gates (create=write, release-delete=maintain). UI pages (releases list/detail/new, star toggle) + releases.js/social.js SDK, dark+light themes. No task kinds (import hook named only). Tests: releases 99.8%, social 99.7%, -race clean, make cover gate green, e2e green, live compose proof (tag→release→asset sha-verified→latest→delete-repair, star/fork counters). E8 evidence entry. Tracks #13 — do not merge.
Implements docs/features/07_releases_stars.md end to end (§§1-9):
internal/releases (headers, two-step asset upload, monotonic latest
pointer + self-healing scan, autodraft, publish fan-out) and
internal/social (stars, watcher reads, counters, starred lists), both
Seam 1 on both lanes; asset bytes on the new server.RepoRoutes chain
(14.3 note, static uncompressed group).

Decisions appended in 07 (watch routes stay in notify; shared-index
autodraft source; idempotent PUT upsert; asset subtree layout for
filesystem backends; git argv) + 14 frozen-overwritable amendment + E8.
- internal/releases/service.go: repairLatestPointer now applies the 07
  section 2 monotonic created_at compare inside the CAS loop (same rule as
  the publish path); a truncated scan can no longer park the pointer at an
  older release. Corrupt pointers still heal by overwrite. The target-date
  lookup is shared with updateLatestPointer (pointerTargetCreated).
- internal/social/service.go: Unstar deletes the star record
  version-conditionally; a concurrent unstar losing the removal recounts
  instead of decrementing (one record implies at most one decrement).
  Unconditional deletes report success on absent keys on every backend, so
  the version is what makes this exactly-once.
- internal/releases/http.go: Range is honored on GET only (RFC 7233 3.1);
  HEAD answers full-object headers even with a Range header.
- docs/go/14_extensibility.md: the Feature-07 amendment named the old
  releases/<tag.json>/assets/<name> layout; corrected to the shipped
  releases/assets/<tag>/<name> sibling subtree.
- docs/features/07_releases_stars.md: recorded the reserved
  latest/autodraft single-GET shadowing (forced by the section 7 route
  table itself).
- Tests: TestRepairLatestPointerMonotonic, TestUnstarConcurrentSingleDecrement
  (deterministic overlap gate; both fail pre-fix, pass post-fix), plus a
  HEAD+Range case in TestAssetHTTPFlow.
Sign in to join this conversation.
No description provided.