Commit Graph

6 Commits

Author SHA1 Message Date
39e33eb634 ci(coverage): wire L1 + L2 + auto-snapshot summary.json on merge
Two-workflow split per ADR-020:

.github/workflows/ci.yml (existing, extended):
  - checkout now uses fetch-depth: 0 so coverage:diff can resolve
    origin/<base-ref>...HEAD against the PR's base branch
  - new step "Coverage — aggregate (L2)" runs after the test step
    (with `if: always()` so the artifact still captures partial state
    on test failures)
  - new step "Coverage — diff (L1)" runs only on pull_request events,
    diffing against origin/${{ github.base_ref }}
  - artifact upload extended to include the aggregated
    coverage/lcov.info and coverage/summary.json alongside the
    per-package files

.github/workflows/coverage-snapshot.yml (new):
  - dedicated workflow with `permissions: contents: write` so it can
    commit the aggregated coverage/summary.json back to main after
    each merge — the committed trend store (ADR-020 L2)
  - runs full test + aggregate, then commits summary.json only if it
    actually changed (commit body marked [skip ci] so the snapshot
    doesn't recurse into itself)
  - concurrency: coverage-snapshot ensures only one snapshot at a time

This closes the CI side of the coverage architecture. PRs now fail
fast when changed lines are uncovered, and main's trend history
accumulates automatically.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 14:12:02 +02:00
749938e48b ci: add fallow whole-codebase gate after pnpm conformance 2026-05-13 08:51:53 +02:00
f16c7b1b60 ci: add Storybook build + visual regression step 2026-05-13 08:27:04 +02:00
132ebc689f ci: add conformance step after lint 2026-05-12 23:58:20 +02:00
955a763c66 feat(eslint+ci): R40 boundary rule for @sentry/* + R31 sendDefaultPii grep gate
Adds two flat-config blocks to core-eslint/base.js: (1) repo-wide
no-restricted-imports for @sentry/* with the R40 message, (2) an
allowlist override for the only paths permitted to import the Sentry
SDK directly — core-shared/instrumentation/sentry/**, the bind-sentry
DI files, the no-sentry test guards, and apps' instrumentation* /
next.config / vite.config / sentry.*.config files. Patterns use
**/-prefix so they match whether ESLint runs from the repo root or
from inside a sub-package.

Also adds the standard `argsIgnorePattern: "^_"` config (used
throughout the repo) and a Node-globals override for *.mjs/*.cjs/*.js
and *.config.{ts,tsx} so withSentryConfig in next.config.mjs lints
clean. Required adding `globals` as a core-eslint dep.

Adds .github/workflows/sentry-pii-guard.yml — a lightweight CI step
that fails any PR introducing `sendDefaultPii: true` (R31). Excludes
node_modules / dist / .next / .turbo from the grep so vendored SDK
JSDoc examples don't false-positive.

Pre-existing lint nits cleared as part of getting `pnpm lint` green:
- core-testing define-contract-suite.test.ts: void the unused
  receivedTracer (mirrors the next test's pattern)
- marketing-pages bind-dev-seed.ts: drop unused MockSiteSettingsRepository
  import
- marketing-pages get-site-settings.use-case.ts: drop the now-redundant
  eslint-disable for `_input`

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 20:31:15 +02:00
98c25f3207 ci: add GitHub Actions workflow
Runs typecheck + lint + boundaries + test (with coverage) + build
on every push to main and every PR. Postgres service for tests that
need DB. Playwright e2e and Storybook smoke tests gated on validate
job passing. Coverage uploaded as artifact (lcov format) for downstream
tools (Codecov, etc.) — wiring left to template users.

Spec: §6.11
2026-05-05 19:43:09 +02:00