Skip to content

Commit fd045b0

Browse files
tbjersclaude
andcommitted
Update progress tracking: phases 4 and 6 complete
Mark Phase 4 (thresholds + PR diff checks) and Phase 6 (composite reporting Action) as complete following E2E self-test verification. - PROGRESS.md: phases 4 and 6 promoted to ✅ Complete; E2E test matrix updated with verified items (feature-branch skip, PR Check Runs, jscpd, threshold breach); coverage figure updated 22.38% → 98.09%; test count corrected 31 → 52 - plans/coverage-tracker-plan.md: phase status table updated to reflect actual completion state - README.md: implementation status table updated accordingly Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6ff2a9a commit fd045b0

3 files changed

Lines changed: 21 additions & 21 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ See [docs/PROGRESS.md](docs/PROGRESS.md) for a full breakdown. Current state:
191191
| 1 | D1 schema | Complete |
192192
| 2 | Worker core (ingest, metrics, badge) | Complete |
193193
| 3 | GitHub App webhooks | Complete |
194-
| 4 | Thresholds + PR diff checks | Planned |
194+
| 4 | Thresholds + PR diff checks | Complete |
195195
| 5 | Svelte dashboard (Cloudflare Pages) | Planned |
196-
| 6 | Composite reporting Action | Planned |
196+
| 6 | Composite reporting Action | Complete |
197197
| 7 | "Deploy to Cloudflare" button | Planned |
198198
| 8 | Docs, OSS hygiene, public release | In progress |
199199

