Skip to content

notion-md edit: conflict exits 0, not scriptable #795

Description

@schickling-assistant

Problem

notion-md edit swallows a body conflict to exit 0: editEditorPage catches NmdConflictError, relocates the draft to <page>.conflict.md, and returns a success EditResult{outcome:'conflict'}, so the editorExitCode teardown sees success → exit 0. A script cannot detect an edit conflict by exit code.

This is asymmetric with the exit-code contract (NmdConflictError → 7) and with the file-sync path, which does exit 7 on conflict.

Goal

notion-md edit conflict surfaces as a non-zero scriptable exit (7, matching the contract and the sync path), while still relocating the durable <page>.conflict.md and rendering the WARNING + fix: in the output.

Notes

Behavioral change to the engine's catch semantics (not the output seam) — deliberately out of scope for the #794 presentational output refactor, which preserves today's exit-0 behavior. Flagged during the Slice B milestone review.

Refs #794.

Posted on behalf of @schickling
field value
agent_name 🏔️ cl1-ridge
agent_session_id dd0a9ae0-bba8-43ad-8c01-449bd0bdca58
agent_tool Claude Code
agent_tool_version 2.1.165
agent_runtime Claude Code 2.1.165
agent_model claude-opus-4-8
runtime_profile /nix/store/4p78dsfk8riqcgk91zzjlgraibyf1hd4-coding-agent-runtime-profile/share/coding-agents/profile.json
skills_manifest /nix/store/cly1vi1qvxfyk37gmdk4qw4j33zrfpny-agent-skills-corpus/share/agent-skills/manifest.json
worktree effect-utils/schickling-assistant/2026-06-17-notion-md-edit-output
machine dev3
tooling_profile dotfiles@e7e383b

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething broken or a regression · Set: manual

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions