-
Notifications
You must be signed in to change notification settings - Fork 0
feat(integration): add governed TEPP analysis request boundary #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
37
commits into
develop
Choose a base branch
from
feat/tepp-analysis-adapter
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
1690c0b
feat(integration): add governed TEPP analysis request boundary
seonghobae c0ab1cb
test(integration): expose TEPP credential and evidence gaps
seonghobae 346d31d
fix(integration): harden TEPP foreign identifiers and audit evidence
seonghobae 52a26de
test(tepp): reject credential-shaped idempotency keys
seonghobae de983c7
fix(tepp): reject credential-shaped idempotency keys
seonghobae b23c15f
docs(tepp): record idempotency credential guard
seonghobae 447ef27
Merge remote-tracking branch 'refs/remotes/origin/develop' into HEAD
seonghobae 1c485a3
test(tepp-adapter): cover operational tenant UUID interoperability
seonghobae 3cf53b0
fix(tepp-adapter): honor authoritative tenant UUID contract
seonghobae 7106925
docs(tepp-adapter): align tenant identity ownership
seonghobae 3aa35ae
docs(traceability): record TEPP tenant UUID interoperability
seonghobae 3d64d3a
docs(changelog): record TEPP tenant UUID repair
seonghobae e689ecd
chore: integrate protected develop into TEPP-adapter lane
seonghobae b6d61c1
test(tepp): cover malformed tenant UUID rejection
seonghobae 98434ef
fix(tepp): remove unreachable UUIDv4 guard
seonghobae 9064af4
chore: reconcile TEPP adapter with current develop
seonghobae fcbd800
chore(tepp): integrate protected develop after #41
seonghobae 3690e11
chore(tepp): integrate protected develop after #43
seonghobae 5f84b22
test(tepp-adapter): reject temporal evidence subclasses
seonghobae fd1b7e6
fix(tepp-adapter): require exact temporal evidence types
seonghobae 4e24809
test(tepp-adapter): reject forged string evidence types
seonghobae edbe5b5
fix(tepp-adapter): require exact string evidence types
seonghobae ea3a144
test(tepp-adapter): bind retries to Orgmetra governance scope
seonghobae caa1bbd
fix(tepp-adapter): scope idempotency to governance evidence
seonghobae aa9d63b
test(tepp-adapter): require durable idempotency evidence
seonghobae 3895bc4
fix(tepp-adapter): persist durable retry correlation evidence
seonghobae 3fe42ec
test(tepp-adapter): cover exact UUIDv4 type guard
seonghobae e068df7
fix(tepp-adapter): bind cross-field scope correlation and temporal or…
seonghobae d440606
test(tepp-adapter): require broad retry comparison annotations
seonghobae e33acd2
fix(tepp-adapter): align retry comparison type contract
seonghobae b3cbd2a
style(tepp-adapter): remove ADR trailing whitespace
seonghobae 15b448b
fix(tepp): freeze request temporal evidence
seonghobae cd81e1b
docs(tepp): document scope digest persistence
seonghobae 0014b68
test(tepp-adapter): require shared config quality triggers
seonghobae 4531959
fix(tepp-adapter): retrigger quality on shared config
seonghobae 1f24fb4
docs(tepp-adapter): record shared-config gate integrity
seonghobae f4a9bf2
docs(tepp-adapter): trace shared-config quality evidence
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| name: TEPP Adapter Quality | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - bootstrap | ||
| - develop | ||
| - main | ||
| paths: | ||
| - "packages/tepp-adapter/**" | ||
| - "docs/adr/0023-governed-tepp-analysis-request-boundary.md" | ||
| - "docs/doctoring/tepp-analysis-adapter-references.md" | ||
| - "docs/traceability/tepp-analysis-adapter.md" | ||
| - ".github/requirements/foundation-test.txt" | ||
| - ".github/workflows/tepp-adapter-quality.yml" | ||
| - ".gitignore" | ||
| - ".python-version" | ||
| - "conftest.py" | ||
| - "packages/conftest.py" | ||
| - "pyproject.toml" | ||
| - "pytest.ini" | ||
| - "setup.cfg" | ||
| - "tox.ini" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: tepp-adapter-quality-${{ github.event.pull_request.number || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| unit: | ||
| name: TEPP request boundary and 100% coverage | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Checkout exact candidate | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| persist-credentials: false | ||
| - name: Prove exact candidate checkout | ||
| env: | ||
| ORGMETRA_EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
| run: test "$(git rev-parse HEAD)" = "$ORGMETRA_EXPECTED_HEAD_SHA" | ||
| - name: Set up Python | ||
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: "3.14" | ||
| check-latest: false | ||
| - name: Install reviewed test toolchain | ||
| run: | | ||
| python -m pip install --require-hashes --no-deps --only-binary=:all: -r .github/requirements/foundation-test.txt | ||
| python -m pip check | ||
| - name: Compile TEPP adapter boundary | ||
| run: python -m compileall -q packages/tepp-adapter/src packages/tepp-adapter/tests | ||
| - name: Test TEPP request contract with exact statement and branch coverage | ||
| env: | ||
| PYTHONPATH: packages/tepp-adapter/src | ||
| COVERAGE_FILE: /tmp/orgmetra-tepp-adapter.coverage | ||
| run: python -m pytest -c packages/tepp-adapter/pyproject.toml packages/tepp-adapter/tests | ||
| - name: Require clean checkout | ||
| run: | | ||
| git diff --exit-code | ||
| test -z "$(git status --porcelain)" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # ADR-0023: Governed TEPP analysis-request boundary | ||
|
|
||
| **Status:** Proposed on active PR | ||
| **Decision owner:** Orgmetra | ||
| **Foreign owner:** TEPP (read-only dependency) | ||
|
|
||
| ## Context | ||
|
|
||
| Orgmetra needs temporal/event analytical evidence for workforce validation without duplicating TEPP kernels or violating dedicated-writer ownership. TEPP protected revision `7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a` exposes `AnalysisRunRequest` contract v1 in `tepp_api`, with immutable snapshot identity, knowledge cutoff, model contract, output profile, and idempotency key. The same TEPP revision documents that protected main is not yet a production HTTP service. | ||
|
|
||
| A direct HTTP client in Orgmetra would therefore overstate foreign runtime maturity. Conversely, copying TEPP's analytical implementation would create split scientific authority and an acquisition-grade integration liability. | ||
|
|
||
| ## Decision | ||
|
|
||
| Orgmetra owns a small pre-transport adapter that: | ||
|
|
||
| 1. emits exactly the seven fields accepted by TEPP `AnalysisRunRequest` v1; | ||
| 2. pins the reviewed TEPP protected revision and contract version as evidence, not as permission to mutate TEPP; | ||
| 3. binds the request to an Orgmetra tenant, validation study, accountable actor, immutable snapshot digest, evidence version, and deterministic request digest; | ||
| 4. detaches the knowledge cutoff and generation instant to exact UTC datetimes, canonicalizes them to RFC 3339 UTC, and rejects naive or unusable instants; | ||
| 5. distinguishes exact same-key retries from same-key semantic conflicts; | ||
| 6. treats opaque correlations as linkable personal/governance data while refusing direct identity values, source text, and credentials at this boundary; | ||
| 7. performs no network transport until the host proves a compatible executable TEPP service contract is published and authorized; and | ||
| 8. treats returned TEPP/LLM output as untrusted analytical evidence requiring accountable human scientific review before any high-impact employment use. | ||
|
|
||
| Orgmetra does not read TEPP application tables, mutate TEPP source/configuration, or reimplement TEPP's temporal/event/statistical kernels. | ||
|
|
||
| ## Consequences | ||
|
|
||
| The integration can be unit-tested and audited now without manufacturing runtime evidence. Future transport can be added behind the same adapter only after TEPP publishes an executable service contract; that future change must add consumer/provider compatibility, timeout/deadline, authentication, retry, observability, privacy, and failure-mode tests against the then-current foreign contract. | ||
|
|
||
| The adapter deliberately requires host re-resolution of tenant/workspace/snapshot/model/output authority. Syntax validation alone never proves tenant membership, artifact existence, policy applicability, or scientific suitability. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # TEPP analysis adapter references | ||
|
|
||
| Primary technical evidence reviewed for ADR-0023 and the active adapter slice: | ||
|
|
||
| - ContextualWisdomLab. (2026). *TEPP API and modular integration contract* (protected revision `7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a`, `docs/API_CONTRACT.md`). GitHub repository source. Reviewed August 20, 2026. | ||
| - ContextualWisdomLab. (2026). *TEPP analysis-run request and accepted-run response contracts* (protected revision `7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a`, `crates/tepp_api/src/analysis_run.rs`). GitHub repository source. Reviewed August 20, 2026. | ||
| - Klyne, G., & Newman, C. (2002). *Date and time on the Internet: Timestamps* (RFC 3339). Internet Engineering Task Force. https://doi.org/10.17487/RFC3339 | ||
|
|
||
| The TEPP revision is evidence of the reviewed foreign contract, not a claim that Orgmetra owns or may modify TEPP. Before executable transport, re-resolve TEPP's then-current protected contract and service maturity rather than treating this snapshot as perpetual compatibility evidence. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # TEPP analysis adapter traceability | ||
|
|
||
| | Requirement | Orgmetra evidence | Verification | Maturity | | ||
| |---|---|---|---| | ||
| | No foreign table access or duplicated TEPP kernels | `orgmetra_tepp_adapter.analysis` contains only request/governance binding logic | package source review; no TEPP runtime dependency | implemented_on_active_pr | | ||
| | Exact TEPP analysis-run v1 request shape | `TeppAnalysisRequestPacket.tepp_request()` | exact seven-field regression against reviewed TEPP DTO | implemented_on_active_pr | | ||
| | Temporal cutoff provenance | timezone-aware `knowledge_cutoff` and `generated_at` → detached exact UTC instants and canonical RFC 3339 UTC | mutable-timezone stability, provider-failure, malformed-offset, arithmetic-overflow, naive/null-offset, and datetime-subclass rejection tests | implemented_on_active_pr | | ||
| | Tenant/study/actor governance | authoritative canonical non-sentinel operational tenant UUID plus namespaced UUIDv4 Orgmetra references | protected-core UUIDv7 interoperability plus nil/max/noncanonical tenant rejection; wrong-namespace/reference-version regressions | implemented_on_active_pr | | ||
| | Immutable analytical snapshot evidence | opaque TEPP snapshot ID plus independent SHA-256 `snapshot_digest` | digest format and governance-evidence regressions | implemented_on_active_pr | | ||
| | Durable idempotency handoff | `idempotency_key` + deterministic `request_digest()` + `governance_scope_digest()` | exact-retry and same-key request/scope conflict regressions | implemented_on_active_pr | | ||
| | Privacy minimization without anonymity claims | `contains_personal_data=true`; direct identity/source text/credentials false; redacted repr | direct-construction/replace/privacy regressions | implemented_on_active_pr | | ||
| | High-impact human review | fixed `human_scientific_review_only`, `untrusted_draft_evidence`, governed `next_action` | authority-expansion regressions | implemented_on_active_pr | | ||
| | Foreign runtime maturity is not overstated | `transport_state=requires_published_tepp_service_contract` | fixed-state regression and package/ADR documentation | implemented_on_active_pr | | ||
| | Exact owned production coverage | package pytest-cov gate | 100% statement + branch coverage | implemented_on_active_pr | | ||
| | Keep adapter-quality evidence current when shared repository test/runtime configuration changes | package quality workflow explicitly retriggers on shared Python/test/clean-checkout configuration inputs | `tests/test_quality_workflow_trigger.py`; supplemental to central required workflows | implemented_on_active_pr | | ||
|
|
||
| ## Foreign evidence snapshot | ||
|
|
||
| Reviewed TEPP protected `main`: `7c29e7c971d7940e1fb3def1ed3aae2d1bc8ad4a`. The reviewed `crates/tepp_api/src/analysis_run.rs` defines contract version `1` and the seven request fields above; `docs/API_CONTRACT.md` states that protected main exposes library/domain contracts rather than a production HTTP service. Orgmetra must re-resolve this evidence before enabling transport. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.