Go to file
jml bb0c33f8d3 fix(api): enable querying of CLI-created community corpus items
## Problem
CLI-created community corpus items (tier 3) were stored correctly but
invisible via API queries. Two issues blocked discoverability:

1. **Prefix mismatch**: API hardcoded 'community://pattern/' for
   aggregated patterns, but CLI creates 'community://rust/http/...' URIs
2. **Query parameter parsing**: Axum's default parser doesn't support
   bracket notation (?sources[]=value) used by the dashboard

Result: 0/22 CLI-created items were queryable.

## Solution

### Fix 1: Broaden Community Prefix
- Changed: 'community://pattern/' → 'community://' in corpus handler
- Impact: Now matches both aggregated patterns AND CLI-created items
- Backward compatible: Broader prefix includes narrower results

### Fix 2: Add QsQuery Extractor
- Added: serde_qs dependency + custom QsQuery extractor
- Supports: Bracket notation for array parameters (?sources[]=a&sources[]=b)
- Compatible: Works with JavaScript URLSearchParams standard
- Tested: 3 new unit tests for extractor behavior

## Verification
-  All 22 CLI-created community items now queryable (was 0)
-  Source filtering works: community (22), RFC (2), vendor (5)
-  Multi-source queries work: ?sources[]=community&sources[]=rfc → 24
-  All 89 API tests pass + 3 new extractor tests
-  Clippy clean (0 warnings)
-  No regressions in existing functionality

## Files Changed
- crates/stemedb-api/Cargo.toml: Add serde_qs dependency
- crates/stemedb-api/src/extractors.rs: New QsQuery extractor (117 lines)
- crates/stemedb-api/src/handlers/aphoria/corpus.rs: Use QsQuery, broaden prefix
- crates/stemedb-api/src/lib.rs: Export extractors module

Also includes: Scale-adaptive thresholds, wiki corpus extraction,
documentation updates, and dashboard UI improvements from prior work.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-09 15:54:35 +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 fix(aphoria): move claims.toml to project root and fix verify integration 2026-02-08 11:09:57 +00:00
.cargo Initial project setup with Claude Code monorepo structure 2026-01-31 10:56:26 -07:00
.claude fix(api): enable querying of CLI-created community corpus items 2026-02-09 15:54:35 +00:00
ai-lookup feat(aphoria): implement claims architecture (A1-A5) with verify engine, corpus, coverage, and explain 2026-02-08 09:11:47 +00:00
applications fix(api): enable querying of CLI-created community corpus items 2026-02-09 15:54:35 +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 querying of CLI-created community corpus items 2026-02-09 15:54:35 +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 fix(aphoria): move claims.toml to project root and fix verify integration 2026-02-08 11:09:57 +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): add git commit tracking + comprehensive documentation 2026-02-08 18:36:46 +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
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