Count the deployment streak across every deployment provider

Aperta
#304 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
tooling

Direzione di ricerca

Start in src/lib/public-metrics/definitions.ts: read vercel-deployment-streak, the event_streak shape of MetricSource, and DEPLOYMENT_OUTCOMES. Then read eventStreak in engine.ts and computeYearReview in yearly.ts, whose per-provider loop is the model for the new streak. Post the semantics decision on the issue before coding; done means the definition, engine, formula and formulas-page entry agree and definitions.test.ts covers the four listed cases.

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

Descrizione

area: web enhancement priority: P3 size: M

Summary

The public metric "Successful deployments in a row" (vercel-deployment-streak) counts Vercel deployments only. Since #262, "Deployments in 7 days" and "Deployments in 30 days" count successful deployments on DigitalOcean App Platform, GitLab, Railway, and Vercel. So a project page can now show a deployment count across four providers next to a streak counted on Vercel alone, and only the formulas page explains the difference. Eddie decided to keep the streak's label as it is and handle the streak in its own issue (review thread on #300: https://github.com/eddiejaoude/DevMacro/pull/300#discussion_r4536027611).

There is no repository task template, so this follows the layout of #262.

Evidence

  • The streak definition is vercel-deployment-streak in src/lib/public-metrics/definitions.ts: providers: ["vercel"], source: { type: "event_streak", successTypeId: VERCEL_SUCCEEDED, failureTypeId: VERCEL_FAILED }.
  • The event_streak source holds one success and failure pair (MetricSource in definitions.ts), and eventStreak in src/lib/public-metrics/engine.ts reads one newest-first sequence of those two types. Widening it to every provider changes the definition's shape, not one line.
  • DEPLOYMENT_OUTCOMES in definitions.ts already lists each deployment provider's success and failure types, proven against the adapters' deploy_succeeded and deploy_failed categories by definitions.test.ts.
  • The year in review's longest run already reads one sequence per provider (computeYearReview in src/lib/public-metrics/yearly.ts), so a failure on one provider never breaks another's run.

Scope

  • Decide what a cross-provider streak means, recorded on this issue before coding. Options include the longest of the per-provider current streaks with its provider named, or a streak per provider. A single mixed sequence is ruled out, because a failure on one provider would end a run on another.
  • Update the definition, the engine's eventStreak, the formula, and the formulas page. The published value changes, so say that in the pull request.

Acceptance criteria

  • The decision is recorded on this issue before coding.
  • The streak counts every deployment provider in DEPLOYMENT_OUTCOMES as decided, and a failure on one provider does not reset another provider's streak.
  • Unit tests: a Railway-only project, a tie across providers, a failure on one provider only, and the STREAK_EVENT_LIMIT lower bound.
  • The formula, its formulas page entry, and the published label agree on what is counted.

Related: #262, #300.

Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown

Lingua principale
TypeScript
Stelle
1
Fork
1
Merge medio
6h 56m
PR unite (30g)
136

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 eddiejaoude/StackDash

Tutte le issue di eddiejaoude/StackDash

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.