@@ -60,6 +60,39 @@ class Remote {
6060}
6161
6262/// A source code repository.
63+ ///
64+ /// This class is an abstraction over a git
65+ /// repository on the local disk. Ideally this abstraction would hide from
66+ /// the outside libraries what git calls were needed to either read or update
67+ /// data in the underlying repository. In practice, most of the bugs in the
68+ /// conductor codebase are related to the git calls made from this and its
69+ /// subclasses.
70+ ///
71+ /// Two factors that make this code more complicated than it would otherwise
72+ /// need to be are:
73+ /// 1. That any particular invocation of the conductor may or may not already
74+ /// have the git checkout present on disk, depending on what commands were
75+ /// previously run; and
76+ /// 2. The need to provide overrides for integration tests (in particular
77+ /// the ability to mark a [Repository] instance as a [localUpstream] made
78+ /// integration tests more hermetic, at the cost of complexity in the
79+ /// implementation).
80+ ///
81+ /// The only way to simplify the first factor would be to change the behavior of
82+ /// the conductor tool to be a long-lived dart process that keeps all of its
83+ /// state in memory and blocks on user input. This would add the constraint that
84+ /// the user would need to keep the process running for the duration of a
85+ /// release, which could potentially take multiple days and users could not
86+ /// manually change the state of the release process (via editing the JSON
87+ /// config file). However, these may be reasonable trade-offs to make the
88+ /// codebase simpler and easier to reason about.
89+ ///
90+ /// The way to simplify the second factor would be to not put any special
91+ /// handling in this library for integration tests. This would make integration
92+ /// tests more difficult/less hermetic, but the production code more reliable.
93+ /// This is probably the right trade-off to make, as the integration tests were
94+ /// still not hermetic or reliable, and the main integration test was ultimately
95+ /// deleted in #84354.
6396abstract class Repository {
6497 Repository ({
6598 required this .name,
0 commit comments