Skip to content

Milestone 2: port verified direct-PostgreSQL analysis into the protected product architecture #79

Description

@seonghobae

Buyer problem

PR #77 contains valuable direct-PostgreSQL analysis and browser/product evidence, but it is a parallel repository replacement that deletes the protected package, migrations, ADRs, ontology profile, license, and reviewed v0.77 lineage. The evidence must be preserved without merging that destructive history.

Source evidence to preserve

Use codex/milestone-2-direct-postgres-product as a read-only source branch. Preserve only claims that can be reproduced from aggregate, privacy-safe evidence and exact source hashes. The historical run records report bounded direct-database analysis, event/semantic graph persistence, report evaluation/calibration, Valkey outbox behavior, browser UX traversal, and evidence-scoped APIs. Do not copy raw records, source identifiers, base64/image bytes, credentials, organization-specific names, or source-table names into the public repository.

Required additive delivery slices

  1. Runtime schema bridge

    • Map the verified analysis_* objects into new migrations after the current v0.77 schema.
    • Keep every database object two-or-more-word snake_case and third-normalized.
    • Provide forward migration, rollback evidence, source-to-target reconciliation, and idempotency.
  2. TEPP measurement port

    • Call TEPP through its versioned import/REST boundary; do not fork or duplicate TEPP arithmetic.
    • Preserve multi-clock evidence, event/document/entity provenance, temporal leakage controls, cross-classified multiple membership, and uncertainty.
  3. contextual-orchestrator port

    • Keep a versioned fail-closed REST adapter until reviewed upstream main exposes the required portable task envelope.
    • Route simple extraction to bounded single-model work and complex ontology/report/multimodal work to deep thinker/worker/verifier/synthesizer workflows with explicit recursion, access lists, reasoning effort, prompt/model hashes, and ablation evidence.
  4. Product UI

    • Port the validated React/PostgreSQL customer, workspace, document popup, source drawer, event DAG, Keyman, issue/todo/calendar, report, and KG surfaces into the existing frontend rather than adding a second web application.
    • Maintain the approved Figma information architecture and automated browser traversal.
  5. Identity and authorization

    • Production compose must bind to real Keyverse. No Keyverse-shaped compose identity service, default account, default client secret, or synthetic production claims.
    • Test doubles belong under test-only fixtures and may never be routable from product compose.
    • Enforce actor-scoped ABAC/RBAC in SQL/API responses and prove hidden-evidence non-disclosure.
  6. Actual-data acceptance

    • Run read-only source profiling first, then write only normalized analysis outputs in a separately governed schema.
    • Reconcile source row/document/thread counts, graph node/edge counts, report/item/calibration rows, outbox delivery, and orphan checks.
    • Store an aggregate-only signed manifest outside public source control; public documentation may contain only non-sensitive aggregate acceptance ranges and reproducibility metadata.

Merge gates

  • Start from the post-feat: ship PROV-O actor lineage, accessible labels, and analysis-run evidence (v0.83.0) #74 protected head and preserve monotonic versioning.
  • Use the committed universal lock and supported Python/Rust/Node toolchains.
  • 100% production statement and branch coverage for changed production code; public API docstrings complete.
  • Exact-head Python, PostgreSQL, React, browser, SAST, security, migration, and public-content boundary checks.
  • No unaccounted test skips; GPU/LLM live lanes use NVIDIA_NIM_API_KEY, never COPILOT_GITHUB_TOKEN.
  • Independent current-head review and protected auto-merge.

Supersession

Closing PR #77 after creating this issue does not discard its source branch. It removes an unsafe merge candidate while retaining a reproducible source for bounded additive ports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions