Task 46 — Verification pipeline
Phase: 4
Initiative: 22
Status: done
Owner: —
Slug: verification-pipeline
Goal
High-impact или safety-sensitive ответы проверяются verifier-навыками, числовыми валидаторами, policy-enforcer’ами или независимыми peer-агентами до возврата пользователю или выполнения действия.
Acceptance criteria
- TBD при старте работы (декомпозиция в sub-tasks)
Sub-tasks
IVerificationPipelineinterface andVerificationPipelineimplementationVerificationContextandVerificationResultmodelsIVerifierbase interface +SafetyVerifier(PII, code injection, dangerous patterns)PolicyVerifier(trust admission, capability constraints)SchemaVerifier(response schema validation)NumericValidator(numeric claim checks)VerificationConfigadded toMeshConfig- Integration into
AgentCore.HandleAsyncCore(post-response, pre-return) - DI registration in
MeshServiceExtensions+Program.cs - Unit tests for all verifiers and pipeline (9 tests)
dotnet build+dotnet testpass
Validation
dotnet build src/agent/Hercules.csproj— succeededdotnet test --filter "FullyQualifiedName~Verification"— 9 passeddotnet test tests/Hercules.Agent.Tests/— pre-existing failures unchanged
Implementation notes
Triggering logic embedded in each verifier’s CanVerify() method and AgentCore confidence-skip logic.
Blocked responses return a safe degradation message and VerificationMetadata in AgentResponse.
Default config: disabled (backward-compatible); enable via Mesh.Verification.Enabled=true in appsettings.
Scope / Likely files
src/agent/Mesh/Verification/
Dependencies
- блокирует / опирается на: task_007 — typed-contracts
- блокирует / опирается на: task_040 — trust-admission
Risks / Rollback
Verifier может быть скомпрометирован или ошибочен; meta-verification несколькими независимыми проверками + re-check критических операций.
Links
- Backlog: ../backlog.md
- Roadmap (EN): ../../ROADMAP-EN.md
- Roadmap (RU): ../../ROADMAP-RU.md