TML-2812: file unify-pretty-rendering slice in the migration-graph-rendering project#709
Conversation
Adds the slice spec, decision D14 (trunk-choice rule = live-contract chain),
and a README entry for TML-2812. The slice closes the gap between the project
thesis (D1: one shared graphical renderer) and what the merged slices produce
on disk: same input ⇒ byte-identical pretty output across migration list,
migration status, migration graph, modulo statuss applied/pending overlay
column and per-command footer.
Three locked changes:
- trunk-choice rule (D14): the chain containing the live contract is the
trunk; historical-ref chains render as indented side-branches. list
already implements this; status and graph adopt it.
- per-row data: every migration row everywhere renders
dirName . from -> to . N ops . {invariants}; status appends a single
overlay column.
- space iteration: graph adopts the all-spaces-by-default policy that list
and status already use (D4).
JSON shapes stay distinct (D2/D3). The question of whether graph is worth
keeping as a separate top-level command is deferred per operator.
Signed-off-by: Will Madden <madden@prisma.io>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (3)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Per markdown-no-artificial-line-wraps skill: prose paragraphs are now one line each. No content changes. Signed-off-by: Will Madden <madden@prisma.io>
At a glance
After #704 (
log), #705 (status), and #706 (list→tree) merged, the migration read-command family was supposed to share one rendering engine (D1). Demoing the result against the demo fixture revealed it doesn't, in three independent ways:listpicks the live-contract chain as the trunk;statusandgraphpick the historical-ref chain.listshows ops + invariants;statusshows applied/pending;graphshows neither.listandstatusrender every on-disk space;graphsilently scopes to one.This PR is docs-only. It files TML-2812 as a new slice in the
migration-graph-renderingproject — locking the design before implementation.What this PR contains
projects/migration-graph-rendering/slices/unify-pretty-rendering/spec.md— zero-open-questions, decision-led, with at-a-glance, locked design, acceptance, and out-of-scope.decisions.md— pins the trunk-choice rule (the chain containing the live contract is the trunk; historical-ref chains render as side-branches). D1 promised "one shared renderer"; D14 closes the gap that allowed three commands feeding the same renderer to pick different trunks.No code changes; the implementation is the next slice's PR.
Locked decisions
listalready does this;statusandgraphadopt it.dirName · from → to · N ops · {invariants}everywhere.statusappends a single overlay column (✓ applied/⧗ pending); that's the only command-specific visual difference.--space <id>narrows.graphadopts the policylistandstatusalready use (D4).graph's{ nodes, edges }stays;list/statusper-space arrays stay. JSON consumers diverge by design (D2/D3).Out of scope (called out in the spec)
migration graph— explicitly deferred per operator ("Let's leave consolidation for a later task"). After TML-2812 lands,graphandlistproduce identical pretty output but distinct JSON; whethergraphshould remain a separate top-level command is a future call.--trunk <ref>flag is conceivable but not asked for here.Alternatives considered
listandgraphnow. Tempting, since their pretty output will converge. But their JSON consumers genuinely differ (one wants the flat package list, the other wants{ nodes, edges }). Operator deferred this decision; surfacing a separate slice keeps the option open without forcing it now.migrate's default--to). D14 records the rationale.