Baseline "expires" date takes effect at UTC midnight, not on the local day
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 82/100
Piste de recherche
Read internal/finding/baseline.go around expired and check how the engine clock is supplied in internal/engine/run.go and internal/engine/scaffold.go. Choose and document one expiry time zone in docs/ci.md, then add a fixed-clock test in a non-UTC zone for the boundary. Run make test-short (or .\make.ps1 test-short on Windows) and make lint; done when the test pins the chosen rule and the docs explain it.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
A baseline entry's expiry date is parsed as midnight UTC and compared with the current instant, so west of UTC the entry stops accepting on the evening before the date written. The docs name no time zone.
Where
internal/finding/baseline.go:50-55(expired)internal/engine/run.go:122,internal/engine/scaffold.go:34(engine clock)docs/ci.md:182("from that day on it accepts nothing")
Details
expired parses the date with time.Parse(time.DateOnly, e.Expires) and returns !now.Before(d); now is time.Now by default.
Impact
At UTC-8 an entry expires at 16:00 on the previous day, so a local scan or pre-commit hook fails the gate a day early; east of UTC it keeps accepting for the first hours of the expiry day. CI runners in UTC behave as documented, so the same baseline can pass in CI and fail locally on the same evening.
Suggested fix
Decide the rule and state it. Either compare calendar days in one zone (now.UTC().Format(time.DateOnly) >= e.Expires, and say "UTC" in docs/ci.md), or parse the date in the local zone with time.ParseInLocation.
Acceptance criteria
- The rule is one of the two above and docs/ci.md states it
- A test with a fixed clock in a non-UTC zone pins the boundary
Related: #81
Getting started
- Relevant files: docs/ci.md, internal/engine/run.go, internal/finding/baseline.go
- How to run tests:
make test-short(Unix) or.\make.ps1 test-short(Windows PowerShell);make lintbefore you call it done - Related docs: CONTRIBUTING.md, docs/ARCHITECTURE.md
Filed by repo-audit/full-audit at 50e92ec. Severity: low. Effort: S. audit-key: bug|internal/finding/baseline.go|BaselineEntry.expired
- Langage dominant
- Go
- Étoiles
- 0
- Forks
- 1
- Merge moyen
- 8 h 14 min
- PR mergées (30 j)
- 3
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
-
ci good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
TMHSDigital/Spackle#206 ·
Les mainteneurs répondent en général sous 1 jour
-
ci severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Spackle#205 ·
Les mainteneurs répondent en général sous 1 jour
-
bug good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
TMHSDigital/Spackle#199 ·
Les mainteneurs répondent en général sous 1 jour
-
bug good first issue severity: low
Difficulté 2/5 1-3 heures Accessibilité débutants 87/100
TMHSDigital/Spackle#195 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation good first issue severity: medium
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
TMHSDigital/Spackle#188 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de TMHSDigital/Spackle
Issues similaires
-
deskclose human-decided leaves the legacy decision-needed label and applies no human-decidedOuvertebug effort:s impact:med raised-by:worker risk:low to:worker
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
medici-finance/assay#8120 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
factory:subtask
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
agent-substrate/substrate#4308 ·
Les mainteneurs répondent en général sous 2 jours
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
celestiaorg/celestia-app#8877 ·
Les mainteneurs répondent en général sous 1 jour
-
sweep
Difficulté 1/5 Moins d'une heure Accessibilité débutants 84/100
bketelsen/truenas-mcp#112 ·
Les mainteneurs répondent en général sous 1 jour