Implementation Plan
Concrete, ordered edits to implement the change described in
backfill-method-removal-architecture.md.
Names and paths are used verbatim from that document. Two files change; none are
created.
1. Edit AgentService.java
Path:
agentspan/src/main/java/org/conductoross/conductor/ai/agentspan/runtime/service/AgentService.java
Delete, in this order (deleting methods before fields keeps the file compiling between steps if applied incrementally):
-
The backfill method and its Javadoc. Remove the block from the
/** Backfill the agent execution classifier index ... */Javadoc through the closing brace ofprivate void backfillLegacyAgentExecutionClassifiers()(currentlyAgentService.java:407–460). -
The
backfillVersionOfhelper and its Javadoc. Remove/** Read the stored backfill version ... */through the closing brace ofprivate static int backfillVersionOf(Map<String, Object> metadata)(currentlyAgentService.java:462–469). -
The
reindexAgentExecutionshelper and its Javadoc. Remove/** Reindex an agent's persisted executions ... */through the closing brace ofprivate void reindexAgentExecutions(String agentName)(currentlyAgentService.java:471–521). -
The two constants (currently
AgentService.java:64–68), including the two-line comment aboveAGENT_CLASSIFIER_BACKFILL_VERSION_VALUE:
private static final String AGENT_CLASSIFIER_BACKFILL_VERSION =
"agent_classifier_backfill_version";
// Version 2 additionally reindexes generated router sub-workflows, which older compiler
// output persisted as ordinary workflow executions.
private static final int AGENT_CLASSIFIER_BACKFILL_VERSION_VALUE = 2;
- The now-unused
indexDAOfield (currentlyAgentService.java:75):
- The now-unused import (currently
AgentService.java:46):
Do not touch
Leave the SearchResult, WorkflowSummary, and WorkflowModel imports and the
executionDAO / metadataDAO / workflowService fields in place — they are
used by searchExecutionsRaw, searchAgentExecutions, and other surviving
methods (verified references at AgentService.java:600, 728, 765, 780, 973,
1548, 1553).
2. Edit AgentSpanDeploymentContractEndToEndTest.java
Path:
test-harness/src/test/java/com/netflix/conductor/test/integration/agent/AgentSpanDeploymentContractEndToEndTest.java
- Delete the failing test method in full — from its
@Testannotation through the closing brace ofvoid legacyAgentClassifierBackfillUsesConcreteExecutionTimeBounds() throws Exception(currentlyAgentSpanDeploymentContractEndToEndTest.java:295–338). This removes the reflective calls:
Method backfill =
AgentService.class.getDeclaredMethod("backfillLegacyAgentExecutionClassifiers");
backfill.setAccessible(true);
backfill.invoke(agentService);
- Remove the unused reflection import (currently
AgentSpanDeploymentContractEndToEndTest.java:18):
Only remove it after confirming no other method in the file uses
java.lang.reflect.Method (see §3). Keep the AgentService import — the
surrounding test class still autowires and uses AgentService elsewhere.
3. Pre-removal verification (grep)
Before deleting the import in step 2 of §2, confirm the symbol is not used elsewhere in the test file:
grep -n "\bMethod\b" test-harness/src/test/java/com/netflix/conductor/test/integration/agent/AgentSpanDeploymentContractEndToEndTest.java
Expect matches only inside the deleted method. If any remain outside it, keep the import.
After editing both files, confirm the removed symbols are gone repo-wide:
grep -rn "backfillLegacyAgentExecutionClassifiers\|backfillVersionOf\|reindexAgentExecutions\|AGENT_CLASSIFIER_BACKFILL_VERSION" \
agentspan/src test-harness/src
Expect no output. (The string literal "agent_classifier_backfill_version"
may still appear in unrelated data such as previously deployed metadata, but not
in these source files.)
4. Format and build
Per AGENTS.md:
5. Ordering note
Both edits should land in the same commit. The test edit alone would leave
dead code the reviewer asked to remove; the production edit alone would leave
AgentSpanDeploymentContractEndToEndTest throwing NoSuchMethodException again
at runtime. Applying them together satisfies both review comments at once.