You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Purpose**: Development history for architecture reviews and restart prompts.
4
-
> **Last Updated**: 2026-04-12
4
+
> **Last Updated**: 2026-05-10
5
5
> **Maintained By**: Marian Ivanov (miranov25)
6
6
7
7
## How to Use This File
@@ -41,10 +41,10 @@ This file is intended for AI reviewers and human collaborators as a **restart co
41
41
AliasDataFrame is a high-performance data analysis framework for particle physics research at CERN's ALICE experiment. It provides schema-driven, lazy-evaluated columns and hierarchical joins for ROOT/Parquet data.
**Commits**: `9fe1e620` (Part A), `99881100` (Part B)
289
+
290
+
**Proposal**: `PHASE_13_24_ADF_v1.2_Proposal.md` (5-reviewer panel, reviewer-drafted by Claude36 after 2 failed coder attempts)
291
+
292
+
**Background — two failed attempts** (both reverted):
293
+
- Attempt 1 (`MappingProxyType`): 47 tests broken, 49 errors — `MappingProxyType` is not JSON-serializable, broke `export_tree`
294
+
- Attempt 2 (`_ReadOnlyAliasDict` without internal audit): 15 tests broken — `apply_schema` line 9303 writes through `self.aliases[name] = expr`, a pre-existing silent no-op exposed by the property change
295
+
296
+
**Root cause**: Internal code path in `apply_schema()` used the public `aliases` property as a write surface. The audit found exactly 1 such site (line 9303).
297
+
298
+
**Part A — Internal write redirection** (`9fe1e620`, behavior-neutral):
**Status**: ✅ Fixed (included in Phase 13.23.ADF step 2 commit)
379
+
**Commit**: `878ee941` (part of Phase 13.23.ADF)
380
+
381
+
**Problem**: `add_alias()` updates the expression in `_schema["columns"]` but does NOT drop the old materialized column from `self.df`. Stale values persist silently. Aliases that transitively depend on the redefined alias also keep their stale materialized values. Production impact: iterative calibration with coefficient-swap pattern produces wrong corrections.
382
+
383
+
**Root cause**: No invalidation mechanism — `add_alias()` overwrites the schema entry but never checks if the old value was materialized.
384
+
385
+
**Fix**: New `_invalidate_alias_cascade(name)` method — builds reverse dependency map via `_resolve_dependencies()`, BFS from changed alias to find all transitive dependents, drops all stale materialized columns. Raw columns never dropped. Called in `add_alias()` after schema write.
386
+
387
+
**Tests**: V1-V7 (7 invariance tests): basic redefine, cascade, 3-level cascade, unrelated not dropped, raw columns protected, new alias no drop, production pattern (iterative calibration with subframe coefficient swap).
| Two-cycle merge for property changes | Audit internal writes (Part A) before changing return type (Part B); validated by 2 failed single-cycle attempts |
778
+
|`_restore_aliases_from_dict` as sanctioned write path | 3 independent reviewers (GPT10, GPT11, Claude37) converged; avoids spreading `setdefault({})["expr"]` across file |
779
+
| Greedy left→right walk for multi-level subframes |`A.B.C.val` parsed segment-by-segment; first non-subframe segment = leaf column |
0 commit comments