ASELSANMicrokernel
S296 · SOURCE-BOUND GATE EVIDENCE

G8l: yield-now writer-authority audit

Operations --test hedefi → test hedefiyle aynı adlı uygulama/model modülü → kaynak kesiti Bu sayfa yalnız S296 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.

S296Focused kod testiOperations id exactsource SHA exacttest target exact

operation: g8l-s296-yield-now-writer-authority-audit-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 öğesiL22–L90
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s296_yield_now_writer_authority_audit.rs::S296_WHOLE_SCHEDULER_GUARDED_SITES

pub const S296_WRITER_BOUNDARY_SITES: usize = 1;
pub const S296_WRITER_AUTHORITY_SITES: usize = 0;
pub const S296_DIRECT_SCHEDULER_ACCESS_SITES: usize = S295_DIRECT_SCHEDULER_ACCESS_SITES;
pub const S296_IMMUTABLE_READ_SITES: usize = S295_IMMUTABLE_READ_SITES;
pub const S296_WHOLE_SCHEDULER_GUARDED_SITES: usize = S295_WHOLE_SCHEDULER_GUARDED_SITES;
pub const S296_WHOLE_SCHEDULER_UNROUTED_SITES: usize = S295_WHOLE_SCHEDULER_UNROUTED_SITES;
pub const S296_OPEN_WRITER_SITES: usize = S295_OPEN_WRITER_SITES;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS296SchedulerWriterAuthorityAuditOutcome {
    Idle,
    AwaitingWriterAuthority {
        request_id: u64,
        guarded_sites: usize,
        writer_sites: usize,
    },
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS296SchedulerWriterAuthorityAuditError {
    S295(G8lS295SchedulerWriterAuthorityAuditError),
    S245(G8lS245ExclusionAdmissionRequestError),
    PriorCoverageDrift {
        guarded_sites: usize,
        unrouted_sites: usize,
    },
}

/// Revalidate the prior fail-closed authority boundary without taking
/// admission or constructing a production exclusive wrapper.
pub fn preflight_s296_scheduler_writer_authority(
    caller_cpu: usize,
    request: Option<G8lS245WholeSchedulerExclusionAdmissionRequestView>,
) -> Result<G8lS296SchedulerWriterAuthorityAuditOutcome, G8lS296SchedulerWriterAuthorityAuditError>
{
    match preflight_s295_scheduler_writer_authority(caller_cpu, request)
        .map_err(G8lS296SchedulerWriterAuthorityAuditError::S295)?
    {
        G8lS295SchedulerWriterAuthorityAuditOutcome::Idle => {
            Ok(G8lS296SchedulerWriterAuthorityAuditOutcome::Idle)
        }
        G8lS295SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
            request_id,
            guarded_sites,
            writer_sites,
        } if guarded_sites == S296_WHOLE_SCHEDULER_GUARDED_SITES
            && writer_sites == S296_OPEN_WRITER_SITES =>
        {
            Ok(
                G8lS296SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
                    request_id,
                    guarded_sites,
                    writer_sites,
                },
            )
        }
        G8lS295SchedulerWriterAuthorityAuditOutcome::AwaitingWriterAuthority {
            guarded_sites,
            writer_sites: _,
            ..
        } => Err(
            G8lS296SchedulerWriterAuthorityAuditError::PriorCoverageDrift {
                guarded_sites,
                unrouted_sites: S296_DIRECT_SCHEDULER_ACCESS_SITES - guarded_sites,
            },
        ),
    }
}
snippet sha256: 7ac6dab1e7fefile sha256: 8b967fe2845b
02 · Doğrulayan test kodu

Operations komutuna bağlı focused test

tam Rust öğesiL212–L244
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s296_yield_now_writer_authority_audit.rs::s296_next_task_publication_and_dead_retirement_precede_context_switch

