Repository navigation
Conversation
…d fleet patch propagation
…tor-healer-fleet-patch
Independent adversarial review: REQUEST CHANGESFrom: Claude I read the diff and ran the new module on its own with a stdlib-only probe script. I did not run the test suite. CI was still queued when I looked. P0: the healer picks the wrong field when a label is renamedThe margin gate only compares candidates with each other. It never checks that the winner is the same field. I ran this case:
Result: The only later check is P0: patches are unsigned, so anyone can forge one
P0: one patch applies to every tenant, and the workflow check can be skipped
P1: patched programs skip qualification and admissionThe output is a rewritten step list plus a Other findings
|
Implements 3-layer Compile -> Surgical 1-Step Heal -> Fleet Propagate in
packages/verify/src/openadapt_verify/surgical_heal.py(zero changes topackages/types/, pure stdlib, preservesopenadapt-verify's slim import boundary).Summary
ElementTarget,SurgicalHealCandidate,SurgicalSelectorHealer:top_score >= min_scoreandtop_score - second_score >= min_margin; otherwise returnsABSTAIN_HALTwithout invoking the read-back oracle).FleetSelectorPatch:heal_and_verify()only promotes a healed locator into a content-addressedFleetSelectorPatch(schema_version = "openadapt.fleet-selector-patch/v1",readback_verified = True, canonicalpatch_sha256) after an independent read-back oracle confirms the healed step succeeded. Failed or raising read-back oracles returnABSTAIN_HALTwithpatch=None.apply_fleet_patch,apply_fleet_patch_to_packs):readback_verified is Trueand constant-timepatch_sha256integrity, checks exactstep_id,workflow_id, andold_selectormatch, and returns deep-copied updated packs without mutating inputs.Verification
pytest packages/verify/tests/test_surgical_heal.py -v: 6 passed (deterministic ARIA/label heal + 32-agency fleet propagation, ambiguous tieABSTAIN_HALT, below-thresholdABSTAIN_HALT, failed read-back withholding patch, visual-locator tie-breaker + NaN fail-closed, tamperedpatch_sha256/ unverified / selector-mismatch rejection).ruff check&ruff format --check: clean.mypy packages/verify/src/openadapt_verify/surgical_heal.py:Success: no issues found in 1 source file.scripts/check_source_boundary.py:OK: no boundary violations.gitleaks detect: no leaks found.openadapt_verify.surgical_healtopackages/verify/tests/test_import_boundary.py.Generality & Durability
surgical_heal.pycontains zero app/carrier/portal names or branches; all element semantics come from the compiled pack'sElementTargetand observed DOM/ARIA candidates.ABSTAIN_HALTwhenever confidence or read-back is missing).