Add exact-equality Hermes ledger self-audit -- FABRIC-3.6.md task 2.6
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
d11eb2e5db
commit
313ffc89e6
@@ -244,6 +244,25 @@ void sk_hermes_ledger(uint64_t *held, uint64_t *pulled, uint64_t *returned, uint
|
||||
*/
|
||||
int sk_hermes_decay(SkHermesMessage *msg);
|
||||
|
||||
/*
|
||||
* Task 2.6 (item 28): the self-audit, epsilon zero (SXXXVII.3).
|
||||
*
|
||||
* sk_hermes_audit_values - pure predicate: nonzero iff
|
||||
* held == pulled - returned - consumed exactly. Separate from the live
|
||||
* ledger so the check can be exercised with deliberately corrupted values
|
||||
* without mutating real state.
|
||||
*
|
||||
* sk_hermes_audit - checks the live ledger (O(1), SXXXVII.4); on failure
|
||||
* prints a console line and bumps a failure count. Called at the end of
|
||||
* every successful mutation: alloc, release, decay.
|
||||
*
|
||||
* sk_hermes_audit_failure_count - cumulative failures seen by the live
|
||||
* audit; must be 0 in a healthy kernel.
|
||||
*/
|
||||
int sk_hermes_audit_values(uint64_t held, uint64_t pulled, uint64_t returned, uint64_t consumed);
|
||||
int sk_hermes_audit(void);
|
||||
uint64_t sk_hermes_audit_failure_count(void);
|
||||
|
||||
#endif /* __STARKERNEL__ */
|
||||
|
||||
#endif /* STARKERNEL_VM_KERNEL_HERMES_H */
|
||||
|
||||
Reference in New Issue
Block a user