Skip to content

Qt-removal R7.6b: the cutover - delete graphlink_app/, burn-down pin reaches 0#157

Merged
dovvnloading merged 1 commit into
mainfrom
qt-removal/r7-6b-cutover
Jul 27, 2026
Merged

Qt-removal R7.6b: the cutover - delete graphlink_app/, burn-down pin reaches 0#157
dovvnloading merged 1 commit into
mainfrom
qt-removal/r7-6b-cutover

Conversation

@dovvnloading

Copy link
Copy Markdown
Owner

The cutover. Deletes graphlink_app/ (289 .py files, 149 of them importing Qt) and the three Qt files left in graphlink_plugins/. Zero files in the repository import PySide6 or PyQt. qt_burndown.json goes 152 → 0 and the gate test's zero-mode assertions now carry the load.

The one hard entanglement

npm run check:schema shelled out to graphlink_app/graphlink_island_codegen.py, so deleting the directory would have broken the frontend build.

Its closure moves to a new top-level contracts/ package — codegen.py, payload_schema.py, and the 11 payload dataclasses the SPA imports. Recon confirmed all 25 payload modules were already Qt-free with zero non-stdlib imports, so the move needed no rewriting.

The registry is pruned 25 → 11 here rather than in #156, where doing it while the dataclasses still lived in graphlink_app/ broke 61 tests. The dataclass and its generated artifact are one unit and had to be deleted together.

Test coverage, stated plainly

The 19 per-payload schema tests died with graphlink_app/. They could not be ported one-for-one — every one imported a Qt bridge class (DragSpeedBridge, NotificationBridge, …) to exercise the payload alongside its publisher.

contracts/tests/test_generated_artifacts.py replaces them by parametrizing over GENERATED_ARTIFACTS, so it covers all 11 surviving payloads where the old files covered 5, and a new registry entry is guarded automatically instead of shipping unguarded until someone writes its file. The codegen CLI's drift tests are ported, repointed from composer-state to scene-state.

Genuinely lost: the bridge-publishes-a-valid-payload round-trip, whose Qt publishers no longer exist.

Backend test count drops 2505 → 961 because ~1550 tests lived in graphlink_app/tests/.

Gate test

The find_spec("PySide6") is None assertion is deleted. It tested whether the developer's environment had a Qt wheel installed, not whether Graphlink contains Qt — a contributor with PySide6 installed for an unrelated project would have failed a gate they hadn't broken, with pip uninstall as the "fix" for a red build. A declaration check across pyproject.toml and requirements* replaces it.

Negative-testing that rewrite found a bug in it: the first version globbed requirements*.txt, which misses requirements.in — the pip-compile source. Qt could have been re-added there and passed the gate until the next recompile. Both probes (a Qt-importing file, a manifest re-declaring Qt) now fail the gate as they should.

Two breaks found while deleting

  • [project.gui-scripts] still pointed at graphlink_app:main, which no longer exists. Repointed to graphlink_desktop:main, the pywebview shell.
  • The py-modules/package-dir indirection existed only to map graphlink_app/'s contents to the top of the distribution. With the directory gone it collapses to a flat layout — which closes both packaging gaps R7.2 recorded as accepted-for-now: the 17 relocated modules are listable again, and version = { attr = "graphlink_version.APP_VERSION" } now resolves instead of hard-failing a real build.

Test plan

  • python -m pytest -q (what CI runs, whole repo): 961 passed
  • npm run check: 779 frontend tests, 0 lint errors, typecheck/build clean
  • check:schema passes from its new home; 11 artifact sets up to date
  • Gate negative-tested in both directions, not just observed green
  • qt_burndown.json = 0/0/0; zero Qt-importing files repo-wide

Remaining

R7.6c: README/CONTRIBUTING/PR-template rewrite and the live §0 GATE drive. This PR is the structural end of the Qt removal; R7.6c is documentation and acceptance.

Deletes graphlink_app/ (289 .py files, 149 of them importing Qt) and the
three Qt files left in graphlink_plugins/. Zero files in the repository
import PySide6 or PyQt. qt_burndown.json goes 152 -> 0 and the gate test's
zero-mode assertions now carry the load.

The one hard entanglement was the codegen: `npm run check:schema` shelled
out to graphlink_app/graphlink_island_codegen.py, so deleting the directory
would have broken the frontend build. Its closure moves to a new top-level
contracts/ package - codegen.py, payload_schema.py, and the 11 payload
dataclasses the SPA imports. Recon confirmed all 25 payload modules were
already Qt-free with zero non-stdlib imports, so the move needed no
rewriting. The registry is pruned 25 -> 11 here rather than in R7.6a,
where doing it while the dataclasses still lived in graphlink_app/ broke
61 tests: the dataclass and its generated artifact are one unit and had to
be deleted together.

Test coverage, stated plainly. The 19 per-payload schema tests died with
graphlink_app/ and could not be ported one-for-one - every one of them
imported a Qt bridge class to exercise the payload alongside its publisher.
contracts/tests/test_generated_artifacts.py replaces them by parametrizing
over GENERATED_ARTIFACTS, so it covers all 11 surviving payloads where the
old files covered 5, and a new entry is guarded automatically. The codegen
CLI's drift tests are ported, repointed from composer-state to scene-state.
Genuinely lost: the bridge-publishes-a-valid-payload round-trip, whose Qt
publishers no longer exist.

Gate test: the `find_spec("PySide6") is None` assertion is deleted. It
tested whether the developer's environment had a Qt wheel installed, not
whether Graphlink contains Qt, and made `pip uninstall` the fix for a red
build on a machine that had PySide6 for some unrelated project. A
declaration check across pyproject.toml and requirements* replaces it.
Negative-testing that rewrite found a bug in it: the first version globbed
`requirements*.txt` and so missed requirements.in, the pip-compile source -
Qt could have been re-added there and passed.

Two breaks found and fixed while deleting:

- [project.gui-scripts] still pointed at `graphlink_app:main`, now gone.
  Repointed to graphlink_desktop:main, the pywebview shell.
- The py-modules/package-dir indirection existed only to map graphlink_app/'s
  contents to the top of the distribution. With the directory gone it
  collapses to a flat layout, which closes both packaging gaps R7.2 recorded
  as accepted-for-now: the 17 relocated modules are listable again, and
  `version = { attr = "graphlink_version.APP_VERSION" }` now resolves instead
  of hard-failing a real build.

961 backend tests pass, down from 2505 because ~1550 lived in
graphlink_app/tests/. 779 frontend tests, 0 lint errors, build clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dovvnloading
dovvnloading merged commit 6c919f6 into main Jul 27, 2026
2 checks passed
@dovvnloading
dovvnloading deleted the qt-removal/r7-6b-cutover branch July 27, 2026 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant