Record-keeping · mizan-ledger 0.1.2 / مسك السجلات · mizan-ledger 0.1.2
How mizan-ledger relates to MI-21, OWASP T8, and Article 12كيف يتعلق mizan-ledger بـ MI-21 وOWASP T8 والمادة 12
Some public frameworks ask for a record of what an agent claimed, when it claimed it, and whether that record can be checked later by someone who does not have to trust the operator. This page maps three of those published asks to what mizan-ledger 0.1.2 actually does.
في بعض الأطر المنشورة، مطلوب سجل يوضح شو ادّعى الوكيل، ومتى ادّعى، وإذا كان ممكن لطرف تاني يفحص السجل من دون ما يثق بالمشغّل. هاي الصفحة بتربط ثلاث طلبات منشورة بهالشكل، مع اللي بعمله mizan-ledger 0.1.2 فعلاً.
This is not a compliance claim. Using mizan-ledger does not make a system compliant with the FINOS AI Governance Framework, with OWASP guidance, with the EU AI Act, or with any other standard. The library is early alpha (v0.1.2), local-first, and testnet-oriented. Its limits are stated here and in the README.
هاد مش ادعاء امتثال. استخدام mizan-ledger ما بيجعل أي نظام ممتثلاً لإطار حوكمة الذكاء الاصطناعي من FINOS، ولا لإرشادات OWASP، ولا لقانون الذكاء الاصطناعي الأوروبي، ولا لأي معيار تاني. المكتبة نسخة تجريبية مبكرة (v0.1.2)، بتشتغل محلياً، وموجّهة لشبكة الاختبار. حدودها مذكورة هون وفي ملف README.
mizan-ledger
pip install mizan-ledger
An agent commits a salted hash of its confidence before a task, then scores that declaration against a later outcome. Receipts are hash-chained. Anyone with the public ledger can run an offline verify. Editing or deleting a record breaks the chain and verify fails. Pending (unresolved) items are counted, so they cannot be quietly dropped.
الوكيل بيوثّق بصمة مملّحة لثقته قبل المهمة، وبعدين بينحسب تصريحه على النتيجة اللاحقة. الإيصالات مربوطة بسلسلة بصمات. أي حدا عنده السجل العلني بيقدر يفحصه أوفلاين. التعديل أو الحذف بكسر السلسلة، والفحص بيفشل. البنود اللي لسا ما انحسمت بتتنعدّ، فما بينفع تُسقَط بهدوء.
FINOS MI-21 — Agent Decision Audit and Explainability
FINOS MI-21 — تدقيق قرارات الوكيل وقابليتها للتفسير
MI-21 includes, as a key principle, tamper-evident logging: cryptographic protection and integrity validation for audit logs to prevent tampering. At Tier 3 it again lists cryptographic protection and tamper-evident logging. The same page distinguishes tamper-resistance from tamper-evidence, and says audit records should be verifiable by a deployer, auditor, or competent authority without privileged access to the provider's systems. It names techniques such as cryptographic hash chaining, signed log segments, or anchoring digests to an append-only transparency log.
MI-21 بيحط، كمبدأ أساسي، سجلات بيبيّن إذا انعبث فيها: حماية تشفيرية والتحقق من سلامة سجلات التدقيق لمنع التلاعب. وبالمستوى 3 بذكر كمان الحماية التشفيرية والسجلات اللي بيبيّن إذا انعبث فيها. ونفس الصفحة بتميّز بين مقاومة التلاعب وبين بيان التلاعب، وبتقول إنه سجلات التدقيق لازم تكون قابلة للتحقق من طرف المشغّل أو المدقق أو السلطة المختصة من دون صلاحيات خاصة على أنظمة المزود. ومن التقنيات اللي بتذكرها: ربط السجلات بسلسلة بصمات، أو توقيع أجزاء من السجل، أو تثبيت الملخصات على سجل شفافية لا يُضاف إليه إلا في النهاية.
What the library covers: hash-chained receipts and resolutions; an offline verifier that fails if the chain is edited; optional independent anchoring of a chain head (the operator can publish chain_head() and timestamp it). Local clocks alone are not that independent anchor.
شو بتغطي المكتبة: إيصالات وقرارات مربوطة بسلسلة بصمات؛ فاحص أوفلاين بيفشل إذا تعدّلت السلسلة؛ وتثبيت اختياري مستقل لرأس السلسلة (المشغّل بيقدر ينشر chain_head() ويختمه زمنياً). ساعة الجهاز لحاله مش هي هاد التثبيت المستقل.
What the library does not cover: MI-21 Tier 3 also asks for complete reasoning traces, tool-selection logic, customer and business context, real-time monitoring, and regulatory reporting formats. mizan-ledger does not provide those, and we do not claim that it satisfies Tier 3 or any other tier.
شو ما بتغطيه المكتبة: المستوى 3 من MI-21 بطلب كمان أثر الاستدلال الكامل، ومنطق اختيار الأدوات، وسياق الزبون والعمل، ومراقبة لحظية، وصيغ تقارير تنظيمية. mizan-ledger ما بيقدّم هاد، وما منقول إنه بيحقّق المستوى 3 ولا أي مستوى تاني.
OWASP T8 — Repudiation and Untraceability
OWASP T8 — الإنكار وعدم إمكانية التتبع
https://genai.owasp.org/download/45674/
In OWASP's Agentic AI — Threats and Mitigations (Version 1.1, December 2025), T8 is Repudiation & Untraceability: actions performed by AI agents cannot be traced back or accounted for because of insufficient logging or transparency. The listed mitigation is comprehensive logging, cryptographic verification, enriched metadata, and real-time monitoring, and it requires AI-generated logs to be cryptographically signed and immutable. The document also says to enforce cryptographic logging and immutable audit trails to prevent log tampering.
بورقة OWASP «Agentic AI — Threats and Mitigations» (الإصدار 1.1، كانون الأول 2025)، التهديد T8 هو الإنكار وعدم إمكانية التتبع: أفعال وكلاء الذكاء الاصطناعي ما بينفع تتتتبّع أو تُحاسَب بسبب نقص التسجيل أو نقص الشفافية. المعالجة المذكورة هي تسجيل شامل، وتحقق تشفيري، وبيانات وصفية أغنى، ومراقبة لحظية، وبتطلب إن سجلات الذكاء الاصطناعي تكون موقّعة تشفيرياً وغير قابلة للتغيير. والورقة كمان بتقول بضرورة فرض تسجيل تشفيري ومسارات تدقيق غير قابلة للتغيير لمنع التلاعب بالسجلات.
What the library covers: a hash-chained, append-only record of the declaration (as a commitment) and of the later resolution; offline verification; coverage of pending items.
شو بتغطي المكتبة: سجل مربوط بسلسلة بصمات، يُضاف إليه فقط، للتصريح (كبصمة التزام) وللقرار اللاحق؛ تحقق أوفلاين؛ وعدّ البنود المعلّقة.
What the library does not cover: it does not sign log entries with an operator key, it does not provide real-time monitoring, and it cannot tell whether the outcome passed to resolve() is honest. Those are documented limits, not features we claim.
شو ما بتغطيه المكتبة: ما بتوقّع قيود السجل بمفتاح المشغّل، وما بتقدّم مراقبة لحظية، وما بتقدر تعرف إذا النتيجة اللي انمرّرت لـ resolve() صادقة. هاي حدود موثّقة، مش ميزات منادّعيها.
EU AI Act, Article 12 — Record-keeping
قانون الذكاء الاصطناعي الأوروبي، المادة 12 — مسك السجلات
https://artificialintelligenceact.eu/article/12/
Article 12(1) says high-risk AI systems shall technically allow for the automatic recording of events (logs) over the lifetime of the system. Later paragraphs set out what those logs are for, including traceability and post-market monitoring. For some Annex III systems there are extra minimum fields (period of use, reference database, matched input data, and the people who verified the results). The unofficial consolidation on that page states the article comes into force on 2 December 2027 for high-risk systems under Annex III, and on 2 August 2028 for high-risk systems under Annex I.
المادة 12(1) بتقول إن أنظمة الذكاء الاصطناعي عالية الخطورة لازم تسمح تقنياً بالتسجيل التلقائي للأحداث (السجلات) على مدى عمر النظام. والفقرات اللاحقة بتحدّد هدف هاي السجلات، ومنها إمكانية التتبع والمراقبة بعد طرح النظام في السوق. ولبعض أنظمة الملحق الثالث في حقول حد أدنى إضافية (مدة الاستخدام، وقاعدة البيانات المرجعية، وبيانات الإدخال المطابقة، والأشخاص اللي دققوا النتائج). التجميع غير الرسمي على نفس الصفحة بذكر إن المادة بتدخل حيّز التنفيذ في 2 كانون الأول 2027 للأنظمة عالية الخطورة تحت الملحق الثالث، وفي 2 آب 2028 للأنظمة عالية الخطورة تحت الملحق الأول.
What the library covers: automatic, local recording of declarations and resolutions, with hash links, for the agent's confidence claims.
شو بتغطي المكتبة: تسجيل تلقائي محلي للتصريحات والقرارات، مع ربط ببصمات، لادعاءات ثقة الوكيل.
What the library does not cover: Article 12 is a legal requirement for systems that are high-risk under the Act. mizan-ledger is not a complete logging system for a high-risk AI system, and it does not record the extra Annex III fields. Using the library does not make a product high-risk, and it does not make a product compliant.
شو ما بتغطيه المكتبة: المادة 12 متطلب قانوني للأنظمة المصنّفة عالية الخطورة بموجب القانون. mizan-ledger مش نظام تسجيل كامل لنظام ذكاء اصطناعي عالي الخطورة، وما بسجّل الحقول الإضافية تبع الملحق الثالث. استخدام المكتبة ما بيجعل المنتج عالي الخطورة، وما بيجعله ممتثلاً.
Honest limits
حدود بصراحة
- Timestamps in the ledger are the local clock. They prove order only if the chain head is anchored somewhere independent.
- الأختام الزمنية بالسجل هي ساعة الجهاز. بتتبت الترتيب بس إذا رأس السلسلة انثبّت عند جهة مستقلة.
- Without that anchor, a ledger owner could rebuild the whole chain after the fact.
- من دون هاد التثبيت، صاحب السجل بيقدر يعيد بناء السلسلة كلها بعد ما تصير النتيجة معروفة.
- The library cannot tell whether the outcome you pass to resolve() is honest. Use an outcome source the agent does not control.
- المكتبة ما بتقدر تعرف إذا النتيجة اللي بتمرّرها لـ resolve() صادقة. استخدم مصدر نتيجة الوكيل ما بيتحكّم فيه.
- Scores are about calibration, not about whether the agent is good, safe, or secure.
- العلامات عن المعايرة، مش عن إن الوكيل منيح أو آمن أو حصين.
- This is testnet-oriented early alpha. Nothing on this page is financial advice.
- هاد إصدار تجريبي مبكر موجّه لشبكة الاختبار. وما في بهالصفحة أي نصيحة مالية.