Skip to content

feat: publish calibrated external lineage contract - #636

Closed
seonghobae wants to merge 17 commits into
mainfrom
feat/external-lineage-contract-main
Closed

feat: publish calibrated external lineage contract#636
seonghobae wants to merge 17 commits into
mainfrom
feat/external-lineage-contract-main

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Outcome

Publishes the bounded, store-agnostic external email/project lineage contract needed by issue #338 and a future Naruon consumer.

Boundaries

  • Reconstructed from historical feat: publish external email and project lineage contract #343 on current protected main; no stale stack review or check evidence is transferred.
  • Naruon remains disabled until this reaches protected main and an immutable release artifact exists.
  • The adapter owns no Naruon database, provider credential, or source mutation.
  • Caller-observed parent relations remain observed; reconstructed relations remain inferred; project projections remain proposed.
  • Fusion requires an explicit ADR-0200-compliant calibrated weight vector. Missing or malformed weights fail closed; no compatibility or arbitrary weights are supplied.
  • Optional LLM work is admitted only through contextual-orchestrator when the request permits it and a calibrated LLM channel exists.

Verification

  • 93 passed — external analysis/contract, explicit-parent budget, adjudication, and batch-parser tests
  • 100% statement and branch coverage across the external analysis, contract, and adjudication modules
  • 45 passed — contract, public API, documentation hygiene, and public docstrings
  • Ruff, Actionlint, JSON parsing, and git diff --check pass

Closes #338 after protected merge.

seonghobae and others added 2 commits August 25, 2026 22:52
* docs: record external lineage contract

* docs: add external lineage ADR

* docs: add external lineage references

* docs: add external lineage design spec

* docs: add external lineage implementation plan

* docs: publish external lineage schema

* feat: define external lineage contract

* feat: analyze caller-owned lineage evidence

* test: cover external lineage contract

* test: cover external lineage analysis

* feat: expose external lineage public API

* test: cover external lineage public API

* feat: export external lineage contract

* docs: record external lineage contract

* docs: add external lineage implementation plan

* docs: define external lineage contract boundary

* docs: add external lineage contract example

* docs: index external integration contracts

* docs: record external lineage package API

* docs: add external lineage traceability

* docs: record external lineage gap closure note

* docs: add external lineage consumer checklist

* docs: record external lineage security boundary

* docs: record external lineage limitations

* docs: record external lineage versioning policy

* docs: record external lineage operability boundary

* docs: record external lineage authorization contract

* docs: record external lineage data minimization

* fix: reject invalid adjudication provider responses

* docs(adr): consolidate external lineage decision record

* docs(contracts): point to canonical external lineage ADR

* docs(plan): reference canonical external lineage ADR

* docs(adr): remove duplicate external lineage decision record

* fix(lineage): avoid rescoring caller-observed parent edges

* test(lineage): cover explicit-parent provider minimization

* docs(adr): record explicit-edge provider minimization

* docs(plan): include explicit-edge inference minimization

* docs(changelog): record explicit-edge inference minimization

* docs(changelog): consolidate external lineage fragment

* docs(changelog): remove duplicate external lineage fragment

* docs(changelog): remove duplicate package API fragment

* docs(plan): align canonical changelog fragment

* docs(adr): distinguish canonical determinism from model repeatability

* docs(contract): disclose model repeatability boundary

* docs(contract): bind implementation and model provenance

* docs(contract): record model-disclosure and provenance controls

* docs(gap): remove superseded external lineage sidecar

* fix: preserve external lineage result contracts

* test: stage PR 343 contract-integrity repair

* ci: harden PR 343 repair anchors

* ci: execute PR 343 contract-integrity repair
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 21 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 63a1d6c7-632e-453b-8b9e-4a5d1d178e7d

📥 Commits

Reviewing files that changed from the base of the PR and between 04e6b61 and f7b9a65.

📒 Files selected for processing (40)
  • AGENTS.md
  • ARCHITECTURE.md
  • CHANGELOG.d/external-lineage-contract.md
  • docs/adr/0064-lineage-evidence-and-tree-assembly.md
  • docs/adr/0172-event-lineage-channel-evidence.md
  • docs/adr/0214-external-email-project-lineage-contract.md
  • docs/adr/README.md
  • docs/contracts/README.md
  • docs/contracts/external-lineage-analysis-v1.authorization.md
  • docs/contracts/external-lineage-analysis-v1.consumer-checklist.md
  • docs/contracts/external-lineage-analysis-v1.data-minimization.md
  • docs/contracts/external-lineage-analysis-v1.example.json
  • docs/contracts/external-lineage-analysis-v1.limitations.md
  • docs/contracts/external-lineage-analysis-v1.operability.md
  • docs/contracts/external-lineage-analysis-v1.schema.json
  • docs/contracts/external-lineage-analysis-v1.security.md
  • docs/contracts/external-lineage-analysis-v1.versioning.md
  • docs/doctoring/EXTERNAL_LINEAGE_CONTRACT_REFERENCES.md
  • docs/doctoring/EXTERNAL_LINEAGE_CONTRACT_TRACEABILITY.md
  • docs/doctoring/python-mathematical-compute-boundary-audit.md
  • docs/product-requirements.md
  • docs/product-technical-gap-baseline.md
  • docs/superpowers/plans/2026-08-21-external-lineage-integration-contract.md
  • docs/superpowers/plans/2026-08-21-naruon-email-project-lineage-contract.md
  • docs/superpowers/specs/2026-08-21-naruon-email-project-lineage-contract-design.md
  • lineageweave/__init__.py
  • lineageweave/adjudication_client.py
  • lineageweave/embedding_client.py
  • lineageweave/external_lineage.py
  • lineageweave/external_lineage_analysis.py
  • lineageweave/external_lineage_contract.py
  • lineageweave/lineage_persistence.py
  • lineageweave/reconstruct.py
  • tests/test_adjudication_client.py
  • tests/test_estimate_llm_channel_weights_script.py
  • tests/test_external_lineage_analysis.py
  • tests/test_external_lineage_contract.py
  • tests/test_external_lineage_explicit_parent_budget.py
  • tests/test_external_lineage_public_api.py
  • tests/test_reconstruct.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 14:01
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

