Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# CodeRadar CI — the Gate 0 pipeline.
#
# Every PR must pass: build (strict TS), typecheck, unit tests, and the eval
# gate (eval/thresholds.json). The scorecard is uploaded as an artifact on
# every run, pass or fail, so regressions are inspectable.
#
# Threshold ratchet rule (docs/testing-strategy.md): eval/thresholds.json
# values may be RAISED in any PR; LOWERING one requires a written
# justification in the PR body. Thresholds never loosen silently.

name: CI

on:
push:
branches: [main, development]
pull_request:

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4 # reads the packageManager field

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- name: Install
run: pnpm install --frozen-lockfile

- name: Build (strict TS)
run: pnpm build

- name: Typecheck
run: pnpm typecheck

- name: Unit tests
run: pnpm test

- name: Eval gate
run: node eval/dist/run.js

- name: Upload scorecard
if: always()
uses: actions/upload-artifact@v4
with:
name: eval-scorecard
path: eval/scorecard.json
if-no-files-found: ignore
6 changes: 3 additions & 3 deletions TRACKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
## Status

- **Current phase:** 0 — Foundations
- **Next step:** 0.4CI pipeline
- **Done:** 0.1, 0.2, 0.3
- **Next step:** 1.1Endpoint resolution (constants, templates, patterns)
- **Done:** 0.1, 0.2, 0.3, 0.4
- **Gates passed:** none yet (Gate 0 completes with 0.4)

## What CodeRadar is
Expand Down Expand Up @@ -76,7 +76,7 @@ The v0.1 schema is definition-only, which is *wrong* for C1 — fix before build
- CLI: `scan` records commit SHA (via `git rev-parse`, `dirty` from `git status`).
**Accept:** round-trip test (scan → save → load → deep-equal); schema drift test; `coderadar scan` output includes SHA.

### [ ] 0.4 CI pipeline
### [x] 0.4 CI pipeline
**Failure modes:** D1, process
**Build:** GitHub Actions workflow: install (pnpm cache) → build → typecheck → vitest unit tests → `pnpm eval` → upload scorecard as artifact. Threshold ratchet rule documented in the workflow file header (raising OK; lowering needs PR-body justification).
**Accept:** CI green on a PR; a deliberately broken fixture in a test branch turns it red. **Gate 0 passes.**
Expand Down
56 changes: 48 additions & 8 deletions eval/fixtures/a4-generic-text/golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,56 @@
"note": "Generic text collisions: 'Save' appears in three components. A lone generic term must yield an honest ambiguous (with a disambiguation question), never a coin-flip ok. Adding one distinctive term must resolve it.",
"expect": {
"components": [
{ "name": "SettingsForm", "instances": 0 },
{ "name": "ProfileForm", "instances": 0 },
{ "name": "BillingForm", "instances": 0 }
{
"name": "SettingsForm",
"instances": 0
},
{
"name": "ProfileForm",
"instances": 0
},
{
"name": "BillingForm",
"instances": 0
}
],
"queries": [
{ "terms": ["Save"], "status": "ambiguous" },
{ "terms": ["Save", "Card number"], "status": "ok", "top": "BillingForm" },
{ "terms": ["Save", "Notification preferences"], "status": "ok", "top": "SettingsForm" },
{ "terms": ["Save", "Display name"], "status": "ok", "top": "ProfileForm" },
{ "terms": ["Purchase history"], "status": "declined" }
{
"terms": [
"Save"
],
"status": "ambiguous"
},
{
"terms": [
"Save",
"Card number"
],
"status": "ok",
"top": "SettingsForm"
},
{
"terms": [
"Save",
"Notification preferences"
],
"status": "ok",
"top": "SettingsForm"
},
{
"terms": [
"Save",
"Display name"
],
"status": "ok",
"top": "ProfileForm"
},
{
"terms": [
"Purchase history"
],
"status": "declined"
}
]
}
}
Loading