Skip to content

Commit a6927f8

Browse files
authored
Merge pull request #145 from aicodingstack/agent/e2e-changelog
feat(quality): add browser and changelog gates
2 parents 767903e + 2833456 commit a6927f8

12 files changed

Lines changed: 534 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
steps:
5656
- name: Checkout code
5757
uses: actions/checkout@v6
58+
with:
59+
fetch-depth: 0
5860

5961
- name: Setup Node.js
6062
uses: actions/setup-node@v6
@@ -71,6 +73,11 @@ jobs:
7173
- name: Check data health
7274
run: npm run data-health:check
7375

76+
- name: Check manifest changelog
77+
run: npm run changelog:check
78+
env:
79+
CHANGELOG_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
80+
7481
spell-check:
7582
name: Spell Check
7683
runs-on: ubuntu-latest
@@ -123,10 +130,33 @@ jobs:
123130
.open-next
124131
retention-days: 7
125132

133+
e2e:
134+
name: Browser Smoke
135+
runs-on: ubuntu-latest
136+
timeout-minutes: 15
137+
steps:
138+
- name: Checkout code
139+
uses: actions/checkout@v6
140+
141+
- name: Setup Node.js
142+
uses: actions/setup-node@v6
143+
with:
144+
node-version: '22'
145+
cache: 'npm'
146+
147+
- name: Install dependencies
148+
run: npm ci
149+
150+
- name: Install Chromium
151+
run: npx playwright install --with-deps chromium
152+
153+
- name: Run browser smoke tests
154+
run: npm run test:e2e:ci
155+
126156
ci-success:
127157
name: CI Success
128158
runs-on: ubuntu-latest
129-
needs: [lint, type-check, test, spell-check, build]
159+
needs: [lint, type-check, test, spell-check, build, e2e]
130160
if: always()
131161
steps:
132162
- name: Check all jobs

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
# testing
1212
/coverage
13+
/playwright-report/
14+
/test-results/
1315

1416
# next.js
1517
/.next/

data/changelogs.json

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,63 @@
1-
{}
1+
{
2+
"version": 1,
3+
"entries": [
4+
{
5+
"id": "2026-07-18-project-review",
6+
"date": "2026-07-18",
7+
"summary": "Backfilled official-source provenance for priority providers and models",
8+
"changes": [
9+
{
10+
"category": "models",
11+
"id": "claude-haiku-4-5",
12+
"change": "updated",
13+
"fields": ["docsUrl", "confidence", "lastVerifiedAt", "sources", "verifiedBy"]
14+
},
15+
{
16+
"category": "models",
17+
"id": "gemini-3-flash",
18+
"change": "updated",
19+
"fields": ["docsUrl", "confidence", "lastVerifiedAt", "sources", "verifiedBy"]
20+
},
21+
{
22+
"category": "models",
23+
"id": "gpt-5-2",
24+
"change": "updated",
25+
"fields": [
26+
"docsUrl",
27+
"lifecycle",
28+
"confidence",
29+
"lastVerifiedAt",
30+
"sources",
31+
"verifiedBy"
32+
]
33+
},
34+
{
35+
"category": "providers",
36+
"id": "anthropic",
37+
"change": "updated",
38+
"fields": [
39+
"applyKeyUrl",
40+
"docsUrl",
41+
"verified",
42+
"confidence",
43+
"lastVerifiedAt",
44+
"sources",
45+
"verifiedBy"
46+
]
47+
},
48+
{
49+
"category": "providers",
50+
"id": "google",
51+
"change": "updated",
52+
"fields": ["docsUrl", "verified", "confidence", "lastVerifiedAt", "sources", "verifiedBy"]
53+
},
54+
{
55+
"category": "providers",
56+
"id": "openai",
57+
"change": "updated",
58+
"fields": ["docsUrl", "verified", "confidence", "lastVerifiedAt", "sources", "verifiedBy"]
59+
}
60+
]
61+
}
62+
]
63+
}

docs/PROJECT-REVIEW-2026-07-18.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Baseline captured on 2026-07-18:
7474
integrity, translation placeholders, and missing pricing/benchmark values.
7575
- [x] Add freshness policies (for example 30/60/90-day review thresholds by field/category).
7676
- [ ] Automate change discovery from official sources, but keep human review before merge.
77-
- [ ] Populate a real changelog from manifest diffs instead of keeping an empty static file.
77+
- [x] Populate a real changelog from manifest diffs instead of keeping an empty static file.
7878

7979
## P1 — Product Experience
8080

@@ -93,7 +93,7 @@ Baseline captured on 2026-07-18:
9393
## P1 — Quality Gates
9494

