Skip to content

sadpig70/LoopShield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LoopShield

LoopShield

Does each invisible automation loop carry a reflex-interrupt pathway with delegation underwriting and anomaly attestation?

LoopShield evaluates whether each invisible automation loop has adequate reflex-interrupt, delegation underwriting, and anomaly attestation evidence, emitting a deterministic 4-way verdict with a hash-chained audit ledger.

What it is not

LoopShield does not execute, schedule, or repair loops. It evaluates whether reflex-interrupt pathways exist and attests to their presence.

Source projects (HELIX exploit)

Source Mechanism reused
LoopKit observability + repair triggers for invisible loops
DelegationUnderwriter trust envelope + liability pre-screening
AfferentCore reflex-interrupt pathway verification

It differs from AfferentInterrupt (which detects abnormal loops in real time) by evaluating the design-time adequacy of reflex pathways rather than runtime behavior. It differs from LoopKit by adding delegation underwriting and attestation as first-class predicates.

Quick start

# Install
pip install -e .

# Write sample loop definitions
loopshield sample -o loops.json

# Evaluate loops
loopshield evaluate loops.json -o result.json --report report.md

# Render report from existing result
loopshield report result.json -o report.md

CLI triplet

Command Purpose
sample Write sample loop definitions to JSON
evaluate Evaluate loop specs → JSON result + optional MD report
report Render Markdown report from JSON result

Five predicates

Predicate Source project Evidence keys
authority DelegationUnderwriter responsible_entity, escalation_path, liability_limit, trust_envelope
interrupt AfferentCore interrupt_signal, reflex_pathway, max_duration, timeout_handler
observability LoopKit telemetry, state_exposure, log_stream, repair_trigger
attestation AfferentCore anomaly_attestation, verification_method, evidence_chain, timestamp_proof
repair LoopKit rollback_procedure, repair_procedure, recovery_state, compensation_action

A predicate passes if any of its evidence keys is truthy.

Verdict scheme (4-way)

Verdict Condition
cleared coverage high (≥ 0.8), no critical gaps
flagged coverage medium (≥ 0.6), non-critical gaps only
attenuated coverage medium with one critical gap
blocked coverage low (< 0.6), or ≥ 2 critical gaps

Critical predicates: authority, interrupt, attestation.

Hash-chained audit ledger

Every evaluation entry is appended to a SHA-256 chained ledger. Each entry records prev_hash, hash, seq, and timestamp_utc. The ledger is sealed with a final hash over all entries.

Project rules

  • stdlib-only — Python 3.10+, zero external packages
  • cli_triplet — sample / evaluate / report
  • k-way verdict — 4-way deterministic (cleared/flagged/attenuated/blocked)
  • hash-chained audit log — SHA-256 chain with seal
  • single_question — "Does this loop carry a reflex-interrupt pathway…?"
  • boundary_clause — "What LoopShield is not" explicitly stated
  • dual_output — JSON (machine) + Markdown (human)

Tests

python -m unittest discover -s tests -q

44 tests covering engine predicates, verdict rules, hash-chain integrity, ledger sealing, report rendering, and all CLI subcommands.

Structure

LoopShield/
├── loopshield/
│   ├── __init__.py      # Public API re-exports
│   ├── engine.py        # Deterministic 5-predicate scoring + verdict + ledger
│   ├── cli.py           # argparse: sample/evaluate/report
│   ├── report.py        # Markdown report renderer
│   └── __main__.py      # python -m loopshield entry
├── tests/
│   └── test_engine.py   # 44 unit tests
├── pyproject.toml
├── README.md
├── LICENSE              # MIT
└── .gitignore

License

MIT License

About

Reflex-interrupt pathway attestation for invisible automation loops (HELIX exploit: LoopKit+DelegationUnderwriter+AfferentCore)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages