feedme 0.2.0

Deterministic streaming data pipeline with mechanical guarantees for Rust
Documentation
# FeedMe Hostile Audit Findings


This document catalogs all empirically bad, idiomatic, wrong, or stupid non-production style issues found during a hostile audit of the FeedMe codebase. Issues are listed by category and file, with severity and rationale.

## Code Quality Issues


### Compiler Warnings (Severity: Medium) - FIXED

- **File:** `src/lib.rs:913` - Unused variable `event` in `HttpPost::execute`
  - **Issue:** Parameter marked as unused but not prefixed with `_`
  - **Fix:** Changed to `_event` (parameter unused due to stub implementation)
  - **Impact:** Clutter, potential confusion

- **File:** `src/lib.rs:903` - Dead code field `url` in `HttpPost` struct
  - **Issue:** Field declared but never read
  - **Fix:** Removed field and simplified HttpPost to unit struct (not implemented)
  - **Impact:** Bloat, confusion

- **File:** `examples/11_config_driven_pipeline.rs:12` - Unused variable `config`
  - **Issue:** Variable assigned but not used
  - **Fix:** Prefixed with `_` (placeholder for future use)
  - **Impact:** Warning noise

### Missing Trait Implementations (Severity: Low)

- **File:** `src/lib.rs` - `LatencyStats`, `Metrics`, `Pipeline`, `StdoutOutput`, `PluginRegistry` missing `Default` impls
  - **Issue:** Types have `new()` but no `Default` for ergonomics
  - **Fix:** Add `impl Default for Type { fn default() -> Self { Self::new() } }`
  - **Impact:** Less ergonomic API

### Complex Type Aliases (Severity: Low)

- **File:** `src/lib.rs:653,657` - Complex `HashMap<String, Box<dyn Fn(&Event) -> serde_json::Value>>` type
  - **Issue:** Repeated complex type without alias
  - **Fix:** `type DerivationMap = HashMap<String, Box<dyn Fn(&Event) -> serde_json::Value>>;`
  - **Impact:** Readability, maintainability

- **File:** `src/lib.rs:790,794` - Complex `HashMap<String, Box<dyn Fn(&serde_json::Value) -> bool>>` type
  - **Issue:** Same as above
  - **Fix:** `type ConstraintMap = HashMap<String, Box<dyn Fn(&serde_json::Value) -> bool>>;`
  - **Impact:** Readability

## API Design Issues


### Error Handling (Severity: Medium)

- **File:** `src/lib.rs` - `PipelineError` display impl uses `to_string()` on inner errors
  - **Issue:** Inconsistent formatting; Parse errors show "Parse error: ..." but others vary
  - **Fix:** Standardize display format
  - **Impact:** User experience inconsistency

### Deadletter Format Inconsistency (Severity: Low)

- **File:** `src/lib.rs` - Parse errors in deadletter use `"error": "parse"`, pipeline errors use `"error": "pipeline"`
  - **Issue:** Inconsistent top-level keys
  - **Fix:** Use consistent `"error_type"` or similar
  - **Impact:** API inconsistency

## Documentation Issues


### README Assumptions (Severity: High)

- **File:** `README.md` - Badge links assume repo is `micha/feedme`
  - **Issue:** Hardcoded GitHub username/repo in badges and links
  - **Fix:** Use placeholders or relative links where possible
  - **Impact:** Broken links if repo moves

- **File:** `README.md` - "Made with ❤️ by micha" assumes specific maintainer
  - **Issue:** Personal branding in official docs
  - **Fix:** Remove or make configurable
  - **Impact:** Not professional for org repos

### Workflow Assumptions (Severity: High)

- **File:** `.github/workflows/test-and-coverage.yml` - Badge in README points to `micha/feedme` workflows
  - **Issue:** Hardcoded repo path
  - **Fix:** Use dynamic repo references
  - **Impact:** Broken CI badges

- **File:** `.github/workflows/test-and-coverage.yml` - Coverage upload assumes Codecov account
  - **Issue:** May not be set up
  - **Fix:** Make optional or document setup
  - **Impact:** CI failures

### Changelog Issues (Severity: Medium)

- **File:** `CHANGELOG.md` - Initial release claims "80%+ code coverage"
  - **Issue:** No actual coverage measured yet
  - **Fix:** Remove or verify
  - **Impact:** Misleading marketing

## Configuration Issues


### GitHub Specifics (Severity: Medium)

- **File:** `.github/FUNDING.yml` - Open Collective slug `feedme` may not exist
  - **Issue:** Assumes sponsorship setup
  - **Fix:** Remove or verify
  - **Impact:** Broken sponsorship links

- **File:** `CODEOWNERS` - Hardcoded `@Michael-A-Kuykendall`
  - **Issue:** Not generic
  - **Fix:** Use maintainer variable
  - **Impact:** Repo-specific

### Dependency Issues (Severity: Low)

- **File:** `Cargo.toml` - No MSRV specified
  - **Issue:** Users don't know minimum Rust version
  - **Fix:** Add `rust-version = "1.70"` or current
  - **Impact:** Compatibility issues

## Example Issues


### Inconsistent Error Handling (Severity: Low)

- **File:** `examples/` - Some examples use `Box<dyn std::error::Error>`, others `anyhow::Result`
  - **Issue:** Inconsistent error types
  - **Fix:** Standardize on `anyhow`
  - **Impact:** Example inconsistency

### Unused Imports/Variables (Severity: Low)

- **File:** Various examples - Multiple unused imports and variables
  - **Issue:** Warning noise
  - **Fix:** Clean up
  - **Impact:** Poor example quality

## Security/Production Issues


### No Security Audit (Severity: High)

- **File:** N/A - No `security.md` or vulnerability disclosure policy
  - **Issue:** Foundation crates need security process
  - **Fix:** Add SECURITY.md
  - **Impact:** No way to report vulnerabilities

### No Fuzzing/Testing Gaps (Severity: Medium)

- **File:** N/A - No fuzz tests despite parser complexity
  - **Issue:** Complex parsing without fuzz coverage
  - **Fix:** Add fuzz targets
  - **Impact:** Potential parser bugs

## Performance Issues


### File Output Per Event (Severity: Medium)

- **File:** `src/lib.rs` - `FileOutput::execute` opens/closes file per event
  - **Issue:** Poor performance for high throughput
  - **Fix:** Buffer or keep file open
  - **Impact:** Not suitable for production workloads

### No Async Support (Severity: Low)

- **File:** N/A - Synchronous I/O only
  - **Issue:** Blocking operations in async contexts
  - **Fix:** Consider tokio integration
  - **Impact:** Limited use cases

## Maintainability Issues


### Large Files (Severity: Low)

- **File:** `src/lib.rs` - 1000+ lines
  - **Issue:** Hard to navigate
  - **Fix:** Split into modules
  - **Impact:** Developer experience

### No Benchmarks (Severity: Medium)

- **File:** N/A - No performance benchmarks
  - **Issue:** Can't measure regressions
  - **Fix:** Add criterion benchmarks
  - **Impact:** Performance claims unverified

## Summary


**Total Issues:** 22+ (3 compiler warnings fixed)
**High Severity:** 4 (README assumptions, CI assumptions, security policy, file output perf)
**Medium Severity:** 7 (error handling, missing Default impls, etc.)
**Low Severity:** 11+ (type aliases, example cleanup, etc.)

**Key Themes:**
- Hardcoded assumptions about repo/user
- Missing production hardening (security, perf, testing)
- Code quality warnings now resolved
- Inconsistent patterns across codebase

**Status:** Compiler warnings eliminated. FeedMe compiles cleanly but still needs significant production hardening.