overengineeringstudio / overengineeringstudio/effect-utils

notion-md edit: conflict exits 0, not scriptable

Open
#795 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
TypeScript
Stars
82
Forks
2
Avg merge
1d 8h
Merged PRs (30d)
121

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the editEditorPage catch for NmdConflictError and trace how editorExitCode derives the process status; compare it with the file-sync conflict path and the NmdConflictError exit-code contract. Done means notion-md edit returns exit 7 on conflict while still relocating .conflict.md and rendering the WARNING plus fix: output.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.