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

[quality] Gate proposal: scheduled Stryker run over the whole src/ tree (five advisory shards)

Chiusa
#594 4 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
30/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github-actions, typescript
Ambito
ci-cd, testing

Direzione di ricerca

Read the “Mutation checks” section of docs/contributing.md and inspect the existing Stryker and Vitest config files named in the proposal. Compare the proposed five mutation shards with the source tree and existing action pins, then prepare the two config files, documentation paragraph, and scheduled workflow. Done when the weekly advisory run uploads a JSON report for each shard.

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

Descrizione

agent/quality needs-human needs-kind stage/045-needs-decision testing

Finding

Every module under src/ now has a full StrykerJS pass, and at main @ 9acb046 the survivors are all equivalent:

set mutants killed timeout survived score wall time (this host)
ownership and merge plugins + their two owner utilities (4 modules) 1420 1266 114 40 97.18% 112m @ concurrency 14
the ten slash-command handlers, fixed labels and five small utilities (16 modules) 1269 1159 26 83 93.45% 94m @ 12
default npm run test:mutation set (4 merge-decision modules) 151 143 2 6 96.03% 7m @ 16
dispatcher / cron / command cluster (#592) 1189 1015 61 113 90.50% 61m @ 12
label writers, config loader and the two label plugins (7 modules) 1357 — — — — 45m @ 12
five reviewer/label plugins (#590) 718 — — 78 — —

The 129 survivors of today's three runs were each sliced at their exact column span: required: true folds, payload ?. chains already null-checked upstream, debug strings, removeLabels([]) / ownersInclude([]) no-ops, a re-run counter whose only consumer tests it against zero, a right-hand .trim() on a rendered notifier that never has outer whitespace, and a lookup !== undefined guard every caller satisfies. Nothing left to pin.

That clean state was reached through fourteen survivor-pinning issues and PRs (#517, #521, #526, #534, #538, #573–#585, #590, #592, consolidated by #588 and #589). Each of those is the same class of finding — a branch that runs but is never asserted — found by hand-running the harness #572 shipped. Nothing in CI runs it, so the next regression of this kind will only be found when someone next runs it by hand. docs/contributing.md ("Mutation checks") already calls it "a reproducible local and nightly-style check, not a per-push gate".

Proposal

Run the harness on a schedule, non-blocking, as one matrix job per cluster. Sharding is needed because the full tree (~6,100 mutants) took over five hours of wall time at concurrency 12–14 on a 32-core host; a single ubuntu-latest job would exceed GitHub's six-hour job limit.

Two parts:

1. Outside .github/workflows/ (PR-able by this agent once accepted):

  • stryker.nightly.config.mjs extending stryker.config.mjs with mutate taken from a STRYKER_MUTATE env var, incremental: false, reporters: ['clear-text', 'json'], and vitest.configFile: 'vitest.nightly.config.mjs'.
  • vitest.nightly.config.mjs extending vitest.mutation.config.mjs and adding __tests__/workflows.test.ts, __tests__/commands.test.ts, the configurationDocs / docsYamlExamples / dogfoodConfig text-scan suites to test.exclude — Stryker instruments the mutated files, so these suites (which read src/ as text) fail the dry run whenever the dispatcher or an input's only reader is mutated.
  • A "Scheduled run" paragraph in docs/contributing.md under "Mutation checks".

2. In .github/workflows/ (needs a human or an ISSUES_PRS_MERGE agent — this agent's App token is minted at the contributor tier and GitHub rejects any push touching .github/workflows/** without the workflows permission):

.github/workflows/mutation.yml:

name: mutation

on:
  schedule:
    - cron: '17 3 * * 1'   # weekly, Monday 03:17 UTC
  workflow_dispatch:

permissions:
  contents: read

jobs:
  stryker:
    runs-on: ubuntu-latest
    timeout-minutes: 355
    strategy:
      fail-fast: false
      matrix:
        include:
          - name: merge-gate
            mutate: src/labels/*.ts,src/utils/mergeGate.ts,src/utils/labelMatch.ts,src/utils/duration.ts
          - name: ownership
            mutate: src/plugins/approve*.ts,src/utils/*wners*.ts,src/utils/auth.ts
          - name: tide
            mutate: src/plugins/tide.ts,src/utils/mergeQueue.ts,src/cronJobs/*.ts
          - name: plugins
            mutate: src/plugins/blunderbuss.ts,src/plugins/lgtmBinding.ts,src/plugins/ownersLabel.ts,src/plugins/requireMatchingLabel.ts,src/utils/config.ts,src/utils/label*.ts
          - name: commands
            mutate: src/issueComment/*.ts,src/pullReq/*.ts,src/issues/*.ts,src/utils/command.ts,src/utils/comments.ts,src/utils/events.ts,src/utils/pulls.ts,src/run.ts
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
        with:
          node-version-file: package.json
          cache: npm
      - run: npm ci
      - run: npx stryker run stryker.nightly.config.mjs
        env:
          STRYKER_MUTATE: ${{ matrix.mutate }}
      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: mutation-${{ matrix.name }}
          path: reports/mutation/report.json

(actions/upload-artifact should be pinned to a SHA the way the other two actions are; the repository's existing pin for it, if any, wins.)

The run is advisory: thresholds.break stays null, so a survivor never fails the workflow — the JSON artifact is the signal, and the quality lane reads it instead of re-running two-hour probes by hand.

Decision requested

  • Accept the scheduled run as proposed (weekly, five shards, advisory), or
  • Decline, in which case the quality lane keeps re-running the harness by hand after test-heavy merges and keeps filing survivor pins one issue at a time.

Risk: governance — this adds roughly 5 × 2–3 h of hosted-runner time per week to a CNCF repository, and docs/contributing.md currently frames the harness as local-only.

Decision taken by hive: shard by functional cluster rather than by file count, weekly rather than nightly (the tree changes a few times a week and each run is hours), advisory rather than a break threshold (the docs' stated position).

Priority

  • Impact: medium
  • Effort: low (the non-workflow half is two config files and a docs paragraph; the workflow half is the text above)

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 9acb046

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

Lingua principale
TypeScript
Stelle
132
Fork
24
Merge medio
1g 9h
PR unite (30g)
228

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.

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.