Skip to content

tools: b64push.py and manage.py take the TV's success marker only as a line of its own - #3603

Merged
Gathin23 merged 1 commit into
Gathin23:mainfrom
M-khalifa:m-khalifa/tools-exact-success-line
Nov 9, 2026
Merged

Gathin23 merged 1 commit into
Gathin23:mainfrom
M-khalifa:m-khalifa/tools-exact-success-line

Conversation

@M-khalifa

Copy link
Copy Markdown
Contributor

b64push.py counted the final move as done when "moved" appeared anywhere in the TV's answer, so a refused mv whose path contains the word (a target such as /data/local/tmp/removed.jpg) skipped the copy fallback and exited 0 with the target unchanged; manage.py read pm's Success the same way, so a failed add-on install whose message names a package containing the word counted as installed. Both now match the marker only as a whole line. In manage.py this covers install for an add-on without its own install script, and remove. Add-ons that ship their own install.sh or install.ps1 run pm inside that script, which still accepts Success anywhere in pm's answer; those scripts are a follow-up and are not touched here. Found by reading the code; the new test reproduces both with a fake TV.

Tested on: no TV needed (fake TV client); Windows 11, Python 3.11.

  • python -m unittest discover -s tests: 3172 tests, no failure from this change; 2 errors in test_bench_other_app and test_bench_replay, which fail to import here (from tests import ... resolves to another tests package in site-packages; the same on every branch, files not touched); 494 skipped (the POSIX-shell and pwsh suites, which CI runs).
  • New tests/test_success_lines.py (6 tests, no shell needed): the refused move that names moved exits 1 through the copy fallback; a failed install and a failed removal whose Failure line names a Success package are failures; Success with surrounding whitespace still counts; Success still counts for install and remove. With the whole-line match reverted, the two Failure-line cases fail; with the whitespace trimming reverted, the trimming case fails.

Related: #1588 (the copy fallback this keeps reachable)

Reviewed with cross-review 1.2.1 (SkillArray, MIT license): https://github.com/M-khalifa/SkillArray

…a line of its own

b64push.py counted a move as done when "moved" appeared anywhere in the answer, so a refused move
whose path contains the word (removed.jpg) skipped the copy fallback and exited 0. manage.py read
pm's "Success" the same way. Both now match the marker as a whole line.

In manage.py this covers `install` for an add-on without its own install script, and `remove`. Add-ons
that ship their own install.sh or install.ps1 run pm in that script, which still accepts "Success"
anywhere in pm's answer; those scripts are a follow-up and are not touched here.
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

maintainer-bot review · suggests merge (p2)

Thanks for the careful fix and for the fake-TV test that reproduces both false successes. This looks ready to merge as it is, and the add-on install scripts make a good follow-up.

Checks
  • Size: size/M (+142 -3, 3 files)

This is a suggestion; a maintainer makes the final call. A maintainer can comment /bot review to run it again.

Reviewed by maintainer-bot · runs on 0G Private Computer

@github-actions github-actions Bot added bot-suggests:merge p2 scripts build-and-install, disable, restore, tv.py and the other tools labels Nov 9, 2026
@Gathin23
Gathin23 merged commit f97f3b0 into Gathin23:main Nov 9, 2026
4 checks passed
@Gathin23

Gathin23 commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Thanks @M-khalifa, b64push.py and manage.py now accept 'moved' and 'Success' only as whole lines, so a refusal that happens to name such a path or package no longer counts as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-suggests:merge p2 scripts build-and-install, disable, restore, tv.py and the other tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants