SpawnStrategy is no longer used as an ActionContext.

Part of the rollforward of https://github.com/bazelbuild/bazel/commit/37aeabcd39fe326d1c4e55693d8d207f9f7ac6c4.

PiperOrigin-RevId: 315524854
diff --git a/src/main/java/com/google/devtools/build/lib/actions/SpawnStrategy.java b/src/main/java/com/google/devtools/build/lib/actions/SpawnStrategy.java
index 0059941..2ce9e78 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/SpawnStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/SpawnStrategy.java
@@ -15,9 +15,17 @@
 
 import com.google.common.collect.ImmutableList;
 
-/** A context that allows execution of {@link Spawn} instances. */
-@ActionContextMarker(name = "spawn")
-public interface SpawnStrategy extends ActionContext {
+/**
+ * An implementation of how to {@linkplain #exec execute} a {@link Spawn} instance.
+ *
+ * <p>Strategies are used during the execution phase based on how they were {@linkplain
+ * com.google.devtools.build.lib.runtime.BlazeModule#registerSpawnStrategies registered by a module}
+ * and whether they {@linkplain #canExec match a given spawn based on their abilities}.
+ */
+// TODO(blaze-team): If possible, merge this with AbstractSpawnStrategy and SpawnRunner. The former
+//  because (almost?) all implementations of this interface extend it; the latter because it forms
+//  a shadow hierarchy graph that looks like that of the corresponding strategies.
+public interface SpawnStrategy {
 
   /**
    * Executes the given spawn and returns metadata about the execution. Implementations must
@@ -53,6 +61,5 @@
    */
   // TODO(katre): Remove once strategies are only instantiated if used, the callback can then be
   //  done upon construction.
-  @Override
   default void usedContext(ActionContext.ActionContextRegistry actionContextRegistry) {}
 }
diff --git a/src/test/java/com/google/devtools/build/lib/exec/util/TestExecutorBuilder.java b/src/test/java/com/google/devtools/build/lib/exec/util/TestExecutorBuilder.java
index ac76890..77a175a 100644
--- a/src/test/java/com/google/devtools/build/lib/exec/util/TestExecutorBuilder.java
+++ b/src/test/java/com/google/devtools/build/lib/exec/util/TestExecutorBuilder.java
@@ -94,10 +94,6 @@
    */
   public <T extends ActionContext> TestExecutorBuilder addContext(
       Class<T> identifyingType, T context, String... commandlineIdentifiers) {
-    if (SpawnStrategy.class.isAssignableFrom(identifyingType)) {
-      SpawnStrategy spawnStrategy = (SpawnStrategy) context;
-      strategyRegistryBuilder.registerStrategy(spawnStrategy, commandlineIdentifiers);
-    }
     actionContextRegistryBuilder.register(identifyingType, context, commandlineIdentifiers);
     return this;
   }