verify starts sandbox runs outside Box.Exec, and evidence numbering is worked out in three places
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
Start in internal/engine/prove.go:145-193, where recordSandboxRun, the lab.box counter and nextEvidence live, and compare it with internal/agent/prover.go:63-70 (Box.Exec / Box.Record). Then read internal/engine/verify.go:137-155 and internal/engine/debug.go:243-252,320 to see the three numbering paths. Do step 1 first (return (seq, rel, err) from recordSandboxRun, drop debug's second counter and Sprintf), and run go test ./internal/engine ./internal/agent after each step; done means the new debug and verify evidence tests pass and every sandbox run goes through box.Exec or the comment names the exception.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
agent.Box.Exec is documented as "the one way to start a sandbox run: it counts the run against the sandbox cap, bounds it by the wall time that is left, and records it". engine.Verify still calls rt.Run directly and records the run itself. Evidence file numbering and paths are also worked out separately in three places (scan, debug, verify).
Where
internal/agent/prover.go:63-70(Box.Execdoc)internal/engine/verify.go:137-155(rt.RunplusrecordSandboxRun)internal/engine/prove.go:145-193(lab.boxcounter,recordSandboxRun,nextEvidence)internal/engine/debug.go:243-252,internal/engine/debug.go:320(second counter and a rebuiltevidence/%02d-%s.txtpath)
Details
recordSandboxRunbuilds the%02d-<purpose>.txtname but returns only the ledger seq.lab.boxkeeps a counter per box. Debug wraps that with a second counter and rebuilds the path string withSprintf. Verify numbers files by listing the folder.- Verify runs are bounded only by the sandbox's per-run timeout. They are not counted against
[budget]caps.
Impact
Changing the evidence layout means editing prove.go and debug.go together. If only one changes, debug findings point at files that do not exist, and no test compares the two. A reader who trusts the Box.Exec comment assumes every sandbox run is capped, and the next change to Exec (network policy, recording) will silently skip verify.
Suggested fix
One commit per step:
- Make
recordSandboxRunreturn(seq, rel, err), and haveBox.Recordreturn the path. Delete debug's second counter and itsSprintf. - Move numbering into one per-finding helper seeded from
nextEvidence, so scan, debug and verify number files the same way. - In
Verify, build anagent.Box(Root: targetDir, a budget fromopts.Config.Budget,RecordcallingrecordSandboxRun) and usebox.Exec. Keep treating a sandbox error as an inconclusive verdict.
Alternatively, narrow the Box.Exec comment to say verify runs proofs directly.
Acceptance criteria
- Every sandbox run goes through one path, or the comment states the exception.
- A debug test checks that every path in its evidence list exists on disk.
- A verify test checks that its evidence is numbered after the scan's files.
Getting started
- Relevant files:
internal/agent/prover.go,internal/engine/verify.go,internal/engine/prove.go,internal/engine/debug.go - How to run tests:
go test ./internal/engine ./internal/agent
Related: #30
Filed by repo-audit/full-audit at fffef43. Severity: low. Effort: S. audit-key: tech-debt|internal/engine/prove.go|recordSandboxRun
- Langage dominant
- Go
- Étoiles
- 0
- Forks
- 1
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TMHSDigital/Spackle
-
enhancement good first issue severity: low
Difficulté 2/5 Une demi-journée Accessibilité débutants 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Spackle#135 ·
-
bug good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
TMHSDigital/Spackle#131 ·
-
runs and runs compare print target text without the control-character cleaning the reports useOuvertebug good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Spackle#129 ·
Toutes les issues de TMHSDigital/Spackle
Issues similaires
-
bug raised-by:reviewer
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
medici-finance/assay#7655 ·
Les mainteneurs répondent en général sous 1 jour
-
helm chart: make DaemonSet pod affinity configurable via values.yamlPeut-être pris @Young-Zen l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
flannel-io/flannel#2632 ·
Les mainteneurs répondent en général sous 6 jours
-
go-vulnerability security-scan
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
teslashibe/agent-go#36 ·
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
nwverse/persona#15194 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug flaky-test
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
rosskukulinski/tailworks#411 ·
Les mainteneurs répondent en général sous 1 jour