S424 · SOURCE-BOUND GATE EVIDENCE
S424 · Continuation receipt publication
tam S424 implementation modülü → Operations --test hedefi ile bağlı tam focused test → ayrı Operations kaydı Bu sayfa yalnız S424 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S424Focused kod testiOperations id exactsource SHA exacttest target exact
operation: g8l-s424-continuation-receipt-publication-partial
uygulama/model · focused test · Operations · 3 exact excerpt
sequence-bound=true · implementation-bound=true
01 · Yürütme / doğrulama kodu
Kapının gerçek repository sözleşmesi
tam dosyaL1–L168
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s424_continuation_receipt_publication.rs::S424 continuation receipt publication implementation
#![allow(unexpected_cfgs)]
//! S424 publication of a successful S423 continuation receipt.
//!
//! After the existing S187 -> S223 -> S212 source chain returns successfully,
//! CPU1 records the exact attempt binding in one bounded slot. The receipt
//! states that the S421 envelope was consumed and the source chain returned;
//! it does not claim runtime observation, scheduler completion, authority, or
//! physical execution.
use crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s423_s187_continuation_invocation::{
S423_DIRECT_SCHEDULER_ACCESS_SITES,
S423_PRODUCTION_GUARDED_DIRECT_ACCESS_SITES, S423_SOURCE_AUDIT_UNITS,
S423_SOURCE_MODEL_COVERED_DIRECT_ACCESS_SITES, S423_UNROUTED_DIRECT_ACCESS_SITES,
};
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
use crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s423_s187_continuation_invocation::G8lS423S187ContinuationReceipt;
pub const S424_SOURCE_AUDIT_UNITS: usize = S423_SOURCE_AUDIT_UNITS;
pub const S424_DIRECT_SCHEDULER_ACCESS_SITES: usize = S423_DIRECT_SCHEDULER_ACCESS_SITES;
pub const S424_SOURCE_MODEL_COVERED_DIRECT_ACCESS_SITES: usize =
S423_SOURCE_MODEL_COVERED_DIRECT_ACCESS_SITES;
pub const S424_PRODUCTION_GUARDED_DIRECT_ACCESS_SITES: usize =
S423_PRODUCTION_GUARDED_DIRECT_ACCESS_SITES;
pub const S424_UNROUTED_DIRECT_ACCESS_SITES: usize = S423_UNROUTED_DIRECT_ACCESS_SITES;
pub const S424_CONTINUATION_RECEIPT_CAPACITY: usize = 1;
pub const S424_PRODUCTION_PUBLISH_CALLSITES: usize = 1;
pub const S424_CONTINUATION_RECEIPT_PUBLICATION_COMPLETE: bool = true;
pub const S424_S212_CONSUMPTION_RECONCILIATION_COMPLETE: bool = false;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct G8lS424ContinuationReceipt {
pub attempt_id: u64,
pub provider_request_id: u64,
pub exclusive_token: u64,
pub s421_envelope_consumed: bool,
pub s223_to_s212_chain_returned: bool,
pub is_authority: bool,
pub runtime_observed: bool,
}
#[derive(Debug)]
pub struct G8lS424ContinuationReceiptState {
pending: Option<G8lS424ContinuationReceipt>,
}
impl G8lS424ContinuationReceiptState {
pub const fn new() -> Self {
Self { pending: None }
}
pub const fn pending(&self) -> bool {
self.pending.is_some()
}
pub fn pending_receipt(
&self,
caller_cpu: usize,
) -> Result<Option<G8lS424ContinuationReceipt>, G8lS424ContinuationReceiptError> {
if caller_cpu != 1 {
return Err(G8lS424ContinuationReceiptError::WrongCpu);
}
Ok(self.pending)
}
pub fn take(
&mut self,
caller_cpu: usize,
) -> Result<Option<G8lS424ContinuationReceipt>, G8lS424ContinuationReceiptError> {
if caller_cpu != 1 {
return Err(G8lS424ContinuationReceiptError::WrongCpu);
}
Ok(self.pending.take())
}
}
impl Default for G8lS424ContinuationReceiptState {
fn default() -> Self {
Self::new()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS424ContinuationReceiptError {
WrongCpu,
BindingDrift,
ExclusiveLeaseStillActive,
ContinuationNotCompleted,
SlotOccupied,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS424ContinuationReceiptOutcome {
Published(G8lS424ContinuationReceipt),
Pending(G8lS424ContinuationReceipt),
}
pub fn service_s424_model_continuation_receipt_publication(
state: &mut G8lS424ContinuationReceiptState,
caller_cpu: usize,
attempt_id: u64,
provider_request_id: u64,
exclusive_token: u64,
active_exclusive_token: Option<u64>,
s223_to_s212_chain_returned: bool,
) -> Result<G8lS424ContinuationReceiptOutcome, G8lS424ContinuationReceiptError> {
if caller_cpu != 1 {
return Err(G8lS424ContinuationReceiptError::WrongCpu);
}
if attempt_id == 0 || provider_request_id == 0 || exclusive_token == 0 {
return Err(G8lS424ContinuationReceiptError::BindingDrift);
}
if active_exclusive_token.is_some() {
return Err(G8lS424ContinuationReceiptError::ExclusiveLeaseStillActive);
}
if !s223_to_s212_chain_returned {
return Err(G8lS424ContinuationReceiptError::ContinuationNotCompleted);
}
let receipt = G8lS424ContinuationReceipt {
attempt_id,
provider_request_id,
exclusive_token,
s421_envelope_consumed: true,
s223_to_s212_chain_returned: true,
is_authority: false,
runtime_observed: false,
};
if let Some(existing) = state.pending {
return if existing == receipt {
Ok(G8lS424ContinuationReceiptOutcome::Pending(existing))
} else {
Err(G8lS424ContinuationReceiptError::SlotOccupied)
};
}
state.pending = Some(receipt);
Ok(G8lS424ContinuationReceiptOutcome::Published(receipt))
}
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
static S424_PRODUCTION_RECEIPTS: spin::Mutex<G8lS424ContinuationReceiptState> =
spin::Mutex::new(G8lS424ContinuationReceiptState::new());
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
pub fn service_s424_continuation_receipt_publication_on_cpu1(
receipt: G8lS423S187ContinuationReceipt,
) -> Result<G8lS424ContinuationReceiptOutcome, G8lS424ContinuationReceiptError> {
let active_token = crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s246_whole_scheduler_read_access_guard::S247_PRODUCTION_WHOLE_SCHEDULER_ACCESS_GATE
.active_exclusive_token();
service_s424_model_continuation_receipt_publication(
&mut S424_PRODUCTION_RECEIPTS.lock(),
crate::percpu::try_current_cpu_id().unwrap_or(usize::MAX),
receipt.attempt_id(),
receipt.provider_request_id(),
receipt.exclusive_token(),
active_token,
receipt.s223_to_s212_chain_entered(),
)
}
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
pub fn inspect_s424_continuation_receipt_on_cpu1(
) -> Result<Option<G8lS424ContinuationReceipt>, G8lS424ContinuationReceiptError> {
S424_PRODUCTION_RECEIPTS.lock().pending_receipt(1)
}
#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
pub fn take_s424_continuation_receipt_on_cpu1(
) -> Result<Option<G8lS424ContinuationReceipt>, G8lS424ContinuationReceiptError> {
S424_PRODUCTION_RECEIPTS.lock().take(1)
}
snippet sha256: efe0f45da27b…file sha256: efe0f45da27b…
02 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam dosyaL1–L118
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s424_continuation_receipt_publication.rs::S424 continuation receipt publication focused tests
use aselsan_microkernel_simulation::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s424_continuation_receipt_publication::*;
#[test]
fn constants_define_one_cpu1_continuation_receipt_slot() {
assert_eq!(S424_CONTINUATION_RECEIPT_CAPACITY, 1);
assert_eq!(S424_PRODUCTION_PUBLISH_CALLSITES, 1);
assert!(S424_CONTINUATION_RECEIPT_PUBLICATION_COMPLETE);
assert!(!S424_S212_CONSUMPTION_RECONCILIATION_COMPLETE);
}
#[test]
fn exact_invocation_publishes_non_authoritative_receipt() {
let mut state = G8lS424ContinuationReceiptState::new();
let outcome =
service_s424_model_continuation_receipt_publication(&mut state, 1, 7, 8, 9, None, true)
.unwrap();
let G8lS424ContinuationReceiptOutcome::Published(receipt) = outcome else {
panic!("published")
};
assert_eq!(
(
receipt.attempt_id,
receipt.provider_request_id,
receipt.exclusive_token
),
(7, 8, 9)
);
assert!(receipt.s421_envelope_consumed && receipt.s223_to_s212_chain_returned);
assert!(!receipt.is_authority && !receipt.runtime_observed);
}
#[test]
fn active_lease_or_failed_chain_rejects_before_publish() {
let mut state = G8lS424ContinuationReceiptState::new();
assert_eq!(
service_s424_model_continuation_receipt_publication(&mut state, 1, 7, 8, 9, Some(9), true),
Err(G8lS424ContinuationReceiptError::ExclusiveLeaseStillActive)
);
assert_eq!(
service_s424_model_continuation_receipt_publication(&mut state, 1, 7, 8, 9, None, false),
Err(G8lS424ContinuationReceiptError::ContinuationNotCompleted)
);
assert!(!state.pending());
}
#[test]
fn exact_replay_is_pending_and_drift_backpressures() {
let mut state = G8lS424ContinuationReceiptState::new();
service_s424_model_continuation_receipt_publication(&mut state, 1, 7, 8, 9, None, true)
.unwrap();
let receipt = state.pending_receipt(1).unwrap().unwrap();
assert_eq!(
service_s424_model_continuation_receipt_publication(&mut state, 1, 7, 8, 9, None, true),
Ok(G8lS424ContinuationReceiptOutcome::Pending(receipt))
);
assert_eq!(
service_s424_model_continuation_receipt_publication(&mut state, 1, 70, 8, 9, None, true),
Err(G8lS424ContinuationReceiptError::SlotOccupied)
);
}
#[test]
fn receipt_take_is_one_shot_on_cpu1() {
let mut state = G8lS424ContinuationReceiptState::new();
service_s424_model_continuation_receipt_publication(&mut state, 1, 7, 8, 9, None, true)
.unwrap();
assert_eq!(
state.take(0),
Err(G8lS424ContinuationReceiptError::WrongCpu)
);
assert!(state.take(1).unwrap().is_some());
assert!(state.take(1).unwrap().is_none());
}
#[test]
fn production_revalidates_gate_and_maps_exact_s423_receipt() {
let source = include_str!("../../kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s424_continuation_receipt_publication.rs");
let start = source
.find("service_s424_continuation_receipt_publication_on_cpu1")
.unwrap();
let body = &source[start..];
assert!(
body.find("active_exclusive_token").unwrap()
< body
.find("service_s424_model_continuation_receipt_publication")
.unwrap()
);
for getter in [
"receipt.attempt_id()",
"receipt.provider_request_id()",
"receipt.exclusive_token()",
"receipt.s223_to_s212_chain_entered()",
] {
assert!(body.contains(getter));
}
}
#[test]
fn timer_publishes_s424_only_from_s423_invoked_before_s212_service() {
let source = include_str!("../../kernel/src/arch/aarch64/exceptions.rs");
let s423 = source
.find("service_s423_s187_continuation_invocation_on_cpu1")
.unwrap();
let invoked = source
.find("G8lS423S187ContinuationOutcome::Invoked")
.unwrap();
let s424 = source
.find("service_s424_continuation_receipt_publication_on_cpu1")
.unwrap();
let s212 = source
.find("service_runtime_owner_s197_tuple_from_current_scheduler_task")
.unwrap();
assert!(s423 < invoked && invoked < s424 && s424 < s212);
let name = "g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s424_continuation_receipt_publication";
assert!(include_str!("../../kernel/src/main.rs").contains(&format!("mod {name};")));
assert!(include_str!("../src/lib.rs").contains(&format!("pub mod {name};")));
}
snippet sha256: 5529e3bb6eea…file sha256: 5529e3bb6eea…
03 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL491–L507
website/src/lib/operations.ts::g8l-s424-continuation-receipt-publication-partial
{
id: "g8l-s424-continuation-receipt-publication-partial",
sequence: 424,
slug: "continuation_receipt_publication",
title: "Continuation receipt publication",
focusedTests: 7,
sourceBytes: 6539,
sourceSha256:
"efe0f45da27b7e9f5359f032960d063f06461a0b8bd42e46b192b20311b29599",
testBytes: 4595,
testSha256:
"5529e3bb6eea13ef68517ac4678479f304fb0ce483dda5842a39fe915ca754af",
acceptance:
"S423 continuation sonucu exact request/attempt/runtime/handoff zarfıyla capacity-one receipt state'ine yayımlanır.",
retainedBoundary:
"S212 consumption reconciliation henüz bu kapıda tamamlanmaz.",
},snippet sha256: 55d04c5c18da…file sha256: 9726dbf00f84…
Focused test komutu
CARGO_INCREMENTAL=0 cargo test -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s424_continuation_receipt_publication -- --test-threads=1proof: docs/M8.1-RPi5-G8l-S424-Continuation-Receipt-Publication-Proof.md
Registry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 3050638b71a684d8f8f947a8a6faa237a17fa8db5dc0db04fb207b668b462af9