Task 15: Coverage in CI, README, tag the milestone #15

Closed
opened 2026-09-10 17:17:32 +00:00 by Cordy · 1 comment
Owner

Depends on Task 14. Closes out phase 1.

Files

  • Modify: .forgejo/workflows/ci.yml, README.md

Steps

  • Add coverage reporting to the vet and test step:
          go mod tidy
          go vet ./...
          go test -count=1 -coverprofile=cover.out ./...
          go tool cover -func=cover.out | tail -1

Optionally add -race. Note: the race detector requires cgo on most platforms, which conflicts with CGO_ENABLED=0. If it fails on the Alpine runner, drop -race and leave a comment in the workflow recording why, rather than silently removing it.

  • Write the README: what this is, current phase, package layout, how to run tests, the DCO requirement (git commit -s), and the licence. Keep it short — CLAUDE.md holds the detail.

  • Push and dispatch CI. Read the result from the runner pod:

kubectl logs -n forgejo-runner deploy/forgejo-runner --tail=100
  • Confirm coverage on internal/sync is above 80%. If it is not, the gap is a missing test, not a reason to lower the bar — find the untested branch and cover it.

  • Tag the milestone:

git tag -a v0.1.0-engine -m "sync engine core: three-way diff, renames, conflicts, property-tested"
git push origin v0.1.0-engine
  • Close the phase-1-engine milestone.

Acceptance criteria

  • CI green: go vet clean, all packages pass, coverage printed.
  • internal/sync coverage > 80%.
  • Tag v0.1.0-engine exists on main.

What comes next

Plan 2 — Cairn integration: real WebDAV + tus remote.Remote, real OS filesystem vfs.FS with per-platform inode/file-index lookup, cmd/cairnsync headless CLI, integration tests against a live cairnd, and ETag-first change detection replacing the naive remote hashing from Task 12.

Plan 3 — desktop application: Wails v3 shell, tray, setup wizard, conflict UI, auto-update via Sparkle/WinSparkle, MSI packaging, GPO/MDM policy overlay.

Neither is written yet. Do not start them from this milestone.

Depends on Task 14. Closes out phase 1. ## Files - Modify: `.forgejo/workflows/ci.yml`, `README.md` ## Steps - [ ] **Add coverage reporting to the `vet and test` step:** ```yaml go mod tidy go vet ./... go test -count=1 -coverprofile=cover.out ./... go tool cover -func=cover.out | tail -1 ``` Optionally add `-race`. **Note:** the race detector requires cgo on most platforms, which conflicts with `CGO_ENABLED=0`. If it fails on the Alpine runner, drop `-race` and leave a comment in the workflow recording why, rather than silently removing it. - [ ] **Write the README:** what this is, current phase, package layout, how to run tests, the DCO requirement (`git commit -s`), and the licence. Keep it short — `CLAUDE.md` holds the detail. - [ ] **Push and dispatch CI.** Read the result from the runner pod: ```bash kubectl logs -n forgejo-runner deploy/forgejo-runner --tail=100 ``` - [ ] **Confirm coverage on `internal/sync` is above 80%.** If it is not, the gap is a missing test, not a reason to lower the bar — find the untested branch and cover it. - [ ] **Tag the milestone:** ```bash git tag -a v0.1.0-engine -m "sync engine core: three-way diff, renames, conflicts, property-tested" git push origin v0.1.0-engine ``` - [ ] **Close the `phase-1-engine` milestone.** ## Acceptance criteria - CI green: `go vet` clean, all packages pass, coverage printed. - `internal/sync` coverage > 80%. - Tag `v0.1.0-engine` exists on `main`. ## What comes next **Plan 2 — Cairn integration:** real WebDAV + tus `remote.Remote`, real OS filesystem `vfs.FS` with per-platform inode/file-index lookup, `cmd/cairnsync` headless CLI, integration tests against a live `cairnd`, and ETag-first change detection replacing the naive remote hashing from Task 12. **Plan 3 — desktop application:** Wails v3 shell, tray, setup wizard, conflict UI, auto-update via Sparkle/WinSparkle, MSI packaging, GPO/MDM policy overlay. Neither is written yet. Do not start them from this milestone.
Cordy added this to the phase-1-engine milestone 2026-09-10 17:17:32 +00:00
Author
Owner

Done

Landed on main, then a whole-branch final review's fix wave, all green in CI:

  • 2fed3ea ci: print coverage; record why -race is off
  • a6503ab docs: README (status, layout, tests, DCO, licence)
  • 6a9a06b fix(sync): refuse paths resolving outside the sync root
  • e7cef2d fix(sync): refuse non-canonical paths + their canonical twins
  • 699ec0a fix(sync): re-check a copy before replacing/removing it
  • f5e1583 test(sync): property test asserts a fixpoint + matching state

