Imagine returning to a test environment and finding resources left over from an earlier run. They have been around for a while. That makes them worth looking at, but it leaves a question about what is happening now. A worker could still be using them. We examined a reporting tool that puts an eligibility decision beside each group of resources it finds. In local fixtures, the same old group received two different decisions when we changed the runner state. Both reports completed successfully. That made the case a useful way to separate the result of running a report from what the report says about a particular group.
Hold the inventory constant
We gave the reporting tool a synthetic inventory containing one aged group with consistent ownership information. The test replaced calls to the container service and runner checks with stubs and fixed the clock. In one case, the stub reported that the runner service was inactive and that there was no matching worker. The report marked the group eligible and returned exit zero. It issued no removal command to the stub. The outcome tells us what the tool reported for those particular inputs.
For the second case, we kept the group and its age the same and changed the service state to active. This time the report marked the group refused and explained why. It still returned exit zero. If we had checked only the status of each invocation, we would have recorded two successes and missed the difference we set out to test. The result of running the report tells us that it completed in these two cases. The classification inside the report tells us what it concluded about the group. Age alone could not explain that classification because the two inventories contained the same aged group.
Distinguish a refusal from an incomplete inventory
We tried a third case with a failure during an inventory read. The initial list was available, but the tool could not get the details it requested. This invocation returned exit three and reported that the inventory had to be complete. That is a different result from the successful report that included a refusal. With the active runner, the tool had enough information to describe one reason to leave the group alone. With the failed read, the tool reported a problem with gathering the information it needed for classification.
This distinction matters for a reader who is trying to understand what was observed. A reason attached to a group refers to that group and the checks that were made on it. An incomplete inventory diagnostic refers to the quality of the information available for the report itself. If a reader records both as a generic cleanup failure, they lose the ability to tell whether the tool completed its inspection. They also lose the reason that the tool was unable to proceed in the incomplete case.
Keep the plan and the action separate
In a fourth fixture, the tool was asked for a removal plan using the same eligible input but without confirmation. It reported that nothing had been deleted and returned exit two. Across all four fixtures, no removal commands reached the stub. That check addresses what the reporting and unconfirmed planning paths did in these cases. It gives us no observation of the removal path and no evidence about how real resources would respond to it.
A hosted end-to-end job for the change passed separately. We did not verify that it ran these fixtures. The four outcomes above come from local execution with stubs at the merged revision. The stubs gave us a controlled inventory and let us change one fact at a time. They leave open what happens when runner state changes between a real inspection and a later action. A dated report can preserve the observation an operator made earlier without showing that the same group would receive the same classification now. A useful report records enough detail for a reader to distinguish a completed inspection, a group-level refusal, an incomplete inventory, and an unconfirmed plan. Each has a different meaning even though none of the four local invocations removed anything.
← All engineering articles