Normalizing Argo CD's Empty `directory.jsonnet` Default in the Harbor Postflight
The Harbor recovery helper was tripping over a serialization detail rather than a real mismatch: Argo CD materializes an empty directory.jsonnet default on the values-reference source in the Application spec and comparison, then omits it in the sync result. This push teaches the postflight comparison to treat those as the same thing, so a cosmetic default no longer looks like drift.
How read_for_verification reconciles the source shape
I added read_for_verification in scripts/harbor-full-sync.py and routed both the preflight read and the VERIFY.verify call through it. For the Harbor Application only, it rebuilds the values-reference source with the empty jsonnet default and, when the spec, comparedTo, or syncResult source matches that shape, drops the key. Every other read and every other resource passes through untouched, so the normalization stays narrow and the stale-source checks still see real differences.
What the new test cases establish
The additions to scripts/ci/harbor-full-sync-test.py are test code, not a cluster result. One case sets the empty default on both the spec and comparison sources and asserts postflight still reports controller_verified. The second sets matching non-empty extVars on both sides and asserts a Failure naming stale_operationSources. Together they pin the boundary: an absent-versus-empty default is accepted, a genuine source change is not.
Where the pattern transfers
I recorded the exception in openwiki/operations/harbor-oci.md so the next operator does not read it as tolerance for arbitrary drift. Any platform team diffing a controller’s live state against its declared spec will hit the same class of problem, where the API server fills defaults the controller later omits. The transferable move is to normalize only the documented default, in one helper, and to keep a test that proves a real divergence still fails. Runtime confirmation on the next actual recovery sync is still the open check.