Findings enter the ledger from two writers kept consistent by a side map
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- Ein halber Tag
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Start with recordFindings in internal/engine/run.go (around lines 341-383) and the runner.recorded field at lines 46-49, then read the early append in internal/engine/agentic.go near lines 432-444. Done means one method owns every write of a finding to the ledger, a table test in internal/engine covers the cap when more findings are already recorded than the limit, and the existing max_findings and interrupt tests still pass under go test ./internal/engine.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
recordFindings is documented as "the one place a finding of a code scan or a running-target scan enters the ledger". Since the max_findings and interrupt fixes, investigateOne also appends each finished finding immediately, and a runner.recorded side map tells the cap which findings it must keep. The cap assumes the kept set fits the limit, and nothing enforces that.
Where
internal/engine/run.go:341-383(recordFindings, the doc comment, and "The investigations are planned within the cap, so kept fits")internal/engine/run.go:46-49(runner.recorded)internal/engine/agentic.go:432-444(the early append)
Impact
Every rule about which findings reach the ledger (cap, validation, dedup) has to be reasoned about across two writers and a shared map. The two writers already validate differently: the early path skips an invalid finding silently, and the final path writes a reject. If planning ever stops respecting max_findings (a planner change, or resume carrying more findings), the report silently exceeds the limit.
Suggested fix
- Correct the doc comment at
run.go:341-348to describe both writers. - Move the early append into a
runner.persist(seq, f)method that ownsrecorded, and call it frominvestigateOne. - Take the cap decision from a pure
capFindings(findings, recorded, limit) (kept, dropped)with a table test that coverslen(recorded) > limit. Clamp, or add a note, when the assumption breaks. - Give both writers the same validation outcome.
Acceptance criteria
- One method owns writes of findings to the ledger.
- A table test covers the cap with more already-recorded findings than the limit.
- The existing
max_findingsand interrupt tests still pass.
Getting started
- Relevant files:
internal/engine/run.go,internal/engine/agentic.go - How to run tests:
go test ./internal/engine
Related: #113
Filed by repo-audit/full-audit at fffef43. Severity: low. Effort: S. audit-key: tech-debt|internal/engine/run.go|recordFindings
- Vorherrschende Sprache
- Go
- Sterne
- 0
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TMHSDigital/Spackle
-
enhancement good first issue severity: low
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
TMHSDigital/Spackle#135 ·
-
bug good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
TMHSDigital/Spackle#131 ·
-
runs and runs compare print target text without the control-character cleaning the reports useOffenbug good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
TMHSDigital/Spackle#129 ·
Alle Issues in TMHSDigital/Spackle
Ähnliche Issues
-
bug raised-by:reviewer
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
medici-finance/assay#7655 ·
Maintainer antworten meist innerhalb von 1 Tag
-
helm chart: make DaemonSet pod affinity configurable via values.yamlEvtl. vergeben @Young-Zen hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
flannel-io/flannel#2632 ·
Maintainer antworten meist innerhalb von 6 Tagen
-
go-vulnerability security-scan
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
teslashibe/agent-go#36 ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
nwverse/persona#15194 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug flaky-test
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
rosskukulinski/tailworks#411 ·
Maintainer antworten meist innerhalb von 1 Tag