Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

dev-env: dangling local go.mod replace + cloud-lab mutates tracked install.json cause false-negative verification runs

Aperta
#550 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Amperstrand ci sta già lavorando.

Dal 11/10/2026.

  • #736 di @Amperstrand — chiusa senza merge
  • #864 di @Amperstrand — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
75/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
tooling

Direzione di ricerca

Look at src/cli/go.mod to understand the replace directive pattern, then examine scripts/go-battery.sh to add a guard that fails when a replace target path does not exist. For the cloud-lab issue, find where tests/cloud-lab/configs/install.json gets mutated during test runs and change it to write runtime state to an untracked location. Done means the guard catches dangling replace directives with a message pointing to go.work, and cloud-lab no longer dirties the working tree.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

Two unrelated local-environment hazards on the shared dev box produced false-negative verification runs and nearly leaked unrelated state into a PR (#549) via a stash. Both are box-local today but the classes are repo-durable problems worth guarding against.

1. Dangling replace in src/cli/go.mod → nonexistent directory

An uncommitted local edit added:

+replace github.com/OpenTollGate/gonuts-tollgate => ../third_party/gonuts-fork

…while src/third_party/gonuts-fork does not exist on the box. Consequence: every build/test invocation in src/cli (and anything resolving through it) fails with a module-resolution error that looks exactly like a code regression. During #549's pre-push verification this produced a red go test for changes that were provably green — the failure had nothing to do with the branch.

If the fork checkout is mid-setup: the sanctioned mechanism for local overrides is a go.work file (gitignorable, per-developer, never rides a commit or a stash) rather than editing go.mod. Suggested durable guard: scripts/go-battery.sh (or a lint lane) fails fast on any replace directive whose target path does not exist, with a message pointing at go.work.

2. cloud-lab writes runtime state into a tracked config

A test run mutated tests/cloud-lab/configs/install.json in the working tree:

-  "install_time": 0,
+  "install_time": 1790094992,
-}
+}
\ No newline at end of file

install.json is tracked; the lab treats it as runtime state. Anyone running the suite walks away with a dirty tree, and the change rides any careless git add/git stash pop (it twice hitchhiked near #549's stashes). Suggested fix: the lab writes its runtime state to an untracked location (or the tracked file becomes a template the lab copies to a build dir), plus a .gitignore entry if the in-place write is load-bearing.

Remediation on the box

Both working-tree mutations have been reverted to HEAD on the shared box; the replace line is preserved verbatim above and in the git stash named teammate-local-env: gonuts-fork redirect + install.json artifact if its author wants it back.

Lingua principale
Go
Stelle
12
Fork
14
Merge medio
1g 5h
PR unite (30g)
232

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenTollGate/tollgate-module-basic-go

Tutte le issue di OpenTollGate/tollgate-module-basic-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.