Skip to content
Merged
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
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@ jobs:
- name: Test (stde)
run: cargo test --features stde

- name: Build (bytecode,taylor)
run: cargo build --features bytecode,taylor

- name: Test (bytecode,taylor)
run: cargo test --features bytecode,taylor

- name: Build (bytecode,stde)
run: cargo build --features bytecode,stde

- name: Test (bytecode,stde)
run: cargo test --features bytecode,stde

- name: Build (taylor,stde)
run: cargo build --features taylor,stde

- name: Test (taylor,stde)
run: cargo test --features taylor,stde

- name: Build (bytecode,taylor,stde)
run: cargo build --features bytecode,taylor,stde

- name: Test (bytecode,taylor,stde)
run: cargo test --features bytecode,taylor,stde

coverage:
name: Coverage
runs-on: blacksmith-2vcpu-ubuntu-2404
Expand Down
2 changes: 2 additions & 0 deletions CLEANUP_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**Generated**: 2026-03-13 | **Project**: echidna v0.4.0 | **LOC**: ~23,400 source, ~15,700 tests

> **Status (2026-03-14)**: Phases 0–3 are complete. All safety comments, lint suppression comments, CI gaps, documentation fixes, and test coverage gaps have been addressed. Remaining work is in Phases 4+ (deferred features and aspirational improvements). See ROADMAP.md for the current state.

## Executive Summary

Three specialist agents (Infrastructure, Design, Documentation) reviewed the echidna codebase. The project is in strong shape — zero lint errors, zero dead code, zero debug artifacts, clean architecture with correct dependency direction, and comprehensive test coverage across 37 integration test files.
Expand Down
138 changes: 138 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Roadmap

**Version**: v0.4.1+ | **Last updated**: 2026-03-14

All core roadmap items (R1–R13) are complete. This document captures forward-looking work: cleanup backlog, infrastructure gaps, deferred features, and aspirational improvements.

For the historical implementation log, see [docs/roadmap.md](docs/roadmap.md). For deferred/rejected rationale, see [docs/adr-deferred-work.md](docs/adr-deferred-work.md).

---

## Phase 0: Foundation ✅

Safety and compliance items with no dependencies. **Complete** (v0.4.1).

| # | Item | Status |
|---|------|--------|
| 0.1 | Add SAFETY comments to 13 unsafe blocks | ✅ Done |
| 0.2 | Add explanatory comments to 8 `#[allow]` suppressions | ✅ Done |

---

## Phase 1: Cleanup ✅

Code duplication consolidation. **Complete** — all items were already addressed in v0.4.1 codebase review.

| # | Item | Status |
|---|------|--------|
| 1.1 | Consolidate `greedy_coloring` → delegate to `greedy_distance1_coloring` | ✅ Already delegates |
| 1.2 | Consolidate `sparse_hessian` → call `sparse_hessian_with_pattern` | ✅ Already a wrapper |
| 1.3 | Extract shared opcode dispatch from `forward`/`forward_into` | ✅ Uses `forward_dispatch` helper |
| 1.4 | Consolidate `column_coloring`/`row_coloring` → generic helper | ✅ Delegates to `intersection_graph_coloring` |
| 1.5 | Extract helper from `GpuTapeData::from_tape`/`from_tape_f64_lossy` | ✅ Shares `build_from_tape` |

---

## Phase 2: Infrastructure ✅

CI and workflow gaps. **Complete**.

| # | Item | Status |
|---|------|--------|
| 2.1 | Add `diffop` feature to CI test and lint jobs | ✅ Done (v0.4.1) |
| 2.2 | Add `parallel` feature to `publish.yml` pre-publish validation | ✅ Done (v0.4.1) |
| 2.3 | Expand MSRV job to test key feature combinations | ✅ Done — tests bytecode, taylor, stde, and all pairwise/triple combos |

---

## Phase 3: Quality ✅

Documentation fixes and test coverage gaps. **Complete**.

### Documentation

| # | Item | Status |
|---|------|--------|
| 3.1 | Update CONTRIBUTING.md architecture tree | ✅ Done (v0.4.1) |
| 3.2 | Fix algorithms.md opcode count | ✅ Done (v0.4.1) |
| 3.3 | Move nalgebra entry to Done in ADR | ✅ Done (v0.4.1) |
| 3.4 | Update roadmap.md stale `bytecode_tape` paths | ✅ Done (v0.4.1) |

