Repository navigation
Milestone 2: port verified direct-PostgreSQL analysis into the protected product architecture #79
Description
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
-
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_caseand third-normalized. - Provide forward migration, rollback evidence, source-to-target reconciliation, and idempotency.
- Map the verified
-
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.
-
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.
-
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.
-
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.
-
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-Role, responsibility, and agent ontology (v2.10.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, neverCOPILOT_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.
Activity
seonghobae commentedon Aug 15, 2026
Canonical Milestone 2 source and ownership handoff
Fresh queue cleanup established the following immutable source-evidence boundaries:
codex/milestone-2-direct-postgres-productremains read-only at96116aa4c44d0fe5dd2515b2e348a75f8f025a48;codex/surface-audit-continue-mainbaseis a one-commit descendant atdc8b536e42756011301c78762a20cf430906c772; its run-audit and abstention-safe parser deltas must be isolated rather than reopening the 235-file repository replacement;First additive implementation lane after #74
The next canonical PR must start from the exact protected result of #74 and implement only the runtime schema bridge:
analysis_*objects from the read-only feat: publish direct-PostgreSQL LineageWeave product #77 branch;Adapter sequence
After the schema bridge is protected-main truth:
This comment is the continuation pointer for the next bounded TDD branch; it does not promote any closed-branch behavior to shipped product truth.
seonghobae commentedon Aug 15, 2026
Canonical Milestone 2 delivery update — corrected 2026-08-16
The runtime-schema lane now has one canonical merge candidate: PR #89 (
feat/analysis-run-registry-v079-clean). It is deliberately Draft and stacked directly on #74.The earlier pointer to #83 is superseded. #83, #84, #85, #86, and the broader #88 prototype remain closed branch evidence only; none may be reopened as a competing migration
0018or ADR0013authority.Current bounded contract on #89 includes:
maximum_available_timeand run-ownedknowledge_cutoff, enforcingmaximum_available_time <= knowledge_cutoff;user_accountrequester identity and requester-scoped idempotency;Dependency order:
main, and integrate;This correction removes competing ownership without discarding the useful closed-branch evidence.
seonghobae commentedon Aug 16, 2026
Continuation (2026-08-16 hourly loop)
Protected
mainis still v0.71.0. #92 (0.72.0 person chips + stacked #93 0.73.0 org chips) is auto-merge + review-blocked; ruleset merge of #74/#91 returned policy prohibition — no admin retry.Next buyer-felt #77 port is PR #95 (
feat/analysis-run-authorized-read, v0.79.0), stacked on #89:GET /api/analysis-runs+ home-page Analysis runs panelmake seed)tepp_clientDo not merge #95 or #89 ahead of #74. #77 stays closed.
seonghobae commentedon Aug 16, 2026
Continuation (2026-08-16 hourly loop)
Protected
mainis still v0.71.0. Inventory:Priya Nair, Northridge Grid (Counterparty)). Auto-merge armed onto feat(ui): show business context on related-node chips (v0.75.0) #92. Synthetic fixtures only.Next #79 slice after #74+#89+#95: Analysis Run Console click-through on the existing
GET /api/analysis-runs/{id}contract. No AGENTS.md rewrite, no real-org data, TEPP unwired except existingtepp_client.seonghobae commentedon Aug 16, 2026
Continuation (2026-08-16 hourly loop)
Protected
mainis still v0.71.0. No admin merge retry (405).Inventory:
Shipped this loop: PR #102 (
feat/analysis-run-status-history, v0.81.0), stacked on #89:GET /api/analysis-runs/{id}now returns labeledstatus_history(Pending → Running → Succeeded)tepp_clientNext #79 slice after #74+#89+#102: scope-bounded post click-through from the run detail, or TEPP measurement through
tepp_clientonly.seonghobae commentedon Aug 16, 2026
Continuation (2026-08-16 hourly loop)
Protected
mainis still v0.71.0. No admin merge retry (405).Inventory (task description was stale):
feat/role-responsibility-agent-ontology.ModelBehaviorError). Do not merge first.mainand is still review-blocked — leave it; do not collide with Role, responsibility, and agent ontology (v2.10.0) #74 ADR 0013.main) is superseded by feat: add normalized analysis-run registry (Milestone 2 slice 1) #89/feat: rebase analysis-run registry onto current #74 head #107 on Role, responsibility, and agent ontology (v2.10.0) #74. Do not merge it as a competing0018/ ADR 0013.Shipped this loop: PR #110 (
feat/analysis-run-cutoff-posts, v0.83.0), stacked on current #74:GET /api/analysis-runs/{id}now appliescreated_at <= knowledge_cutoffmake seedstamps Demo public/private at 2026-01-10 so defaultnow()does not empty the January run; Late Demo public post (2026-01-13) is the counter-exampletepp_clientNext #79 slice after #74+#110: TEPP measurement through
tepp_clientonly, or run-scoped post bodies. Do not merge #110 before #74.seonghobae commentedon Aug 16, 2026
Continuation (2026-08-17 hourly loop)
Task description was stale. Protected
mainis stillc93d449/ v0.71.0. No admin merge retry (405).Inventory:
feat/role-responsibility-agent-ontology@7f2d4bc, title still says v0.83.0) already contains the merged analysis-run stack through v0.86.1 (registry, authorized read, detail, history, cutoff, fail-closed TEPP seed, pending create, team/org walk, embedded images). Independent current-head approval remains the merge gate. Do not merge first.88a1a0f,8c3694f).Shipped this loop: PR #150 (
feat/analysis-run-live-write-clock, v0.87.0), stacked on current #74:updated_atstill matched the runGET /api/analysis-runs/{id}now returnsupdated_at+live_after_cutoffper in-cutoff title — never a body, DSN, or thetamake seedbackdates Demo private / reconstruct fixtures toupdated_at = created_atand stamps Demo public post at 2026-01-13 as the rewritten counter-exampletepp_clientDo not merge #150 before #74. Next #79 slice after #74+#150: start pending lineage reconstruction (ADR 0017 follow-up) or cutoff body versioning.
seonghobae commentedon Aug 17, 2026
Continuation (2026-08-17 hourly loop)
Task description was stale. Protected
mainis stillc93d449/ v0.71.0. No admin merge retry (405).Inventory:
feat/role-responsibility-agent-ontology@54c4312, v0.97.0) already contains feat: open the scored week from a period-report analysis run (v0.97.0) #198. Title still says v0.83.0. Independent current-head approval remains the merge gate. Do not merge first.main(REVIEW_REQUIRED; last Tests run cancelled by the org queue). Leave cursor drafts feat: start a pending lineage reconstruction (v0.87.0) #142–feat: show cutoff-known post body beside the live rewrite (v0.87.2) #191.Shipped this loop: PR #199 rebase + leftover (
4632dee):scope_grouping_keypersists the reconstruct grouping key (entity id), never the week or a thetatepp_clientDo not merge #199 before #74. Next #79 slice after #74+#199: land the comparison strip on the opened Demo Corp row when the operator is already on that week, or cutoff body versioning.
seonghobae commentedon Aug 17, 2026
Continuation (2026-08-17 hourly loop)
Task description was stale. Protected
mainis stillc93d449/ v0.71.0. No admin merge retry (405).Inventory:
feat/role-responsibility-agent-ontology@c7e9428, title still says v0.83.0) now contains feat: open the corp grouping with the scored week (v0.98.0) #199 (v0.98.0). Independent current-head approval remains the merge gate. Semgrep is still red on this head (asyncpg-sqli.format()inanalysis_run_ingestion.py). Do not merge first.main(REVIEW_REQUIRED; no review-comment product defect). Leave cursor drafts feat: start a pending lineage reconstruction (v0.87.0) #142–feat: show cutoff-known post body beside the live rewrite (v0.87.2) #191.Re-verified this loop: PR #200 rebase (
35bdcf1):p/pythonWARNING/ERROR onbackend/app: 0 findingsShipped this loop: PR #201 (
feat/analysis-run-comparison-strip-landing, v0.99.0), stacked on #200:make seedthe home week is already 2026-W02, so Open period report did not land the comparison striptepp_clientDo not merge #200 or #201 before #74. Next #79 slice after #74+#201: cutoff body versioning, or the next buyer leftover that is not a cursor draft.
seonghobae commentedon Aug 17, 2026
Continuation (2026-08-17 hourly loop)
Task description was stale. Protected
mainis stillc93d449/ v0.71.0. No admin merge retry (405).Inventory:
feat/role-responsibility-agent-ontology@fbcd4df, title still says v0.83.0) now contains fix: bind analysis-run visibility with parameterized SQL literals (v0.98.1) #200 and feat: land the comparison strip on the opened Demo Corp row (v0.99.0) #201 (v0.99.0). Independent current-head approval remains the merge gate. Checks on this head are green. Do not merge first.main(REVIEW_REQUIRED; CodeRabbit found no product defect). Leave cursor drafts feat: start a pending lineage reconstruction (v0.87.0) #142–feat: show cutoff-known post body beside the live rewrite (v0.87.2) #191.Shipped this loop: PR #202 (
feat/analysis-run-opened-report-next-action, v1.0.0), stacked on current #74:Compare corporate_entity: Demo Corpand named no next actionCompare Corporate entity: Demo Corp, mean θ 0.42(visible caption + persisted mean θ)tepp_client, no cutoff-body invention (ADR 0016)Do not merge #202 before #74. Next #79 slice after #74+#202: cutoff body versioning stays later, or the next buyer leftover that is not a cursor draft and is not historical-body invention.
seonghobae commentedon Aug 17, 2026
Continuation (2026-08-17 hourly loop)
Task description was stale. Protected
mainis stillc93d449/ v0.71.0. No admin merge retry (405).Inventory:
feat/role-responsibility-agent-ontology@1958d70, title still says v0.83.0) now contains feat: land the comparison strip on the opened Demo Corp row (v0.99.0) #201 and feat: name the next action on the landed Demo Corp report (v1.0.0) #202 (v1.0.0). Independent current-head approval remains the merge gate. Checks on this head are green. Do not merge first.main(REVIEW_REQUIRED; no review-comment product defect). Leave cursor drafts feat: start a pending lineage reconstruction (v0.87.0) #142–feat: show cutoff-known post body beside the live rewrite (v0.87.2) #191.Shipped this loop: PR #203 (
feat/analysis-run-opened-report-members, v1.1.0), stacked on current #74:tepp_client, no cutoff-body invention (ADR 0016)Do not merge #203 before #74. Next #79 slice after #74+#203: cutoff body versioning stays later, or the next buyer leftover that is not a cursor draft and is not historical-body invention.
seonghobae commentedon Aug 17, 2026
Continuation (2026-08-17 hourly loop)
Task description was stale. Protected
mainis stillc93d449/ v0.71.0. No admin merge retry (405).Inventory:
feat/role-responsibility-agent-ontology@3bb3e86, title still says v0.83.0) now contains feat: name the next action on the opened Demo Corp member (v1.2.0) #204 (v1.2.0). Independent current-head approval remains the merge gate. Do not merge first.main(REVIEW_REQUIRED; no review-comment product defect). Leave cursor drafts feat: start a pending lineage reconstruction (v0.87.0) #142–feat: show cutoff-known post body beside the live rewrite (v0.87.2) #191.Shipped this loop: PR #204 (
feat/analysis-run-opened-member-next-action, v1.2.0), stacked on and merged into #74:tepp_client, no cutoff-body invention (ADR 0016)Do not merge #74 to main without independent approval. Next #79 slice after #74+#204: cutoff body versioning stays later, or the next buyer leftover that is not a cursor draft and is not historical-body invention.
seonghobae commentedon Aug 17, 2026
Milestone 2 item 3 (contextual-orchestrator fail-closed envelope) is now PR #228 on
main@8c020aaas v0.84.0 / ADR 0025. Independent exact-head APPROVE still required. Do not close this parent issue — TEPP (#214), schema bridge (#87), identity, and remaining product-UI ports are open.seonghobae commentedon Aug 23, 2026
cycle-write-probe 2026-08-23: confirming issue remains open pending Milestone 2 schema/TEPP port. No close.
seonghobae commentedon Aug 23, 2026
Queue retry 2026-08-23 (Grok Build): leftover-pair persist+UI is already on
main(ADR 0048/0049). Ontology #74, analysis-run #89, and structured-auto #91 are merged. Duplicate #96 stays closed.Still open and not being fake-closed:
ModelBehaviorErrorclassifier (Vulnerabilities 0 + trusted LiteLLM/agents same-line context; Vulnerabilities [1-9] remain fail-closed).AGP) and full form (Aurora Grid Power) bind onecorporate_entityrow. Real org names stay out of fixtures.No self-approval. Independent APPROVE still required to merge.
2 remaining items
seonghobae commentedon Aug 23, 2026
Cycle 2026-08-23 (v2.12.10): leftover persist is already PR #481 (v2.12.7). Next independent buyer gap: leftover-map criterion nodes are unlabeled diamonds, not buttons. Pair-member criterion nodes will open the leftover-pair post (onSelectPost only; no #485 leftover-focus). Non-pair criteria stay non-interactive. Stacked on #481; independent of #485/#484. Issues #79 and #87 stay open.
seonghobae commentedon Aug 23, 2026
Cycle 2026-08-23 (v2.12.10) landed as stacked PR #488 on #481: leftover-map criterion nodes that belong to a leftover pair now open that pair's post. Non-pair criteria stay non-interactive. Independent of #485. Issues #79 and #87 stay open. Author will not self-approve.
seonghobae commentedon Aug 23, 2026
Cycle note: leftover-map distances on main are being clamped to two Gabriel axes in a separate increment (v2.12.13 / ADR 0119). Milestone 2 (#79) stays open — this does not complete the protected product architecture port.
seonghobae commentedon Aug 23, 2026
Cycle probe 2026-08-23T18:04Z: GitHub write retry from seonghobae. Issues #79 and #87 stay open. Independent exact-head APPROVE remains required on open heads; this identity will not self-approve.
seonghobae commentedon Aug 23, 2026
Cycle probe 2026-08-24T03:32KST / 2026-08-23T18:33Z: GitHub write retry from seonghobae (ghu token, empty X-OAuth-Scopes; GraphQL+REST comment/close succeed). Duplicate #96 stays closed. Issues #79 and #87 stay open. Independent exact-head APPROVE remains required; this identity will not self-approve. Next buyer gap after leftover persist #481 / pair landing #485 / residual #502: implement the next unclaimed leftover-map honesty slice without mixing into those stacks.
seonghobae commentedon Aug 23, 2026
Cycle 2026-08-24T03:32 KST: GitHub writes still succeed via MCP comments (identity seonghobae). #96 stays closed. #79 (Milestone 2 parent) and #87 (schema bridge) stay open — incomplete work is not closed.
Queue honesty:
Next unclaimed leftover-map honesty slice targeting protected main: name complete-case coverage (Gabriel 1971 / Jeon 2021). The map already drops incomplete rows rather than treating missing cells as 0, but the period report does not tell the buyer how many scored posts entered the factorization. This cycle ships leftover_map_coverage (map_post_count of scored_post_count; incomplete rows excluded, never zero) as v2.12.17 / ADR 0165 on a fresh branch off main. Not coordinates, not residual disclosure, not criterion landing.
seonghobae commentedon Aug 23, 2026
Shipped independent leftover complete-case coverage onto protected main: #518 (
feat/leftover-map-complete-case-coverage-v21217@ cec898f, v2.12.17 / ADR 0165).Buyer caption: leftover map used N of M scored posts (complete-case). Incomplete rows stay excluded, never zero. Independent of #481 / #485 / #502 / #426.
Independent exact-head APPROVE required. Not self-approving. #79 and #87 stay open.
seonghobae commentedon Aug 23, 2026
Continuing Milestone 2 without closing this parent. Landed independent Start-clock slice as #524 (v2.12.19 / ADR 0167): status events share one PostgreSQL
clock_timestamp()so live Start no longer hitsanalysis_run_status_time_check. Leftover two-axis distance remains #522. Neither is self-approved. Schema bridge #87 stays open.feat: persist leftover observed Y and expected E (v2.12.20) (#527)
feat: name leftover-map rank on leftover pairs (v2.12.21) (#529)
feat: name leftover residual on period-report pair rows (v2.12.22) (#530
seonghobae commentedon Aug 27, 2026
Cycle 2026-08-27T00:12Z: GitHub write probe (comment). Historic #96 is already gone; leftover-pair persist (v0.71.2 / #211) and subsequent leftover-map honesty slices are on protected main. Issues #79 and #87 remain open parent/schema-bridge work. Next unique buyer gap will be implemented independently of closed #74/#92 stacks. Author will not self-approve.