Permits automation scripts accumulate duplicated logic that slows future changes. Which CI enhancement flags that before merge?
Select an answer to reveal the explanation.
Short Explanation
Quality scanning is the duplicate-stamp detector on permits scripts—catch copy-paste sprawl before it lands on main. Annual slide decks without a merge gate don't stop the sprawl.
Full Explanation
Code quality scanning can flag duplication and maintainability issues before merge, slowing the accumulation of copy-paste debt in automation. Permits automation scripts that accumulate duplicated logic should hit a CI enhancement that fails or warns per policy when duplication and maintainability thresholds are violated. The correct enhancement works because duplicated permit workflows multiply the cost of every rule change—fixing a bug in one copy while leaving others creates inconsistent citizen outcomes; pre-merge scanning surfaces that risk while the change is still cheap to fix.
Banning all static analysis so duplication never appears in reports fails because hiding the metric does not remove the debt; it only removes the chance to gate it. Merging first and measuring maintainability only after a production outage fails conceptually: outages are the most expensive feedback loop for quality problems that scanners can catch earlier. Tracking quality only in annual slide decks with no pipeline enforcement fails because slides do not block merges—without a CI gate, duplicated permits logic keeps landing daily.
Exam caveat: duplication thresholds need calibration—generated code and intentional repetition (e.g., mirrored jurisdiction adapters) may require narrow exclusions so the gate stays credible. Operational check: introduce a deliberate large duplicated block in a permits automation PR, confirm the quality scan flags it, refactor to a shared module, confirm the gate clears, and keep the scan as a required check on the protected branch.