# Env Validation Overwrite and Route Invalidation Improvements in Assembler v8\.6\.0

Canonical URL : https://adonisjs-signal.jrmc.dev/insights/b38c322f-c150-413e-9170-465d63fb45ee
Source release or documentation date : 2026-10-18T12:02:42.000Z
Category : release | Developer impact : medium
Affected packages : @adonisjs/assembler, @adonisjs/session

The Assembler package v8\.6\.0 introduces an option to overwrite existing environment variable validations defined in \`start/env\.ts\` via \`defineEnvValidations\`\. This allows replacing validations instead of preserving them, fixing issues like stale enum values breaking type\-checking\. It also fixes code generation bugs related to trailing comments and improves route invalidation performance by parsing controllers once for all routes instead of per route\. Additionally, the \`ip\-address\` dependency was updated\.

## What this means for your code

Developers using codemods to define environment validations can now enable the \`overwrite\` option to replace existing validations, which helps avoid stale or conflicting validations\. This is especially relevant when running configure commands with \`\-\-force\`\. The fix to trailing comment handling prevents invalid code generation\. Route invalidation is more efficient, potentially speeding up development workflows\. No breaking changes are indicated, and the overwrite option is opt\-in\.

## Suggested actions

- Consider enabling the \`overwrite\` option in \`defineEnvValidations\` when regenerating env validations to avoid stale validations\.
- Review any custom env validation codemods to leverage the new overwrite behavior if desired\.
- Benefit from improved route invalidation performance without code changes\.
- No mandatory migration steps required\.

## Original sources

- [Replace existing env validations from codemods](https://github.com/adonisjs/assembler/releases/tag/v8.6.0)

AI-generated analysis based on the linked sources. Check the original documentation before changing your application.
