Get the mode from the Branch object instead of passing it separately when possible.

This doesn't change any functionality.

Also a bit of comment cleanup.

PiperOrigin-RevId: 421241010
diff --git a/src/main/java/com/google/devtools/build/lib/dynamic/LocalBranch.java b/src/main/java/com/google/devtools/build/lib/dynamic/LocalBranch.java
index 59f4a7f..90ff49b 100644
--- a/src/main/java/com/google/devtools/build/lib/dynamic/LocalBranch.java
+++ b/src/main/java/com/google/devtools/build/lib/dynamic/LocalBranch.java
@@ -61,12 +61,17 @@
       IgnoreFailureCheck ignoreFailureCheck,
       Function<Spawn, Optional<Spawn>> getExtraSpawnForLocalExecution,
       AtomicBoolean delayLocalExecution) {
-    super(DynamicMode.LOCAL, actionExecutionContext, spawn, strategyThatCancelled, options);
+    super(actionExecutionContext, spawn, strategyThatCancelled, options);
     this.ignoreFailureCheck = ignoreFailureCheck;
     this.getExtraSpawnForLocalExecution = getExtraSpawnForLocalExecution;
     this.delayLocalExecution = delayLocalExecution;
   }
 
+  @Override
+  public DynamicMode getMode() {
+    return LOCAL;
+  }
+
   /**
    * Try to run the given spawn locally.
    *
@@ -164,7 +169,7 @@
           (exitCode, errorMessage, outErr) -> {
             maybeIgnoreFailure(exitCode, errorMessage, outErr);
             DynamicSpawnStrategy.stopBranch(
-                remoteBranch, this, LOCAL, strategyThatCancelled, options, this.context);
+                remoteBranch, this, strategyThatCancelled, options, this.context);
           },
           getExtraSpawnForLocalExecution);
     } catch (DynamicInterruptedException e) {