Skip to content

Block publish on missing Notion instead of silently degrading#45

Open
parsakhaz wants to merge 1 commit into
mainfrom
notion-block-on-unavailable
Open

Block publish on missing Notion instead of silently degrading#45
parsakhaz wants to merge 1 commit into
mainfrom
notion-block-on-unavailable

Conversation

@parsakhaz

Copy link
Copy Markdown
Member

What happened

An epic publish today (bloomapi/bloom-mono#338) ran in a session with no Notion connection. The notion skill returned NOTION UNAVAILABLE and the publish continued per the letter of the procedure: the Notion page was never created, the GitHub issue went out as a ~10-line summary whose "full spec lives in the linked work item" pointed at nothing, and the refs/ artifacts (PostHog funnel pulls, code research with file:line findings) existed only on one machine. The refs layer is what justifies keeping specs lean — a publish that drops it is a failed publish, but the current wording treats it as an acceptable degraded outcome and lets it happen silently.

(Aggravating factor: the session's synced ~/.references copy predated #44, so it didn't even run the artifact-comment fallback. That's a sync problem, but it shows silent degradation compounds.)

Change

tyler/.claude/skills/notion/SKILL.md — setup step 1 no longer silently returns NOTION UNAVAILABLE when a human is present. Interactive sessions block, surface the connection path (claude mcp add --transport http notion https://mcp.notion.com/mcp + /mcp), and retry once connected; an explicit user skip returns NOTION SKIPPED BY USER. Headless runs (cron/cloud) keep the non-blocking NOTION UNAVAILABLE so nothing hangs on a prompt nobody can answer.

tyler/references/publish-work-item.md — degraded mode (the #44 artifact-comment fallback) is now gated on those two explicit signals instead of firing automatically; it must set the issue body to the full item.md (not the caller's summary) and record the skip in frontmatter so a later notion publish re-run is an obvious TODO. The done-when now names the failure mode this prevents: artifacts stranded on one machine, or an issue referencing a Notion page that doesn't exist.

Why blocking is right here

Publish is the one moment the artifacts leave the local machine. Every caller (/create-feature, /create-epic, /create-issue) is human-invoked, so there is always someone present to either connect Notion or consciously accept degraded mode — the cost of pausing is seconds, the cost of silent degradation is a work item that can't be picked up remotely and dangling references in the issue. Headless is carved out explicitly so /do-adjacent automation never deadlocks.

🤖 Generated with Claude Code

An epic publish (bloomapi/bloom-mono#338) ran with no Notion connection
and a stale local copy of these files: the Notion page was never created,
the GitHub issue was a ~10-line summary that referenced a 'linked work
item' that didn't exist, and the refs/ artifacts (data pulls, code
research) existed only on one machine. The degraded path executed
silently when the right move was to stop and connect.

- notion skill setup: with no Notion tools/CLI, interactive sessions now
  block with the connection path and retry after connecting; only an
  explicit user skip returns NOTION SKIPPED BY USER. Headless runs keep
  the non-blocking NOTION UNAVAILABLE so cron/cloud never hangs on a
  prompt.
- publish procedure: degraded mode is gated on those two explicit
  signals, sets the issue body to the full item.md (not the summary),
  records the skip in frontmatter, and the done-when now names the
  failure this PR is preventing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@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: 63c17bcd34

ℹ️ 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".

`NOTION UNAVAILABLE` from a headless run.
6. Degraded mode: the issue must carry everything a remote `/do` needs —
set the issue body to the **full `item.md` content** (not the summary),
record `notion: SKIPPED — re-run notion publish when connected` in the

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid using notion: for skipped publishes

When a user explicitly skips Notion, this writes a non-URL sentinel into the notion: frontmatter. Later /do wrap-up treats any notion: reference as a real Notion target (tyler/.claude/skills/do/SKILL.md lines 170-173) and invokes the notion upload operation with it, so degraded items can fail at wrap-up or try to upload plan/wrapup to SKIPPED — ... instead of simply skipping or re-publishing. Use a separate flag/status or update /do to recognize this sentinel before adding it to the canonical notion: field.

Useful? React with 👍 / 👎.

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