Skip to content

Commit ff62dd5

Browse files
2-meancursoragent
andcommitted
refactor: Gate 6 batch 6 remove spectral_fl package shim
Drop the deprecated import root after serialized-asset scan showed no legacy module paths. Refresh gate-check 3/4c, CI compile, package tests, and tombstone docs. Remove leftover spectral_fl/ directory to avoid namespace package shadowing. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8e90b0c commit ff62dd5

15 files changed

Lines changed: 34 additions & 165 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- name: Compile Python files
2929
run: |
3030
python -m py_compile run_experiment.py run_vision_experiment.py run_vision_suite.py run_vision_stress_grid.py run_vision_client_count_sweep.py run_graph_ablation.py
31-
python -m py_compile graphfl_lab/*.py spectral_fl/*.py
32-
python -m compileall -q graphfl_lab spectral_fl tests scripts
31+
python -m py_compile graphfl_lab/*.py
32+
python -m compileall -q graphfl_lab tests scripts
3333
3434
- name: Unit smoke tests
3535
run: python -m unittest discover -s tests

.github/workflows/nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
- name: Compile Python files
3030
run: |
3131
python -m py_compile run_experiment.py run_vision_experiment.py run_vision_suite.py run_vision_stress_grid.py run_vision_client_count_sweep.py run_graph_ablation.py
32-
python -m py_compile graphfl_lab/*.py spectral_fl/*.py
33-
python -m compileall -q graphfl_lab spectral_fl tests scripts
32+
python -m py_compile graphfl_lab/*.py
33+
python -m compileall -q graphfl_lab tests scripts
3434
3535
- name: Unit smoke tests
3636
run: python -m unittest discover -s tests

MIGRATION.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ python run_experiment.py --track cora ...
2525
During deprecation, old names remain available where documented:
2626

2727
```text
28-
spectral_fl (shim; `strategies.spectral` import path removed in Gate 6 batch 5)
2928
configs/general/...
3029
result_general_* (readers only; new runs no longer write mirrors)
3130
general_suite_* (readers only; new runs no longer write mirrors)
@@ -100,25 +99,15 @@ Gate sequence:
10099
Gate 0 workspace/status/check contract
101100
Gate 1 inventory
102101
Gate 2 schema/config contract
103-
Gate 3 graphfl_lab package migration with spectral_fl shim
102+
Gate 3 graphfl_lab package migration (`spectral_fl` shim removed in Gate 6 batch 6)
104103
Gate 4 unified runner and nightly
105104
Gate 5 behavior-preserving modularization
106105
Gate 6 hard cleanup and 1.0.0
107106
```
108107

109-
Gate 3 keeps a `spectral_fl` shim until Gate 6. The shim must cover:
110-
111-
```text
112-
DeprecationWarning
113-
GRAPHFL_LAB_SILENCE_DEPRECATION=1
114-
sys.modules alias behavior
115-
pickle round-trip compatibility
116-
```
117-
118-
Gate 6 must provide `scripts/dev/migrate_serialized_objects.py` before removing
119-
old import aliases. Any preserved pickle/checkpoint asset with `spectral_fl.*`
120-
module paths must be migrated before hard cleanup or explicitly declared outside
121-
post-Gate-6 compatibility guarantees.
108+
Gate 6 batch 6 removed the `spectral_fl` import shim. Use `graphfl_lab` for all
109+
new imports. Run `scripts/dev/migrate_serialized_objects.py` before loading
110+
external pickle assets; tracked repo assets had no legacy module-path markers.
122111

123112
Migration C5 (public docs/commands) status: complete on `main`. Gate 4c nightly
124113
evidence is recorded in `docs/maintenance/last_nightly_run.json`. Gate 6

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,9 @@ graphfl_lab/
231231
strategies/
232232
graphfl/ graph-FL runtime
233233
baselines/ baseline strategies
234-
spectral/ old import compatibility
235234
experiments/
236235
vision/ current run orchestration
237236
suites/vision/ suite grammar and reporting
238-
general/ old module compatibility
239-
240-
spectral_fl/
241-
__init__.py old package import shim
242237
243238
scripts/
244239
checks/ non-training validation
@@ -331,7 +326,6 @@ New code uses `vision`, `graphfl`, `graph_filtered_*`.
331326

332327
| Old name | Role |
333328
|---|---|
334-
| `spectral_fl` | old package import shim |
335329
| `spectral_filtered_*`, `spectral_filter_strength` | config/result compatibility alias |
336330
| `general_suite_*`, `result_general_*` | historical output filenames (readers only; new runs use vision names) |
337331

docs/maintenance/cleanup-status.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ disagree, rerun the relevant gate check and update this file from the result.
99

1010
| Field | Value |
1111
|---|---|
12-
| current_gate | Gate 4c complete on `main`; Gate 6 batches 1–3 in progress on `main` |
13-
| status | PR #2 merged; nightly 26288800411 green; Gate 6 batches 2–5 landed; `spectral_fl` shim and root `general_*` CLI facades remain per `gate-6-prep.md` |
12+
| current_gate | Gate 4c complete on `main`; Gate 6 batch 6 in progress on `main` |
13+
| status | PR #2 merged; nightly 26288800411 green; Gate 6 batches 2–6 landed (`spectral_fl` shim removed); root `general_*` CLI facades and batch 7–8 remain |
1414
| owner | codex |
1515
| started_at | 2026-05-21 |
1616
| last_verified | see `docs/maintenance/last_gate_check.json` |
17-
| next_step | Confirm CI green on batch 5 commit; then batch 6 (`spectral_fl` shim) only after grep shows no remaining imports; batch 7 legacy CLI tokens last |
17+
| next_step | Push batch 6 and confirm CI green; then batch 7 (legacy CLI choices / suite tokens); batch 8 close status + `removed-materials.md` |
1818

1919
Only one Gate branch should be active at a time. In short: use a single Gate branch.
2020
If parallel work is
@@ -271,6 +271,8 @@ result-schema contracts.
271271
| 2026-05-22 | Gate 6 batch 3: root `run_general_*` and `plot_general_*` / `merge_general_*` / `deep_dive_general` wrappers only re-exported vision CLIs after C5. | Delete wrappers; compile canonical `run_vision_*` in CI/nightly; drop `run_general_experiment` from `gate-check 4b` contract. |
272272
| 2026-05-22 | Gate 6 batch 4: `graphfl_lab/experiments/general/` and `suites/general/` were star-import facades with no remaining in-repo consumers after batch 3. | Delete import-path wrappers; keep root `general_*` CLI shims and `strategies/spectral/` for batch 5+. |
273273
| 2026-05-22 | Gate 6 batch 5: `graphfl_lab/strategies/spectral/` mirrored `strategies/graphfl` with no in-repo Python imports; spectral math stays under `graph/operators` and `graphfl` modules. | Delete strategy import facades; use `graphfl_lab.strategies.graphfl` (or `spectral_fl.strategies.graphfl` via shim until batch 6). |
274+
| 2026-05-22 | Gate 6 batch 6 pre-check: active `spectral_fl` imports only in `tests/core/test_package_alias.py`, gate-check fixtures, `scripts/dev/*`, and `scripts/archive/` (archive skipped by gate 3b). `migrate_serialized_objects.py` reports 0 legacy byte markers. | Remove shim; tombstone in `docs/removed-materials.md`; update gate-check 3/4c and package tests; do not remove `general_*` CLI facades in same batch. |
275+
| 2026-05-22 | Deleting only `spectral_fl/__init__.py` left an on-disk `spectral_fl/__pycache__` tree; Python 3 still exposed a namespace package and gate-check 3 flagged the tracked path until the directory was removed. | Delete the full `spectral_fl/` directory (not only `__init__.py`); assert `ModuleNotFoundError` after clearing `sys.modules`. |
274276

275277
## Gate 4c Local Readiness
276278

@@ -281,7 +283,7 @@ present: scripts/dev/golden.py + tests/dev/test_golden.py + tests/golden/README.
281283
local pass: python scripts/dev/run.py gate-check 4c
282284
local pass: python scripts/dev/run.py gate-check 5d-prep
283285
Gate 6 entry: pragmatic policy (4c + merge CI green; optional 1 more green before first deletion)
284-
Gate 6 hard removal: batches 2–5 done; batches 6–8 remain — see docs/maintenance/gate-6-prep.md
286+
Gate 6 hard removal: batches 2–6 done; batches 7–8 remain — see docs/maintenance/gate-6-prep.md
285287
```
286288

287289
## Closure Policy

docs/maintenance/gate-6-prep.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ replace with the recommended check above unless you explicitly want a week-long
3636
3. [x] Remove `run_general_*` root wrappers and `plot_general_*` / `merge_general_*` / `deep_dive_general` script wrappers.
3737
4. [x] Remove `graphfl_lab/experiments/general/` and `graphfl_lab/experiments/suites/general/` import facades.
3838
5. [x] Remove `graphfl_lab/strategies/spectral/` wrappers (keep real spectral math names in operators).
39-
6. Remove `spectral_fl` package shim last, after grep shows no remaining imports outside tests explicitly checking deprecation.
39+
6. [x] Remove `spectral_fl` package shim last, after grep shows no remaining imports outside tests explicitly checking deprecation.
4040
7. Remove legacy CLI choices (`spectral_filtered_*` inputs) and old suite token spellings only after suite/history policy is frozen.
4141
8. Update `docs/maintenance/cleanup-status.md` to `closed` and link from `docs/removed-materials.md`.
4242

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"gate": "5d-prep",
2+
"gate": "3b",
33
"pass": true,
44
"failed_checks": [],
5-
"verified_at": "2026-05-22T13:09:27.027433+00:00",
6-
"commit_sha": "a81d70286aa817c3fcd012dc30a9ae263386ef62"
5+
"verified_at": "2026-05-22T13:15:55.360258+00:00",
6+
"commit_sha": "8e90b0caacc052cfc1eea833fedf122723c38f41"
77
}

docs/removed-materials.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ documents after Gate 6.
1414

1515
| Path or material | Status | Replacement |
1616
|---|---|---|
17+
| `spectral_fl/__init__.py` (package shim) | removed Gate 6 batch 6 | `graphfl_lab` canonical imports; serialized assets scanned via `scripts/dev/migrate_serialized_objects.py` |
1718
| `docs/maintenance/cleanup-status.md` | active until Gate 6 | After Gate 6, mark closed and link from this table. |
1819
| `docs/framework/experimental-design.md` | removed duplicate bridge | `docs/framework/graph_fl_experimental_design.md`, `docs/framework/graph_fl_experimental_design_appendix.md` |
1920

docs/structure.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ graphfl_lab/
7777
Keep these thin. Add new logic in scoped modules, then re-export only if compatibility requires it.
7878

7979
```text
80-
spectral_fl/__init__.py
8180
graphfl_lab/aggregation.py
8281
graphfl_lab/client.py
8382
graphfl_lab/general_client.py

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies = [
1818
]
1919

2020
[tool.setuptools.packages.find]
21-
include = ["spectral_fl*", "graphfl_lab*"]
21+
include = ["graphfl_lab*"]
2222

2323
[tool.flwr.app]
2424
publisher = "local"

0 commit comments

Comments
 (0)