Files
sencho/backend
Anso d57d2a3ee9 fix(gitops): compare stale artifact probes by platform membership (#2034)
* fix(gitops): compare stale artifact probes by platform membership

The Direct dispatch probe decided that an accepted generation's executable
identity had moved by comparing artifact set fingerprints. A fingerprint pins
one platform child per service, so it only compares resolutions made on the
same platform. A target whose architecture differs from the one that produced
the frozen expected set resolved a different fingerprint for the same approved
child of a multi-arch tag, recorded stale for a converged target, advanced the
newest-evidence pointer to that row, and surfaced as artifact stale in the
projection and in attention.

Route the probe through the same per-target platform membership the Blueprint
drift path applies, so a target that matches the approved child for its own
platform is no longer stale, a real move of that child still is, and an
expected set with no per-service evidence keeps the fingerprint verdict.

* fix(gitops): keep the stale probe fail-closed on a changed service set

The membership test only walks the expected services and weighs the registry
ones, so it cannot tell an extra or renamed service from an unchanged set, and
with nothing to weigh it answers vacuously. The probe resolves the live stack
rather than the staged candidate, so a stack edited out of band can carry a
different set than the one that was frozen, and that is a moved identity rather
than a matching one.

Ask membership only when both sides hold the same services. A set that grew or
shrank keeps the fingerprint verdict, as does an expected set that recorded no
per-service evidence.

* fix(gitops): tell a swapped service apart from an unchanged set

The set-equality check compared service names, so a service that kept its name
while swapping a local build for a published image still looked unchanged, and
the membership test had no registry service left to weigh. Compare the kind of
each service as well as its name, and cover that flip.

Also fold the same-platform move into the moved-child test, since it shares the
service set and belongs beside it rather than as its own case.
2026-10-01 08:29:11 -04:00
..