wave2-polish: implement etk-geom + etk-config, add CI#1
Merged
Conversation
Fill in the two pure-CPU, hardware-free crates from the scaffold and wire up a GitHub Actions CI workflow. etk-geom (fully implemented + tested): - Point: f64 2D point with distance helper. - Ellipse: pupil ellipse parameterisation (area, eccentricity, boundary sampling). - OneEuro: One-Euro filter for cursor smoothing, plan defaults min_cutoff=1.0 / beta=0.007 (PLAN.md Phase 7). - Homography: 2D 9-point calibration map via DLT + normal equations, with a hand-rolled 8x8 Gaussian-elimination solver (no extra deps). Validates point count / length / singularity. - 17 unit tests. etk-config (fully implemented + tested): - Typed Config tree (capture / smoothing / dwell / fusion) with documented defaults drawn from PLAN.md. - TOML load/parse/round-trip; partial files merge with defaults; unknown fields rejected; missing file -> default. - config_path() resolves XDG_CONFIG_HOME / HOME. - notify live-reload left as an explicit TODO (belongs in daemon event loop). - 6 unit tests. CI: - .github/workflows/ci.yml: fmt --check, clippy -D warnings, build, test on stable. The remaining crates (capture, preproc, infer, output, gui) and the four app binaries are left as documented scaffolds: their intent requires camera/GPU/Wayland hardware that cannot be verified in this environment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
Independent verification — verdict: solid, ready to mergeRe-cloned
Code review:
Overclaims: none. The PR honestly downgraded the etk-geom module doc-comment (removed the old scaffold's unimplemented 'Levenberg-Marquardt refinement' and 'brightest-CC glint detection' claims) and was explicit that those live in etk-infer. The 'NOT done' section accurately lists the untouched hardware/GPU crates — confirmed: CI: Minor, non-blocking nits (optional follow-up):
LGTM to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Polish pass on the scaffold. Filled in the two crates whose intent is fully
specified by
PLAN.mdand that are pure CPU math (no camera/GPU/Waylandhardware needed), added unit tests, and wired up CI.
What was finished
etk-geom(was a doc-comment-only scaffold → fully implemented):Point—f642D point + Euclidean distance.Ellipse— pupil ellipse parameterisation:area,eccentricity(axis-order independent),point_atboundary sampling.OneEuro— One-Euro cursor-smoothing filter. Defaults matchPLAN.md§6 Phase 7 (min_cutoff=1.0,beta=0.007). Handles first-sample passthrough, out-of-order timestamps, and reset.Homography— 2D 9-point calibration map (gaze feature → screen px) via Direct Linear Transform solved through the normal equations, with a hand-rolled 8×8 Gaussian-elimination solver (partial pivoting). No external linear-algebra dependency. Rejects too-few / mismatched-length / singular inputs.etk-config(scaffold → fully implemented):Configtree:capture/smoothing/dwell/fusion, every field documented with a default drawn fromPLAN.md.deny_unknown_fields); missing file →Config::default().config_path()resolvesXDG_CONFIG_HOMEthenHOME/.config.CI —
.github/workflows/ci.yml:cargo fmt --check,cargo clippy --workspace --all-targets -D warnings, build, test on stable. Uses no untrusted input inrun:/ref:.Verified (built + tested on this machine)
Toolchain present: cargo/rustc 1.95.0, gcc.
cargo fmt --all --check— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo build --workspace --all-targets— successcargo test --workspace— 23 tests pass (17 etk-geom + 6 etk-config), 0 failures. All previously-building crates still build.NOT done / UNVERIFIED (left as documented scaffolds)
These crates/apps need hardware or large GPU/Wayland stacks that cannot be exercised in this environment, so finishing them would be guessing at integration details. Left as the existing doc-comment scaffolds:
etk-capture(tokio UDP/MJPEG receiver — needs ESP32-S3 modules)etk-preproc(JPEG decode / GPU upload)etk-infer(burn-wgpu / wonnx Vulkan inference — needs the burn/wgpu stack + ONNX weights)etk-output(libei / uinput cursor injection — needs Wayland portal //dev/uinput)etk-gui(egui calibration UI)bench-infer,capture-preview,track-preview,eye-tracker(print placeholders)The heavy workspace dependencies (
burn,wgpu,egui,reis,evdev,tokio) were not pulled into any crate, so the build stays light and these were not benchmarked. No invented benchmarks.TODOs left in code
etk-config:notifylive-reload watcher — belongs in theeye-trackerdaemon event loop, markedTODO(Phase 7)onconfig_path().Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
🤖 Generated with Claude Code