### Test Coverage

| # | Item | Status |
|---|------|--------|
| 3.5 | Add `echidna-optim` solver convergence edge-case tests | ✅ Done — near-singular Hessian, 1e6:1 conditioning, saddle avoidance |
| 3.6 | Add `cross_country` full-tape integration test | ✅ Already has 5+ cross-validation tests |
| 3.7 | Add CSE edge-case tests | ✅ Done — deep chains, powi dedup, multi-output preservation |
| 3.8 | Sparse Jacobian reverse-mode auto-selection test | ✅ Done — wide-input map forces reverse path |

---

## Phase 4: Deferred Features

Valuable features without current demand. Revisit when a concrete use case arises.

| # | Item | Effort | Revisit when | Source |
|---|------|--------|--------------|--------|
| 4.1 | Indefinite dense STDE (eigendecomposition for indefinite C matrices) | medium | A user needs indefinite C support | [ADR](docs/adr-deferred-work.md) |
| 4.2 | General-K GPU Taylor kernels (beyond K=3) | medium | Need for GPU-accelerated 3rd+ order derivatives | [ADR](docs/adr-deferred-work.md) |
| 4.3 | Chunked GPU Taylor dispatch (exceed 128 MB WebGPU limit) | small | Users hit the buffer limit in practice | [ADR](docs/adr-deferred-work.md) |
| 4.4 | CUDA `laplacian_with_control_gpu_cuda` | small | CUDA users need variance-reduced Laplacian | [ADR](docs/adr-deferred-work.md) |
| 4.5 | `taylor_forward_2nd_batch` in `GpuBackend` trait | small | Multiple backends need to be used generically | [ADR](docs/adr-deferred-work.md) |

---

## Phase 5: Aspirational

Nice-to-haves with no urgency. Pursue opportunistically or if the relevant area is being actively modified.

| # | Item | Effort | Impact |
|---|------|--------|--------|
| 5.1 | Decompose `stde.rs` (1409 lines) into sub-modules | medium | medium |
| 5.2 | Add `#![warn(missing_docs)]` and fill gaps | large | medium |
| 5.3 | Bulk-add `#[must_use]` to pure functions (~267 sites) | medium | low |
| 5.4 | Audit `usize` to `u32` casts in GPU paths | small | medium |

**Caution**: 5.1 risks breaking delicate Taylor jet propagation logic — only pursue if `stde.rs` continues to grow. 5.2 is large (all public items need docs) — consider enabling per-module incrementally.

---

## Blocked

| Item | Blocker | Action |
|------|---------|--------|
| RUSTSEC-2024-0436 (paste via simba) — unmaintained | Upstream simba must release with paste alternative | Already ignored in `deny.toml`. Monitor simba releases. |

---

## Dependency Bump

| Item | Current | Latest | Effort | Notes |
|------|---------|--------|--------|-------|
| cudarc | 0.17 | 0.19 | medium | Breaking API changes in 0.18. Defer until GPU backend is actively developed. |

---

## Rejected

These items were evaluated and explicitly rejected. Rationale is in [docs/adr-deferred-work.md](docs/adr-deferred-work.md).

- **Constant deduplication** — `FloatBits` orphan rule blocks impl; CSE handles the common case
- **Cross-checkpoint DCE** — contradicts segment isolation design
- **SIMD vectorization** — bottleneck is opcode dispatch, not FP throughput
- **no_std / embedded** — requires ground-up rewrite (heap allocation, thread-local tapes)
- **Source transformation / proc-macro AD** — orthogonal approach, separate project
- **Preaccumulation** — superseded by cross-country Markowitz elimination
- **Trait impl macros for num_traits** — hurts error messages, IDE support, debuggability
- **DiffOperator trait abstraction** — `Estimator` trait already provides needed abstraction

---

## Dependencies Between Phases

```
Phase 0–3 (complete) — all done as of 2026-03-14
Phase 4 (deferred features) — each item independent; all require active use of base feature
Phase 5 (aspirational) — independent nice-to-haves
```
Loading
Loading