What was built

CI prints per-package + total coverage; -race is dropped with a recorded reason (needs cgo,
conflicts with CGO_ENABLED=0). README covers scope, phase, layout, tests, DCO, licence. The
final review's fix wave then closed two data-loss paths (root-escape via a hostile path segment;
a destructive op run against a stale scan) and made the property test assert a fixpoint with matching state.

Tests

CI run 16 (http://192.168.10.245/Cordy/cairn-desktop/actions/runs/16), green on
f5e1583e4270c265e0385408a1f7fd0b3b9c0f09. internal/sync coverage — CI reported:
total: (statements) 90.8%.

Acceptance criteria

  • CI green: go vet clean, all packages pass, coverage printed. Met — run 16 above.
  • internal/sync coverage > 80%. Met — CI total 90.8%, well above the bar.
  • Tag v0.1.0-engine exists on main. Met — tagged at f5e1583 (this range's HEAD).

Rulings

R5 (owner-confirmed): tag + close #15/milestone deferred until after the whole-branch final
review and its fix wave landed with CI green — done here. R11: an issue closes only once its
commits are on main and that push's CI is green. R12: every commit is git commit -s with
the Co-Authored-By: Claude Opus 5 trailer.

Final review

Verdict: ready to tag, with fixes. Decide, R4 conflict naming, the rename collapse,
record-after-confirmation and missing-path handling all held under scrutiny; internal/sync
coverage independently reproduced at 91.2%. The fix wave above closed the two must-fix
findings and strengthened the property test. One process item — posting hand-off amendments on
#22/#23/#25/#26 for phase 2 — is tracked separately and does not block this tag.

Implemented and reviewed by Claude (subagent-driven), landed on main after review and green CI.

## Done Landed on `main`, then a whole-branch final review's fix wave, all green in CI: - [`2fed3ea`](http://192.168.10.245/Cordy/cairn-desktop/commit/2fed3ea) ci: print coverage; record why `-race` is off - [`a6503ab`](http://192.168.10.245/Cordy/cairn-desktop/commit/a6503ab) docs: README (status, layout, tests, DCO, licence) - [`6a9a06b`](http://192.168.10.245/Cordy/cairn-desktop/commit/6a9a06b) fix(sync): refuse paths resolving outside the sync root - [`e7cef2d`](http://192.168.10.245/Cordy/cairn-desktop/commit/e7cef2d) fix(sync): refuse non-canonical paths + their canonical twins - [`699ec0a`](http://192.168.10.245/Cordy/cairn-desktop/commit/699ec0a) fix(sync): re-check a copy before replacing/removing it - [`f5e1583`](http://192.168.10.245/Cordy/cairn-desktop/commit/f5e1583) test(sync): property test asserts a fixpoint + matching state ## What was built CI prints per-package + total coverage; `-race` is dropped with a recorded reason (needs cgo, conflicts with `CGO_ENABLED=0`). README covers scope, phase, layout, tests, DCO, licence. The final review's fix wave then closed two data-loss paths (root-escape via a hostile path segment; a destructive op run against a stale scan) and made the property test assert a fixpoint with matching state. ## Tests CI run 16 (http://192.168.10.245/Cordy/cairn-desktop/actions/runs/16), green on `f5e1583e4270c265e0385408a1f7fd0b3b9c0f09`. `internal/sync` coverage — CI reported: `total: (statements) 90.8%`. ## Acceptance criteria - **CI green: `go vet` clean, all packages pass, coverage printed.** Met — run 16 above. - **`internal/sync` coverage > 80%.** Met — CI total 90.8%, well above the bar. - **Tag `v0.1.0-engine` exists on `main`.** Met — tagged at `f5e1583` (this range's HEAD). ## Rulings R5 (owner-confirmed): tag + close #15/milestone deferred until after the whole-branch final review and its fix wave landed with CI green — done here. R11: an issue closes only once its commits are on `main` and that push's CI is green. R12: every commit is `git commit -s` with the `Co-Authored-By: Claude Opus 5` trailer. ## Final review Verdict: **ready to tag, with fixes.** Decide, R4 conflict naming, the rename collapse, record-after-confirmation and missing-path handling all held under scrutiny; `internal/sync` coverage independently reproduced at 91.2%. The fix wave above closed the two must-fix findings and strengthened the property test. One process item — posting hand-off amendments on #22/#23/#25/#26 for phase 2 — is tracked separately and does not block this tag. _Implemented and reviewed by Claude (subagent-driven), landed on main after review and green CI._
Cordy closed this issue 2026-09-11 01:41:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/cairn-desktop#15
No description provided.