Skip to content

feat: take a published page down with stele delete - #6

Merged
ProJedi1234 merged 1 commit into
mainfrom
feat/stele-delete
Aug 7, 2026
Merged

ProJedi1234 merged 1 commit into
mainfrom
feat/stele-delete

Conversation

@ProJedi1234

Copy link
Copy Markdown
Owner

What

stele delete <slug> — the CLI verb for the DELETE /pages/:slug endpoint the server has offered all along. Publish-scoped, so an agent's own credential is enough.

Design notes

  • SteleClient.delete bypasses the send helper. Success is a 204 with no body (the server strips even Content-Length), and send hands every response to a JSONDecoder unconditionally — routed through it, every successful delete would surface as a malformedResponse. It calls perform directly, the way fetchSkill does, and keeps the credential.host rule by hand since it no longer inherits it.
  • A new Expectation.delete rather than reusing .write: that one's 404 advice names stele update and says to publish the page first, which on a delete is the opposite instruction — an agent following it would recreate the page it was asked to remove. The delete advice frames "already gone" as the work being done. conflict: .none, because this route asks for no name and a 409 on it is a genuine surprise.
  • Stdout stays empty on success. Every other page command's stdout is a URL, which is what makes url=$(stele publish page.html) safe; a confirmation line here would be captured by the same idiom and handed onward as an address. The dim deleted <slug> goes to stderr beside the deadline line; --json echoes the slug on stdout.
  • 404 exits 7, matching update/amend — a typo'd slug is an error to branch on, not a 0 that means nothing happened. No new exit code.

Testing

  • 5 new tests: request shape (method/path/credential/no body), slug percent-encoding through Path.segment, the 204 empty-body no-decode regression, and the 404/403 mappings. Full suite: 152 tests passing.
  • Live smoke against stele.olympus.lan: publish → delete (exit 0, empty stdout) → delete again (exit 7, new advice) → GET answers 404.

Not in this PR

  • Version still reads 0.2.0 — bumping ships as its own chore commit per repo convention (chore: report 0.2.0, the version --ttl actually shipped in #3), and the server's version gate makes it worth a deliberate call.
  • The publish-to-stele skill claims to cover "delete or unpublish"; updating it to point at stele delete is queued as a follow-up.

🤖 Generated with Claude Code

The server has answered DELETE /pages/:slug since the beginning; this
gives the CLI a verb for it. `SteleClient.delete` bypasses the
JSON-decoding `send` helper — success is a 204 with no body, and routed
through `send` every successful delete would surface as a
malformedResponse. Its 404 advice is written for the reader a delete
actually has: "already gone" is the work being done, not a page to
publish first.

On success stdout stays empty, deliberately — every other page
command's stdout is a URL, and a deleted page has none to print. The
confirmation goes to stderr; --json echoes the slug back. A delete
aimed at a slug with no live page behind it exits 7 rather than
claiming work the server never did.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ProJedi1234, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: 1f70737f-c526-4c25-9bca-3b653dbb3323

📥 Commits

Reviewing files that changed from the base of the PR and between ab32d1d and 407df13.

📒 Files selected for processing (7)
  • README.md
  • Sources/SteleKit/SteleClient.swift
  • Sources/SteleKit/SteleError.swift
  • Sources/stele/Exit.swift
  • Sources/stele/PageCommands.swift
  • Sources/stele/Stele.swift
  • Tests/SteleKitTests/SteleClientTests.swift

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@ProJedi1234
ProJedi1234 merged commit 1e9b00e into main Aug 7, 2026
2 checks passed
@ProJedi1234
ProJedi1234 deleted the feat/stele-delete branch August 25, 2026 21:26
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