SUBTASK #63: Calculate confidence score (2.2.4.3)
I maintainer di solito rispondono entro 1 giorno
@Edgeless6 ci sta già lavorando.
Dal 30/10/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
Direzione di ricerca
Start with the evidence weights and shared evidence record from #64, then read conflict resolution in #66 for Resolution.kept and count_points. Implement backend/services/scan/calculate_score.py and cover the listed cases in tests/services/scan/test_calculate_score.py. Done means the breakdown traces points to retained evidence, contributions use a fixed order, and the score stays between 0 and 100.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What to do
A pure function that turns the evidence kept by conflict resolution into a 0–100 confidence score, together with a breakdown showing exactly which evidence earned which points, so every part of the score traces to stored evidence (spec 7.1).
Background
- Spec 7.1: the score comes from the evidence stored for the device, runs from 0% to 100%, and "every part of a score shall trace to stored evidence."
- System design 2.2.4.3: "Sum the weights of retained evidence into 0% to 100%."
- Spec FR-10, OUT-02 (a score per device, with the evidence that produced it) and DI-08 (0 to 100).
- The input is
Resolution.keptfrom #66, so dropped (conflicting) evidence is never scored. - The counting rule (
count_points, each evidence type once) andMAX_SCOREare inevidence.py(#64, #66). - Rules are in #63.
Steps
-
ScoreBreakdownrecord incalculate_score.py:-
score: the final 0–100 whole number -
contributions: one entry per evidence type, with the points it added and the evidence behind it -
capped:Truewhen the points added up to more thanMAX_SCORE
-
-
calculate_score(kept) -> ScoreBreakdown, pure:- Points come from
count_points, the same function conflict resolution uses - The score is those points, capped at
MAX_SCORE - No evidence gives a score of 0, not an error
- Contributions come back in a fixed order (by evidence type), so the device detail page always lists them the same way
- Points come from
- Unit tests:
- No evidence: 0
- OUI evidence only: the OUI weight (20 with the agreed weights)
- Different evidence types add up
- Several pieces of one evidence type count once, and the breakdown lists all of them under that type
- More than 100 points: the score is 100 and
cappedisTrue - The contributions always add up to the uncapped points: nothing in the score comes from nowhere
- Built from a
Resolution, dropped evidence adds nothing - Over many generated evidence sets, the score is always a whole number from 0 to 100
Where
backend/services/scan/calculate_score.pytests/services/scan/test_calculate_score.py
Done when
- All the tests above pass without a database or network
- The score can't go outside 0 to 100, whatever evidence comes in
Depends on
- Evidence weights and the shared evidence record (#64)
- Resolve conflicting evidence (#66), for
count_pointsandResolution
- Lingua principale
- Python
- Stelle
- 1
- Fork
- 1
- Merge medio
- 9h 31m
- PR unite (30g)
- 36
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Bearkat-Professionals/Software-Engineering-Project
-
SUBTASK #86: Password hashing (BB-5)Forse già presa @Edgeless6 l’ha presa 3 giorni fa. Apertabackend Low Priority subtask
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Bearkat-Professionals/Software-Engineering-Project#87 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Enhancement: Regression tests for Validate Input crash fixes (SH-1)Forse già presa @yoshi301 l’ha presa 2 giorni fa. Apertabackend Low Priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Bearkat-Professionals/Software-Engineering-Project#59 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Manage user accounts (admin)Forse già presa @Edgeless6 l’ha presa 3 giorni fa. Apertabackend Low Priority subtask
Difficoltà 4/5 Più di una settimana Idoneità per principianti 20/100
Bearkat-Professionals/Software-Engineering-Project#92 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Login screen and signed-in layoutForse già presa @Solo-Her0 l’ha presa 3 giorni fa. Apertafrontend Low Priority subtask
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
Bearkat-Professionals/Software-Engineering-Project#91 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SUBTASK #86: Sessions and route protection in the Application Controller (2.0)Forse già presa @javi120467 l’ha presa 3 giorni fa. Apertabackend Low Priority security subtask
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
Bearkat-Professionals/Software-Engineering-Project#90 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Bearkat-Professionals/Software-Engineering-Project
Issue simili
-
community enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
Hochfrequenz/sapgui.mcp#1039 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
didi/helixharness#18 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
dataforgoodfr/democracy-watch#46 · 1 reazione ·