Qt-removal R7.6b: the cutover - delete graphlink_app/, burn-down pin reaches 0#157
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The cutover. Deletes
graphlink_app/(289.pyfiles, 149 of them importing Qt) and the three Qt files left ingraphlink_plugins/. Zero files in the repository import PySide6 or PyQt.qt_burndown.jsongoes 152 → 0 and the gate test's zero-mode assertions now carry the load.The one hard entanglement
npm run check:schemashelled out tographlink_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.pyreplaces them by parametrizing overGENERATED_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 fromcomposer-statetoscene-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 Noneassertion 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, withpip uninstallas the "fix" for a red build. A declaration check acrosspyproject.tomlandrequirements*replaces it.Negative-testing that rewrite found a bug in it: the first version globbed
requirements*.txt, which missesrequirements.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 atgraphlink_app:main, which no longer exists. Repointed tographlink_desktop:main, the pywebview shell.py-modules/package-dirindirection existed only to mapgraphlink_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, andversion = { 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 passednpm run check: 779 frontend tests, 0 lint errors, typecheck/build cleancheck:schemapasses from its new home; 11 artifact sets up to dateqt_burndown.json= 0/0/0; zero Qt-importing files repo-wideRemaining
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.