Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f8fa192
docs(design): define Milestone 2 analysis-run contract
seonghobae Aug 15, 2026
35aeaf7
docs(plan): sequence Milestone 2 run-contract TDD
seonghobae Aug 15, 2026
9f67432
test(red): define leakage-safe analysis evidence
seonghobae Aug 15, 2026
324a483
test(red): define transactional analysis provenance
seonghobae Aug 15, 2026
f505031
test(red): define PostgreSQL analysis provenance schema
seonghobae Aug 15, 2026
505ee8e
test(red): preserve one idempotent start event
seonghobae Aug 15, 2026
e122189
test(red): reject category drift and invalid lifecycle
seonghobae Aug 15, 2026
967aa7e
feat: implement leakage-safe analysis evidence
seonghobae Aug 15, 2026
ab78bdc
feat: persist normalized analysis-run provenance
seonghobae Aug 15, 2026
7408b29
feat(db): add normalized analysis-run provenance
seonghobae Aug 15, 2026
b427c98
chore(db): apply analysis provenance on fresh install
seonghobae Aug 15, 2026
0217d61
docs(adr): establish analysis provenance boundary
seonghobae Aug 15, 2026
121783b
docs(doctoring): trace analysis provenance standards
seonghobae Aug 15, 2026
c6a6019
docs(changelog): record Milestone 2 run provenance
seonghobae Aug 15, 2026
62a7943
test(red): bound analysis completion lifecycle
seonghobae Aug 15, 2026
4fb249b
test(red): reject unsafe completion before SQL
seonghobae Aug 15, 2026
c159bd5
test(red): reject unregistered source kinds
seonghobae Aug 15, 2026
e56bdf5
feat: validate analysis completion lifecycle
seonghobae Aug 15, 2026
8cdef93
feat: guard completion input before PostgreSQL
seonghobae Aug 15, 2026
30b67c3
refactor: remove unreachable lifecycle branch
seonghobae Aug 15, 2026
e4d2bbb
ci(test): verify Milestone 2 analysis-run contract
seonghobae Aug 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/verify-milestone2-analysis-run-v079.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Verify Milestone 2 analysis-run contract v0.79

on:
push:
branches:
- feat/milestone2-analysis-run-contract-v079

permissions:
contents: read

concurrency:
group: verify-milestone2-analysis-run-v079
cancel-in-progress: true

jobs:
exact-branch-verification:
name: Exact branch contract verification
runs-on: ubuntu-latest
timeout-minutes: 60
services:
postgres:
image: postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
LINEAGEWEAVE_TEST_POSTGRES_ADMIN_DSN: postgresql://postgres:postgres@localhost:5432/postgres
steps:
- name: Checkout exact branch head
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # actions/checkout@v7
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # actions/setup-python@v6
with:
python-version: "3.12"

- name: Select repository Rust toolchain
run: |
set -euo pipefail
rustup toolchain install 1.97.1 --profile minimal
rustup default 1.97.1

- name: Set up locked Python dependency manager
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
with:
version: "0.11.28"
enable-cache: false

- name: Install committed Python dependencies
run: uv sync --frozen --extra dev --extra backend

- name: Prove focused owned-code coverage
run: |
set -euo pipefail
uv run --frozen coverage erase
uv run --frozen coverage run --branch \
--source=lineageweave.analysis_run,backend.app.analysis_run_ingestion \
-m pytest -q \
tests/test_analysis_run.py \
backend/tests/test_analysis_run_ingestion.py
uv run --frozen coverage report --show-missing --fail-under=100

- name: Prove normalized schema against PostgreSQL
run: uv run --frozen python -m pytest -q tests/test_analysis_run_schema.py

- name: Run complete Python and PostgreSQL suite
run: uv run --frozen python -m pytest -q

- name: Compile shipped Python
run: uv run --frozen python -m compileall -q backend lineageweave tests

- name: Set up Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # actions/setup-node@v5
with:
node-version: "24"

- name: Install committed frontend dependencies
run: |
set -euo pipefail
corepack enable
cd frontend
pnpm install --frozen-lockfile

- name: Verify React product
working-directory: frontend
run: |
set -euo pipefail
pnpm run lint
pnpm run test
pnpm run build

- name: Verify repository diff hygiene
run: |
set -euo pipefail
git diff --check HEAD^
test ! -e compose/keyverse_oidc.py
python - <<'PY'
from pathlib import Path

forbidden_fragments = (
"postgresql://seonghobae@localhost/postgres",
"zcrht811_export_rows",
)
changed = [
line.strip()
for line in __import__("subprocess").check_output(
["git", "diff", "--name-only", "HEAD^"], text=True
).splitlines()
if line.strip()
]
for relative in changed:
path = Path(relative)
if not path.is_file():
continue
text = path.read_text(encoding="utf-8", errors="ignore")
for forbidden in forbidden_fragments:
if forbidden.casefold() in text.casefold():
raise SystemExit(f"private-source fragment found in {relative}")
PY
19 changes: 19 additions & 0 deletions CHANGELOG.d/milestone2-analysis-run-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Added

- Added a normalized, aggregate-only provenance root for private PostgreSQL
analysis runs, downstream TEPP/contextual-orchestrator/fast-mlsirm service
calls, status events, and external acceptance artifacts.
- Added a no-future-information database and Python contract requiring the
source snapshot's latest evidence-availability time not to exceed the run's
knowledge cutoff.
- Added deterministic, source-redacting request digests and transactional
idempotency/conflict handling without storing SQL, DSNs, raw content, image
bytes, provider credentials, or private source identifiers.
- Added real-PostgreSQL schema tests and 100% statement/branch coverage for the
new Python contracts and repository.

## Security

- Private actual-data acceptance manifests remain external deployment
artifacts referenced only by digest and URI; public API projections contain
aggregate counts, clocks, opaque IDs, configuration, and status only.
Loading
Loading