Skip to content

fix(ontology): move :AnnexIII_Condition_1a and :AnnexIII_Condition_5b to governance extension#69

Merged
Amosk21 merged 3 commits into
mainfrom
chore/regulatory-conditions-to-governance
May 14, 2026
Merged

fix(ontology): move :AnnexIII_Condition_1a and :AnnexIII_Condition_5b to governance extension#69
Amosk21 merged 3 commits into
mainfrom
chore/regulatory-conditions-to-governance

Conversation

@Amosk21

@Amosk21 Amosk21 commented May 14, 2026

Copy link
Copy Markdown
Owner

Why

Deduplicates universal regulatory content out of two per-fixture instance files into ARCO_governance_extension.ttl. Closes regulatory_alignment FAIL and traceability FAIL on DecoySystem_001 and GhostSystem_001 by making the regulatory condition declarations visible to every fixture that imports the governance extension. Extended scope (2026-05-14) refreshes stale doc/header references and adds two coverage gaps the README previously disclosed.

Both audit queries (check_regulatory_alignment.sparql, check_assessment_traceability.sparql) require the condition to be typed :RegulatoryContent in the merged graph. The conditions were previously declared only inside ARCO_instances_sentinel.ttl (1(a)) and ARCO_instances_creditscoring.ttl (5(b)). Fixtures that don't import either instance file referenced the conditions via iao:0000136 but the type assertion wasn't present, so both audit queries returned FAIL for fixture-distribution reasons, not fixture-semantics reasons.

What changes

Three commits.

Commit 1: ontology migration (390e115)

  • 03_TECHNICAL_CORE/ontology/ARCO_governance_extension.ttl: new section "3a) REGULATORY CONTENT" adds :AnnexIII_List, :AnnexIII_Condition_1a, :AnnexIII_Condition_5b with the same triples previously in the two instance files. Triples preserved verbatim.
  • 03_TECHNICAL_CORE/ontology/ARCO_instances_sentinel.ttl: removes 10 lines (declaration block); section header replaced with a brief migration comment. References preserved.
  • 03_TECHNICAL_CORE/ontology/ARCO_instances_creditscoring.ttl: removes 13 lines (declaration block + self-containedness comment); section header replaced with a brief migration comment. References preserved.

Commit 2: stale-doc refresh (cffcf2e)

  • ARCO_instances_flag_tests.ttl header: replaces pre-migration text ("audit FAIL... minimal instances for flag testing... without full regulatory content linkage") with the actual post-migration state. Names the remaining cause of traceability FAIL and regulatory_alignment FAIL (local :AssessmentDocumentation -> :AnnexIII_Condition_* iao:0000136 link absent from this fixture, not fixture-distribution).
  • LIMITATIONS.md sec 9: file reference for the class-as-individual cco:prescribes triple updated from ARCO_instances_sentinel.ttl to ARCO_governance_extension.ttl. Adds the 5(b) companion triple. Notes the new 5(b) gate-removal coverage and adversarial-mechanism tests.
  • README.md: "Gate independence is empirically verified" sentence drops the "(Symmetric coverage for 5(b) is queued.)" parenthetical; corresponding row in the active-changes table moves from "Active work" to "Landed 2026-05-14".

Commit 3: coverage additions (d74e76a)

  • test_gate_removal.py: parameterized over both modeled Annex III categories. Original 7 Sentinel tests (5 removals + 2 mutations) preserved by triple; 7 symmetric CreditScorer tests added against AnnexIII5bApplicableSystem. Closes the previously disclosed 5(b) gap.
  • test_adversarial_mechanism.py (new): asserts that DecoySystem_001 Gate 1 routes via owl:equivalentClass propagation (:WeirdScanner typed pre-reasoning, :BiometricIdentificationCapability absent from asserted triples and entailed post-reasoning) and that GhostSystem_001 disposition is a blank node still satisfying owl:someValuesFrom. test_scenarios.py asserts the entailment fires; this test asserts HOW.
  • .github/workflows/arco-smoke-test.yml and arco-demo.yml: both workflows run the new test alongside the existing three regression tests.

Tests

Per-fixture diff table (pre vs post commit 1, all 7 fixtures, 5 output channels):

Fixture summary.json field deltas (semantic) SHACL Classification
Sentinel_ID_System entailed_triples_added 20160 -> 20194 only PASS unchanged unchanged
CreditScorer_001 entailed_triples_added 20103 -> 20137 only PASS unchanged unchanged
VerificationKiosk_001 entailed_triples_added 20025 -> 20114 only PASS unchanged unchanged
DecoySystem_001 traceability FAIL->PASS; regulatory_alignment FAIL->PASS; triples +89 PASS unchanged unchanged
GhostSystem_001 traceability FAIL->PASS; regulatory_alignment FAIL->PASS; all_checks_passed false->true; triples +89 PASS unchanged unchanged
FlagTest_BiometricSystem_WithDerogationClaim entailed_triples_added +89 only PASS unchanged unchanged
FlagTest_CreditSystem_WithFraudProcess entailed_triples_added +89 only PASS unchanged unchanged

