Skip to content

Commit a6f6c04

Browse files
authored
chore: establish vNext quality foundation (#170)
Establishes the next-major engineering foundation before production architecture changes. Adds the research and implementation plans, split unit/browser configs, honest aggregate coverage ratchets, 95% changed-code coverage, governed known failures, strict vNext typing, clean builds, deterministic packed-consumer validation, Node floor coverage, and release-gate parity.\n\nValidated locally: lint, integrity, all TypeScript scopes, 587 unit tests plus one governed expected failure, aggregate and changed coverage, Chromium browser smoke, packed consumer/runtime parse, demo build, actionlint, and two independent adversarial review loops. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Sets up the vNext quality foundation with strict typing, split unit/browser tests, honest coverage gates (aggregate + changed-code), governed known failures, and deterministic package smoke tests that preserve the `pnpm` version. Hardens CI/release and unblocks the next major architecture work. - **New Features** - CI: pin Node 20.19.0 and `pnpm` 10.28.2 with version checks; disable Node-managed PM version enforcement; add concurrency with cancel-in-progress; fetch full git history; add lint and test integrity gates; split unit and headless browser runs; enforce aggregate and changed-code coverage. - Release: add a compatibility job that runs `pnpm pack` and a consumer smoke test; preserve and verify `pnpm` 10.28.2 across the smoke path; `autofix.yml` also runs on `dev-refactor`. - Known failures governed via `test/known-failures.json` with owner and expiry. - Added vNext docs: `SQL_EDITOR_RESEARCH.md` and `implementation.md`. - **Refactors** - Split TS configs and typecheck scripts for source, legacy tests, vNext tests, and demo; vNext tests use stricter rules. - Extracted `vitest` configs; `vite.config.ts` now only builds the demo. - Minor ESM/typing fixes in demo and tests; export test now uses `pnpm pack`. <sup>Written for commit ebbeb2f. Summary will update on new commits.</sup> <a href="https://cubic.dev/pr/marimo-team/codemirror-sql/pull/170?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
1 parent ca19200 commit a6f6c04

28 files changed

Lines changed: 3645 additions & 93 deletions

.github/workflows/autofix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: autofix.ci # needed to securely identify the workflow
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, dev-refactor]
66
pull_request:
77

88
permissions:

.github/workflows/release.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,39 @@ on:
88
- 'v*'
99

1010
jobs:
11+
compatibility:
12+
env:
13+
EXPECTED_PNPM_VERSION: "10.28.2"
14+
npm_config_manage_package_manager_versions: "false"
15+
npm_config_package_manager_strict_version: "false"
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
21+
22+
- name: ⎔ Setup pnpm
23+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
24+
with:
25+
package_json_file: test/package-smoke/package.json
26+
version: 10.28.2
27+
28+
- name: ⎔ Setup Node.js
29+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
30+
with:
31+
node-version: 20.19.0
32+
cache: pnpm
33+
34+
- name: 🔒 Verify pnpm version
35+
shell: bash
36+
run: test "$(pnpm --version)" = "10.28.2"
37+
38+
- name: 📥 Install dependencies
39+
run: pnpm install --ignore-scripts --frozen-lockfile
40+
41+
- name: 📦 Packed Package Smoke Test
42+
run: pnpm run test:package
43+
1144
build:
1245
runs-on: ubuntu-latest
1346
steps:
@@ -27,11 +60,26 @@ jobs:
2760
- name: 📥 Install dependencies
2861
run: pnpm install --ignore-scripts --frozen-lockfile
2962

63+
- name: 🧹 Lint
64+
run: pnpm exec oxlint
65+
66+
- name: 🧪 Test Integrity
67+
run: pnpm run test:integrity
68+
3069
- name: 🔍 Type Check
3170
run: pnpm run typecheck
3271

33-
- name: 🧪 Test
34-
run: pnpm run test
72+
- name: 🧪 Unit Tests and Coverage
73+
run: pnpm run test:coverage
74+
75+
- name: 🎭 Install Chromium
76+
run: pnpm exec playwright install --with-deps chromium
77+
78+
- name: 🧪 Browser Tests
79+
run: pnpm run test:browser
80+
81+
- name: 📦 Packed Package Smoke Test
82+
run: pnpm run test:package
3583

