Skip to content

Report where a published draft lives; live smoke cleans up - #36

Merged
jthingelstad merged 1 commit into
mainfrom
claude/publish-url
Oct 5, 2026
Merged

jthingelstad merged 1 commit into
mainfrom
claude/publish-url

Conversation

@jthingelstad

Copy link
Copy Markdown
Owner

What the first live smoke run found

Sign-in, CLI reads, doctor, every MCP read, and the draft create and edit all passed against POAPChallenge. After post_publish, though, the draft URL no longer resolved: post_get and post_delete returned "The post with the requested URL was not found." So the test post was left published on the test blog.

Cause: _dispatch_claimed overwrote every edit, publish and delete result's url with the URL it was called with. For publish, that's the draft URL, which micro.blog retires on publish.

Fix

  • post_publish keeps the URL micro.blog's response reports, if it differs from the draft URL and _owns_url confirms it's on the selected blog. The old URL is returned as draft_url. Otherwise the result is unchanged.
  • The post_publish output schema adds draft_url, and docs/mcp-schemas.json is regenerated.
  • New test: a moved Location is reported; an off-blog Location is ignored; a 204 with no Location keeps the old URL.

Live smoke

  • It now deletes the URL publish reports. If that URL doesn't read back as published, it searches the blog's recent posts and drafts for its marker text, then prints what it found.
  • It sweeps any leftover "mb live smoke" posts, which removes the post stranded by run 37368849777.
  • It checks operation_status on the create operation, which is always recorded.

We still don't know whether micro.blog's publish response includes the new URL at all. The next run prints it. If it doesn't, mb needs its own way to find the moved post, and that would be a follow-up.

Verification

569 tests pass; ruff, format and mypy are clean.

🤖 Generated with Claude Code

The first live smoke run showed that Micro.blog moves a draft to a new
URL when it is published, and post_publish then reported the dead draft
URL, so a following edit or delete found nothing. Keep the URL the
publish response reports when it is on the selected blog, and add
draft_url with the old one.

Live smoke now deletes the URL publish reports, falls back to finding
its post by marker text, prints what Micro.blog returned, and sweeps any
marker posts an earlier failed run left behind.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T21:49:34.308063Z ad91d8c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jthingelstad
jthingelstad merged commit 49cdd23 into main Oct 5, 2026
12 checks passed
@jthingelstad
jthingelstad deleted the claude/publish-url branch October 5, 2026 21:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad91d8c0b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/mb/shapes.py
"post_edit": _WRITE,
"post_delete": _WRITE,
"post_publish": _WRITE,
"post_publish": _obj({}, {"url": _STR, "id": _STR, "draft_url": _STR}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Teach both guides to follow the published URL

This changes the public post_publish contract so that publishing can retire the draft identifier and callers must use the returned data.url, but neither src/mb/guidance/mcp.md nor src/mb/commands/guide.py explains that behavior; both still tell agents only to read back the result. An agent following the shipped guidance can therefore reuse the dead draft URL for read/edit/delete and reproduce the failure this change fixes. Update both guides with the moved-URL workflow as required for command changes.

AGENTS.md reference: AGENTS.md:L373-L373

Useful? React with 👍 / 👎.

@jthingelstad jthingelstad mentioned this pull request Oct 5, 2026
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