Skip to content

fix: distinguish structural invalidity from investigation findings #55

fix: distinguish structural invalidity from investigation findings

fix: distinguish structural invalidity from investigation findings #55

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 \
--output /tmp/relationship-artifacts.json
test -s /tmp/relationship-artifacts.json
# customer-chain intentionally has an orphan, so the consolidated report
# must fail loud while still producing 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": "invalid_model"' /tmp/investigation.json
grep -q 'Downstream context' /tmp/investigation.md
# 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 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