Add required phrases to lgpl-3.0_16.RULE - #5251
Conversation
The rule is an LGPL-3.0 notice, but nothing in it was required, so a partial sequence match reported LGPL-3.0 for LGPL-2.x notices of the same shape that never mention version 3. Mark the two version-bearing phrases as required. Reported in aboutcode-org#4995. Signed-off-by: Eljees <3.14hell@gmail.com>
|
Did you run tests and add new tests? |
|
And we are evolving our policy for the use of LLMs. Was this entirely AI-generated? Please join our Slack for discussion. |
|
Especially when I see this comment: |
|
Yes — I use an LLM assistant for drafting, and I should have said so up front. Sorry for that, and sorry if my earlier comments read as if every word was mine. What I'm doing here isn't PR farming. My day job is AppSec false-positive triage of SAST/SCA findings; I'm preparing a conference talk and collecting data on how well models actually do on that kind of work. That only works if the contributions hold up, so I run the tools myself before opening anything. For this rule specifically:
Both runs after I did not add a test file. Tell me where you want it ( And for what it's worth — humans have been shipping bad code for decades without any help from models, mine included. :) The disclosure point is fair, though, and I'll state it in my PRs from now on. Happy to join the Slack discussion. |
Add a lic4 datadriven fixture with the LGPL-2-or-later notice header from KDE libqzeitgeist src/logbrowser.cpp (issue aboutcode-org#4995): it must detect as lgpl-2.0-plus only and no longer match lgpl-3.0_16.RULE now that the rule requires its GNU Lesser General Public License version 3 phrases. Signed-off-by: Eljees <3.14hell@gmail.com>
|
yeah, of course testing it locally, occasionally new here
…On Tue, Jul 28, 2026 at 1:18 PM Philippe Ombredanne < ***@***.***> wrote:
*pombredanne* left a comment (aboutcode-org/scancode-toolkit#5251)
<#5251 (comment)>
Did you run tests and add new tests?
—
Reply to this email directly, view it on GitHub
<#5251?email_source=notifications&email_token=ANWGLBW65COSEIEFYWEWNO35HB4YBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DMNRRGA4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5102866108>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANWGLBTK3AGVCT3ZM5IBN4L5HB4YBAVCNFSNUABEKJSXA33TNF2G64TZHMZTQMZXGMZTGOB3JFZXG5LFHM2DSOJWHEYDKNBYGOQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ANWGLBUGK3ST3G2WWUD4HET5HB4YBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DMNRRGA4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/ANWGLBTO6B3NDN7MCLOEC6T5HB4YBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DMNRRGA4KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
my code is far more worse, when i write it by hands
…On Tue, Jul 28, 2026 at 1:19 PM Philippe Ombredanne < ***@***.***> wrote:
*pombredanne* left a comment (aboutcode-org/scancode-toolkit#5251)
<#5251 (comment)>
And we are evolving our policy for the use of LLMs. Was this entirely
AI-generated? Please join our Slack for discussion.
—
Reply to this email directly, view it on GitHub
<#5251?email_source=notifications&email_token=ANWGLBXRFLFIUU333WN7HAD5HB433A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DONRVGM3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5102876536>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANWGLBXNF7AEQJKJVJGAFAL5HB433AVCNFSNUABEKJSXA33TNF2G64TZHMZTQMZXGMZTGOB3JFZXG5LFHM2DSOJWHEYDKNBYGOQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ANWGLBTJ42BRI3YHMJFYQE35HB433A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DONRVGM3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/ANWGLBW2O6VVEK4JHI75MML5HB433A5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DONRVGM3KM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
sorry for that, frameworks fail sometimes, adjustiing =(
…On Tue, Jul 28, 2026 at 1:21 PM Philippe Ombredanne < ***@***.***> wrote:
*pombredanne* left a comment (aboutcode-org/scancode-toolkit#5251)
<#5251 (comment)>
Especially when I see this comment:
- ossf/cve-bin-tool#5781 (comment)
<ossf/cve-bin-tool#5781 (comment)>
—
Reply to this email directly, view it on GitHub
<#5251?email_source=notifications&email_token=ANWGLBUTLLIMZCKXGHCC35T5HB5DRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DSNRXHAZKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5102896782>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANWGLBWCA346GUEVCIUAHQ35HB5DRAVCNFSNUABEKJSXA33TNF2G64TZHMZTQMZXGMZTGOB3JFZXG5LFHM2DSOJWHEYDKNBYGOQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/ANWGLBXRHH7SXPA33YHPXLL5HB5DRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DSNRXHAZKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/ANWGLBSMCJZCDCFXKYE42DL5HB5DRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMJQGI4DSNRXHAZKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Concretely, on both questions. New test. Added in bf999f7: One correction to my own PR description while I am here: it claimed The red CI is not this PR. The latest develop build, 18996, ran on 6ba5908 - the exact parent commit of this PR - on 2026-06-25, and fails with the same seven job kinds:
I reproduced the first two classes locally at this commit in a On the LLM question - fair to ask, and you were right to. Yes, I use an assistant for drafting, and I said so above rather than let you find out. My own unaided code and English are worse than what I produce with it, so I use it and then check the result myself; the tests I run and the evidence above are mine. I am happy to take this to Slack for the policy discussion. If your evolving policy ends up not wanting contributions produced this way, say so and I will close this PR without argument. |
Fixes #4995
Problem
lgpl-3.0_16.RULEis an LGPL-3.0 notice, but none of its text is required, so a partial sequence match reports LGPL-3.0 for an LGPL-2.x notice of the same shape that never mentions version 3.The reporter's file,
KDE/libqzeitgeist/src/logbrowser.cpp, says:and is detected as
LGPL-3.0-only.This follows @pombredanne's suggestion in the issue that the rule should get required phrases.
Change
The two version-bearing phrases are marked as required:
Nothing else in the rule changes.
Verification
Measured with scancode-toolkit 32.5.0, rebuilding the license index (
scancode-reindex-licenses) between runs.logbrowser.cppLGPL-3.0-only—lgpl-3.0_16.RULE, score 88.68LGPL-2.0-or-later AND LGPL-2.1-or-later—lgpl-2.0-plus_1.RULE(100.0) +lgpl-2.1-plus_113.RULELGPL-3.0-only, score 100.0LGPL-3.0-only—lgpl-3.0_16.RULE, score 100.0So the false positive resolves to the license the file actually carries, and the rule still matches real LGPL-3.0 notices at full score — the second row is there because required phrases can easily turn a false positive into a false negative, and I wanted that pinned down rather than assumed.
One methodology note that cost me an hour and may be worth knowing: editing a rule inside an installed scancode and rescanning changes nothing — the index is cached. I only caught this because a control run with the rule file deleted entirely still produced the identical match at the identical score. All numbers above are from runs with an explicit reindex.
I have not run the full
tests/licensedcodesuite; if there are expected-detection fixtures that reference this rule, they'd want a look.