Regression suite (all PASS post commit 3):

  • test_gate_removal.py (now covers both 1(a) and 5(b))
  • test_scenarios.py (7 scenarios, including FlagTest expected_flags)
  • test_kiosk_html_no_false_concretization.py
  • test_adversarial_mechanism.py (new — 2 mechanism assertions for Decoy and Ghost)
  • test_output_provenance.py 1 failure (unchanged baseline)
  • hermit_cross_check.py: HermiT and OWL-RL agree on every (fixture, system, query) in the certificate-grade set

Coverage audit summary (added 2026-05-14):

ARCO claim Test that proves it Coverage
Two-reasoner cross-check (OWL-RL + HermiT agree) hermit_cross_check.py covered
Each Annex III 1(a) gate independently necessary test_gate_removal.py CATEGORY_1A covered
Each Annex III 5(b) gate independently necessary test_gate_removal.py CATEGORY_5B covered (new)
Negative case (verification kiosk) does NOT entail 1(a) test_scenarios.py covered
Cross-category isolation test_scenarios.py covered
Decoy: OWL inference fires via owl:equivalentClass test_adversarial_mechanism.py covered (new)
Ghost: OWL inference fires via blank-node disposition test_adversarial_mechanism.py covered (new)
FlagTest classification + flag fire simultaneously test_scenarios.py expected_flags covered
HTML output discipline (kiosk) test_kiosk_html_no_false_concretization.py covered
Output provenance contract test_output_provenance.py failing-by-design, 1 baseline

Downstream consumer audit (grep across 03_TECHNICAL_CORE/, docs/, mcp/, .github/): all reference sites either load ARCO_governance_extension.ttl (via every pipeline / test / cross-check loader confirmed at run_pipeline.py:1902, test_scenarios.py:153, hermit_cross_check.py:83, test_gate_removal.py:204) or are documentation mentions of the IRI itself. No consumer depends on the conditions being declared in a specific instance file.

Deviation from plan

The migration plan predicted four fixtures would flip regulatory_alignment FAIL->PASS: Decoy, Ghost, FlagTest_BiometricSystem_WithDerogationClaim, FlagTest_CreditSystem_WithFraudProcess. Actual outcome: only Decoy and Ghost flip. The two FlagTest fixtures do not flip because their :AssessmentDocumentation instances (ARCO_instances_flag_tests.ttl:90-92, 155-157) do not contain any iao:0000136 :AnnexIII_Condition_* triple; the audit query's ?doc iao:0000136 ?condition path is empty independent of where the condition is declared. This is a separate fixture-authoring gap, not introduced by this PR. The FlagTest fixture header (commit 2) now documents this state explicitly.

Deferred

  • :AnnexIII_Condition_1a_Exclusion in ARCO_instances_verification.ttl:25-29 is a different class (verification-kiosk exclusion documentation per Recital 22 / Art 3(41)). Whether to also generalize the exclusion pattern is a separate future decision.
  • FlagTest fixtures' :AssessmentDocumentation instances do not link to any regulatory condition; closing their regulatory_alignment FAIL is a separate fixture-authoring change.
  • Negative-case isolated pipeline harness (LIMITATIONS sec 9 remains queued; not closed by this PR).

Revert

git revert <commit-hash> cleanly undoes each commit in isolation. Commits 2 and 3 are documentation and test-only and have no production-behavior impact. Reverting commit 1 sends the audit query back to FAIL on Decoy and Ghost (pre-existing state on main) with no other downstream consumer impact because the merged ontology is structurally identical.

… to governance extension

Deduplicates universal regulatory content out of two per-fixture instance
files into ARCO_governance_extension.ttl. Closes regulatory_alignment FAIL
and traceability FAIL on the Adversarial Decoy and Blanknode Ghost fixtures
by making the regulatory condition declarations visible to every fixture
that imports the governance extension.

Why
  Both audit queries (check_regulatory_alignment.sparql, check_assessment_
  traceability.sparql) require the condition to be typed :RegulatoryContent
  in the merged graph. The conditions were declared only in
  ARCO_instances_sentinel.ttl (1(a)) and ARCO_instances_creditscoring.ttl
  (5(b)). Fixtures that don't import either file (Decoy, Ghost) referenced
  the conditions via iao:0000136 but the type assertion wasn't present, so
  both audit queries returned FAIL for fixture-distribution reasons, not
  fixture-semantics reasons.

What changes
  - ARCO_governance_extension.ttl: new section "3a) REGULATORY CONTENT" adds
    :AnnexIII_List, :AnnexIII_Condition_1a, :AnnexIII_Condition_5b with the
    same triples previously in the two instance files. Triples preserved
    verbatim (rdfs:label, rdfs:comment, cco:prescribes, iao:0000136 targets).
  - ARCO_instances_sentinel.ttl: removes 10 lines (the declaration block);
    section header replaced with a brief migration comment. The three
    references via iao:0000136 :AnnexIII_Condition_1a are preserved.
  - ARCO_instances_creditscoring.ttl: removes 13 lines (the declaration
    block + the self-containedness comment); section header replaced with
    a brief migration comment. The three references via iao:0000136
    :AnnexIII_Condition_5b are preserved.

