S146 · SOURCE-BOUND GATE EVIDENCE
K2: Notification deadline, signal coalescing ve exact wake
Operations --test hedefi → focused test içindeki include_str!/#[path] bağı → kaynak kesiti Bu sayfa yalnız S146 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.
S146Focused kod testiOperations id exactsource SHA exacttest target exact
operation: k2-notification-deadline-signal-wake-partial
uygulama/model · focused test · Operations · 3 exact excerpt
sequence-bound=true · implementation-bound=true
01 · Testin bağlı olduğu uygulama/model kodu
Kapının yürüttüğü gerçek kaynak
tam Rust öğesiL93–L192
kernel/src/ipc_notification.rs::signal
impl NotificationObject {
pub fn try_new(id: u64, owner: u64) -> Result<Self, NotificationObjectError> {
if id == 0 {
return Err(NotificationObjectError::ZeroObject);
}
if owner == 0 {
return Err(NotificationObjectError::ZeroOwner);
}
Ok(Self {
id,
owner,
state: Notification::new(),
waiter: None,
})
}
pub const fn id(&self) -> u64 {
self.id
}
pub const fn owner(&self) -> u64 {
self.owner
}
pub const fn pending(&self) -> u64 {
self.state.pending()
}
pub const fn waiter_snapshot(&self) -> Option<NotificationWaiter> {
self.waiter
}
pub fn wait(
&mut self,
waiter: NotificationWaiter,
) -> Result<NotificationWaitOutcome, NotificationObjectError> {
if self.waiter.is_some() {
return Err(NotificationObjectError::WaiterAlreadyRegistered);
}
let observed = self
.state
.take(waiter.mask())
.map_err(Self::map_notification_error)?;
if observed != 0 {
return Ok(NotificationWaitOutcome::Immediate { observed });
}
self.waiter = Some(waiter);
Ok(NotificationWaitOutcome::Registered)
}
pub fn signal(
&mut self,
bits: u64,
) -> Result<NotificationSignalOutcome, NotificationObjectError> {
let pending = self
.state
.signal(bits)
.map_err(Self::map_notification_error)?;
let Some(waiter) = self.waiter else {
return Ok(NotificationSignalOutcome::Coalesced { pending });
};
let observed = pending & waiter.mask();
if observed == 0 {
return Ok(NotificationSignalOutcome::Coalesced { pending });
}
let consumed = self
.state
.take(waiter.mask())
.map_err(Self::map_notification_error)?;
debug_assert_eq!(consumed, observed);
self.waiter = None;
Ok(NotificationSignalOutcome::Wake {
waiter,
observed,
pending: self.state.pending(),
})
}
pub fn cancel_waiter_exact(
&mut self,
expected: NotificationWaiter,
) -> Result<NotificationWaiter, NotificationMutationError> {
let Some(waiter) = self.waiter else {
return Err(NotificationMutationError::StaleWaiter);
};
if waiter != expected {
return Err(NotificationMutationError::ExactWaiterMismatch);
}
self.waiter = None;
Ok(waiter)
}
const fn map_notification_error(error: NotificationError) -> NotificationObjectError {
match error {
NotificationError::EmptySignal => NotificationObjectError::EmptySignal,
NotificationError::EmptyMask => NotificationObjectError::EmptyMask,
}
}
}snippet sha256: 35f4ad39c658…file sha256: f2d14940b62d…
02 · Doğrulayan test kodu
Operations komutuna bağlı focused test
tam Rust öğesiL181–L194
simulation/tests/ipc_notification_deadline_runtime.rs::qemu_acceptance_requires_timeout_coalescing_matching_wake_and_reclaim
#[test]
fn qemu_acceptance_requires_timeout_coalescing_matching_wake_and_reclaim() {
assert!(MAIN.contains("run_qemu_s146_notification_deadline"));
assert!(MAIN.contains("ABI=SYS_NOTIFICATION_WAIT_TIMEOUT+SYS_NOTIFICATION_SIGNAL"));
assert!(MAIN.contains("NONMATCHING_COALESCED=YES"));
assert!(MAIN.contains("MATCHING_WAKE=YES"));
assert!(MAIN.contains("IMMEDIATE_COALESCED=YES"));
assert!(MAIN.contains("NOTIFICATION_CLEANUP=1"));
assert!(MAIN.contains("KERNEL_FAULTS=0 EXECUTOR=PASS"));
assert!(SMOKE.contains("K2-S146-DEADLINE"));
assert!(SMOKE.contains("strict ELF W^X 26/26"));
assert!(SMOKE.contains("IPC reply 20/20"));
}snippet sha256: 2c2bb678de2e…file sha256: f914d7d86158…
03 · Kapı kimlik kaydı
Operations sıra, kimlik ve başlık bağı
tam Operations kaydıL24491–L24619
website/src/lib/operations.ts::k2-notification-deadline-signal-wake-partial
{
id: "k2-notification-deadline-signal-wake-partial",
date: "2026-08-24",
sequence: 146,
status: "passed",
umbrella_status: "partial",
title: "K2: Notification deadline, signal coalescing ve exact wake",
summary:
"S146, ABI major 1'i koruyup minor sürümü 3'e çıkarır; SYS_NOTIFICATION_SIGNAL=17 ve SYS_NOTIFICATION_WAIT_TIMEOUT=18 production yollarını ekler. x1 64-bit mask, x6 relative tick taşır. İlk strict waiter tick 127→130'da TimedOut olur ve stale waiter kaldırılır. İkinci wait sırasında nonmatching 0x8 pending'e coalesce olur fakat uyandırmaz; matching 0x2 yalnız exact waiter'ı 0x2 ile uyandırır ve 0x8'i korur. Üçüncü wait kalan 0x8'i IMMEDIATE_NOTIFICATION_DEADLINE=UNARMED ile tüketir. Notification lifecycle revoke/teardown ve Generic SMP cross-CPU arbitration açık; K2 PARTIAL kalır.",
evidence: [
"Fail-closed bring-up: eksik userspace image/notification yüzeyleri 0/10 RED → runtime fixture ve smoke öncesi 8/10 → final S146 source/policy 10/10 PASS.",
"ABI major/minor=1/3; SYS_NOTIFICATION_SIGNAL=17, SYS_NOTIFICATION_WAIT_TIMEOUT=18, x1=64-bit mask ve x6=relative ticks. S144 CALL ve S145 RECV timeout ABI'leri korunur.",
"S129–S146 exact envanteri 35 binary / 206 testtir; 206/206 PASS. Ortak ABI/IPC odaklı kapı 68/68 PASS.",
"CALL, RECV ve notification aynı global wait epoch, global IPC transaction ve allocation-free capacity=32 deadline registry'yi paylaşır; arm-before-waiter publication zorunludur.",
"AArch64 board-qemu, board-rpi4, board-rpi5 ve board-rpi5+smp applicability 4/4 PASS.",
"QEMU notification=51, waiter/signaler=55/56, domains=1330597191/1330597192. İlk wait mask=0x3 ve now/deadline/timeout tick=127/130/130.",
"WAIT_EPOCH=2, REGISTERED=2, TIMED_OUT=1, DELIVERED=1, REPLIED=0, PEER_CLOSED=0, CANCELLED=0; TIMEOUT_AT_DEADLINE=YES, STALE_WAITER_ABSENT=YES ve EXACT_ONCE=YES.",
"NONMATCHING_COALESCED=YES: signal 0x8 pending kaldı ve waiter uyanmadı. MATCHING_WAKE=YES: signal 0x2 exact waiter'a observed=0x2 verdi; unmatched 0x8 korundu.",
"IMMEDIATE_COALESCED=YES ve IMMEDIATE_NOTIFICATION_DEADLINE=UNARMED: üçüncü wait tick 133'te korunmuş 0x8'i yeni deadline kaydı açmadan tüketti.",
"Reclaim=10, free 6139→6129→6139, active 5→15→5, NOTIFICATION_CLEANUP=1, KERNEL_FAULTS=0 ve EXECUTOR=PASS.",
"QEMU strict ELF W^X 26/26, başarılı IPC reply 20/20, final RuntimePmm 6144→6144 / active 0→0 ve scheduler SEC5 birlikte PASS.",
"Manuel 8 saniyelik QEMU log'u 474363 B / SHA-256 ea721ec7eab07ff423385c44977278437768fad7d15251bf86db15bbdb673ab4 olarak ölçüldü.",
"Tam workspace yedi S146-dışı frozen G8h identity/closure assertion'ında kırmızıdır: S96 exceptions.S SHA, iki S97 30653/27275 byte history kilidi, iki S100 clean-closure kilidi, Makefile 32329/28951 ve reconstructed 52911/52745. Yedisi exact adlarıyla dışlanınca kalan 107 result group / 678 test 678/678 PASS; assertion'lar gevşetilmedi ve full GREEN iddia edilmez.",
"Fiziksel operatör sırası görünürdür: Gücü kapat → SD kartı Pi'den çıkar → SD kartı Mac'e tak → yetkili write/verify/read-back işlemini tamamla → SD kartı Mac'ten güvenli çıkar → SD kartı güçsüz Pi'ye tak → UART capture pre-arm ve exact identity kapısını doğrula → Güç ver.",
"Bu fiziksel sıra S146'da uygulanmadı: physical/device operations=0, S124 archive/promotion STOP, son fiziksel boot/runtime PASS S92 BOOT8G ve son storage/media PASS S119.",
"Güncel planlama tahmini S146 bazında R2 bitiş aralığı S330–386, risk-paylı merkez ≈S363'tür; taahhüt veya fiziksel PASS değildir.",
"Yerel web kapıları: içerik 242/242, ESLint, TypeScript --noEmit ve Next.js static export 23/23 route / 191 file PASS; üç canonical route'un her birinde S146 ve exact fiziksel operatör marker matrisi 25/25'tir.",
"Kalıcı kapsam: `docs/K2-S146-Notification-Deadline-Signal-Wake-Proof.md`.",
],
commands: [
"cargo test -p aselsan_microkernel_simulation --test ipc_notification_deadline_runtime -- --test-threads=1",
"cargo test -p aselsan_microkernel_simulation [35 exact focused test binary] -- --test-threads=1",
"cargo check -p aselsan_kernel --target aarch64-unknown-none [board-qemu, board-rpi4, board-rpi5, board-rpi5+smp]",
"make verify-qemu",
"cargo test --workspace -- --test-threads=1",
"python3 scripts/render-project-status.py --check",
"cd website && npm test && npm run lint && npx tsc --noEmit && npm run build",
],
terminalSessions: [
{
id: "s146-red-before-notification-runtime",
title:
"Notification deadline authority kaynak kapısı: fail-closed bring-up",
commandLines: [
"cargo test -p aselsan_microkernel_simulation --test ipc_notification_deadline_runtime -- --test-threads=1",
],
outputLines: [
"missing userspace images/notification runtime: 0/10 RED",
"runtime integration, QEMU fixture/smoke öncesi: 8/10",
"no partial PASS accepted",
],
exitCode: 101,
outputMode: "selected",
},
{
id: "s146-green-focused-aarch64-qemu",
title:
"Exact timeout, coalescing, matching wake, immediate consume ve QEMU",
commandLines: [
"cargo test -p aselsan_microkernel_simulation [35 exact focused test binary] -- --test-threads=1",
"cargo check -p aselsan_kernel --target aarch64-unknown-none [4 profiles]",
"make verify-qemu",
],
outputLines: [
"ipc_notification_deadline_runtime: 10/10 PASS",
"combined exact focused inventory: 206/206 PASS · 35 binaries",
"focused ABI/IPC: 68/68 PASS · AArch64 compile profiles: 4/4 PASS",
"[K2-S146-DEADLINE] tick=130 waiter=55 notification=51 mask=0x3 TIMEOUT=EXACT WAKE=TIMED_OUT STALE_WAITER_REMOVED=YES",
"[K2-S146] STRICT EL0 NOTIFY NONMATCHING=COALESCED",
"[K2-S146] STRICT EL0 NOTIFY WAKE=MATCHED",
"[K2-S146] STRICT EL0 NOTIFY IMMEDIATE=COALESCED",
"[K2-S146] WAIT_EPOCH=2 REGISTERED=2 TIMED_OUT=1 DELIVERED=1 NONMATCHING_COALESCED=YES MATCHING_WAKE=YES IMMEDIATE_NOTIFICATION_DEADLINE=UNARMED RECLAIM=10 free=6139->6129->6139 active=5->15->5 KERNEL_FAULTS=0 EXECUTOR=PASS",
"QEMU smoke PASS: strict ELF W^X 26/26 · IPC reply 20/20 · S146 PASS",
],
exitCode: 0,
outputMode: "selected",
},
{
id: "s146-workspace-independent-history-red",
title:
"Tam workspace: yedi S146-dışı frozen G8h identity/closure kırmızısı",
commandLines: [
"cargo test --workspace -- --test-threads=1",
"cargo test --workspace -- --test-threads=1 [seven exact historical --skip filters]",
],
outputLines: [
"full workspace: FAIL-CLOSED · 7 historical frozen G8h identity/closure assertions",
"S96 exceptions.S SHA: observed f7b47672...04fd · expected c0eed3e2...cb89",
"S97 source bytes: 30653 / historical 27275 · asserted twice",
"S100 closure: post-S100 userspace includes and expanded recursive Make target set remain outside frozen manifest",
"Makefile bytes: 32329 / historical 28951 · reconstructed bytes: 52911 / historical 52745",
"excluding exactly those seven assertion names: 107 result groups · 678/678 PASS · 7 filtered",
"historical assertions were not relaxed · full-workspace GREEN is not claimed",
],
exitCode: 101,
outputMode: "selected",
},
{
id: "s146-local-web-gates",
title: "İşlemler, Timeline, tahmin ve fiziksel operatör paneli",
commandLines: [
"cd website && npm test",
"cd website && npm run lint",
"cd website && npx tsc --noEmit",
"cd website && npm run build",
],
outputLines: [
"web content tests: 242/242 PASS",
"ESLint: PASS · TypeScript --noEmit: PASS",
"Next.js static export: 23/23 routes · 191 files PASS",
"operations/timeline/yol-haritasi local marker matrix: 25/25 each",
"Gücü kapat → SD kartı Pi'den çıkar → SD kartı Mac'e tak → write/verify/read-back → Mac'ten güvenli çıkar → güçsüz Pi'ye tak → UART capture pre-arm → Güç ver",
"physical/device operations=0 · RUNBOOK_EXECUTED=NO · S124 STOP",
],
exitCode: 0,
outputMode: "selected",
},
],
terminalSessionsNote:
"S146 opt-in notification signal/timed-wait dilimini kapatır. Notification lifecycle revoke/teardown ve Generic SMP cross-CPU timer/signal/wake yarışı açık olduğundan K2 COMPLETE değildir. Fiziksel runbook açıkça görünür, fakat uygulanmadı.",
limitations: [
"Notification owner/task lifecycle teardown, post-admission revoke ve concurrent signal/revoke/timeout fault-injection matrisi tam kapanmadı.",
"Allocation-free deadline tablosu shared capacity=32 ve timer tick başına en fazla bir expired wait işler; ürün latency/capacity bütçesi imzalı değildir.",
"Generic SMP current-task stop/migration, cross-CPU timer/signal/wake/TLB/reaper, capability transferi, shared-memory loan ve ortak reconciliation açıktır.",
"Cross-subsystem rollback, diğer fault/concurrency sınıfları ve signed product thresholds açıktır.",
"Full workspace yedi S146-dışı frozen G8h identity/closure assertion'ı nedeniyle GREEN değildir; exact yedi assertion dışlandığında kalan 678/678 PASS'tir.",
"S124 fiziksel archive/promotion STOP; görüntülenen güç/SD/Mac/UART sırası S146'da yürütülmedi.",
],
},snippet sha256: faa140f313c3…file sha256: 9726dbf00f84…
Focused test komutu
cargo test -p aselsan_microkernel_simulation --test ipc_notification_deadline_runtime -- --test-threads=1proof: docs/K2-S146-Notification-Deadline-Signal-Wake-Proof.md
Registry schema v5 · generator
website/scripts/generate-code-gates.mjs · Tam SHA-256: 3050638b71a684d8f8f947a8a6faa237a17fa8db5dc0db04fb207b668b462af9