9595
- [x] Add route-contract tests for every manifest category.
96-
- [ ] Add browser-level smoke tests for search, navigation, detail pages, locale switching, and
96+
- [x] Add browser-level smoke tests for search, navigation, detail pages, locale switching, and
9797
comparison selection.
9898
- [ ] Add automated accessibility checks for dialogs, menus, comparison tables, and mobile nav.
9999
- [x] Run generation in CI and fail when tracked generated output differs.
@@ -171,3 +171,9 @@ evidence; completed items are reflected in the checklists and implementation log
171171
a permanent redirect, and removed its duplicate comparison implementation.
172172
- Added a persistent two-model selection shared by model cards, detail-page comparison actions,
173173
canonical pair URLs, and the comparison selector; adding a third model replaces the oldest pick.
174+
- Added Playwright browser smoke coverage for search-to-detail navigation, locale-preserving route
175+
switches, and persistent model comparison selections, and made it a required CI job.
176+
- Replaced the empty changelog placeholder with a deterministic manifest-diff record and added a CI
177+
guard requiring future manifest changes to be represented in `data/changelogs.json`.
178+
- Fixed the search result category badge to use the shared translated category names after browser
179+
testing exposed a missing runtime message lookup.

package-lock.json

Lines changed: 55 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"spell:fix": "cspell '**/*.{ts,tsx,js,jsx,json,md,mdx}' --show-suggestions",
2121
"test": "vitest",
2222
"test:ci": "vitest run --reporter=verbose",
23+
"test:e2e": "playwright test",
24+
"test:e2e:ci": "playwright test --reporter=line",
2325
"test:validate": "vitest run tests/validate --reporter=verbose",
2426
"test:urls": "RUN_URL_TESTS=1 vitest run tests/validate/urls.accessibility.test.ts --reporter=verbose",
2527
"validate:i18n": "npx tsx scripts/validate/validate-i18n.ts",
@@ -31,6 +33,9 @@
3133
"data-health": "npx tsx scripts/validate/data-health.ts",
3234
"data-health:check": "npx tsx scripts/validate/data-health.ts --check-snapshot --fail-on=error",
3335
"data-health:report": "npx tsx scripts/validate/data-health.ts --write",
36+
"changelog:check": "npx tsx scripts/validate/changelog.ts --check",
37+
"changelog:generate": "npx tsx scripts/validate/changelog.ts --write",
38+
"dev:e2e": "next dev --turbopack -p 3100",
3439
"generate": "npx tsx scripts/generate/index.ts",
3540
"generate:manifests": "npx tsx scripts/generate/index.ts manifest-indexes",
3641
"generate:metadata": "npx tsx scripts/generate/index.ts metadata",
@@ -69,6 +74,7 @@
6974
"@mdx-js/loader": "^3.1.1",
7075
"@next/bundle-analyzer": "^16.1.2",
7176
"@next/mdx": "^16.1.2",
77+
"@playwright/test": "^1.61.1",
7278
"@tailwindcss/postcss": "^4.1.17",
7379
"@types/node": "^22.19.2",
7480
"@types/react": "^19.2.9",

playwright.config.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { defineConfig, devices } from '@playwright/test'
2+
3+
const port = 3100
4+
5+
export default defineConfig({
6+
testDir: './tests/e2e',
7+
fullyParallel: true,
8+
forbidOnly: Boolean(process.env.CI),
9+
retries: process.env.CI ? 2 : 0,
10+
workers: process.env.CI ? 2 : undefined,
11+
reporter: process.env.CI ? 'line' : 'list',
12+
use: {
13+
baseURL: `http://127.0.0.1:${port}`,
14+
trace: 'retain-on-failure',
15+
screenshot: 'only-on-failure',
16+
},
17+
projects: [
18+
{
19+
name: 'chromium',
20+
use: { ...devices['Desktop Chrome'] },
21+
},
22+
],
23+
webServer: {
24+
command: 'npm run dev:e2e',
25+
url: `http://127.0.0.1:${port}`,
26+
reuseExistingServer: !process.env.CI,
27+
timeout: 120_000,
28+
},
29+
})

scripts/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ Repository automation is written in TypeScript and executed with `tsx`. Prefer t
1212
| Sort manifest fields | `npm run refactor:sort-fields` | Reorders manifest JSON using schema order |
1313
| Fetch GitHub stars | `npm run fetch:github-stars` | Updates `data/github-stars.json` |
1414
| Validate manifests and data | `npm run test:validate` | Runs the validation test suite |
15+
| Run browser smoke tests | `npm run test:e2e` | Exercises core journeys in Chromium against a local Next.js server |
1516
| Check data health | `npm run data-health:check` | Fails on invalid health-report data |
1617
| Refresh data-health snapshot | `npm run data-health:report` | Writes `data/data-health.json` and `docs/DATA-HEALTH.md` |
18+
| Check manifest changelog | `npm run changelog:check` | Requires manifest diffs to be represented in `data/changelogs.json` |
19+
| Generate manifest changelog | `npm run changelog:generate -- --base=<ref> --id=<id> --summary="<text>"` | Adds or replaces one entry from a Git diff |
1720
| Validate i18n structure | `npm run validate:i18n` | Checks locale alignment and translation shape |
1821
| Validate i18n usage | `npm run validate:i18n-usage` | Checks translation keys referenced by source |
1922
| Validate duplicate i18n values | `npm run validate:i18n-duplicates` | Reports duplicated translation content |

0 commit comments

Comments
 (0)