Repository navigation
Repair label-watch migration under Qt 6.12; make checksums portable - #2
Merged
Merged
Conversation
Pillumz
force-pushed
the
fix/label-ownership-tests
branch
from
October 8, 2026 11:34
e2aa9cd to
148032d
Compare
|
CI failed at 91350b1 (run). What each failed gate needs: Released backend gate failedThe backend the plugin pins (
Released backend gate failedThe backend the plugin pins (
Fix, push, and the gates run again; this comment updates itself. |
Qt 6.12 hands a value that crossed a signal or `var` boundary back as a V4Sequence: not an Array, but a sequence with an integral, finite length and the sequence methods. The migrated watched-label ids cross MailAccount.monitoredMigrated, so Accounts.idList read the V4Sequence as empty and a rename or delete cleared the watches instead of following them. idList now reads an Array directly and otherwise accepts only that genuine sequence shape — a non-Array object with typeof slice === "function" and a finite, integral, non-negative length — copying it by index into a plain JS array. A JSON object cannot carry a function, so it stays as rejected as it was under the old Array.isArray-only check, and an unbounded length is never walked. Elements are copied by index, never by enumerating keys, so an own "__proto__" is not run as a setter. Filtering, trimming and de-duplication are unchanged; a focused regression covers the malformed-payload boundary. tests/test_source.sh hard-coded Perl's shasum, which Arch does not ship. It now prefers sha256sum and falls back to shasum -a 256, keeping the same SHA-256 source-integrity gate. Provenance: authored by DeepSeek V4.1 Flash (pi herd worker).
Pillumz
force-pushed
the
fix/label-ownership-tests
branch
from
October 8, 2026 11:46
148032d to
91350b1
Compare
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.
What
Repairs the three
LabelOwnershipfailures and makes the source checksum gate portable.Root cause
Qt 6.12 hands a value that crossed a signal or
varboundary back as aV4Sequence: not an Array, but a sequence with an integral, finite length and the sequence methods. The migrated watched-label ids crossMailAccount.monitoredMigrated, soAccounts.idListread theV4Sequenceas empty and a rename/delete cleared the watches instead of following them.Fix:
idListreads an Array directly and otherwise accepts only that genuine sequence shape — a non-Array object withtypeof slice === "function"and a finite, integral, non-negative length — copying it by index into a plain JS array. A JSON object cannot carry a function, so malformed payloads stay as rejected as they were under the oldArray.isArray-only check, and an unbounded length is never walked. Elements are copied by index, never by enumerating keys, so an own__proto__is never run as a setter. Filtering, trimming and de-duplication are unchanged.Checksum portability
tests/test_source.shusedshasum -a 256, which Arch does not ship. It now preferssha256sumand falls back toshasum -a 256— the same SHA-256 source-integrity gate, failing closed if neither exists.Verification
Isolated offscreen runs, no owner display/bus, on both engines:
make test-js,make test-shell,make test-qmlall pass —make test-qml1158 passed / 0 failed on each, including the three repairedLabelOwnershipcases.make test-jsincludes a focused safety-boundary regression: a plain object with a numericlength(and unbounded/infinite/negative/fractional lengths, strings, null) is rejected, while trimming/de-dup are preserved for a real sequence.V4Sequencepath is exercised on 6.12 (the signal conversion); the same arrays on 6.11 take theArray.isArraypath.Diff against
mainisui/account/Accounts.js,ui/tests/test_accounts.js, andtests/test_source.sh.Provenance
Authored by DeepSeek V4.1 Flash (pi herd worker); not independently reviewed here.
Independent review
GPT-6.1 Sol reviewed exact revised head 91350b1. The initial arbitrary-numeric-length acceptance was rejected and is fixed: only real arrays or sequence-capable objects with finite integral nonnegative length are admitted, so malformed JSON objects cannot trigger new list acceptance or huge-length walks. Index copying preserves trimming/dedup and does not set prototype keys. SHA-256 fallback keeps the same expected digests and fail-closed checks. Reviewed focused malformed-input regression coverage; actual Qt sequence acceptance and both-engine suite runs are the author’s verification (1158/0 each), not claimed by this reviewer. No unresolved code concern.