Skip to content

Complete LHP v1 evals metrics and validation#60

Merged
Svaag merged 1 commit into
mainfrom
chore/lhp-v1-evals-metrics-docs
Jun 23, 2026
Merged

Complete LHP v1 evals metrics and validation#60
Svaag merged 1 commit into
mainfrom
chore/lhp-v1-evals-metrics-docs

Conversation

@Svaag

@Svaag Svaag commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes deferred LHP-v1 item 8:

  • adds concrete private eval suite definitions under evals/lhp_v1/
  • adds LHP-specific Prometheus counters and CaseService lifecycle wiring
  • documents rollout validation, metrics, and live smoke evidence
  • updates README/TESTING with LHP eval/metrics pointers
  • marks the plan item complete

Live rollout validation

Production validation passed on 2026-06-23 after the NOC/Loop rollout, Vault shared-secret patch, firewall apply, Engineering Loop re-apply, and NOC service reload.

Evidence captured in docs/lhp-v1-rollout-validation.md:

  • NOC public health OK: /health, /health/cases, /health/config, /health/mcp, /health/model
  • CaseService backend PostgresCaseStore, outbox worker running, verifier running, outbox pending/failed 0/0
  • public LHP endpoint non-exposed via Caddy (404)
  • Loop timer and Knowledge MCP active
  • shared LHP secret rendered on both NOC and Loop, lengths only recorded; values not printed
  • internal unsigned fetch 401
  • internal stale signed fetch 401
  • internal valid signed missing handoff 404
  • internal signed Engineering callback attempting verifier-only resolved status 422

Tests

git diff --check
uv run --group dev ruff check app/model_metrics.py app/cases/service.py tests/test_case_metrics.py
uv run --group dev python -m pytest -q \
  tests/test_lhp_foundation.py \
  tests/test_lhp_store_service.py \
  tests/test_lhp_verifier.py \
  tests/test_lhp_knowledge.py \
  tests/test_proactive_lhp.py \
  tests/test_proactive_loop.py \
  tests/test_case_metrics.py

Result: 58 passed.

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🏅 Score: 98
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@github-actions

Copy link
Copy Markdown

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Ensure objective_type attribute exists

The VerificationObjective model may not have an objective_type attribute; the
original code uses objective_key for the event payload. If objective_type is
missing, this will raise an AttributeError. Verify that the model includes
objective_type or use objective_key as a fallback to avoid runtime failures.

app/cases/service.py [581]

-record_lhp_verification_result(objective_type=updated.objective_type, status=updated.status)
+record_lhp_verification_result(objective_type=getattr(updated, 'objective_type', updated.objective_key), status=updated.status)
Suggestion importance[1-10]: 3

__

Why: The suggestion is cautious but the PR consistently adds both the metric counter label objective_type and the call using updated.objective_type. Without evidence that the attribute is missing, the fix is unnecessary and could introduce incorrect fallback semantics.

Low

@Svaag Svaag merged commit b056383 into main Jun 23, 2026
4 checks passed
@Svaag Svaag deleted the chore/lhp-v1-evals-metrics-docs branch June 23, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant