Skip to content

P0: Wire full connection architecture and close audit-readiness blockers #2

@GCagent

Description

@GCagent

Operator Update

Connect the full NoblePort revenue/control architecture and prioritize the audit blockers from the 2026-02-23 optimization report.

Target Flow

Stephanie.ai Avatar Intake -> FastAPI Intake API -> Postgres source of truth -> Proposal Engine -> Stripe deposit link -> Stripe webhook -> Deposit verified -> Schedule lock -> GCagent work order -> PermitStream/AWO/Invoice -> append-only audit log -> Warboard dashboard

Non-negotiable Rules

  • No deposit -> no schedule
  • No audit log -> no action
  • Postgres is source of truth
  • NoblePort Construction LLC is contracting entity on construction contracts
  • Permit uncertainty -> HOLD / AHJ verification required
  • Regulated investor/token communications -> human approval required

P0 Implementation Scope

  1. Deploy/verify PostgreSQL persistence layer and backup strategy.
  2. Add append-only audit_log with hash chain.
  3. Add Stripe deposit webhook and payment verification path.
  4. Enforce schedule_lock only after deposit_verified=true.
  5. Add API rate limiting and request validation.
  6. Replace deprecated crypto methods in audit integration with AES-256-GCM / createCipheriv.
  7. Add retry/error handling for IPFS/Arweave/blockchain anchoring.
  8. Add dashboard endpoints for revenue, risk, and audit state.

Source Report Findings

Optimization report lists overall system health at 78/100 and deliverables completion at 76.7%, but audit readiness only 64.75/100. Critical blockers include missing primary database deployment, missing connection pooling/backups, no rate limiting, no caching strategy, deprecated crypto methods, incomplete error handling, and missing audit/compliance documentation.

Acceptance Criteria

  • /health returns OK.
  • /ready verifies DB, Redis, Stripe config, and audit logger.
  • Smoke test proves blocked_before_deposit=true, deposit_recorded=true, schedule_locked=true.
  • Every state transition emits audit_log row with prev_hash and this_hash.
  • Schedule write fails when no verified deposit exists.
  • P0 crypto replacement covered by unit test.
  • OpenAPI docs generated.

Labels

P0, audit-readiness, revenue-lock, stripe, postgres, security

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions