Commit Graph

2 Commits

Author SHA1 Message Date
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
jordan
c65066fd1c feat(aphoria): implement ignore & exclusion system (Phase 16)
Reduces scan noise by 96% through proper exclusion of test fixtures,
demo apps, and intentional vulnerabilities.

Phase 16.1 - Glob Pattern Matching:
- Replace starts_with() with globset for ** and * patterns
- Backwards compatible with legacy prefix patterns
- Add walker/mod.rs tests for glob exclusions

Phase 16.2 - .aphoriaignore File:
- Create walker/ignore_file.rs for gitignore-style parsing
- Merge with aphoria.toml excludes
- Support # comments and whitespace trimming

Phase 16.3 - Inline Ignore Comments:
- Create extractors/ignore_comments.rs parser
- Support // aphoria:ignore, // aphoria:ignore-next-line
- Support // aphoria:ignore-block / // aphoria:end-ignore
- Multiple comment styles: //, #, /*, --, <!--
- Integrate with ExtractorRegistry.extract_all()

Phase 16.4 - Ack Export/Import:
- Create ack_file.rs for TOML serialization
- Add 'aphoria ack add' subcommand
- Add 'aphoria ack export' to .aphoria/acks.toml
- Add 'aphoria ack import' from .aphoria/acks.toml
- Preserve expiry and reason fields

Also configures stemedb with:
- aphoria.toml with glob excludes for vulnbank, extractors, fixtures
- .aphoriaignore for dashboard, community, latent, SDK examples

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 17:28:50 -07:00