Port Verify — act101 Agent Skill
Gate a cross-language port for correctness — composes port-scoped behavioral equivalence, contract parity, and port-manifest drift into a port-correctness verdict. Use to verify that a ported function matches its source before marking the port done.
port-verify
A port-correctness gate: confirm a ported function behaves like its source and that the port manifest is not drifting. Composes two Enterprise verification ops with the port inventory.
Honesty caveat (read first)
This is a structural/contract comparison (v1), not execution-based differential
testing. verify_port_parity and verify_behavioral_equivalence (scope=port)
compare only dimensions BOTH grammars model — a dimension modeled by one side
only is reported unknown, never falsely preserved/diverged. Each result
carries modeled_kinds; an empty set for either grammar means that dimension is
uncovered. Per-grammar degradation across the source/target language pair is the
norm — name both languages and the uncovered dimensions. Verdicts are advisory.
Tier
Enterprise. verify_behavioral_equivalence at scope:"port",
verify_port_parity, and the port_* manifest/inventory tools are all
Enterprise and enforce the tier themselves.
Tools (in order)
| Step | Tool | What it answers |
|---|---|---|
| 1 | verify_behavioral_equivalence (scope:"port") |
Do the source and ported functions have an equivalent control-flow shape under cross-language normalization? |
| 2 | verify_port_parity |
Do signature arity, return presence, effect-kind set, CFG shape, and raise count match across the language pair? |
| 3 | port_inventory |
Is the manifest consistent — is this symbol marked ported, and is the target verified? Surfaces drift. |
Workflow
- Call
verify_behavioral_equivalencewithscope:"port", the sourcetarget/fileand the ported version (viabefore/afteror the manifest mapping).equivalentconfirms shape held;changedlists which dimensions diverged;unknownmeans a dimension could not be normalized across the pair — do not claim parity on it. - Call
verify_port_paritywithsource_file/source_targetandported_file/ported_target. Read the verdict (preserved/diverged/unknown), thedimensions_checked, and everymismatch. Adivergeddimension is a hard gate failure. - Call
port_inventoryto check manifest state for the file: is it marked ported, are ported/stubbed symbols recorded, does target verification pass? A symbol that is structurally equivalent but absent/stubbed in the manifest is drift — the manifest and reality disagree.
Verdict synthesis
- PORT VERIFIED —
equivalent(port scope) AND paritypreservedwith ≥1 jointly-modeled dimension AND the manifest marks the symbol ported with a verified target. - PORT DIVERGED — equivalence
changedor paritydivergedon any modeled dimension; report the exact dimension and the mismatch. - MANIFEST DRIFT — structurally equivalent but the manifest disagrees (unrecorded, stubbed, or unverified target).
- UNKNOWN — either op returned
unknown/emptymodeled_kindson a dimension; name the source+target languages and the uncovered dimension. Never present UNKNOWN as VERIFIED.
Output
Per ported symbol: the equivalence result, the parity verdict with
dimensions_checked + mismatches, the manifest status, and the gate verdict.
Quote modeled_kinds for both languages on any UNKNOWN.