task-work: recognize app.notion.com URLs (closes #158)#159
Closed
martin-conur wants to merge 1 commit into
Closed
Conversation
is_notion_url() only matched notion.so/notion.site, so app.notion.com links — the form Notion now serves and the Notion MCP fetch/search tools return — fell through to the slug-only branch, leaving NOTION_URL empty. The worker then launched with a bare /worker and no task. Add notion.com to the predicate in both Notion loadouts (claude-notion, kiro-notion). Safe: notion.so/notion.site URLs never contain notion.com, nor does a free-form slug; derive_slug_from_url already handles the /p/<32-hex> tail. Adds regression tests covering the single-arg and explicit slug+URL forms for app.notion.com in both loadouts. task-reviewer is unaffected — its non-gh path accepts any ISSUE_INPUT generically. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Starting a worker for a Notion task silently dropped the spec URL: the worker launched with a bare
/workerand no task, and the operator had to paste the URL in by hand. Jira was unaffected.Root cause (#158)
is_notion_url()only matchednotion.so/notion.site:Notion now serves workspace/page links as
app.notion.com— and the Notion MCPfetch/searchtools return URLs in that form. The predicate returned false, no arg-resolution branch matched, and parsing fell through to the slug-onlyelse, leavingNOTION_URL="".build_claude_cmdthen emittedclaude … "/worker"with no task identifier. Deterministic, not flaky.Fix
Add
notion.comto the predicate in both Notion loadouts (claude-notion,kiro-notion):Safe: real
notion.so/notion.siteURLs never containnotion.com, nor does a free-form slug.derive_slug_from_urlalready handles the…/p/<32-hex>tail.Tests
Added regression tests (confirmed red before the fix, green after) for the single-arg and explicit
slug + URLforms using anapp.notion.comURL:tests/claude_notion_task_work.bats(3)tests/kiro_task_work.bats(2)Full suite: 799 passing, 0 failures; drift check passes; shellcheck clean on both edited scripts.
Note
#158 speculated
task-reviewercarries the same predicate — it does not. Its non-gh path uses a genericSPEC_IDENTIFIER="$ISSUE_INPUT"with no Notion-specific filter, so it was never affected. No change needed there.Closes #158
🤖 Generated with Claude Code