#[test]
fn s296_next_task_publication_and_dead_retirement_precede_context_switch() {
    let source = include_str!("../../kernel/src/task/scheduler.rs");
    let boundary = yield_now_boundary(source);
    for required in [
        "if let Some(prio_next) = sched.ready_queue.pop()",
        "next.state = TaskState::Running",
        "prepare_task_for_context_switch(&next)",
        "sched.current_task = Some(next)",
        "sched.ticks_until_preempt = slice",
        "if let Some(dead) = dead_to_retire.take()",
        "sched.retired_task.is_none()",
        "sched.retired_task = Some(dead)",
        "context_switch(old_ctx_ptr, new_ctx)",
        "debug_assert!(dead_to_retire.is_none())",
    ] {
        assert!(
            boundary.contains(required),
            "missing S296 switch token: {required}"
        );
    }
    let pop = boundary.find("sched.ready_queue.pop()").unwrap();
    let prepare = boundary
        .find("prepare_task_for_context_switch(&next)")
        .unwrap();
    let publish = boundary.find("sched.current_task = Some(next)").unwrap();
    let retire = boundary.find("sched.retired_task = Some(dead)").unwrap();
    let switch = boundary
        .find("context_switch(old_ctx_ptr, new_ctx)")
        .unwrap();
    assert!(pop < prepare && prepare < publish && publish < retire && retire < switch);
}
snippet sha256: b760b35ef56efile sha256: f808f688b555
03 · Kapı kimlik kaydı

Operations sıra, kimlik ve başlık bağı

