Because we apply both MATCH rule and DELETE rule on the artifact, foo.txt, the first MATCH rule makes the subsequent DELETE rule moot. However, both MATCH rule and DELETE rule here are meaningful. We need MATCH rule to guarantee the integrity of artifacts between steps. We also need DELETE rule to guarantee that deleted artifacts don't appear as products of this step.
This is a problem that @lukpueh points out in the in-toto/layout-web-tool#49 (comment):
Here is an example of a material rule:
Because we apply both
MATCH
rule andDELETE
rule on the artifact,foo.txt
, the firstMATCH
rule makes the subsequentDELETE
rule moot. However, bothMATCH
rule andDELETE
rule here are meaningful. We needMATCH
rule to guarantee the integrity of artifacts between steps. We also needDELETE
rule to guarantee that deleted artifacts don't appear as products of this step.