stemedb/aphoria.toml
jordan 4096967c20 fix: fix claims API scan prefix bug and add hosted Aphoria config
- stemedb_claims.rs: fix list/get/delete handlers using wrong scan key
  - Was scanning subject_index_key ({subject}\x00S:) which stores a
    single Vec<Hash> — scan_prefix finds nothing on a single key
  - Fix: use assertion_prefix ({subject}\x00H:*) to scan all assertions
  - GET /v1/claims was returning [] even after creating claims
- aphoria.toml: add [hosted] section pointing to local StemeDB (18180)
  - Enables aphoria scan --persist to push observations to StemeDB
- scripts/validate.sh: use release binary if available for fast startup
  - --no-build flag now actually skips all compilation (sub-3s startup)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 15:12:44 -07:00

64 lines
1.5 KiB
TOML

# Aphoria Configuration for StemeDB
#
# This configures the code-level truth linter for the StemeDB project.
[project]
name = "stemedb"
[scan]
# Exclude patterns (supports globs)
exclude = [
# Build outputs
"target/**",
"node_modules/**",
".git/**",
# Intentionally vulnerable demo app
"docs/demo/vulnbank/**",
# Test fixtures (intentionally insecure patterns)
"**/uat/fixtures/**",
"**/test_fixtures/**",
# Extractor source files (contain detection patterns as test strings, not real issues)
"applications/aphoria/src/extractors/**",
# Report modules (contain example output, not real issues)
"applications/aphoria/src/report/**",
# Learning modules (contain pattern examples)
"applications/aphoria/src/learning/**",
# Community modules (contain anonymization examples)
"applications/aphoria/src/community/**",
]
# Include test files in scan (we'll use inline ignores for specific patterns)
include_tests = false
# Max file size to scan (1MB)
max_file_size = 1048576
[extractors]
# All extractors enabled by default
[corpus]
# Include all corpus sources
include_hardcoded = true
include_rfc = true
include_owasp = true
[aliases]
# Auto-create aliases when conflicts are detected
auto_create_aliases = true
[hosted]
# Local StemeDB instance for observations sync
url = "http://127.0.0.1:18180"
project_id = "stemedb"
sync_mode = "local-and-remote"
offline_fallback = "skip"
api_key_env = "STEMEDB_API_KEY"
max_retries = 3
retry_delay_ms = 1000