# Technical Debt Tracking for RSSN Project

## Current Status
- Date: November 2, 2025
- Project: RSSN Scientific Computing Library
- Version: 0.1.11

## Issues Identified & Fixed

### 1. Parser Issues (Completed)
- **Issue**: Unused import `alphanumeric1` in `src/input/parser.rs`
- **Issue**: Unused variables `input` and `expr` in the `unary` function (around line 120)
- **Fix**: Removed unused import and corrected logic in unary function to properly handle negative rational numbers
- **Status**: Fixed

### 2. Concurrency Safety Issues (Completed)
- **Issue**: Multiple `unwrap()` calls in `src/compute/cache.rs` and `src/compute/engine.rs` that could panic on poisoned mutex locks
- **Impact**: Potential runtime panics in production code
- **Fix**: Replaced `unwrap()` with `expect()` to provide descriptive panic messages
- **Additional Fix**: Changed `"".to_string()` to `String::new()` for better performance
- **Additional Fix**: Added `Default` implementations for `ParsingCache`, `ComputationResultCache`, and `ComputeEngine` structs
- **Status**: Fixed

### 3. Core Expression Constructor Issues (Completed)
- **Issue**: Multiple `unwrap()` calls in `src/symbolic/core.rs` macro definitions that could panic on DAG construction failures
- **Impact**: Potential runtime panics in production code when constructing expressions
- **Fix**: Replaced `unwrap()` with `expect()` in the macro definitions to provide descriptive panic messages
- **Status**: Fixed

## Issues Identified (To be addressed)

### 4. Pre-existing Test Failures (To Be Addressed)
- **Issue**: 14 parser tests are currently failing that existed before changes
- **Examples**: `test_parse_division`, `test_parse_floor`, `test_parse_factorial`, etc.
- **Impact**: These indicate possible regressions or issues in the parsing logic that need investigation
- **Status**: Identified, but not fixed in this round to maintain stability

### 5. Linting and Code Quality
- **Issue**: Multiple clippy lints are suppressed globally (e.g., `clippy::indexing_slicing`, `clippy::arithmetic_side_effects`)
- **Issue**: Large number of allow attributes in lib.rs for various lints
- **Impact**: Code maintainability and safety concerns
- **Priority**: High

### 6. Performance and Safety
- **Issue**: Direct indexing without bounds checks in numerical computations
- **Issue**: Performance vs safety trade-offs documented in allow attributes
- **Impact**: Potential runtime panics in production
- **Priority**: High

### 7. Documentation
- **Issue**: Missing documentation for many functions
- **Issue**: Incomplete safety documentation for FFI functions
- **Impact**: Usability and maintainability
- **Priority**: Medium

### 8. Architecture
- **Issue**: Very large prelude file exporting 1000+ functions/types
- **Issue**: Complex module structure with potential circular dependencies
- **Impact**: Code organization and maintainability
- **Priority**: Medium

### 9. Testing
- **Issue**: Limited test coverage in some critical modules
- **Issue**: Potential need for more comprehensive integration tests
- **Impact**: Code reliability
- **Priority**: Medium

## Decision Log

### Nov 2, 2025
- Initial fix: Addressed immediate compilation warnings in parser module
- Decision: Maintain backward compatibility by keeping existing public APIs
- Decision: Focus on stability over feature additions during technical debt cleanup
- Decision: Replace `unwrap()` with `expect()` to provide meaningful error messages rather than changing function signatures which would break the API

## Next Steps
1. Review and clean up global lint suppressions
2. Add comprehensive test coverage
3. Improve documentation
4. Refactor complex modules for better maintainability