stemedb/applications/aphoria/dogfood/httpclient/scan-all-violations.json
jml 3dac3dc914 feat(aphoria): implement Day 3 debugging features and comprehensive documentation
Implements all product gaps identified in msgqueue Day 3 evaluation (VG-DAY3-001/003/004)
and adds comprehensive documentation to prevent dogfooding failures.

## Product Features (VG-DAY3-XXX)

### VG-DAY3-001: --show-observations flag (P0)
- Shows all observations with concept paths for debugging extractor alignment
- Includes claim matching analysis (/ visual feedback)
- Explains tail-path matching and why observations don't match claims
- 8 unit tests in src/report/observations.rs
- 5 integration tests in src/tests/day3_debugging.rs

### VG-DAY3-003: aphoria extractors validate (P2)
- Validates extractor subject fields match claim concept_paths
- Smart fuzzy matching suggests corrections for typos
- Clear error messages with actionable hints
- Proper exit codes (0=success, 1=validation failed)

### VG-DAY3-004: aphoria extractors test NAME --file (P2)
- Tests single extractor pattern against one file (no full scan needed)
- Shows line numbers and matched text
- Previews what observation would be created
- Helpful troubleshooting when pattern doesn't match

## Documentation (P0-P1)

### New Docs Created
- docs/extractors/declarative-extractors.md (800 lines)
  - Complete field reference with emphasis on subject field format
  - 3 worked examples (timeout=0, unbounded queue, TLS disabled)
  - Common mistakes with fixes
  - Validation workflow
  - Debugging 0% detection rate

- docs/examples/extractors/timeout-zero-example.md (500 lines)
  - End-to-end flow: code → extractor → claim → conflict → fix
  - Visual diagrams showing path alignment
  - Troubleshooting guide
  - Validation checklist

- docs/dogfooding-common-mistakes.md (560 lines)
  - Mistake #1: Skipping Day 3 extractor creation (CRITICAL)
  - Mistake #2: Creating extractors with wrong subject format (NEW)
  - Evidence from msgqueue failures
  - Recovery procedures

### Docs Updated
- dogfood/msgqueue/plan.md (Day 3 Steps 3-4)
  - Added complete manual declarative extractor TOML format
  - Added validation workflow BEFORE scanning
  - Added debug workflow for 0% detection after creating extractors

- dogfood/msgqueue/eval/ (evaluation artifacts)
  - EVALUATION-REPORT-2026-02-10.md (600 lines)
  - DOC-FIXES-2026-02-10.md (summary of fixes)
  - IMPLEMENTATION-REVIEW-2026-02-10.md (feature review)

## New Extractors
- src/extractors/ack_mode_config.rs - Detects AckMode::AutoAck violations
- src/extractors/async_blocking.rs - Detects blocking calls in async functions
- src/extractors/unbounded_resources.rs - Detects unbounded queues/connections

## Code Changes
- src/cli/mod.rs: Add --show-observations flag to scan command
- src/cli/extractors.rs: Add Validate and Test subcommands
- src/handlers/scan.rs: Call format_observations when flag enabled
- src/handlers/extractors.rs: Implement handle_validate() and handle_test()
- src/report/observations.rs: Observation formatting with claim matching analysis
- src/tests/day3_debugging.rs: Integration tests for new features

## Dogfood Artifacts
- dogfood/msgqueue/ - Complete msgqueue Day 3 evaluation with findings
- dogfood/dbpool/ - Database pool dogfooding exercise

## Impact
- Time savings: 30 min per Day 3 debugging (67% faster)
- User experience: Transparent debugging (no blind trial-and-error)
- Documentation: 1,860 new lines covering all P0-P1 gaps

## Related Issues
- Closes VG-DAY3-001 (--show-observations)
- Closes VG-DAY3-002 (concept path alignment docs)
- Closes VG-DAY3-003 (extractors validate)
- Closes VG-DAY3-004 (extractors test)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 03:31:06 +00:00

182 lines
6.6 KiB
JSON

