--quality-delta: architecture and coupling changes between two trees (the measurements #477's consumers asked for)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- backend-api-design, devtools
Direzione di ricerca
Start with runQualityDelta in src/verbs_quality.h, then read ModuleMetric in src/arch.h and the availability states in src/langfacts.h. First decide which architectural rows and thresholds consumers can justify; the issue asks for measured examples and a fixture pair with a known verdict. Done means a mutation controlled regression test is added to test/regression.sh alongside the command documentation and changelog entry; claim the work in a comment first.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Split out of #477, where it was the other half of a --dump-graph discussion and did not belong. This issue is for what --quality-delta would have to report so that a tool measuring package-level architecture can read a change rather than recompute one, and for the question we cannot answer ourselves: which of these is worth gating on, and at what threshold.
What --quality-delta does today
It reports only what a change made worse against a baseline (git HEAD by default, or an explicit BASE..HEAD), across these kinds:
complexity · verbosity (LOC) · nesting · params · duplication · dead-code · api-surface · error-masking · short-horizon-churn · new-clone-of-reused-helper · defect-shape format-arity · ceiling · tangle
It exits 2 when pre-existing code got worse; rows on new symbols never gate (except the three noted). An ack ledger suppresses a finding with a recorded reason, and a stale ack is reported rather than silently dropped.
What it has no notion of is architecture. Nothing in that list moves when a new import creates a cycle, or when a package's fan-in doubles.
What is already computed, just not diffed
--arch computes per-directory Ca, Ce, instability, abstractness, distance and zone, uncapped. --deps lists cycles. #477's consumers measured those against an ast-based ground truth on pypa/pip and rollup/rollup: 81% of directories exact on Ca, 85% on Ce on pip, 26 of 26 sampled directories exact on both on rollup, every real SCC detected plus a deliberately introduced one, byte-identical re-runs throughout. So the inputs are trustworthy at that accuracy; what is missing is the delta between two trees.
Proposed rows
new-cycle— an import cycle present at HEAD and absent at the baseline. The clearest signal of the set: a cycle is a yes/no fact, not a number with a noise band.coupling-change— Ca, Ce, instability, abstractness, distance per directory, baseline vs HEAD.lcom4— wanted, but not in a first step: ours needs fixing before it can be diffed. Listed here so the issue records the intent rather than looking like an omission.
Report-only to begin with. None of these gates (no exit 2) until there is evidence about what a real change does to them.
The part we cannot answer from here
Instability and distance are noisy: a single new import moves them, and a refactor that splits one file moves a whole directory's numbers without changing anything a reviewer would call a regression. Publishing a gate on a noisy metric is how a gate becomes something people learn to ignore.
So, concretely, for anyone who would consume these:
- Which rows would you gate on, and which do you want report-only forever?
- At what threshold — absolute (
Ca +3), relative (instability +0.15), or "only when a cycle appears"? - Over what population — every directory, or only directories the diff touches? (The second is much quieter and much easier to defend.)
- Would a new-cycle row alone be enough for a first version, with coupling numbers available from
--archon each side?
Measured answers beat opinions here. If you have two commits where you know what the architectural verdict should be, that pair is worth more to this issue than a threshold proposal.
Per-language availability: "not available", never zero
Not every language has file-level edges in this build. LangFacts::fileEdges (src/langfacts.h:101-106) is a three-state column — Resolved, Unmeasured, NotApplicable — and Go, Java and Swift are Unmeasured today (src/arch.h:665).
A coupling row for those languages must say not available, not 0. --arch already sets the precedent: an unread FROM-side file makes a rule's verdict unknown rather than pass, and the verb prints <arch unqualified=N> with a per-rule verdict="unknown" row. Any row added here follows that, because a zero that means "not read" is the kind of silent surface this project treats as a defect.
Scope notes
- Field read/write sites and language-specific type taxonomy are out — #477's consumers compute those themselves and asked us not to.
- The absolute-levels use case is not this issue: that is
--dump-graphin #477. This issue is only the change between two trees. - Whatever lands needs a gate written before it, with a mutation control: a delta row that cannot distinguish a real change from a re-run is worse than no row. A fixture pair of commits with a known verdict is the gate.
Files this would touch
src/verbs_quality.h (runQualityDelta), src/arch.h (ModuleMetric, and kZoneDistanceThreshold if a zone change becomes a row), src/langfacts.h for the availability read, plus a new test/*check.sh listed in test/regression.sh in the same commit (manifestcheck enforces it), a docs/COMMANDS.md entry, and a changelog.d/ fragment.
Claim it in a comment first. Partial answers to the threshold questions above are useful on their own — they do not need to come with code.
- Lingua principale
- C++
- Stelle
- 2.6k
- Fork
- 182
- Merge medio
- 21h 12m
- PR unite (30g)
- 262
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
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 redhat-et/ripwire
-
bug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
TS/JS: a generator function expression (const f = function* / async function*) is not indexedForse già presa @shivam512262 l’ha presa 6 giorni fa. Apertabug good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
redhat-et/ripwire#730 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 78/100
redhat-et/ripwire#334 · 8 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
redhat-et/ripwire#68 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di redhat-et/ripwire
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
riscv-software-src/riscv-isa-sim#2640 ·
I maintainer di solito rispondono entro 1 giorno
-
difficulty:easy func:gui prio:normal type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NatronGitHub/Natron#2118 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
mechanics UI
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
endless-sky/endless-sky#12949 ·
I maintainer di solito rispondono entro 1 giorno
-
bug difficulty:easy prio:low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NatronGitHub/openfx-io#523 ·
I maintainer di solito rispondono entro 1 giorno