Skip to content

Carry relationship evidence in bounded handoffs #64

Carry relationship evidence in bounded handoffs

Carry relationship evidence in bounded handoffs #64

Workflow file for this run

name: CI
on:
push:
paths-ignore:
- "README.md"
- "ROADMAP.md"
- "AGENTS.md"
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package
run: python -m pip install .
- name: Test suite
run: python -m unittest discover -s tests -v
- name: Installed CLI smoke tests
run: |
data-relationship-map --help
data-relationship-map validate examples/customer-chain.json
data-relationship-map path examples/customer-chain.json AFS:4711 S4:10000891
data-relationship-map lineage examples/customer-chain.json AFS:4711 --direction downstream
data-relationship-map artifacts examples/customer-chain.json \
--policy examples/identity-policy.json \
--observed-at 2026-08-25T10:00:00Z \
--output /tmp/relationship-artifacts.json
test -s /tmp/relationship-artifacts.json
grep -q '"observed_at": "2026-08-25T10:00:00Z"' /tmp/relationship-artifacts.json
# customer-chain intentionally has an orphan. The graph is structurally
# valid, but the investigation must return findings and reviewer artifacts.
set +e
data-relationship-map investigate examples/customer-chain.json \
--policy examples/identity-policy.json \
--focus AFS:4711 \
--json-output /tmp/investigation.json \
--markdown /tmp/investigation.md
investigation_exit=$?
set -e
test "$investigation_exit" -eq 1
test -s /tmp/investigation.json
test -s /tmp/investigation.md
grep -q '"status": "findings"' /tmp/investigation.json
grep -q '"structural_finding_count": 1' /tmp/investigation.json
grep -q 'Orphan node' /tmp/investigation.md
grep -q 'Downstream context' /tmp/investigation.md
data-relationship-map handoff build examples/customer-chain.json \
/tmp/relationship-handoff \
--policy examples/identity-policy.json \
--focus AFS:4711 \
--max-depth 2 \
--observed-at 2026-08-25T10:00:00Z
data-relationship-map handoff verify /tmp/relationship-handoff
test -s /tmp/relationship-handoff/manifest.json
test -s /tmp/relationship-handoff/graph.json
test -s /tmp/relationship-handoff/investigation.json
test -s /tmp/relationship-handoff/investigation.md
test -s /tmp/relationship-handoff/investigation.html
test -s /tmp/relationship-handoff/artifact-index.json
grep -q '"observed_at": "2026-08-25T10:00:00Z"' /tmp/relationship-handoff/artifact-index.json
# ambiguity example is structurally valid but violates explicit 1:1 policy.
set +e
data-relationship-map investigate examples/ambiguous-identity.json \
--policy examples/identity-policy.json \
--focus AFS:4711 \
--json-output /tmp/ambiguous-investigation.json
ambiguity_exit=$?
set -e
test "$ambiguity_exit" -eq 1
grep -q '"status": "findings"' /tmp/ambiguous-investigation.json
grep -q '"policy_finding_count": 2' /tmp/ambiguous-investigation.json
- name: Backwards-compatible module workflows
run: |
python relationship_map.py examples/customer-chain.json validate
python relationship_policy.py examples/customer-chain.json examples/identity-policy.json
python relationship_lineage.py examples/customer-chain.json AFS:4711 --direction downstream
python relationship_lineage.py examples/customer-chain.json S4:10000891 --direction upstream
python relationship_lineage.py examples/customer-chain.json AFS:4711 --direction downstream --stop-system MDG
python csv_adapter.py examples/csv/manifest.json --output /tmp/customer-model.json
python relationship_map.py /tmp/customer-model.json validate
python relationship_map.py /tmp/customer-model.json path AFS:4711 S4:10000345
python relationship_policy.py /tmp/customer-model.json examples/identity-policy.json
python relationship_diff.py examples/customer-chain.json examples/customer-chain-after.json
python relationship_handoff.py build examples/customer-chain.json /tmp/module-handoff \
--policy examples/identity-policy.json --focus AFS:4711 --max-depth 2 \
--observed-at 2026-08-25T10:00:00Z
python relationship_handoff.py verify /tmp/module-handoff
python examples/xlsx/make_sample.py examples/xlsx/customer_crosswalk.xlsx
python xlsx_adapter.py examples/xlsx/manifest.json --output /tmp/customer-xlsx-model.json
python relationship_map.py /tmp/customer-xlsx-model.json validate
python relationship_map.py /tmp/customer-xlsx-model.json path AFS:4711 S4:10000345
python relationship_policy.py /tmp/customer-xlsx-model.json examples/identity-policy.json