v0.29.0 - DataFrameState shared reference (2026-03-22)¶
What Changed?¶
This release introduces DataFrameState, a shared mutable object that holds all core DataFrame data (data, headers, length).
All internal submodules now hold a reference to the same DataFrameState instance, so any mutation is immediately visible across all submodules without an explicit sync call.
The internal _syncSubmodules() method has been removed entirely.
What's New¶
Main Feature: DataFrameState shared reference¶
What it does:
Replaces the three separate private fields (_data, _headers, _length) in DataFrame with a single DataFrameState object.
All submodules share the same reference, eliminating the need to propagate state changes manually.
How to use it:
DataFrameState is now publicly exported and can be used for type annotations in tests or third-party extensions.
Code example:
import type { DataFrameState } from "gaslamp";
const state: DataFrameState = {
data: new Map(),
headers: [],
length: 0,
};
Added¶
DataFrameStateinterface exported publicly fromsrc/torch/dataframe/core/state.ts
Changed¶
- All 12 DataFrame submodules now accept
DataFrameStateinstead of individualdata/headers/lengtharguments DataFrameValidationnow holds aDataFrameStatereference instead of a plainheadersarrayDataFrameManipulation.reset()return type changed from object tovoid— resets state in placeupdateReferences()in all submodules marked@deprecated— no longer called byDataFrame
Fixed¶
- Stale state bug: submodules could hold a stale
headersreference afterfromMap()replaced the array. Fixed by sharing theDataFrameStateobject reference.
Is It Safe to Upgrade?¶
- Breaking Changes: Yes
- Backward Compatible: No
The constructor signatures of all internal submodule classes have changed.
If you were constructing submodules directly (e.g. new DataFrameValidation(wright, headers)), update to pass a DataFrameState object instead.
Normal DataFrame usage via the public API is unaffected.
Release Details¶
- Date: 2026-03-22
- Version: v0.29.0
- gaslamp: version 71
- pilotlamp: version 28
- Files Changed: 156
- Commits:
- f298dc7 feat(torch): add DataFrameState interface and export it publicly
- 8fea8f3 refactor(torch)!: add _state field to DataFrame as preparation for state migration
- 4fc5fa4 refactor(torch)!: migrate all submodules to accept DataFrameState
- c429bb0 refactor(torch)!: remove
_data/_headers/_lengthfields and_syncSubmodulesfrom DataFrame - 3b01d44 docs(torch): update docstrings for DataFrameState migration
- 48b80c6 docs(torch): fix stale updateReferences docstrings in DataFrame submodules
- 1fb4719 docs(torch): mark updateReferences as deprecated in all DataFrame submodules
Known Issues¶
updateReferences()still exists as dead code in all submodules. Will be removed in a future release.- Circular references between submodules and
core/dataframe.tsremain (submodules callnew DataFrame()to return results). No runtime impact — will be addressed in a separate issue.
Next Steps¶
- Remove
updateReferences()from all submodules (cleanup issue) - Investigate circular reference resolution via factory function injection