`merge` should save its own study-level facts so datalad's generic aux commit does not arise
- Dominant language
- Python
- Stars
- 1
- Forks
- 4
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 24
Description
## What
A merge tick leaves three commits in the study: `babs merge` + the RIA pull-back move the derivative subdataset's HEAD mid-command, so `datalad run` takes its protective split — the content half under datalad's hardcoded, generic message **`Remaining changes after command execution`**, then the run record as a merge commit on top.
That aux commit is datalad's protective split working as designed, not a bug to fix upstream (considered and deliberately not filed 2026-08-24).
The fix is on our side, and it is already decided and in the spec (`docs/spec.md`, the per-subcommand save rule): **`mechababs-inner merge` saves its own study-level facts (shard + gitlink) last, under `record: is now merged`**.
The generic aux commit then does not arise and both remaining commits say something; the run record still wraps the subcommand's own commit — the record embracing the content, which is the shape to preserve.
`scaffold` keeps leave-uncommitted: it makes no commit datalad can see, so it already reaches the one-clean-RUNCMD shape and self-saving would split it.
## Where the code is behind the spec
`merge.merge()` ends at `write_state` + `return`, and its docstring still says "commits nothing at the study itself"; no save appears in `merge.py`, `inner.py` or `dispatch.py`.
Build sites: `inner.cmd_merge` + `dispatch`.
## Why it is a follow-up, not a fix before #114
Real merged cells (the 2026-09 OpenNeuroStudies shakeout) have the three-commit shape and the history is correct — the aux commit's message could be better, which is cosmetic to the provenance and worth doing but does not force a redo.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the per-subcommand save rule in docs/spec.md, then trace merge.merge() and the build sites in inner.cmd_merge and dispatch; the issue also identifies merge.py, inner.py, and dispatch.py. Confirm the merge path saves the study-level shard and gitlink last with the message `record: is now merged`, while scaffold remains leave-uncommitted and the generic auxiliary commit does not arise.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100