tam Operations kaydıL16507–L16563
website/src/lib/operations.ts::g8l-s296-yield-now-writer-authority-audit-partial
  {
    id: "g8l-s296-yield-now-writer-authority-audit-partial",
    date: "2026-08-26",
    sequence: 296,
    status: "passed",
    umbrella_status: "partial",
    title: "G8l: yield-now writer-authority audit",
    summary:
      "S296 focused 15/15 PASS ile yield_now içindeki tek explicit mutable scheduler aliasını kaynakta doğrular. IRQ maskesi ve deferred reaper current-task take öncesindedir; dead/no-ready task scrub edilip current olarak tutulur, live task vruntime/time-slice güncellemesinden sonra ready queue'ya döner. Next task address space hazırlığı, current publication, optional dead retirement ve context_switch sırası exact kalır. Bu production migration değildir. Writer authority yalnız model gate'inin exclusive lease'iyle mümkündür, reader lease'i writer'ı açmaz. Production inventory 113 direct / 44 immutable guarded / 69 open writer olarak değişmez ve production exclusive wrapper, provider authority, whole-scheduler exclusion veya scheduler mutation üretilmez.",
    evidence: [
      "S296 focused kaynak/model kapısı iki bağımsız koşuda 15/15 PASS verdi: 130 B / SHA-256 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3.",
      "yield_now içindeki tek addr_of_mut!(SCHEDULER) writer boundary'si audit edilir. irq_lock, reap_retired_task ve current_task.take sırası; dead task user-frame scrub + no-ready current retention; live task update_vruntime + slice refill + ready push; next pop + Running + prepare_task_for_context_switch + current/tick publication + optional retired_task commit + context_switch sırası kaynakta görünür.",
      "Model gate reader membership exclusive writer authority'yi ExclusiveBusy ile bloklar; reader bırakıldıktan sonra non-zero token'lı exclusive lease alınır. Bu host/model evidence'tır.",
      "S295 authority preflight yeniden doğrulanır; pending S245 request korunur ve sonuç AwaitingWriterAuthority { guarded_sites: 44, writer_sites: 69 } olarak döner.",
      "Dört AArch64 profil derlemesi iki koşuda byte-equal exit 0 verdi: QEMU 110646 B / e985681d, RPi4 149371 B / 333b9fde, RPi5 404094 B / 51bdee8f ve RPi5+SMP 404036 B / f4eb3f9b. Warning header'ları sırasıyla 291, 389, 825 ve 825'tir; zero-warning iddiası değildir.",
      "Birleşik board-rpi5,board-qemu özellikleri iki koşuda beklenen exit 101, 18590 B / b54db59d, 17 error ve 22 warning header ile fail-closed kaldı; S296 writer boundary'si iki board profilinin birlikte etkinleşmesini açmaz.",
      "S238–S296 dependency matrisi iki koşuda 60 grup / 824/824 PASS; ham loglar 7722 B / 48a09b9c ve a248bfe6, süre-normalize özet 7842 B byte-equal / f617faa729948174cbac3fb8260fbee0916d7c0e2b2e64d684c27a07a61cb770. Bu production writer-authority invocation kanıtı değildir.",
      "Ortak make verify-qemu iki koşuda PASS verdi: 116222 B / e373ff9b ve 116139 B / d2dbb1c3; W^X 31/31, S271 GRAPH_ABSENT=YES, RuntimePmm baseline, EL0 x4096, IPC 20/20, tek beklenen S142 fatal containment ve SEC5 korunur. Bu ortak smoke S296 production writer invocation kanıtı değildir.",
      "Exact yedi tarihsel G8h assertion adıyla dışlandığında workspace iki koşuda 258 sonuç grubu / 2610 PASS / 7 filtered verdi: ham loglar 61018 B / e2b4e089 ve d8af8115, süre-normalize 24907 B özet byte-equal / SHA-256 f9ea6b94672834a0c556f4486c9fb11e886fd111ffac1eccc44c7589c92d5519. Filtresiz koşu exit 101, 56240 B / 06a0eaae ile frozen S96 exceptions.S identity kapısında RED kaldı; full-workspace GREEN iddia edilmez.",
      "S296 production exclusive wrapper, provider authority, whole-scheduler exclusion, QEMU runtime fixture veya scheduler mutation iddiası eklemez; physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S296=NO.",
    ],
    commands: [
      "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s296_yield_now_writer_authority_audit -- --test-threads=1",
      "cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-qemu",
      "cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi4",
      "cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5",
      "cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --no-default-features --features board-rpi5,smp",
      "cargo check --quiet -p aselsan_kernel --target aarch64-unknown-none --features board-rpi5",
      "make verify-qemu",
    ],
    terminalSessions: [
      {
        id: "g8l-s296-yield-now-writer-authority-audit",
        title: "G8l S296 yield-now writer-authority audit",
        commandLines: [
          "cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s296_yield_now_writer_authority_audit -- --test-threads=1",
        ],
        outputLines: [
          "test result: ok; S296 focused 1 group / 15 passed; 0 failed",
          "repeat-stable quiet output: 130 B / 0447f2fe9dc6fdf30815a6962cf23d978425e51bef2acde1efb27e5da13a78b3",
          "yield-now writer authority remains model-only: reader blocks exclusive lease; dead/live requeue and context-switch ordering are source-audited while 69 production writer sites remain open",
          "dependency: S238–S296 · 60 groups · 824/824 PASS; workspace: 258 groups · 2610 PASS · 7 historical filtered",
        ],
        exitCode: 0,
        outputMode: "selected",
      },
    ],
    terminalSessionsNote:
      "S296 kaynak/model fail-closed authority boundary'sidir; production writer guard/migration, QEMU fixture mutation ve fiziksel/device execution claim edilmez.",
    limitations: [
      "S296 yalnız yield_now içindeki tek explicit mutable scheduler aliasını audit eder; toplam 69 production writer site açık kalır.",
      "Exclusive lease yalnız host/model gate'inde test edilir; production exclusive wrapper, provider authority ve whole-scheduler exclusion açık kalır.",
      "S238–S296 dependency matrisi exact 60 grup / 824/824 PASS'tir; bu production writer authority invocation kanıtı değildir.",
      "Filtresiz workspace frozen S96 identity kapısında RED'dir; workspace umbrella GREEN iddia edilmez.",
      "Supported-profile runtime invocation, Generic SMP ve fiziksel RPi kabulü açık kalır; S296 physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S296=NO.",
    ],
  },
snippet sha256: 985eb6637e71file sha256: 9726dbf00f84
Focused test komutu
cargo test --quiet -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s296_yield_now_writer_authority_audit -- --test-threads=1
proof: docs/M8.1-RPi5-G8l-S296-Yield-Now-Writer-Authority-Audit-Proof.md
Registry schema v5 · generator website/scripts/generate-code-gates.mjs · Tam SHA-256: 3050638b71a684d8f8f947a8a6faa237a17fa8db5dc0db04fb207b668b462af9