docs/PROGRESS.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Tracks completion status for all phases defined in `docs/plans/coverage-tracker-
5656

5757
---
5858

59-
## Phase 4 — Thresholds + PR diff checks 🔶 Implemented — untested
59+
## Phase 4 — Thresholds + PR diff checks ✅ Complete
6060

61-
Implemented as part of the Phase 6 Action (the two are tightly coupled). **No end-to-end CI test has been run yet.**
61+
Implemented as part of the Phase 6 Action (the two are tightly coupled). E2E verified via PR #2 self-test: `min-coverage: '20'` passed, `min-coverage: '99'` breached with correct Check Run failure, baselines fetched from prior main push.
6262

6363
- [x] Threshold logic in the reporting Action (`min-coverage`, `max-coverage-drop`, `max-complexity`, `max-duplication` inputs)
6464
- [x] PR diff checks: collect metrics, fetch baseline via OIDC-gated `GET /baseline`, compare
@@ -77,9 +77,9 @@ Implemented as part of the Phase 6 Action (the two are tightly coupled). **No en
7777

7878
---
7979

80-
## Phase 6 — Composite reporting Action 🔶 Implemented — untested
80+
## Phase 6 — Composite reporting Action ✅ Complete
8181

82-
Lives at `.github/actions/report/`. All files written and TypeScript compiled clean; `dist/run.js` committed. **No end-to-end CI test has been run yet — this is the next objective and is pivotal before any consuming repo can adopt the Action.**
82+
Lives at `.github/actions/report/`. All files written and TypeScript compiled clean; `dist/run.js` committed. E2E self-test verified: push-to-main ingests, feature-branch push skips cleanly, PR Check Runs post correctly with threshold enforcement.
8383

8484
- [x] Action scaffold (`action.yml`, inputs: `worker-url`, threshold knobs; invokes `collect.sh` via `bash` to avoid exec-permission issues)
8585
- [x] OIDC token minting: `core.getIDToken('coverage-tracker')`; non-default-branch pushes skip before mint to avoid 422
@@ -106,7 +106,7 @@ The Action runner (`src/run.ts`) contains pure helper functions that unit-test t
106106
- [x] Add `vitest` and `@vitest/coverage-v8` to devDependencies in `.github/actions/report/package.json`
107107
- [x] Add `vitest.config.ts` to `.github/actions/report/`
108108
- [x] Update `test` script in `package.json`: `"test": "vitest run --coverage"`
109-
- [x] Write `src/__tests__/run.test.ts`31 tests covering all 5 helpers; all green
109+
- [x] Write `src/__tests__/run.test.ts`52 tests covering all helpers + I/O paths; all green
110110
- [x] Rebuild `dist/run.js` after adding exports (`npm run build`); verified `run()` fires in bundle (`node dist/run.js` → "WORKER_URL is not set")
111111

112112
#### Layer 2 — `collect.sh` parser fixtures
@@ -129,16 +129,16 @@ High value but a real setup cost — requires `@cloudflare/vitest-pool-workers`,
129129

130130
#### Step 1 — Create `.github/workflows/action-test.yml` ✅ Done
131131

132-
Self-test workflow created. Uses `min-coverage: '20'` (runner's actual coverage is ~22% — only pure helpers are tested). Layer 2 fixture step added alongside the runner tests.
132+
Self-test workflow created. Uses `min-coverage: '20'`; actual coverage is 98.09% (52 tests covering all helpers + I/O paths). Layer 2 fixture step added alongside the runner tests.
133133

134134
#### Step 2 — End-to-end test matrix (run in order)
135135

136-
- [x] **Push to main** — OIDC token mints, `/ingest` accepts it, 2 metrics ingested (`coverage: 22.38%`, `duplication: 0.00%`)
137-
- [ ] **Push to feature branch** — Action exits cleanly with "Not on default branch" info log; job green, no 422, no metric written
138-
- [ ] **PR from same repo** — baselines fetched (from the push above), Check Run posted on PR head SHA with summary table; pass and fail cases exercised by adjusting `min-coverage`
136+
- [x] **Push to main** — OIDC token mints, `/ingest` accepts it, 2 metrics ingested (`coverage: 98.09%`, `duplication: 0.00%`)
137+
- [x] **Push to feature branch** — Action exits cleanly with "Not on default branch (test/matrix-threshold-and-branch ≠ main) — skipping ingest." info log; job green, no 422, no metric written
138+
- [x] **PR from same repo** — baselines fetched, Check Run posted on PR head SHA with summary table; pass (`min-coverage: '20'`) and fail (`min-coverage: '99'`) cases both verified via PR #2
139139
- [ ] **Fork PR** (if applicable) — OIDC mint fails gracefully (warning, not failure); Check Run post skipped gracefully
140-
- [ ] **jscpd** — auto-installs on a fresh runner; `jscpd-report.json` produced; duplication % appears in Check Run summary
141-
- [ ] **Threshold breach**set `min-coverage: '99'`, confirm job fails with correct reason in Check Run summary
140+
- [x] **jscpd** — auto-installs on fresh runner; `Duplication: 0.00% (no clones detected)` collected; appears in Check Run summary table
141+
- [x] **Threshold breach**`min-coverage: '99'` with coverage at 98.09%; action fails with "One or more coverage thresholds were not met.", Check Run posted with `conclusion: failure`
142142

143143
**Go/Python parser paths are not exercised by this workflow.** The Layer 2 fixture script covers those; a repo with `go.mod` or `pyproject.toml` and a real coverage artifact is needed for full end-to-end verification of those paths.
144144

docs/plans/coverage-tracker-plan.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ are documented so current designs accommodate them.
4444

4545
| Phase | Scope | Status |
4646
|-------|-------|--------|
47-
| 1 | D1 schema (multi-project from day one) | **NOW** |
48-
| 2 | Worker core: ingest (OIDC-verified), metrics read, badge | **NOW** |
49-
| 3 | GitHub App registration webhooks → projects table | **NOW** |
50-
| 4 | Thresholds + PR diff checks (reporting Action logic) | designed-for, built later |
51-
| 5 | Svelte dashboard on Cloudflare Pages, behind Access | later |
52-
| 6 | Reusable composite reporting Action (in this repo) | later |
53-
| 7 | "Deploy to Cloudflare" button + one-click onboarding | later |
54-
| 8 | Docs, OSS hygiene, public release | later |
47+
| 1 | D1 schema (multi-project from day one) | ✅ complete |
48+
| 2 | Worker core: ingest (OIDC-verified), metrics read, badge | ✅ complete |
49+
| 3 | GitHub App registration webhooks → projects table | ✅ complete |
50+
| 4 | Thresholds + PR diff checks (reporting Action logic) | ✅ complete |
51+
| 5 | Svelte dashboard on Cloudflare Pages, behind Access | not started |
52+
| 6 | Reusable composite reporting Action (in this repo) | ✅ complete |
53+
| 7 | "Deploy to Cloudflare" button + one-click onboarding | not started |
54+
| 8 | Docs, OSS hygiene, public release | 🔶 in progress |
5555

5656
---
5757

0 commit comments

Comments
 (0)