Repository navigation
docs(rfc): rewrite the Layer 1 RFC after review [DMD-1900] - #709
Merged
Merged
Conversation
Two review passes (Opus + Sonnet) and a design discussion reshaped the
document. The command surface is unchanged; what changed is what may
happen without a human saying so, plus a batch of factual corrections.
Design decisions:
- Auto-merge is a destructive act, and classifying only `merge` as such
was theatre. A background scheduler runs every approved MR armed with
autoMergeStrategy through the SAME MergeProcessor under a system token
(AutoMergeCandidateRepository.php:44-47, AutoMergeTickHandler.php:86),
polling rather than hooking approve, retrying indefinitely. So
create/update escalate to destructive when they arm it, and
request-review/approve/resolve escalate on an already-armed MR.
Confirmation sits where a human CHOOSES an irreversible outcome
(merge, arming); escalation sits wherever one is CAUSED. `none` never
escalates -- it is the disarm, and escalating it would let
--deny-destructive lock the hazard in place.
- One rule replaces a per-command table: when an invocation resolves to
`destructive`, --json requires an explicit target. Derived from the
house rule that implicit branch resolution selects the SCOPE while the
target is always named (storage delete-table takes the active branch
but requires --table-id; branch delete requires --branch because there
the branch IS the target). A bare `--json merge` would satisfy neither
of the repo's two destructive shapes -- it neither prompts nor names.
Inverting --yes under --json was considered and rejected: zero
precedent across 48 commands carrying the flag.
- Flag is `--merge-request-id` (short alias `--id`), not `--mr-id`: a
bare noun is the context you work IN (--project 206x, --branch 94x),
`--<noun>-id` is the object you act ON (20 flags, ~170 uses).
- Every serve route declares require_permission, or the classification
above is decorative over HTTP (only auth.py does today).
Corrections:
- The module split is justified qualitatively; output.py is at 679 CODE
lines of 1000, not the 1013 raw lines previously cited (CONTRIBUTING
measures code lines -- the exact mistake it warns about).
- The wire field list is deleted, not fixed: the notes doc is the
authority. The previous list was wrong three ways (createdAt exists,
mergerName is nested in merge{}, autoMerge* are response fields too).
- diff/allowed_actions claims are now true rather than aspirational --
Layer 2 applied the findings (get_config_diff derives the branch from
the MR; _enrich_row carries allowed_actions everywhere).
- Rich markup escaping, --state/--take pre-validation to exit 2, plain
ConfigError -> exit 5, the mandatory CLI-layer test file, the serve
wiring steps and route-order hazard, `resolve --take delete
--change-description` being silently dropped, `update` with no fields
being a no-op, and the branch-merge deprecation also resetting
active_branch_id.
E2E remains explicitly unsettled.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Rewrite of
docs/merge-requests-layer1.mdafter two review passes and a design session (merged 2026-08-31 into the Layer 2 branch). The implementation of the RFC is a separate PR: see the open PR onms/dmd-1900/cli-layer-1.🤖 Generated with Claude Code