Repository navigation
chore(engine): remove the lyrashield-local terminal TUI - #204
Conversation
Local mode launches as Desktop only, so the terminal version of it is dead surface. Remove lyrashield/tui (6 files, 2156 lines) and tests/tui (6 files, 1580 lines), drop the lyrashield-local console script from pyproject.toml, drop the now-empty tests/tui Ruff per-file-ignore block and fix the UPGRADES.md line that named the removed entry point. The interface TUI at lyrashield/interface/tui stays. It is the default interactive mode of the lyrashield CLI and the founder kept it. Its live_view.py stays too because the viewer imports it. textual stays a base dependency so the CLI install story does not change. tests/test_package_artifacts.py asserted lyrashield/tui/app.py ships in the wheel and imports from it. That assertion now covers lyrashield/interface/tui/app.py, the TUI that remains. The six dead keys under scripts/customer-branding-allowlist.json that exempted the removed files are dropped so the exact-line allowlist keeps matching real files only. Co-Authored-By: Claude Code <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (16)
💤 Files with no reviewable changes (13)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe PR removes the legacy ChangesLegacy TUI removal
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Merge Risk: ⚪ Minimal · up to The legacy 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Remove the
lyrashield-localterminal TUISummary
Local mode launches as Desktop only. The terminal version of it, shipped as the
lyrashield-localconsole script, is therefore dead surface. This PR removes it.Deleted:
lyrashield/tui— 6 Python files, 2,156 lines.tests/tui— 6 files, 1,580 lines (5 test modules plus__init__.py).Edited:
pyproject.toml— removed thelyrashield-localconsole script (was line 82) and thetests/tui/*.pyRuff per-file-ignore block (was line 412).UPGRADES.md— line 109 namedlyrashield/lyrashield-localas the shipped entry points.It now names only
lyrashield.tests/test_package_artifacts.py— assertedlyrashield/tui/app.pyships in the wheel andimports from it. Those assertions now cover
lyrashield/interface/tui/app.py, the TUI thatremains.
scripts/customer-branding-allowlist.json— dropped the 6 keys that exempted the removedfiles. The allowlist matches exact source lines per file, so leaving keys for deleted files
would leave the allowlist asserting things about files that no longer exist.
Not touched, deliberately:
lyrashield/interface/tui— 22 files, 5,225 lines. It is the default interactive mode of thelyrashieldCLI (lyrashield/interface/main.py:466-471selects it whenever-n/--non-interactiveis absent) and the founder kept it.lyrashield/interface/tui/live_view.py— the viewer imports it atlyrashield/interface/viewer/transcript.py:56. It stays in place.textual— still a base dependency. Moving it to an optional extra changes the CLI installstory and is out of scope.
strix/**— untouched. The controlled-derivative footprint is unchanged.Total: 16 files changed, 4 insertions, 3,769 deletions.
Per-change safety proof
git grepover the whole repository at the new head. Three patterns, all clean.Nothing references the removed modules, the removed tests or the removed console script:
Searched surfaces:
lyrashield,lyrashield_adapter,strix,tests,scripts,pyproject.toml,strix.spec,Makefile,.github/**,containers/**,.pre-commit-config.yaml,.trivyignore.yaml,docs/**,README.md,CONTRIBUTING.md,uv.lock,benchmarks/**.Two references existed before the change and are handled, not ignored:
tests/test_package_artifacts.pyassertedlyrashield.tui.appis importable from a builtwheel, that
lyrashield/tui/app.pyis in the wheel and that it is in the sdist wheel. Allthree now point at
lyrashield/interface/tui/app.py. This test is the reason the removalneeded a code change and is the strongest proof that the wheel contents still cover a
product TUI. It passes (see gates).
scripts/customer-branding-allowlist.jsoncarried 6 exact-line exemptions for the removedfiles. Removed with them.
The only surviving mentions of
lyrashield/tuiare indocs/superpowers/plans/2026-09-25-deep-code-review.mdanddocs/superpowers/plans/2026-09-25-engine-improvements-plan.md. These are dated working notesfrom an earlier review that already quote drifted line numbers and reference paths that no
longer exist. They are not in
docs/docs.jsonnavigation and no code reads them. They are notin this PR's scope and editing history to hide a deletion would be the wrong call.
The
lyrashieldbinary is unchangedConsole entry points, before and after:
lyrashieldis byte-for-byte the same entry point. The.venv/bin/lyrashieldshim is presentand
lyrashield --helpruns..venv/bin/lyrashield-localis gone, which is the point.Frozen build.
uv build --wheelsucceeds and the wheel is checked directly:lyrashield/tui/**— absent from the wheel.lyrashield/interface/tui/**— 22 files present.entry_points.txt— contains onlylyrashield = lyrashield_adapter.cli:main.lyrashield_adapter.cli,lyrashield.interface.main,lyrashield.interface.tui.app,lyrashield.interface.viewer.server,strix.interface.tui.runtime.The PyInstaller spec needed no change and gets none.
strix.specnever listedlyrashield.tui— that module was never in the frozen release, which is consistent with thesweep. Its
lyrashield.interface.tui.appandlyrashield.interface.tui.renderershiddenimports still resolve, every one of its 16
lyrashield.*hidden imports still resolves, andits
datasglobs (skills/**/*.md,**/*.jinja,**/*.xml,**/*.tcss) surface no removedpath. A full
pyinstallerbuild could not run here: PyInstaller requiresobjdumpfrombinutils, which is absent from this sandbox and not installable in it. That is environmental,
and it is why the wheel was inspected directly and the spec's imports were resolved instead.
No license or doctor expectation is lost
lyrashield-localshipped adoctorcommand whose only license check wascheck_license_cache(lyrashield/tui/doctor.py:213-249). Its own docstring says what itdid: "The desktop shell owns the ed25519 license cache; the TUI only checks that a cached
license blob exists and is not expired. Full signature verification lives in the Tauri
license.rsmodule." It confirmed presence and minimum size, nothing more.That check is not lost, because Desktop performs it. The Tauri side verifies the ed25519
signature —
verify_licenseinapps/desktop/src-tauri/src/license/mod.rs:173, exercised bythe golden-vector tests in
apps/desktop/src-tauri/src/license/golden_vectors.rsincluding thetampered-blob
signature_mismatchcase — and it enforces expiry with an offline grace windowat
apps/desktop/src-tauri/src/license/mod.rs:138-143. The engine now contains no licensecheck at all, so nothing in the engine depends on the removed path.
Tests added
No test was added, because this PR removes a feature rather than fixing one. There is no
regression to write: the behaviour being deleted is the behaviour that is gone.
What stands in for it is a test that had to change and therefore proves the removal landed
cleanly.
tests/test_package_artifacts.py::test_wheels_exclude_go_inputs_and_retain_product_python_importsbuilds the wheel and the sdist, asserts
lyrashield/tui/app.pyis present in both and importsfive product modules from the wheel. Before this PR that test pinned the removed module. It now
pins
lyrashield/interface/tui/app.py, so the wheel is still asserted to carry a product TUIand to import it. Left unedited, this test fails on the deletion, which is the failing state
that justified the edit.
tests/tuihad 78 test cases. The suite drops from 3,087 to 3,009 collected cases, exactly the78 removed, with no other change in count.
Gates run
All commands run in
/agent/workspace/repos/eng-bat head8f71a8f, withuvon PATH.uv sync --frozenlyrashield-engine==1.2.1reinstalleduv run ruff check .uv run ruff format --check .uv run mypy strix lyrashield_adapter lyrashielduv run bandit -r strix lyrashield_adapter lyrashield -q -c pyproject.tomlpytest(full suite, split into three disjoint chunks so each fits the sandbox's 120 s per-command cap)python scripts/verify-customer-branding.pyscripts/verify-controlled-derivative.shBoth failures are environmental and both are present at baseline.
makeis absent from thissandbox, so
tests/test_quality_environments.py::test_precommit_and_make_run_the_same_type_checkfails on its
shutil.which("make")assertion.tests/test_local_sources.py::test_clone_repository_checks_out_a_full_commit_sha_detachedfails in the guarded-clone path. Neither reads any file this PR touches and both fail
identically at baseline
93b5517.Baseline comparison, same three chunks and the same environment (uv on PATH) at
93b5517:3079 passed, 6 skipped, 2 failed — the same two environmental failures. The counts
reconcile exactly: 3079 - 3001 = 78, which is precisely the 78 test cases in
tests/tuithatthis PR removes. Skipped and failed are unchanged.
scripts/verify-controlled-derivative.shnote. The script's tail runsuv sync --frozen --extra viewer, Ruff, format, the whole pytest suite, mypy and bandit. The full script exceedsthis sandbox's 120 s per-command cap, so it timed out here partway through its pytest step with
every test it had reached passing. Its deterministic part — the upstream base fetch, the
strix/**allowlist diff, the footprint ceiling and the reviewed patch digest — was rundirectly and passed. The five gates the script invokes were then each run individually above
and all pass except the environmental
makefailure. This is an environmental limit of thesandbox, not a result of the change: the script's
strix/**invariants are unaffected by alyrashield/**deletion and the digest check confirms that.PROTECTED
pyproject.tomldependency block untouched.uv.lockunchanged (git statusclean on it).strix/**footprint (4 files, +22/-201)scripts/verify-controlled-derivative.shpassesENGINE_REVISIONin workflows and.lyrashield-worker-pinentry_points.txtcarries onlylyrashieldand the wheel import smoke passes.no-storecachingbuildScorecardPayload,WORKSPACE_SCOPED_MODELSpackages/myra, RLS policies, Myra migration areaAdditionally, the two things this PR could most easily have broken were checked directly:
live_view.pypresent,
lyrashield/interface/main.py:466-471still selectsrun_tui(args)when--non-interactiveis absent and its dedicated tests (test_tui_product_runtime.py,test_proxy_renderer.py,test_shell_renderer.py) pass.lyrashield/interface/viewer/transcript.py:56stillimports
lyrashield.interface.tui.live_viewandtest_viewer.pypasses.Not done
behaviour to pin. The one test that had to change is the acceptance check.
textualwas not moved to an optional extra. The brief puts this out of scope and itwould change the CLI install story. Note for a later pass: after this PR
keyringisdeclared in
pyproject.tomlwith no importer left in the engine — the removedlyrashield/tui/results_store.pyandlyrashield/tui/byok_config.pywere its only users.cryptographyis unaffected:lyrashield/runtime/target_relay_proxy.pystill imports it, sothe declared cryptography cap is still load-bearing. Dropping
keyringwas not requested andwould be a separate dependency decision, so it was left alone.
docs/superpowers/plans/*.mdwere not edited. They are dated historical working notesthat already reference paths that do not exist. Rewriting them to hide this deletion would
misrepresent history.
objdump/binutils. Thewheel was inspected directly and the spec's hidden imports were resolved instead.
opens the PR as a draft.
Rollback
Revert this PR. Nothing here is forward-only: no schema change, no migration, no pin bump, no
data change. Reverting restores
lyrashield/tui,tests/tui, the console script, the Ruffper-file-ignore block, the allowlist keys and the
UPGRADES.mdline and returns the tree tobaseline
93b5517.One caveat for anyone who already installed from this branch:
uv sync --frozenafter arevert restores the
lyrashield-localconsole script, so no manual cleanup is needed.Generated with Claude Code
Summary by CodeRabbit
lyrashield-localcommand are no longer available.lyrashieldentry point.