Drop the f-string Var marker from array ref names
Type of change
- Bug fix (non-breaking change which fixes an issue)
Description
Follow-up to #7691, which made format_ref strip the f-string Var marker so singular ref names are identical in every build. The array variant format_array_ref was not updated: it folds the whole marker into the sanitized name, so an f-string array ref like f"item_{var}" becomes refs_item__reflex_Var_1527262189261635202_item__someVar_ — the per-run hash is baked into the compiled ref name and changes every run, defeating the reproducibility goal of #7564/#7691 for array refs.
The fix strips the marker exactly like the singular formatter, producing refs_item__someVar_.
Tests
Two new parametrized cases in test_format_array_ref (with and without an index) fail on main (aeea15a) and pass with this change; all 161 test_format.py cases pass. ruff and pyright clean. News fragment added.
Changes To Core Features:
- Have you added an explanation of what your changes do and why you'd like us to include them?
- Have you written new tests for your core changes, as applicable?
- Have you successfully ran tests with your changes locally?