IC-EVIDENCE-ARCHITECTURE — CANONICAL STATE SNAPSHOT

Snapshot date: 2026-09-10 Europe/Kyiv Architect: Alexander Romaskevich Public signature: RomaskevicH Source: current IMPERIAL Core architecture review thread

Canonical architecture

  • SPEC: IC-EVIDENCE-ARCHITECTURE-IMPLEMENTATION-SPEC-003 FINAL
  • STATUS: ARCHITECTURALLY_APPROVED / IMPLEMENTATION_AUTHORIZED
  • IMPLEMENTATION_STATUS: NOT YET VERIFIED
  • Principle: Architecture -> Implementation -> Independent Verification -> Evidence
  • Evidence Before Claims
  • Data classification: PUBLIC / PRIVATE / SECRET / RESTRICTED
  • Identity != Authority
  • Capability != Approval
  • Intelligence != Privilege
  • Federated Multi-Orchestrator Architecture
  • AI Passport is an enforceable authority boundary
  • Guardian Core evaluates policy/security/human-protection rules
  • Approval Gateway authorizes the exact action now
  • Audit Ledger is append-only; history may not be rewritten

Approved Evidence Architecture decisions

  1. Multi-ledger database model with composite (ledger_id, sequence_number).
  2. Atomic append protocol with expected sequence/hash/version and bounded retry.
  3. RFC 8785 JCS + UTF-8 + SHA-256 lowercase hex for canonical hashing.
  4. Historical anomaly preservation + CHAIN_REPAIR_CHECKPOINT; no history rewrite.
  5. Composite idempotency scope + key.
  6. External side-effect reconciliation before unsafe retry.
  7. Strict PaymentReceipt truth; CRM state alone is not payment evidence.
  8. Approval decision separated from authorization lifecycle.
  9. AI Passport is an enforceable authority boundary.
  10. Append-only DB permission model; no direct ordinary application mutation of ledger head/history.

Evidence levels

  • E1: VERIFIED (approved specification)
  • E2: NOT VERIFIED
  • E3: NOT VERIFIED
  • E4: NOT VERIFIED
  • E5: NOT VERIFIED
  • E6: NOT VERIFIED

Adrian implementation history

  • V1: IMPLEMENTED FALSE; only initial artifacts/pseudocode.
  • V2: PARTIAL; compile and architecture defects found.
  • V3: PARTIAL; additional ledger/idempotency/payment/passport defects found.
  • V4 package version 4.0.0: PARTIAL implementation; no typecheck, runtime tests, integration tests, deployment, or package hash.

Lucas verification history

  • Early static PASS results were rejected where they relied on visual inspection or incomplete evidence.
  • V4 accepted only as STATIC_VERIFICATION PARTIAL.
  • LOCAL_RUNTIME_VERIFICATION: NOT_EXECUTED.
  • INTEGRATION_VERIFICATION: NOT_EXECUTED.
  • LIVE_RUNTIME_VERIFICATION: NOT_EXECUTED.

Current V4 file manifest reported by Adrian

package.json tsconfig.json jest.config.js src/evidence/types.ts src/evidence/errors.ts src/evidence/canonical-profiles.ts src/evidence/canonicalize.ts src/evidence/hashing.ts src/ledger/genesis.ts src/ledger/ledger-service.ts src/ledger/ledger-verifier.ts src/approval/approval-consumption.ts src/approval/action-execution.ts src/idempotency/idempotency-service.ts src/idempotency/external-effect-state.ts src/external-facts/ingestion.ts src/external-facts/verifier.ts src/payments/payment-intent.ts src/payments/payment-receipt.ts src/payments/reconciliation.ts src/payments/payment-confirmation-gate.ts src/passport/ai-passport.ts src/passport/issuer-registry.ts src/passport/signature-verification.ts src/passport/enforce-passport.ts migrations/001_evidence_core.sql migrations/002_approval.sql migrations/003_idempotency.sql migrations/004_external_facts.sql migrations/005_payment_truth.sql migrations/006_permissions.sql migrations/007_external_fact_transitions.sql tests/state-consistency.test.ts tests/hashing.test.ts tests/ledger.test.ts tests/ledger-race.test.ts tests/genesis.test.ts tests/approval.test.ts tests/idempotency.test.ts tests/security-definer.test.ts tests/external-facts.test.ts tests/passport.test.ts