{
"claim_verification": [
{
"claim_id": "httpclient-connect-timeout-001",
"concept_path": "httpclient/connect_timeout",
"explanation": "Expected 10, found: Text(\"connect_timeout: Duration::from_secs(60)\"), Text(\"connect_timeout: Duration::from_secs(10)\")",
"invariant": "TCP connection timeout MUST NOT exceed 10 seconds",
"verdict": "CONFLICT"
},
{
"claim_id": "httpclient-request-timeout-001",
"concept_path": "httpclient/request_timeout",
"explanation": "Expected 30, found: Text(\"request_timeout: Duration::from_secs(120)\"), Text(\"request_timeout: Duration::from_secs(30)\")",
"invariant": "HTTP request timeout MUST NOT exceed 30 seconds",
"verdict": "CONFLICT"
},
{
"claim_id": "httpclient-read-timeout-001",
"concept_path": "httpclient/read_timeout",
"explanation": "No matching observation found",
"invariant": "Response body read timeout MUST NOT exceed 30 seconds",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-idle-timeout-001",
"concept_path": "httpclient/idle_timeout",
"explanation": "Expected true, found: Boolean(false)",
"invariant": "Idle connection timeout MUST be configured",
"verdict": "CONFLICT"
},
{
"claim_id": "httpclient-idle-timeout-default-001",
"concept_path": "httpclient/idle_timeout",
"explanation": "No matching observation found",
"invariant": "Idle timeout default SHOULD be 60 seconds",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-tls-cert-validation-001",
"concept_path": "httpclient/tls/certificate_validation",
"explanation": "Expected true, found: Boolean(false)",
"invariant": "HTTPS connections MUST validate server certificates",
"verdict": "CONFLICT"
},
{
"claim_id": "httpclient-tls-enabled-001",
"concept_path": "httpclient/tls/enabled",
"explanation": "No matching observation found",
"invariant": "HTTPS SHOULD be enabled by default for all connections",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-tls-min-version-001",
"concept_path": "httpclient/tls/min_version",
"explanation": "Expected 1.2, found: Text(\"1.0\")",
"invariant": "TLS version MUST be >= 1.2 (TLS 1.0/1.1 deprecated)",
"verdict": "CONFLICT"
},
{
"claim_id": "httpclient-tls-ciphers-001",
"concept_path": "httpclient/tls/cipher_suites",
"explanation": "No matching observation found",
"invariant": "TLS cipher suites SHOULD use modern ciphers only",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-max-redirects-001",
"concept_path": "httpclient/max_redirects",
"explanation": "No matching observation found",
"invariant": "HTTP redirect limit MUST NOT exceed 10",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-redirect-loop-001",
"concept_path": "httpclient/redirects/loop_detection",
"explanation": "No matching observation found",
"invariant": "Redirect loop detection MUST be implemented",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-retry-max-001",
"concept_path": "httpclient/retry/max_attempts",
"explanation": "No matching observation found",
"invariant": "Retry attempts MUST NOT exceed 3",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-retry-backoff-001",
"concept_path": "httpclient/retry/backoff",
"explanation": "No matching observation found",
"invariant": "Retry backoff MUST use exponential strategy",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-retry-idempotent-001",
"concept_path": "httpclient/retry/idempotent_only",
"explanation": "No matching observation found",
"invariant": "Retries MUST only apply to idempotent methods",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-retry-post-excluded-001",
"concept_path": "httpclient/retry/post_excluded",
"explanation": "No matching observation found",
"invariant": "POST requests MUST be excluded from automatic retries",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-metrics-enabled-001",
"concept_path": "httpclient/metrics/enabled",
"explanation": "No matching observation found",
"invariant": "Metrics collection SHOULD be enabled for production HTTP clients",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-metrics-exposed-001",
"concept_path": "httpclient/metrics/exposed",
"explanation": "No matching observation found",
"invariant": "Core HTTP metrics MUST be exposed: request_count, active_connections, latency_p99, error_rate",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-pool-size-001",
"concept_path": "httpclient/pool_size",
"explanation": "No matching observation found",
"invariant": "Connection pool size SHOULD be 50-100 per host in production",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-pool-default-size-001",
"concept_path": "httpclient/pool/default_size",
"explanation": "No matching observation found",
"invariant": "Default pool size SHOULD be 10 connections per host",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-connection-pooling-001",
"concept_path": "httpclient/sessions/connection_pooling",
"explanation": "No matching observation found",
"invariant": "Connection pooling SHOULD be enabled for multi-request scenarios",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-user-agent-001",
"concept_path": "httpclient/headers/user_agent",
"explanation": "No matching observation found",
"invariant": "User-Agent header MUST be sent with all requests",
"verdict": "MISSING"
},
{
"claim_id": "httpclient-error-handling-001",
"concept_path": "httpclient/error_handling/request_failure",
"explanation": "No matching observation found",
"invariant": "HTTP request failures MUST return Result, NEVER panic",
"verdict": "MISSING"
}
],
"conflicts": [],
"deprecated_usages": [],
"drifts": [],
"project": "httpclient",
"scan_id": "scan-1770710674080",
"strict": false,
"summary": {
"acks": 0,
"authority_conflicts": 0,
"blocks": 0,
"claims_conflict": 5,
"claims_missing": 17,
"claims_pass": 0,
"claims_total": 22,
"claims_unclaimed": 16,
"deprecated_usages": 0,
"drifts": 0,
"files_scanned": 13,
"flags": 0,
"observations_extracted": 25,
"observations_recorded": 0,
"passes": 0
}
}