Skip to content

Sync & reconcile cross-repo state (2026-11-27) - #20

Merged
danregima merged 4 commits into
mainfrom
sync/reconcile-2026-11-27
Nov 28, 2026
Merged

danregima merged 4 commits into
mainfrom
sync/reconcile-2026-11-27

Conversation

@danregima

@danregima danregima commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Cross-repo sync & reconciliation for cogpy/chainlex, back-porting the Scheme Defect D1 criminal-law repair to align chainlex with ad-res-j7, ad-res-j7-cron, and lexrex.

Exact Changes

  • cri/za/south_african_criminal_law.scm (d4eed14):
    • Applied Scheme Defect D1 repair (fraud? and theft? per S v Gardener [2011] ZASCA 24): removed erroneous benefit-to-accused? and helpers; added unlawful-act?, no-claim-of-right?, claim-of-right?, self-defence?, legal-authority?, intention-to-defraud?, intention-to-induce-prejudicial-action?; updated misrepresentation?.
    • Balanced 8 pre-existing unbalanced closing parentheses so global paren depth is 0.
  • Shipped artifacts regenerated to match the repaired Scheme (Devin Review finding):
    • framework_index.json: only the cri entries change, with 3 removed and 6 added (total 2638 → 2641). Other frameworks are left untouched to avoid glob-order churn.
    • hypergraph/tuples.json → scmlex_hypergraph.{pkl,json,graphml,_neo4j.cypher}, hypergraph_stats.json → weighted/* → gnn/*, rebuilt with build_hypergraph.py → analyze_edge_weights.py → gnn_legal_reasoning.py (networkx 3.4 + lxml). On the old tuples this pipeline reproduces the previously shipped files byte-for-byte. Rule nodes go from 2215 to 2218. Existing node UUIDs are kept.
  • test_suite.py:
    • TestShippedArtifactParity: the shipped framework_index.json must list the same functions as FrameworkIndex() for every framework; tuples.json must contain every extractable cri rule and none of the D1-removed names; the criminal rules in the pickle must match tuples.json (skipped without networkx).
    • TestCriminalRuleSemantics (runs under Guile, skipped without it): a truth table for fraud?/theft? that drives the D1 helpers from case-fact attributes. It covers potential prejudice, actual loss with and without causation, missing elements, a bona fide claim of right, and the self-defence?/legal-authority? aliases.
    • run_tests summary no longer counts skipped tests as successes.

Verification

  • python3 -B test_suite.py → 27 run, 0 failures, 0 errors, 0 skipped.
  • python3 -I scripts/check_withdrawn_claims.py --diff origin/main → no withdrawn claims in added lines.

Not changed (flag for review)

  • lv1/criminal_law_helpers.scm fraud-elements? still requires benefit-to-accused (same D1 defect, separate module).
  • hypergraph/visualizations/*.png and the README/CLAUDE.md node counts (2,306) were not regenerated.
  • extract_tuples.py skips names containing digits (e.g. under-18?). This was already the case before this PR.

Guardrails Confirmed

  • Zero forbidden paths modified (evidence/, ANNEXURES/, .gitattributes, .gitignore, WITHDRAWN_CLAIMS_REGISTER.json, ecosystem-evidence-graph.json untouched).
  • Draft PR #5148 in cogpy/ad-res-j7 was not touched.

Link to Devin session: https://app.devin.ai/sessions/3b7c299f27584296b1cc3dcd86347e6e
Open in Devin Desktop: https://app.devin.ai/desktop/session/3b7c299f27584296b1cc3dcd86347e6e?variant=devin
Requested by: @danregima


Devin Review

Copilot AI balanced review requested due to automatic review settings November 27, 2026 13:18

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

devin-ai-integration[bot]

This comment was marked as resolved.

…air; add parity and fraud?/theft? semantic tests

Co-Authored-By: dan@regima.zone <dan@regima.zone>
Copilot AI balanced review requested due to automatic review settings November 28, 2026 12:38
@cursor

cursor Bot commented Nov 28, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

devin-ai-integration[bot]

This comment was marked as resolved.

…tible subprocess call; report skipped tests

Co-Authored-By: dan@regima.zone <dan@regima.zone>
@cursor

cursor Bot commented Nov 28, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

devin-ai-integration[bot]

This comment was marked as resolved.

Copilot AI 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.

🟡 Changes recommended

The new Guile truth-table test is blocked by a stray apostrophe in the Scheme source and subprocess arguments unsupported on Python 3.6.

2 open issues

Review effort: Balanced

Comment thread test_suite.py
(define (has-attribute act attr) (and (assq attr act) #t))
(define (get-attribute act attr . d)
(let ((p (assq attr act))) (if p (cdr p) (if (null? d) #f (car d)))))
(primitive-load "cri/za/south_african_criminal_law.scm")
Comment thread test_suite.py Resolved
Copilot AI balanced review requested due to automatic review settings November 28, 2026 12:41
Co-Authored-By: dan@regima.zone <dan@regima.zone>
@cursor

cursor Bot commented Nov 28, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

Copilot AI 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.

🔵 Needs a closer look

The substantive fraud and theft changes need South African criminal-law review to validate intention and prejudice-causation requirements against the unavailable cited judgments; the stubbed truth table checks logic, not legal accuracy.

1 open issue
1 resolved since last review

Review effort: Balanced

@danregima
danregima merged commit 7d7511b into main Nov 28, 2026
6 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.

2 participants