3684
- name: 🏗️ Build
3785
run: pnpm run build
@@ -76,7 +124,7 @@ jobs:
76124
contents: read
77125

78126
publish:
79-
needs: build
127+
needs: [build, compatibility]
80128
runs-on: ubuntu-latest
81129
permissions:
82130
id-token: write

.github/workflows/test.yml

Lines changed: 97 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ on:
44
push:
55
branches:
66
- main
7+
- dev-refactor
78

89
pull_request:
910
branches:
1011
- main
12+
- dev-refactor
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1117

1218
env:
1319
CLICOLOR: 1
@@ -22,6 +28,8 @@ jobs:
2228

2329
steps:
2430
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
31+
with:
32+
fetch-depth: 0
2533

2634
- name: ⎔ Setup pnpm
2735
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
@@ -38,18 +46,104 @@ jobs:
3846
- name: 🧹 Lint
3947
run: pnpm exec oxlint
4048

49+
- name: 🧪 Test Integrity
50+
run: pnpm run test:integrity
51+
4152
- name: 🔍 Type Check
4253
run: pnpm run typecheck
4354

44-
- name: 🧪 Test
45-
run: pnpm run test
55+
- name: 🧪 Unit Tests and Coverage
56+
run: pnpm run test:coverage
57+
58+
- name: 📈 Changed-Code Coverage
59+
if: github.event_name == 'pull_request' || github.event_name == 'push'
60+
env:
61+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
62+
run: >-
63+
pnpm run test:coverage:changed
64+
"${{ github.event.pull_request.base.sha || github.event.before }}"
4665
4766
- name: 📊 Report Coverage
48-
if: always()
67+
if: >-
68+
always() &&
69+
github.event_name == 'pull_request' &&
70+
github.event.pull_request.head.repo.full_name == github.repository
4971
uses: davelosert/vitest-coverage-report-action@3c50566c523e04813df28de8f7c48dd97d663f1c # v2
5072
with:
5173
pr-number: auto
5274

75+
browser:
76+
runs-on: ubuntu-latest
77+
78+
permissions:
79+
contents: read
80+
81+
steps:
82+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
83+
84+
- name: ⎔ Setup pnpm
85+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
86+
87+
- name: ⎔ Setup Node.js
88+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
89+
with:
90+
node-version: 24
91+
cache: pnpm
92+
93+
- name: 📥 Install dependencies
94+
run: pnpm install --ignore-scripts --frozen-lockfile
95+
96+
- name: 🎭 Install Chromium
97+
run: pnpm exec playwright install --with-deps chromium
98+
99+
- name: 🧪 Browser Tests
100+
run: pnpm run test:browser
101+
102+
package:
103+
env:
104+
EXPECTED_PNPM_VERSION: ${{ matrix.pnpm-version }}
105+
npm_config_manage_package_manager_versions: "false"
106+
npm_config_package_manager_strict_version: "false"
107+
strategy:
108+
fail-fast: false
109+
matrix:
110+
include:
111+
- node-version: "20.19.0"
112+
pnpm-manifest: "test/package-smoke/package.json"
113+
pnpm-version: "10.28.2"
114+
- node-version: "24"
115+
pnpm-manifest: "package.json"
116+
pnpm-version: "11.4.0"
117+
runs-on: ubuntu-latest
118+
119+
permissions:
120+
contents: read
121+
122+
steps:
123+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
124+
125+
- name: ⎔ Setup pnpm
126+
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6
127+
with:
128+
package_json_file: ${{ matrix.pnpm-manifest }}
129+
version: ${{ matrix.pnpm-version }}
130+
131+
- name: ⎔ Setup Node.js
132+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
133+
with:
134+
node-version: ${{ matrix.node-version }}
135+
cache: pnpm
136+
137+
- name: 🔒 Verify pnpm version
138+
shell: bash
139+
run: test "$(pnpm --version)" = "${{ matrix.pnpm-version }}"
140+
141+
- name: 📥 Install dependencies
142+
run: pnpm install --ignore-scripts --frozen-lockfile
143+
144+
- name: 📦 Packed Package Smoke Test
145+
run: pnpm run test:package
146+
53147
security:
54148
runs-on: ubuntu-latest
55149
steps:

0 commit comments

Comments
 (0)