Tests (all 7 fixtures, pre vs post pipeline diff)
  - Sentinel, CreditScorer, VerificationKiosk: identical except entailed-
    triples count (+34 to +89 from the additional universal regulatory
    content now visible to every fixture).
  - DecoySystem_001: regulatory_alignment FAIL -> PASS; traceability
    FAIL -> PASS (closes the documented goal).
  - GhostSystem_001: regulatory_alignment FAIL -> PASS; traceability
    FAIL -> PASS; all_checks_passed false -> true.
  - FlagTest_BiometricSystem_WithDerogationClaim and
    FlagTest_CreditSystem_WithFraudProcess: no audit-row flip. Their
    :AssessmentDocumentation instances do not link to any regulatory
    condition via iao:0000136 in the source TTL, so the audit query's
    AssessmentDoc -> condition path is empty independent of where the
    condition is declared. The plan predicted these fixtures would flip;
    the actual cause is a separate fixture-authoring gap in
    ARCO_instances_flag_tests.ttl lines 90-92, 155-157. Closing that
    is a separate fixture edit outside this PR's scope.
  - Regression: test_gate_removal.py PASS; test_scenarios.py PASS (all
    7 scenarios); test_kiosk_html_no_false_concretization.py PASS;
    test_output_provenance.py 1 failure (unchanged baseline).
  - HermiT vs OWL-RL cross-check: agree on every (fixture, system,
    query) tuple in the certificate-grade set.
  - SHACL conforms PASS on every fixture (unchanged).
  - No classification flip on any fixture; no SHACL change; no other
    audit-row change.

Downstream consumer audit
  Grep across 03_TECHNICAL_CORE/, docs/, mcp/, .github/ for every reader
  of :AnnexIII_Condition_1a / _5b / _List / :RegulatoryContent. All
  reference sites either load ARCO_governance_extension.ttl (via every
  pipeline / test / cross-check loader) or are documentation mentions of
  the IRI itself. No consumer depends on the conditions being declared
  in a specific instance file.

Deferred
  - :AnnexIII_Condition_1a_Exclusion in ARCO_instances_verification.ttl
    is a different class (verification-kiosk exclusion documentation per
    Recital 22 / Art 3(41)). Whether to also generalize the exclusion
    pattern is a separate future decision.
  - FlagTest fixtures' AssessmentDocs do not link to any regulatory
    condition; closing their regulatory_alignment FAIL is a separate
    fixture-authoring change.

Revert
  git revert HEAD

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Amosk21 and others added 2 commits May 14, 2026 13:29
…ry-content migration

Three stale-doc fixes tied to the 2026-05-14 governance-extension move:

- ARCO_instances_flag_tests.ttl header: replaces the pre-migration text
  ("classification PASS but audit FAIL ... minimal instances for flag testing
  only, without full regulatory content linkage") with the actual post-migration
  state. Classification and exception flag remain the test target; traceability
  and regulatory_alignment still FAIL but for a different reason now (local
  :AssessmentDocumentation -> :AnnexIII_Condition_* iao:0000136 link absent
  from this fixture, not fixture-distribution).

- LIMITATIONS.md sec 9: file reference for the
  :AnnexIII_Condition_1a cco:prescribes :RemoteBiometricIdentificationProcess
  class-as-individual triple updated from ARCO_instances_sentinel.ttl to
  ARCO_governance_extension.ttl per the migration. Adds the 5(b) companion
  triple. Also notes that gate-removal coverage is now symmetric and adversarial-
  mechanism tests exist (next commit).

- README.md "Gate independence is empirically verified" sentence: drops the
  "(Symmetric coverage for 5(b) is queued.)" parenthetical; corresponding row in
  the active-changes table moves from "Active work" to "Landed 2026-05-14".

No pipeline behavior change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ism assertions

Two coverage gaps closed against README claims:

- test_gate_removal.py: parameterized over both modeled Annex III categories.
  CATEGORY_1A (Sentinel) preserves the original 7 tests (5 gate removals + 2
  content mutations) verbatim by triple; CATEGORY_5B (CreditScorer) adds the
  symmetric 7 against AnnexIII5bApplicableSystem. README "Gate independence is
  empirically verified" previously disclosed the 5(b) gap as queued; closes
  that.

- test_adversarial_mechanism.py (new): asserts that DecoySystem_001's Gate 1
  entailment routes through owl:equivalentClass propagation (the disposition
  is typed only as :WeirdScanner pre-reasoning; :BiometricIdentificationCapability
  is absent from the asserted triples and entailed post-reasoning), and that
  GhostSystem_001's disposition is a blank node (no named individual) that
  still satisfies owl:someValuesFrom. test_scenarios.py asserts the entailment
  fires; this test asserts HOW.

- .github/workflows/arco-smoke-test.yml and arco-demo.yml: both workflows run
  the new test alongside the existing three regression tests.

Pipeline behavior unchanged. test_output_provenance.py failure count unchanged
at 1 (baseline).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@Amosk21 Amosk21 merged commit 622e956 into main May 14, 2026
9 checks passed
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.

1 participant