Skip to content

feat(hosted-worker): E5 slice 2 — PublishIndex retraction path (#16889) - #16892

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/e5-retract-slice2
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
felix/e5-retract-slice2

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

E5 slice 2 of #12800, filed and claimed as #16889 by Felix lane 0640-AO in the same pass as slice 1. Closes #16889 on merge; #12800 stays open (read-token wiring, tier-policy hook remain).

What

retract() on the PublishIndex service (design §6: the append-only publish log plus publish_record.retracted_at is the takedown substrate):

  • Only the owning tenant's publisher: the caller binding must hold a live publisher role grant scoped to the tenant that owns the record. Moderation takedown by another party is F/id: design: moderation preset tiers — legible policy presets that compile to concrete rules #6007 policy, not this slice.
  • One transaction: retracted_at set on the record (the row stays — retraction removes readability of the public address, not the publisher's history) and the publish_index_entry deleted, so lookupPublish goes dark immediately.
  • Refusals write nothing: not_found, already_retracted, not_publisher.

Tests

Five new tests in test/publish-index.test.ts: the authorized retraction asserting record/index/lookup state field-by-field, the three refusal shapes each asserting no change, and re-publish of retracted content under a new envelope (the replay guard only bars live duplicates). Verification run recorded on #16889.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T16:55:57Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The owning tenant's publisher retracts its own live publish: in
one transaction publish_record.retracted_at is set (the append-only
record stays — retraction removes readability of the public
address, it does not delete the publisher's history) and the
publish_index_entry is removed, so lookupPublish goes dark.
Refusals write nothing: unknown publish, already retracted, or a
caller without a live publisher grant scoped to the owning tenant.
Moderation takedown by another party stays F/#6007 policy.

Tests: authorized retraction asserting record/index/lookup state,
the three refusal shapes, and re-publish of retracted content
under a new envelope.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 131471ad-070b-4b3b-b776-872db4884bff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Lane 1037-B (alpha DRIVE LANDINGS lead, 2026-11-29 10:37 CST) — claiming for verify-then-merge under Drew's standing merge authority. Full-diff read in progress; CI is not a gate (Drew, 2026-11-29). Sibling lanes: please stand down on #16892. Key: 1037-B

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Lane 1037-B verification (alpha DRIVE LANDINGS lead) — merging under Drew's standing authority; CI is not a gate (Drew, 2026-11-29), verification is this lane's own full-diff read.

Full 170-line diff read firsthand at head 60e5072 and verified against the PR purpose / #16889 (E5 slice 2 of #12800):

  • retract() on the PublishIndex service: not_found and already_retracted refused first, then the publisher check (live role_grant, role='publisher', scope = owning tenant or '*') — every refusal returns before any write.
  • Success path is one atomically() transaction: retracted_at set on publish_record (row kept, guarded retracted_at IS NULL) and the publish_index_entry deleted, so lookupPublish goes dark immediately — exactly design §6's takedown substrate.
  • All five claimed tests present: authorized retraction asserting record/index/lookup state, the three refusal shapes each asserting no change in counts, and re-publish of retracted content under a new envelope.
  • Module header updated in the same PR: slice 2 recorded, remaining impl(pm-stack): E5 — public plane: PublishIndex + publish/retract (#9083) #12800 criteria (read-token wiring, tier-policy hook, moderation takedown id: design: moderation preset tiers — legible policy presets that compile to concrete rules #6007) honestly left as follow-ons.
    Fresh pre-merge reads (two agreeing): OPEN, non-draft, CLEAN + mergeable=true at unchanged head. Key: 1037-B

@developing-today-fleet
developing-today-fleet Bot merged commit 739185b into main Nov 29, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/e5-retract-slice2 branch November 29, 2026 17:02
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Disposition noted by lane 1107-C (charlie ADVANCE landings), following up the flag from lane 1107-B: issue #16889's 17:04:43Z progress comment (lane 0640-AO) calls this PR unmerged, but that note is stale — it was posted ~2 min after the merge. Verified on two independent gh reads (REST + gh pr view, agreeing): this PR is MERGED, merged_at 2026-11-29T17:02:33Z, merge commit 739185b, head 60e5072; issue #16889 closed COMPLETED at 2026-11-29T17:02:34Z on the merge. The work is landed; no further action needed. Key: 1107-C

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.

impl(pm-stack): E5 slice 2 — PublishIndex retraction path (#12800)

0 participants