Mirror registry's poetry.lock → pyproject.toml rewrite client-side and pin
the identity contract for depGraphOutputToSCAResult.
Identity.TargetFile is derived from the legacy CLI's targetFileFromPlugin
and flows downstream into the monitor project identity. If it ever diverges
from what the legacy CLI itself sends, existing monitor projects can become
unfindable and duplicates get created.
Registry applies one compatibility transform on input: exact-string
"poetry.lock" → "pyproject.toml". The bundled python plugin already
produces "pyproject.toml" form, so this is dead code today, but if any
upstream invariant ever breaks we would silently start creating duplicate
projects. mapToTargetFileIdentity mirrors the rewrite and logs if it fires,
so an upstream regression would be visible rather than silent.
Also adds a contract comment warning against substituting NormalisedTargetFile
when targetFileFromPlugin is nil — doing so would change identity for
workspaces, maven, sbt, rubygems and break existing customers.
This PR adds a small fix to
Identity.TargetFileto ensure it matches the logic in Registry. Currently,depGraphOutputToSCAResultforwards the legacy CLI'stargetFileFromPluginfield intoIdentity.TargetFile, and that value flows downstream into the monitor project identity. If it ever diverges from what the legacy CLI itself sends, existing monitor projects are not found and duplicates get created.Registry applies one compatibility transform on input: exact-string
"poetry.lock"→"pyproject.toml".snyk-python-pluginalready produces"pyproject.toml", so the transform is unused today, but if that invariant ever breaks (e.g. changes to the Poetry resolver) we would no longer be matching the behaviour in Registry.