Go to file
jml e758f2ebfb feat(aphoria): implement programmatic extractors for Option<T> semantics
Completes Task #3 of httpclient dogfooding with 100% detection rate (7/7 violations).

## New Extractors

- **OptionBoundsExtractor**: Detects Option<T> fields set to None (unbounded)
- **OptionValueExtractor**: Extracts values from Some(n) for threshold checks

Both extractors use context-aware pattern matching to understand Rust Option<T>
semantics, which declarative extractors cannot handle.

## Implementation

**Files Created**:
- applications/aphoria/src/extractors/option_bounds.rs (257 lines)
- applications/aphoria/src/extractors/option_value.rs (277 lines)
- applications/aphoria/docs/examples/extractors/programmatic-option-semantics.md

**Files Modified**:
- applications/aphoria/src/extractors/mod.rs - Added module declarations
- applications/aphoria/src/extractors/registry.rs - Registered extractors
- applications/aphoria/dogfood/httpclient/.aphoria/claims.toml - Added 4 claims
- applications/aphoria/dogfood/httpclient/TASK-1-SUMMARY.md - Task #3 completion

## Results

| Metric | Value |
|--------|-------|
| Detection Rate | 100% (7/7 violations) |
| Improvement | +29 percentage points (from 71%) |
| New Violations | 2 (max_redirects, max_retries unbounded) |
| Unit Tests | 13 (all passing) |

## Two-Claim Strategy

For each bounded Option<T> field:
1. **configured** claim - Detects None (unbounded)
2. **max_value** claim - Validates Some(n) threshold

Example:
- `max_redirects: None` → CONFLICT (not configured)
- `max_redirects: Some(20)` → CONFLICT (exceeds 10)
- `max_redirects: Some(5)` → PASS

## Enterprise Quality

✓ Proper error handling (no unwrap/expect)
✓ Comprehensive tests (6+7 unit tests)
✓ Full documentation with examples
✓ Reusable for 10+ similar patterns
✓ Screening patterns for performance

## Cachewrap Dogfood

Also includes complete cachewrap dogfood exercise:
- 10 claims for Redis cache wrapper
- Day 1-5 summaries
- Full retrospective and evaluation
- Declarative extractors for all patterns

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 06:43:10 +00:00
.agentive-remediation feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
.aphoria feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
.cargo Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
.claude feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
ai-lookup feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
applications feat(aphoria): implement programmatic extractors for Option<T> semantics 2026-02-11 06:43:10 +00:00
batteries feat: WAL hardening (Phase 5B) - CRC32C, crash recovery, group commit, log rotation 2026-02-02 12:36:35 -07:00
cmd feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
community feat: Ingestor deadlock fix + blessed assertion tracking + patent docs 2026-02-04 03:41:08 -07:00
crates fix(api): enable non-strict mode for URL-encoded bracket notation 2026-02-09 16:11:25 +00:00
demo/keys feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
docs feat(aphoria): add git commit tracking + comprehensive documentation 2026-02-08 18:36:46 +00:00
latent feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
research-requests feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
scripts feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
sdk/go feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
uat feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
use-cases feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
.aphoriaignore feat(aphoria): implement ignore & exclusion system (Phase 16) 2026-02-07 17:28:50 -07:00
.dockerignore feat: Complete Aphoria Phase 8-9 + UAT suite (90/90 tests passing) 2026-02-06 22:50:55 -07:00
.gitignore chore(dogfood): archive dated documentation and remove database files from git 2026-02-11 06:12:34 +00:00
.jscpd.json Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
aphoria.toml feat(aphoria): implement ignore & exclusion system (Phase 16) 2026-02-07 17:28:50 -07:00
architecture.md feat: Complete Phase 2 (The Cortex) - query, lens, and API layers 2026-02-01 13:22:44 -07:00
arena-roadmap.md refactor: Split all files to enforce 500-line max 2026-02-02 01:13:45 -07:00
Cargo.toml perf: speed up test suite with profile.test optimization 2026-02-07 20:21:25 -07:00
CLAUDE.md feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
clippy.toml Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
CODING_GUIDELINES.md Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
CORPUS-QUICK-START.md fix(api): enable querying of CLI-created community corpus items 2026-02-09 15:54:35 +00:00
docker-compose.yml feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
Dockerfile feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
DOCUMENTATION_UPDATES.md feat(aphoria): add git commit tracking + comprehensive documentation 2026-02-08 18:36:46 +00:00
GEMINI.md feat: Complete Phase 1 (The Spine) - storage foundation 2026-01-31 14:15:34 -07:00
Makefile perf: speed up test suite with profile.test optimization 2026-02-07 20:21:25 -07:00
position.md feat: Complete Phase 2 (The Cortex) - query, lens, and API layers 2026-02-01 13:22:44 -07:00
quickstart.md feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
roadmap-archive.md feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
roadmap.md feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
rustfmt.toml Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
scan-results-v1.json feat(aphoria): implement Day 3 debugging features and comprehensive documentation 2026-02-11 03:31:06 +00:00
simulation-vision.md feat: Complete Phase 1 (The Spine) - storage foundation 2026-01-31 14:15:34 -07:00
usage.md feat: Multi-application expansion with chaos testing and community UI 2026-02-04 01:24:14 -07:00
vision.md feat: Complete Aphoria Phase 14 - Governance Workflows 2026-02-07 05:16:26 -07:00
what-is-episteme.md feat: WAL hardening (Phase 5B) - CRC32C, crash recovery, group commit, log rotation 2026-02-02 12:36:35 -07:00