Current V4 truth

TSC_TYPECHECK_STATUS: NOT_EXECUTED_NO_RUNTIME_ENVIRONMENT ACTUAL_TEST_STATUS: NOT_EXECUTED_NO_RUNTIME_ENVIRONMENT IMPLEMENTED_LIVE: FALSE COMPILE_READY: UNVERIFIED TRANSFERABLE_PACKAGE_COMPLETE: UNVERIFIED PACKAGE_HASH: NOT COMPUTED

Open P0 implementation defects identified after V4 review

  1. ledger-service uses JSON.stringify for canonical payload/event strings while approved hash path requires RFC 8785 JCS; DB and application can hash different bytes.
  2. Trusted append function must bind canonical event JSON field-by-field to the exact stored columns; hash of Event A must never be accepted while storing Event B metadata.
  3. pgcrypto/digest runtime dependency must be explicit and fail closed if unavailable.
  4. SECURITY DEFINER owner/search_path/schema permissions need full hardening; dedicated NOLOGIN owner must actually own the function and untrusted writable schemas must not be in search_path.
  5. PostgreSQL idempotency duplicate handling must not rely on catching 23505 then SELECT inside the same aborted transaction; use ON CONFLICT DO NOTHING RETURNING or equivalent.
  6. startActionExecution must explicitly handle EXISTING_EXECUTING, EXISTING_UNKNOWN and RETRY_ALLOWED, not only success/conflict.
  7. Existing successful idempotent request must return the real previous execution/result reference, not a synthetic execution id.
  8. External fact transition evidence table must actually be populated atomically with state transitions.
  9. External fact verification must validate evidence/authenticity, not merely non-empty strings/state flag.
  10. Passport cryptographic verification remains unimplemented in V4; minimum runnable Ed25519 verification is required before claiming crypto enforcement implemented.
  11. Trusted issuer registry must not be self-registerable by ordinary runtime/NCA code.
  12. Issuer signature metadata must be separate from the agent identity key algorithm.
  13. Resource budget path currently fails open when required resource_cost is absent; required dimensions must fail closed.
  14. Financial action with missing amount/currency/budget/payment-intent context must fail closed.
  15. External action with external=true but missing action_type must fail closed.
  16. ApprovalDecision ID presence is not authorization; trusted action entrypoint must validate/consume exact ApprovalDecision before side effect.
  17. payment_verifier must not have unrestricted UPDATE verification_state authority; use restricted trusted transition functions.
  18. Financial storage semantics must not mix integer minor units with DECIMAL major-unit representation.
  19. Placeholder tests such as expect(true).toBe(true) are not tests; use real integration tests or test.skip with explicit reason.
  20. Reported FULL SOURCE does not match visible evidence scope where some listed files were not supplied.
  21. Reproducible build remains false without lockfile and actual dependency resolution.
  22. Adrian may mark only FIX_IMPLEMENTED_IN_SOURCE until Lucas independently verifies and execution evidence exists.

Next required deliverable

ADRIAN IMPLEMENTATION PACKAGE V5:

  • actual complete source artifact or repository commit
  • inspectable complete file manifest
  • package/commit SHA-256 when available
  • exact package.json + lockfile when generated
  • real crypto implementation
  • corrected JCS trusted append path
  • corrected idempotency transaction flow
  • external fact evidence enforcement
  • payment verifier authority boundary
  • non-placeholder tests

Then LUCAS STATIC VERIFICATION V5 against the actual artifact.

No-recheck rule

Do not repeat already verified checks without state change. Re-test only changed code/runtime/database/deployment/provider/credentials/policy/security/error/integration state and required regressions.

Truth boundary

This snapshot records architecture and implementation-review state only. It does NOT claim deployment, runtime verification, production verification, client acceptance, or payment.