Problem/Motivation

After deploying `redirect_audit` in production environments with complex redirect structures, some inconsistencies have been observed across the different layers of the system (detection, storage, fix workflow, and UI).

The main observed behaviors are:

- On high-volume sites, the audit may fail to complete within memory or time constraints.
- Some redirect chains can be recorded multiple times, affecting dashboard metrics.
- Self-loops may be represented inconsistently between processing and UI display.

Overall, these behaviors can lead to results that do not fully align with the actual redirect topology in large-scale scenarios.

Motivation / Context

The goal of the `redirect_audit` module is to help validate redirect health and provide reliable insights for fixing issues.

In real-world environments with large and complex redirect graphs, some inconsistencies have been identified between the reported results and the actual state after analysis and correction workflows. This can reduce clarity when interpreting audit results in complex cases.

The objective of this work is to stabilize the behavior across all layers so that a full audit and fix cycle produces consistent results, operates within expected resource limits, and accurately reflects the final state in the UI.

This change is strictly focused on bug fixing and minimal hardening of existing flows. It does not introduce new features, configuration changes, or structural refactors outside the affected areas.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

antonio nunez created an issue. See original summary.

antonio nunez’s picture

Status: Active » Fixed

This issue bundles a set of stability and reliability improvements for the module, focused on producing accurate audit results and making it usable on sites with large redirect sets.

Summary of what has been addressed:

  • Chains and self-loops are recorded with consistent metadata, avoiding duplicates and stale entries between runs.
  • Concurrent operations (scan, fix, clear, queue worker) are now coordinated to prevent inconsistencies.
  • Existing data from previous versions is migrated automatically via an update hook.

The module has been validated with kernel tests and stress scenarios covering thousands of redirects, multilingual setups, and a fresh install on legacy sites.

With these changes, the following related issues are also resolved and can be closed as part of this work:

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

antonio nunez’s picture

Status: Fixed » Closed (fixed)