test-suite/fhevm/COMPAT.md
Compatibility exists for one narrow reason: keep explicitly supported older targets runnable when the CLI evolves.
In practice, this usually means latest-supported, or another target the project still intends to support, even though the current CLI may have changed:
The compatibility layer lives in src/compat/compat.ts.
compat-smoke actually checksThe PR workflow runs one narrow behavioral smoke:
coprocessor and kms-connector service definitions for latest-supportedIt does not fully replay the rendered runtime. It does not try to prove every compose mount, env_file, or entrypoint wiring path.
So compat-smoke answers this question:
Does the current CLI still speak a compatible command/env contract to the legacy images we explicitly support?
It does not answer this stronger question:
Does the whole legacy stack still boot exactly like a full runtime replay?
For that, targeted runtime QA is still needed.
When a supported old target breaks, there are only three valid responses:
src/compat/compat.tssrc/compat/compat.tssrc/resolve/target.tsUse a shim when the old supported bundle can still run with a small CLI-side adjustment.
Examples:
Use an incompatibility rule when the combination should fail early with a clear message instead of reaching boot.
Use a support-floor increase when the project no longer intends to support that bundle at all. Today that includes the simple-ACL floor and the later gw-listener drift-address floor in src/resolve/target.ts.
If you change any of these, assume compatibility may need to be touched:
Treat compat-smoke as a narrow contract probe, not as a full stack replay.