seonghobae and others added 2 commits August 25, 2026 07:34
* fix(lineage): require exact calibrated channel profile

* docs(gaps): track exact active channel profile stack

---------

Co-authored-by: seonghobae <seonghobae@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head review reconciliation (2026-08-26):

  • feat: persist leftover interaction-map coordinates (v2.12.19) #579 689a21b6: the process-unit scoped period-report finding is already present in this exact head: report_ingestion.py selects and serializes p.process_unit_id, and read_period_reports uses it for ABAC before stripping it. The empty-map path in leftover_pairs.py returns axes=() (with regression coverage in tests/test_leftover_pairs.py::test_empty_upstream_map_does_not_invent_product_evidence), so zero-share axes are not persisted for an invalid complete-case map.
  • fix(semantic): preserve graph fact source provenance #632 3851c7cf: _graph_facts_for_posts performs one bounded query with a 64-fact global cap; gather_chat_sources calls it once per path and reuses the returned mapping. The cited duplicate-query review points to an older commit and is not present at this exact head.
  • feat: publish calibrated external lineage contract #636 1230a1a7: AGENTS.md already states that active_weights fails closed on an active-channel mismatch and loads a separately calibrated exact-channel vector; it no longer mandates renormalization. ARCHITECTURE.md and ADR 0172 carry the same contract.
  • feat(dashboard): quantify cases and preserve project journeys #640 4677052c: operations_dashboard.py currently computes primary_project_name by confidence desc, project_name, then uses it before the alphabetical project_names array. The cited fallback is not present at this exact head.

These are exact-head validations; no stale review snapshot was transferred as merge evidence. Hosted Checks and independent approval remain authoritative.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Revalidated current exact head eeeb23c6: external-lineage analysis, contract, and public API suites passed 75 tests. The current AGENTS.md and ARCHITECTURE.md both describe exact active-channel calibration and fail-closed mismatch handling; the stale renormalization comment refers to an older commit.

devin-ai-integration[bot]

This comment was marked as resolved.

@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 15:10
github-code-quality[bot]

This comment was marked as resolved.

@opencode-agent
opencode-agent Bot disabled auto-merge August 25, 2026 15:38
@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 15:43
@seonghobae

Copy link
Copy Markdown
Contributor Author

Verified the latest Code Quality finding at head f7b9a65f: removed the duplicate module import and switched the remaining monkeypatch to the qualified string target. Focused adjudication tests: 15 passed. Auto-merge is enabled; current hosted gates and independent approval remain required.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head review reconciliation at f7b9a65f0d11250c9ba8d06fa2f09e1fc138c68e:

  • The Devin renormalization finding targets the older 575891a7; current AGENTS.md now states exact active-channel calibration and fail-closed mismatch handling, matching reconstruct.active_weights() and ARCHITECTURE.md.
  • The mixed-import Code Quality finding is resolved in the current head (f7b9a65f); tests/test_adjudication_client.py uses the string monkeypatch target and no module import.
  • Focused exact-head validation (test_adjudication_client.py, test_reconstruct.py, test_channel_weight_estimation.py) passed: 30 passed, 1 skipped. No stale finding was transferred as a current code defect.

@seonghobae

Copy link
Copy Markdown
Contributor Author

ADR 0225와 현재 제품 계약에 맞지 않아 병합하지 않고 종료합니다. 이 PR은 닫힌 #343의 Python 계산 경로를 다시 반입하며, external_lineage_analysis.py에서 채널 점수·후보 제한·fusion 입력을 계산합니다. LineageWeave는 권한·증거 admission·cutoff·orchestration·provenance·UI만 소유하고, 계산은 TEPP/fast-mlsirm/RankWeave/ThreadWeave의 버전 고정 계약으로 이관되어야 합니다. 명시적 calibrated weight 입력만 요구하는 것으로는 중복 계산 엔진 문제가 해소되지 않습니다.

브랜치는 삭제하지 않아 계약·테스트 자료는 회수할 수 있습니다. RankWeave #45가 Rust 계산 경계를 릴리스한 뒤, 현재 main에서 fail-closed adapter와 비계산 wire contract만 최소 PR로 다시 구성하십시오. 이 PR의 checks/reviews는 후속 PR로 이전되지 않습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Cross-repo] Publish an evidence-bounded email/project lineage contract for Naruon consumption

1 participant