FABRIC.md -> FABRIC-0.md FABRIC-2.md -> FABRIC-1.md FABRIC-3.md -> FABRIC-2.md (the current/living document) FABRIC-4.md unchanged (new #3 to follow separately) Every cross-reference repo-wide updated to match, including doc-comment citations inside kernel source (.c/.h) files -- done via an ordered placeholder substitution (FABRIC-3.md->placeholder2, FABRIC-2.md-> placeholder1, FABRIC.md->placeholder0, then placeholders resolved to final names) in a single pass per file to avoid double-shifting already-renamed references. One line in capsules/font.4th grew past the 64-char block-format limit as a side effect of the longer filename; shortened it and reverified with mkcapsule --lint (34/34 pass) before rebuilding. Verified 3-arch boot to ok> (amd64/aarch64/riscv64, each in the foreground) after the fix; logs and DoE CSVs from this session's verification runs included per this repo's own audit-artifact convention. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YcT3H2PQeyujrzjqS3Var
57 lines
2.1 KiB
C
57 lines
2.1 KiB
C
/*
|
||
StarForth — Steady-State Virtual Machine Runtime
|
||
|
||
Copyright (c) 2023–2025 Robert A. James
|
||
All rights reserved.
|
||
|
||
Licensed under the StarForth License, Version 1.0
|
||
*/
|
||
|
||
/**
|
||
* zuse_eligibility.h - Read/add/membership-check over the on-disk
|
||
* elevation eligibility list (FABRIC-2.md §H.5/§H.12 Phase 6,
|
||
* zuse_eligibility_list.h's zuse_eligibility_devblock_t chain). Zuse
|
||
* checks zuse_eligibility_is_member() before honoring any
|
||
* ELEVATE-REQUEST (§H.7/§H.8) -- a gating layer on top of the
|
||
* message-based elevation trigger, not a replacement for it. Adding an
|
||
* entry (zuse_eligibility_add()) is meant to be reachable only from a
|
||
* Zuse-only FORTH word (§H.12 item 19, gated by zuse_session), not
|
||
* called directly from arbitrary session code.
|
||
*/
|
||
|
||
#ifndef STARKERNEL_ZUSE_ELIGIBILITY_H
|
||
#define STARKERNEL_ZUSE_ELIGIBILITY_H
|
||
|
||
#ifdef __STARKERNEL__
|
||
|
||
#include <stdint.h>
|
||
|
||
/**
|
||
* zuse_eligibility_is_member - Check whether pubkey appears anywhere in
|
||
* the eligibility list chain. Fail-closed: an empty/nonexistent list, a
|
||
* corrupt/foreign devblock encountered mid-chain, or any I/O error all
|
||
* read as "not eligible" (0), never "eligible" -- this gates elevation,
|
||
* so an unreadable list must never be treated as permissive.
|
||
*
|
||
* @param pubkey 32-byte Ed25519 public key to look up.
|
||
* @return 1 if found, 0 otherwise (including on any error).
|
||
*/
|
||
int zuse_eligibility_is_member(const uint8_t pubkey[32]);
|
||
|
||
/**
|
||
* zuse_eligibility_add - Add pubkey to the eligibility list, creating
|
||
* the list's head devblock if it doesn't exist yet and chaining a fresh
|
||
* devblock onto the tail if the current tail is full. Idempotent: adding
|
||
* an already-present pubkey is a no-op success, not a duplicate entry.
|
||
*
|
||
* @param pubkey 32-byte Ed25519 public key to add.
|
||
* @return 0 on success (added, or already present), -1 on
|
||
* failure (fence write failed, fence budget exhausted, or
|
||
* a corrupt devblock was encountered mid-chain).
|
||
*/
|
||
int zuse_eligibility_add(const uint8_t pubkey[32]);
|
||
|
||
#endif /* __STARKERNEL__ */
|
||
|
||
#endif /* STARKERNEL_ZUSE_ELIGIBILITY_H */
|