ASELSANMicrokernel
S397 · SOURCE-BOUND GATE EVIDENCE

S397 · Whole-scheduler writer coverage reconciliation

tam S397 reconciliation modülü → Operations --test hedefi ile bağlı tam focused test → tam Operations kaydı Bu sayfa yalnız S397 kapısına aittir; komşu kapıların kaynakları bu kabulün içine katılmaz.

S397Focused kod testiOperations id exactsource SHA exacttest target exact

operation: g8l-s397-whole-scheduler-writer-coverage-reconciliation-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–L236
kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s397_whole_scheduler_writer_coverage_reconciliation.rs::S397 whole-scheduler writer coverage reconciliation
#![allow(unexpected_cfgs)]

//! S397 whole-scheduler writer-coverage reconciliation.
//!
//! S327 established the exact production source inventory: 44 immutable reads
//! and 69 mutable aliases across seven audit units, five of which contain
//! writers. S328-S396 then gave each of those 69 writers its own production
//! membership in the shared static S247 access state. S397 reconciles those two
//! independently established sides without adding a seventieth writer or
//! acquiring the gate itself. The five source partitions remain 1 current-task,
//! 29 scheduler, 14 capability, 8 exception and 17 main writers. There are 69
//! distinct writer-gate modules and 74 raw acquire sites because five blocking
//! IPC paths transfer the already-owned lease into their resume boundary.
//! S398 direct-access reconciliation remains open, as do provider preflight,
//! admission publication, provider construction and whole-scheduler exclusion.

use crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s244_whole_scheduler_exclusion_admission_request::{
    G8lS245ExclusionAdmissionRequestError, G8lS245WholeSchedulerExclusionAdmissionRequestView,
};
use crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s327_writer_inventory_source_model_reconciliation::{
    S327_CAPABILITY_WRITER_SITES, S327_CURRENT_TASK_WRITER_SITES,
    S327_DIRECT_SCHEDULER_ACCESS_SITES, S327_EXCEPTION_WRITER_SITES,
    S327_IMMUTABLE_READ_SITES, S327_MAIN_WRITER_SITES, S327_MUTABLE_SOURCE_UNITS,
    S327_SCHEDULER_WRITER_SITES, S327_SOURCE_AUDIT_UNITS,
    S327_SOURCE_MODEL_COVERED_WRITER_SITES, S327_WRITER_SITES,
};
use crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s396_qemu_s136_stale_ack_writer_guard_integration::{
    preflight_s396_qemu_s136_stale_ack_writer_guard_integration,
    G8lS396WriterGuardIntegrationError, G8lS396WriterGuardIntegrationOutcome,
    S396_GUARDED_READ_SITES, S396_OPEN_PRODUCTION_WRITER_SITES,
    S396_PRODUCTION_GUARDED_WRITER_SITES,
};

pub const S397_SOURCE_AUDIT_UNITS: usize = S327_SOURCE_AUDIT_UNITS;
pub const S397_MUTABLE_SOURCE_UNITS: usize = S327_MUTABLE_SOURCE_UNITS;
pub const S397_DIRECT_SCHEDULER_ACCESS_SITES: usize = S327_DIRECT_SCHEDULER_ACCESS_SITES;
pub const S397_SOURCE_IMMUTABLE_READ_SITES: usize = S327_IMMUTABLE_READ_SITES;
pub const S397_GUARDED_READ_SITES: usize = S396_GUARDED_READ_SITES;
pub const S397_TOTAL_WRITER_SITES: usize = S327_WRITER_SITES;
pub const S397_SOURCE_MODEL_COVERED_WRITER_SITES: usize = S327_SOURCE_MODEL_COVERED_WRITER_SITES;
pub const S397_PRODUCTION_GUARDED_WRITER_SITES: usize = S396_PRODUCTION_GUARDED_WRITER_SITES;
pub const S397_OPEN_PRODUCTION_WRITER_SITES: usize = S396_OPEN_PRODUCTION_WRITER_SITES;
pub const S397_DISTINCT_WRITER_GATE_MODULES: usize = 69;
pub const S397_PRODUCTION_WRITER_ACQUIRE_SITES: usize = 74;
pub const S397_CURRENT_TASK_WRITER_SITES: usize = S327_CURRENT_TASK_WRITER_SITES;
pub const S397_SCHEDULER_WRITER_SITES: usize = S327_SCHEDULER_WRITER_SITES;
pub const S397_CAPABILITY_WRITER_SITES: usize = S327_CAPABILITY_WRITER_SITES;
pub const S397_EXCEPTION_WRITER_SITES: usize = S327_EXCEPTION_WRITER_SITES;
pub const S397_MAIN_WRITER_SITES: usize = S327_MAIN_WRITER_SITES;
pub const S397_PRODUCTION_PROVIDER_AUTHORITY_SITES: usize = 0;
pub const S397_PRODUCTION_ADMISSION_PUBLISHER_SITES: usize = 0;
pub const S397_SUPPORTED_PROFILE_RUNTIME_OBSERVATIONS: usize = 0;
pub const S397_WRITER_COVERAGE_RECONCILIATION_COMPLETE: bool = true;
pub const S397_DIRECT_ACCESS_COVERAGE_RECONCILIATION_COMPLETE: bool = false;
pub const S397_PROVIDER_PREFLIGHT_COMPLETE: bool = false;
pub const S397_WHOLE_SCHEDULER_EXCLUSION_COMPLETE: bool = false;

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct G8lS397WriterCoverageLedger {
    pub source_audit_units: usize,
    pub mutable_source_units: usize,
    pub direct_scheduler_access_sites: usize,
    pub guarded_read_sites: usize,
    pub total_writer_sites: usize,
    pub source_model_covered_writer_sites: usize,
    pub production_guarded_writer_sites: usize,
    pub open_writer_sites: usize,
    pub distinct_writer_gate_modules: usize,
    pub production_writer_acquire_sites: usize,
    pub current_task_writer_sites: usize,
    pub scheduler_writer_sites: usize,
    pub capability_writer_sites: usize,
    pub exception_writer_sites: usize,
    pub main_writer_sites: usize,
}

impl G8lS397WriterCoverageLedger {
    pub const fn canonical() -> Self {
        Self {
            source_audit_units: S397_SOURCE_AUDIT_UNITS,
            mutable_source_units: S397_MUTABLE_SOURCE_UNITS,
            direct_scheduler_access_sites: S397_DIRECT_SCHEDULER_ACCESS_SITES,
            guarded_read_sites: S397_GUARDED_READ_SITES,
            total_writer_sites: S397_TOTAL_WRITER_SITES,
            source_model_covered_writer_sites: S397_SOURCE_MODEL_COVERED_WRITER_SITES,
            production_guarded_writer_sites: S397_PRODUCTION_GUARDED_WRITER_SITES,
            open_writer_sites: S397_OPEN_PRODUCTION_WRITER_SITES,
            distinct_writer_gate_modules: S397_DISTINCT_WRITER_GATE_MODULES,
            production_writer_acquire_sites: S397_PRODUCTION_WRITER_ACQUIRE_SITES,
            current_task_writer_sites: S397_CURRENT_TASK_WRITER_SITES,
            scheduler_writer_sites: S397_SCHEDULER_WRITER_SITES,
            capability_writer_sites: S397_CAPABILITY_WRITER_SITES,
            exception_writer_sites: S397_EXCEPTION_WRITER_SITES,
            main_writer_sites: S397_MAIN_WRITER_SITES,
        }
    }

    pub const fn source_partition_total(self) -> usize {
        self.current_task_writer_sites
            + self.scheduler_writer_sites
            + self.capability_writer_sites
            + self.exception_writer_sites
            + self.main_writer_sites
    }
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct G8lS397WriterCoverageReceipt {
    pub source_audit_units: usize,
    pub mutable_source_units: usize,
    pub source_model_covered_writer_sites: usize,
    pub production_guarded_writer_sites: usize,
    pub open_writer_sites: usize,
    pub distinct_writer_gate_modules: usize,
    pub production_writer_acquire_sites: usize,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS397WriterCoverageReconciliationOutcome {
    Idle,
    WriterCoverageReconciledAwaitingDirectAccessReconciliation {
        request_id: u64,
        source_audit_units: usize,
        mutable_source_units: usize,
        guarded_read_sites: usize,
        source_model_covered_writer_sites: usize,
        production_guarded_writer_sites: usize,
        open_writer_sites: usize,
        distinct_writer_gate_modules: usize,
        production_writer_acquire_sites: usize,
    },
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum G8lS397WriterCoverageReconciliationError {
    S396(G8lS396WriterGuardIntegrationError),
    S245(G8lS245ExclusionAdmissionRequestError),
    PredecessorDrift {
        guarded_read_sites: usize,
        guarded_writer_sites: usize,
        open_writer_sites: usize,
    },
    InventoryDrift {
        observed: G8lS397WriterCoverageLedger,
        expected: G8lS397WriterCoverageLedger,
    },
}

pub fn reconcile_s397_writer_coverage(
    ledger: G8lS397WriterCoverageLedger,
) -> Result<G8lS397WriterCoverageReceipt, G8lS397WriterCoverageReconciliationError> {
    let expected = G8lS397WriterCoverageLedger::canonical();
    let dimensions_are_exact = ledger == expected
        && ledger.direct_scheduler_access_sites
            == ledger.guarded_read_sites + ledger.total_writer_sites
        && ledger.source_model_covered_writer_sites == ledger.total_writer_sites
        && ledger.production_guarded_writer_sites == ledger.total_writer_sites
        && ledger.open_writer_sites == 0
        && ledger.distinct_writer_gate_modules == ledger.total_writer_sites
        && ledger.source_partition_total() == ledger.total_writer_sites;
    if !dimensions_are_exact {
        return Err(G8lS397WriterCoverageReconciliationError::InventoryDrift {
            observed: ledger,
            expected,
        });
    }
    Ok(G8lS397WriterCoverageReceipt {
        source_audit_units: ledger.source_audit_units,
        mutable_source_units: ledger.mutable_source_units,
        source_model_covered_writer_sites: ledger.source_model_covered_writer_sites,
        production_guarded_writer_sites: ledger.production_guarded_writer_sites,
        open_writer_sites: ledger.open_writer_sites,
        distinct_writer_gate_modules: ledger.distinct_writer_gate_modules,
        production_writer_acquire_sites: ledger.production_writer_acquire_sites,
    })
}

pub fn preflight_s397_whole_scheduler_writer_coverage_reconciliation(
    caller_cpu: usize,
    request: Option<G8lS245WholeSchedulerExclusionAdmissionRequestView>,
) -> Result<G8lS397WriterCoverageReconciliationOutcome, G8lS397WriterCoverageReconciliationError> {
    match preflight_s396_qemu_s136_stale_ack_writer_guard_integration(caller_cpu, request)
        .map_err(G8lS397WriterCoverageReconciliationError::S396)?
    {
        G8lS396WriterGuardIntegrationOutcome::Idle => {
            Ok(G8lS397WriterCoverageReconciliationOutcome::Idle)
        }
        G8lS396WriterGuardIntegrationOutcome::SixtyNinthWriterGuardedAwaitingReconciliation {
            request_id,
            guarded_read_sites,
            guarded_writer_sites,
            open_writer_sites,
            ..
        } => {
            if guarded_read_sites != S397_GUARDED_READ_SITES
                || guarded_writer_sites != S397_PRODUCTION_GUARDED_WRITER_SITES
                || open_writer_sites != S397_OPEN_PRODUCTION_WRITER_SITES
            {
                return Err(G8lS397WriterCoverageReconciliationError::PredecessorDrift {
                    guarded_read_sites,
                    guarded_writer_sites,
                    open_writer_sites,
                });
            }
            let receipt = reconcile_s397_writer_coverage(G8lS397WriterCoverageLedger::canonical())?;
            Ok(
                G8lS397WriterCoverageReconciliationOutcome::WriterCoverageReconciledAwaitingDirectAccessReconciliation {
                    request_id,
                    source_audit_units: receipt.source_audit_units,
                    mutable_source_units: receipt.mutable_source_units,
                    guarded_read_sites,
                    source_model_covered_writer_sites:
                        receipt.source_model_covered_writer_sites,
                    production_guarded_writer_sites: receipt.production_guarded_writer_sites,
                    open_writer_sites: receipt.open_writer_sites,
                    distinct_writer_gate_modules: receipt.distinct_writer_gate_modules,
                    production_writer_acquire_sites: receipt.production_writer_acquire_sites,
                },
            )
        }
    }
}

#[cfg(all(target_arch = "aarch64", target_os = "none", feature = "board-rpi5"))]
pub fn service_s397_whole_scheduler_writer_coverage_reconciliation_on_cpu1(
) -> Result<G8lS397WriterCoverageReconciliationOutcome, G8lS397WriterCoverageReconciliationError> {
    use crate::g8l_runtime_contract::CPU1;

    if crate::percpu::try_current_cpu_id() != Some(CPU1) {
        return preflight_s397_whole_scheduler_writer_coverage_reconciliation(CPU1 + 1, None);
    }
    let request = crate::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s244_whole_scheduler_exclusion_admission_request::inspect_s245_exclusion_admission_request_on_cpu1()
        .map_err(G8lS397WriterCoverageReconciliationError::S245)?;
    preflight_s397_whole_scheduler_writer_coverage_reconciliation(CPU1, request)
}
snippet sha256: 8bfb45c33817file sha256: 8bfb45c33817
02 · Doğrulayan test kodu

Operations komutuna bağlı focused test

tam dosyaL1–L442
simulation/tests/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s397_whole_scheduler_writer_coverage_reconciliation.rs::S397 focused writer coverage reconciliation tests
#![recursion_limit = "256"]

use aselsan_microkernel_simulation::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s244_whole_scheduler_exclusion_admission_request::{
    service_s245_exclusion_admission_request, G8lS245ExclusionAdmissionRequestOutcome,
    G8lS245WholeSchedulerExclusionAdmissionRequestState, S245_SOURCE_CPU0, S245_TARGET_CPU1,
};
use aselsan_microkernel_simulation::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s327_writer_inventory_source_model_reconciliation::{
    S327_DIRECT_SCHEDULER_ACCESS_SITES, S327_IMMUTABLE_READ_SITES,
    S327_SOURCE_MODEL_COVERED_WRITER_SITES, S327_WRITER_SITES,
};
use aselsan_microkernel_simulation::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s396_qemu_s136_stale_ack_writer_guard_integration::{
    S396_GUARDED_READ_SITES, S396_OPEN_PRODUCTION_WRITER_SITES,
    S396_PRODUCTION_GUARDED_WRITER_SITES, S396_TOTAL_WRITER_SITES,
};
use aselsan_microkernel_simulation::g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s397_whole_scheduler_writer_coverage_reconciliation::*;

fn pending() -> G8lS245WholeSchedulerExclusionAdmissionRequestState {
    let mut state = G8lS245WholeSchedulerExclusionAdmissionRequestState::new();
    assert_eq!(
        service_s245_exclusion_admission_request(&mut state, S245_SOURCE_CPU0, true, true),
        Ok(G8lS245ExclusionAdmissionRequestOutcome::RequestPublished(1))
    );
    state
}

fn module_source() -> &'static str {
    include_str!("../../kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s397_whole_scheduler_writer_coverage_reconciliation.rs")
}

fn kernel_main_source() -> &'static str {
    include_str!("../../kernel/src/main.rs")
}

fn exception_source() -> &'static str {
    include_str!("../../kernel/src/arch/aarch64/exceptions.rs")
}

fn simulation_lib_source() -> &'static str {
    include_str!("../src/lib.rs")
}

fn current_task_source() -> &'static str {
    include_str!("../../kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_current_task.rs")
}

fn scheduler_source() -> &'static str {
    include_str!("../../kernel/src/task/scheduler.rs")
}

fn capability_source() -> &'static str {
    include_str!("../../kernel/src/ui/capability.rs")
}

fn user_copy_source() -> &'static str {
    include_str!("../../kernel/src/user_copy.rs")
}

fn request_publication_source() -> &'static str {
    include_str!("../../kernel/src/g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_current_task_runtime_owned_request_publication.rs")
}

fn macro_sites(source: &str) -> (usize, usize) {
    let compact = source
        .chars()
        .filter(|character| !character.is_whitespace())
        .collect::<String>();
    let count = |needle: &str| {
        compact
            .match_indices(needle)
            .filter(|(offset, _)| {
                compact[*offset..]
                    .split(')')
                    .next()
                    .unwrap_or("")
                    .contains("SCHEDULER")
            })
            .count()
    };
    (count("addr_of!("), count("addr_of_mut!("))
}

fn production_sources() -> [&'static str; 5] {
    [
        current_task_source(),
        scheduler_source(),
        capability_source(),
        exception_source(),
        kernel_main_source(),
    ]
}

#[test]
fn constants_reconcile_all_sixty_nine_writers_without_promoting_later_gates() {
    assert_eq!(S397_SOURCE_AUDIT_UNITS, 7);
    assert_eq!(S397_MUTABLE_SOURCE_UNITS, 5);
    assert_eq!(S397_DIRECT_SCHEDULER_ACCESS_SITES, 113);
    assert_eq!(S397_SOURCE_IMMUTABLE_READ_SITES, 44);
    assert_eq!(S397_GUARDED_READ_SITES, 44);
    assert_eq!(S397_TOTAL_WRITER_SITES, 69);
    assert_eq!(S397_SOURCE_MODEL_COVERED_WRITER_SITES, 69);
    assert_eq!(S397_PRODUCTION_GUARDED_WRITER_SITES, 69);
    assert_eq!(S397_OPEN_PRODUCTION_WRITER_SITES, 0);
    assert_eq!(S397_DISTINCT_WRITER_GATE_MODULES, 69);
    assert_eq!(S397_PRODUCTION_WRITER_ACQUIRE_SITES, 74);
    assert_eq!(S397_PRODUCTION_PROVIDER_AUTHORITY_SITES, 0);
    assert_eq!(S397_PRODUCTION_ADMISSION_PUBLISHER_SITES, 0);
    assert_eq!(S397_SUPPORTED_PROFILE_RUNTIME_OBSERVATIONS, 0);
    assert!(S397_WRITER_COVERAGE_RECONCILIATION_COMPLETE);
    assert!(!S397_DIRECT_ACCESS_COVERAGE_RECONCILIATION_COMPLETE);
    assert!(!S397_PROVIDER_PREFLIGHT_COMPLETE);
    assert!(!S397_WHOLE_SCHEDULER_EXCLUSION_COMPLETE);
}

#[test]
fn predecessor_inventories_are_exactly_the_two_sides_of_reconciliation() {
    assert_eq!(
        S327_DIRECT_SCHEDULER_ACCESS_SITES,
        S397_DIRECT_SCHEDULER_ACCESS_SITES
    );
    assert_eq!(S327_IMMUTABLE_READ_SITES, S397_GUARDED_READ_SITES);
    assert_eq!(S327_WRITER_SITES, S397_TOTAL_WRITER_SITES);
    assert_eq!(
        S327_SOURCE_MODEL_COVERED_WRITER_SITES,
        S397_SOURCE_MODEL_COVERED_WRITER_SITES
    );
    assert_eq!(S396_GUARDED_READ_SITES, S397_GUARDED_READ_SITES);
    assert_eq!(S396_TOTAL_WRITER_SITES, S397_TOTAL_WRITER_SITES);
    assert_eq!(
        S396_PRODUCTION_GUARDED_WRITER_SITES,
        S397_PRODUCTION_GUARDED_WRITER_SITES
    );
    assert_eq!(
        S396_OPEN_PRODUCTION_WRITER_SITES,
        S397_OPEN_PRODUCTION_WRITER_SITES
    );
}

#[test]
fn canonical_ledger_reconciles_to_a_typed_receipt() {
    assert_eq!(
        reconcile_s397_writer_coverage(G8lS397WriterCoverageLedger::canonical()),
        Ok(G8lS397WriterCoverageReceipt {
            source_audit_units: 7,
            mutable_source_units: 5,
            source_model_covered_writer_sites: 69,
            production_guarded_writer_sites: 69,
            open_writer_sites: 0,
            distinct_writer_gate_modules: 69,
            production_writer_acquire_sites: 74,
        })
    );
}

#[test]
fn every_independent_ledger_dimension_fails_closed_on_drift() {
    let canonical = G8lS397WriterCoverageLedger::canonical();
    let drifts = [
        G8lS397WriterCoverageLedger {
            source_audit_units: 6,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            mutable_source_units: 4,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            direct_scheduler_access_sites: 112,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            guarded_read_sites: 43,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            total_writer_sites: 68,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            source_model_covered_writer_sites: 68,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            production_guarded_writer_sites: 68,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            open_writer_sites: 1,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            distinct_writer_gate_modules: 68,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            production_writer_acquire_sites: 73,
            ..canonical
        },
        G8lS397WriterCoverageLedger {
            scheduler_writer_sites: 28,
            ..canonical
        },
    ];
    for ledger in drifts {
        assert!(matches!(
            reconcile_s397_writer_coverage(ledger),
            Err(G8lS397WriterCoverageReconciliationError::InventoryDrift { .. })
        ));
    }
}

#[test]
fn idle_without_s245_request() {
    assert_eq!(
        preflight_s397_whole_scheduler_writer_coverage_reconciliation(S245_TARGET_CPU1, None),
        Ok(G8lS397WriterCoverageReconciliationOutcome::Idle)
    );
}

#[test]
fn pending_request_reports_reconciled_writers_and_preserves_s398_boundary() {
    let state = pending();
    let view = state.pending_view(S245_TARGET_CPU1).unwrap().unwrap();
    assert_eq!(
        preflight_s397_whole_scheduler_writer_coverage_reconciliation(
            S245_TARGET_CPU1,
            Some(view)
        ),
        Ok(
            G8lS397WriterCoverageReconciliationOutcome::WriterCoverageReconciledAwaitingDirectAccessReconciliation {
                request_id: 1,
                source_audit_units: 7,
                mutable_source_units: 5,
                guarded_read_sites: 44,
                source_model_covered_writer_sites: 69,
                production_guarded_writer_sites: 69,
                open_writer_sites: 0,
                distinct_writer_gate_modules: 69,
                production_writer_acquire_sites: 74,
            }
        )
    );
}

#[test]
fn preflight_never_consumes_the_s245_request() {
    let state = pending();
    let view = state.pending_view(S245_TARGET_CPU1).unwrap().unwrap();
    preflight_s397_whole_scheduler_writer_coverage_reconciliation(S245_TARGET_CPU1, Some(view))
        .unwrap();
    assert_eq!(state.pending_request_id(), Some(1));
}

#[test]
fn wrong_cpu_fails_closed_through_the_typed_s396_predecessor() {
    let state = pending();
    let view = state.pending_view(S245_TARGET_CPU1).unwrap().unwrap();
    assert!(matches!(
        preflight_s397_whole_scheduler_writer_coverage_reconciliation(S245_SOURCE_CPU0, Some(view)),
        Err(G8lS397WriterCoverageReconciliationError::S396(_))
    ));
}

#[test]
fn seven_source_units_still_total_forty_four_reads_and_sixty_nine_writers() {
    let units = [
        exception_source(),
        current_task_source(),
        request_publication_source(),
        kernel_main_source(),
        scheduler_source(),
        capability_source(),
        user_copy_source(),
    ];
    let total = units
        .into_iter()
        .map(macro_sites)
        .fold((0, 0), |(reads, writers), (unit_reads, unit_writers)| {
            (reads + unit_reads, writers + unit_writers)
        });
    assert_eq!(total, (44, 69));
}

#[test]
fn mutable_source_partition_is_exactly_one_twenty_nine_fourteen_eight_seventeen() {
    let counts = production_sources().map(|source| macro_sites(source).1);
    assert_eq!(counts, [1, 29, 14, 8, 17]);
    assert_eq!(counts.into_iter().sum::<usize>(), 69);
}

#[test]
fn two_read_only_audit_units_remain_writer_free() {
    assert_eq!(macro_sites(request_publication_source()).1, 0);
    assert_eq!(macro_sites(user_copy_source()).1, 0);
}

#[test]
fn all_sixty_nine_distinct_writer_gate_markers_are_present_in_production_sources() {
    let sources = production_sources();
    for sequence in 328..=396 {
        let marker = format!("acquire_s{sequence}_production_scheduler_writer_access");
        assert!(
            sources.iter().any(|source| source.contains(&marker)),
            "missing production membership marker {marker}"
        );
    }
}

#[test]
fn raw_acquire_count_records_five_context_switch_resume_handoffs_separately() {
    let count = production_sources()
        .into_iter()
        .map(|source| {
            source
                .matches("_production_scheduler_writer_access")
                .count()
        })
        .sum::<usize>();
    assert_eq!(count, 74);
}

#[test]
fn no_s397_writer_acquire_is_invented_by_a_reconciliation_gate() {
    for source in production_sources() {
        assert!(!source.contains("acquire_s397_production_scheduler_writer_access"));
    }
    assert!(!module_source().contains("acquire_s397_production_scheduler_writer_access"));
}

#[test]
fn all_writer_modules_and_the_reconciliation_module_are_registered_separately() {
    let kernel = kernel_main_source();
    let simulation = simulation_lib_source();
    for sequence in 328..=397 {
        let marker = format!("_s{sequence}_");
        assert!(kernel.contains(&marker), "kernel missing {marker}");
        assert!(simulation.contains(&marker), "simulation missing {marker}");
    }
    let name = "g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s397_whole_scheduler_writer_coverage_reconciliation";
    assert!(kernel.contains(&format!("mod {name};")));
    assert!(simulation.contains(&format!("pub mod {name};")));
}

#[test]
fn cpu1_service_is_ordered_after_s396_and_before_s242() {
    let source = exception_source();
    let s396 = source
        .find("service_s396_qemu_s136_stale_ack_writer_guard_integration_on_cpu1")
        .unwrap();
    let s397 = source
        .find("service_s397_whole_scheduler_writer_coverage_reconciliation_on_cpu1")
        .unwrap();
    let s242 = source[s397..]
        .find("service_s242_sender_runtime_callsite_request_on_cpu1")
        .map(|offset| offset + s397)
        .unwrap();
    assert!(s396 < s397 && s397 < s242);
}

#[test]
fn cpu1_service_only_inspects_and_never_takes_the_request() {
    let source = module_source();
    assert!(source.contains("inspect_s245_exclusion_admission_request_on_cpu1"));
    assert!(!source.contains("take_s245_exclusion_admission_request"));
    assert!(!source.contains("request_state.take("));
}

#[test]
fn reconciliation_source_cannot_mutate_scheduler_or_construct_provider_authority() {
    let source = module_source();
    for forbidden in [
        "addr_of_mut!(",
        "S247_PRODUCTION_WHOLE_SCHEDULER_ACCESS_GATE",
        "try_acquire_exclusive",
        "try_construct_s400",
        "publish_s244",
        "ProviderAuthority",
    ] {
        assert!(!source.contains(forbidden), "forbidden source: {forbidden}");
    }
}

#[test]
fn source_names_s397_as_reconciliation_and_s398_as_the_next_boundary() {
    let normalized = module_source()
        .replace("//!", " ")
        .split_whitespace()
        .collect::<Vec<_>>()
        .join(" ");
    assert!(normalized.contains("S397"));
    assert!(normalized.contains("writer-coverage reconciliation"));
    assert!(normalized.contains("S398 direct-access reconciliation remains open"));
}

#[test]
fn source_does_not_claim_provider_admission_runtime_or_physical_completion() {
    let source = module_source();
    assert!(source.contains("S397_PRODUCTION_PROVIDER_AUTHORITY_SITES: usize = 0"));
    assert!(source.contains("S397_PRODUCTION_ADMISSION_PUBLISHER_SITES: usize = 0"));
    assert!(source.contains("S397_SUPPORTED_PROFILE_RUNTIME_OBSERVATIONS: usize = 0"));
    assert!(source.contains("S397_WRITER_COVERAGE_RECONCILIATION_COMPLETE: bool = true"));
    assert!(source.contains("S397_DIRECT_ACCESS_COVERAGE_RECONCILIATION_COMPLETE: bool = false"));
    assert!(source.contains("S397_PROVIDER_PREFLIGHT_COMPLETE: bool = false"));
    assert!(source.contains("S397_WHOLE_SCHEDULER_EXCLUSION_COMPLETE: bool = false"));
}

#[test]
fn source_has_no_legacy_s335_s400_range_facade_dependency() {
    assert!(!module_source().contains("s335_s400"));
    assert!(!module_source().contains("S335_TO_S396_WRITER_STAGES"));
    assert!(!module_source().contains("writer_stage("));
}

#[test]
fn production_service_uses_exact_rpi5_aarch64_cfg() {
    let source = module_source();
    assert!(source.contains("target_arch = \"aarch64\""));
    assert!(source.contains("target_os = \"none\""));
    assert!(source.contains("feature = \"board-rpi5\""));
    assert!(source.contains("crate::percpu::try_current_cpu_id()"));
}

#[test]
fn s397_registers_the_exact_s398_through_s402_successor_chain() {
    let kernel = kernel_main_source();
    let simulation = simulation_lib_source();
    let s398 = "g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s398_whole_scheduler_direct_access_coverage_reconciliation";
    assert!(kernel.contains(&format!("mod {s398};")));
    assert!(simulation.contains(&format!("pub mod {s398};")));
    let s399 = "g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s399_whole_scheduler_provider_preflight";
    assert!(kernel.contains(&format!("mod {s399};")));
    assert!(simulation.contains(&format!("pub mod {s399};")));
    let s400 = "g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s400_whole_scheduler_provider_authority_constructor";
    assert!(kernel.contains(&format!("mod {s400};")));
    assert!(simulation.contains(&format!("pub mod {s400};")));
    let s401 = "g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s401_provider_authority_timer_callsite";
    assert!(kernel.contains(&format!("mod {s401};")));
    assert!(simulation.contains(&format!("pub mod {s401};")));
    let s402 = "g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s402_provider_invocation_observation_publication";
    assert!(kernel.contains(&format!("mod {s402};")));
    assert!(simulation.contains(&format!("pub mod {s402};")));
}
snippet sha256: ab18d2f957dbfile sha256: ab18d2f957db
03 · Kapı kimlik kaydı

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

tam Operations kaydıL5328–L5560
website/src/lib/operations.ts::g8l-s397-whole-scheduler-writer-coverage-reconciliation-partial
  {
    id: "g8l-s397-whole-scheduler-writer-coverage-reconciliation-partial",
    date: "2026-08-29",
    sequence: 397,
    status: "passed",
    umbrella_status: "partial",
    title: "S397 · Whole-scheduler writer coverage reconciliation",
    summary:
      "S397 yeni bir scheduler writer eklemez; S327'nin yedi source-audit unit, beş mutable unit, 44 immutable read ve 69 mutable alias envanteri ile S396'nın aynı statik S247 state word üzerinde 69/69 production writer guarded ve 0 open sonucunu ayrı typed ledger/receipt üzerinden uzlaştırır. Mutable partition 1 current-task + 29 scheduler + 14 capability + 8 exception + 17 main = 69 olarak korunur. S328–S396 aralığındaki 69 sequence'in her biri gerçek production kaynaklarında distinct acquire marker taşır; ham acquire sayısı beş blocking IPC resume handoff'u nedeniyle 74'tür fakat yeni writer veya gate kimliği oluşmaz. S397 CPU1 service'i S396'dan sonra, S242'den önce çalışır; S245 request'i yalnız inspect eder, take etmez. S397 S247 acquire etmez, mutable scheduler aliası kurmaz, S244 admission yayımlamaz ve provider authority oluşturmaz. Writer-coverage reconciliation=true olurken 113 direct-access reconciliation=false, provider preflight=false ve whole-scheduler exclusion=false kalır. S398 ayrı direct-access reconciliation kapısıdır; S399 ve S400 öne çekilmez. Supported-profile runtime observation=0 ve physical/device operations=0'dır.",
    evidence: [
      "Canonical S397 focused target, ayrı S397 module source ve simulation export yokken unresolved S397 import ile compile RED verdi.",
      "İlk focused RED exit 101 ile missing include_str source file ve unresolved S397 simulation import'unu birlikte gösterdi.",
      "S396'nın 69/69 writer membership sonucu S397 reconciliation yerine otomatik PASS sayılmadı.",
      "Ayrı S397 kernel source unit, ayrı simulation export ve ayrı CPU1 inspection service eklendikten sonra focused sonuç 23/23 PASS oldu.",
      "Focused final koşuda unused-import warning kalmadı ve hiçbir assertion ignored veya filtered yapılmadı.",
      "S397 reconciliation module 11774 B / 8bfb45c3381701c8bab8585831a23225c550928ca848d187109ed416d8c71dde SHA-256'dır.",
      "S397 focused test source 15582 B / e0bb094ca1d52205bd0e9f6656b9b060951ebc8a9b3ce2186842dc9901f6e1ed SHA-256'dır.",
      "G8lS397WriterCoverageLedger canonical source, read, writer, gate ve acquire boyutlarını typed alanlarla taşır.",
      "G8lS397WriterCoverageReceipt yalnız bütün boyutlar exact canonical değerlerle eşleştiğinde üretilir.",
      "Source audit unit drift 7→6 ayrı InventoryDrift sonucu verir.",
      "Mutable source unit drift 5→4 ayrı InventoryDrift sonucu verir.",
      "Direct access drift 113→112 ayrı InventoryDrift sonucu verir.",
      "Guarded read drift 44→43 ayrı InventoryDrift sonucu verir.",
      "Total writer drift 69→68 ayrı InventoryDrift sonucu verir.",
      "Source/model covered writer drift 69→68 ayrı InventoryDrift sonucu verir.",
      "Production guarded writer drift 69→68 ayrı InventoryDrift sonucu verir.",
      "Open writer drift 0→1 ayrı InventoryDrift sonucu verir.",
      "Distinct writer-gate drift 69→68 ayrı InventoryDrift sonucu verir.",
      "Raw acquire drift 74→73 ayrı InventoryDrift sonucu verir.",
      "Source partition drift scheduler 29→28 ayrı InventoryDrift sonucu verir.",
      "Ledger ayrıca direct accesses == guarded reads + total writers, source/model == total, production guarded == total ve partition sum == total invariantlarını doğrular.",
      "S327_DIRECT_SCHEDULER_ACCESS_SITES=113 exact S397 direct-access carry-forward değeridir.",
      "S327 immutable read envanteri 44 ve S396 production guarded reader sonucu 44 exact eşleşir.",
      "S327 writer inventory 69 ve S396 total writer sonucu 69 exact eşleşir.",
      "S327 source/model-covered writer 69 ve S397 reconciled source side 69 exact eşleşir.",
      "S396 production-guarded writer 69 ve S397 reconciled production side 69 exact eşleşir.",
      "S396 open writer 0 ve S397 reconciled open side 0 exact eşleşir.",
      "Yedi live source unit tekrar tarandığında toplam 44 addr_of scheduler read ve 69 addr_of_mut scheduler writer bulunur.",
      "İki audit-only kaynak — runtime-owned request publication ve user_copy — writer-free kalır.",
      "Beş mutable kaynak partition'ı current-task/scheduler/capability/exceptions/main için exact 1/29/14/8/17'dir.",
      "Beş partition toplamı 69'dur; herhangi bir kaynak birimindeki tek-site drift focused testi kırar.",
      "S328'den S396'ya kadar her sequence için acquire_s{sequence}_production_scheduler_writer_access marker'ı gerçek production sources içinde bulunur.",
      "Distinct marker sayısı 69'dur; sequence table veya generic writer_stage dispatcher kabul edilmez.",
      "Raw production acquire occurrence toplamı 74'tür.",
      "74 ile 69 arasındaki beş fark S373, S374, S377, S378 ve S379 context-switch resume lease handoff'larından gelir.",
      "Resume handoff'ları yeni mutable alias veya yeni writer inventory site üretmez.",
      "S397 kaynak veya production source içinde acquire_s397_production_scheduler_writer_access yoktur; reconciliation kendi writer'ını icat etmez.",
      "S397 source addr_of_mut!, try_acquire_exclusive veya S247 production static gate sembolü içermez.",
      "S397 source request_state.take, take_s245_exclusion_admission_request veya publish_s244 içermez.",
      "S397 source try_construct_s400 veya provider-constructor sembolü içermez.",
      "Pending S245 request view S397 preflight sonrasında aynı request id ile state içinde kalır.",
      "Wrong CPU çağrısı typed S396 predecessor zinciri üzerinden fail-closed sonuç verir.",
      "No-request durumunda S397 preflight Idle döndürür ve reconciliation sonucu uydurmaz.",
      "Pending request sonucu WriterCoverageReconciledAwaitingDirectAccessReconciliation adıyla S398 sınırını açık taşır.",
      "Outcome request id 1, 7/5 source units, 44 reads, 69 source/model, 69 production, 0 open, 69 gate ve 74 acquire değerlerini birlikte taşır.",
      "Kernel main ve simulation lib S397 uzun modül adını ayrı mod kayıtlarıyla yayımlar.",
      "CPU1 timer service sırası service_s396... < service_s397... < service_s242... olarak sabitlenmiştir.",
      "CPU1 service gerçek percpu kimliğini doğrular ve yalnız inspect_s245_exclusion_admission_request_on_cpu1 çağırır.",
      "Production service exact target_arch=aarch64 + target_os=none + board-rpi5 cfg'si altındadır.",
      "S397 source eski s335_s400 range facade, S335_TO_S396_WRITER_STAGES veya writer_stage çağrısı içermez.",
      "S397 canonical ledger 7 source unit, 5 mutable unit, 113 direct access, 44 source read, 44 guarded read, 69 total writer, 69 source/model writer, 69 production writer, 0 open writer, 69 distinct gate ve 74 raw acquire alanlarını tek receipt öncesinde taşır.",
      "Reconciliation exact 113 == 44 + 69 direct-access partition eşitliğini kendi başına doğrular; predecessor sabitlerini yalnız kopyalayıp PASS üretmez.",
      "Reconciliation source/model-covered writer == total writer ve production-guarded writer == total writer eşitliklerini birbirinden bağımsız doğrular.",
      "Reconciliation current-task + scheduler + capability + exception + main partition toplamının exact total writer 69 olmasını ayrıca doğrular.",
      "G8lS397WriterCoverageReconciliationError InventoryDrift dışında S396 typed predecessor hatasını ayrı S396 variant'ında korur.",
      "WriterCoverageReconciledAwaitingDirectAccessReconciliation outcome'u request_id yanında bütün 11 reconciliation ölçüsünü typed alanlarda dışarı verir.",
      "Focused constants_reconcile_all_sixty_nine_writers_without_promoting_later_gates testi true/false completion bayraklarını ve provider/admission/runtime sıfırlarını birlikte kilitler.",
      "Focused predecessor_inventories_are_exactly_the_two_sides_of_reconciliation testi S327 kaynak yüzeyi ile S396 production yüzeyini aynı sayı çıktı diye tek kaynağa indirgemez.",
      "Focused every_independent_ledger_dimension_fails_closed_on_drift testi 11 bağımsız boyutun her birinde tek-adımlık sapmayı ayrı çağrıyla RED'e çevirir.",
      "Focused pending_request_reports_reconciled_writers_and_preserves_s398_boundary testi success outcome içindeki request id ve tüm reconciliation alanlarını exact doğrular.",
      "Focused seven_source_units_still_total_forty_four_reads_and_sixty_nine_writers testi live include_str kaynaklarını yeniden tarar; sabit tabloyu envanter yerine geçirmez.",
      "Focused all_sixty_nine_distinct_writer_gate_markers_are_present_in_production_sources testi S328–S396 marker aralığında missing veya duplicate sequence'i reddeder.",
      "Focused raw_acquire_count_records_five_context_switch_resume_handoffs_separately testi 74 raw occurrence ile 69 distinct membership arasındaki farkı isimlendirilmiş beş resume handoff'una bağlar.",
      "Focused reconciliation_source_cannot_mutate_scheduler_or_construct_provider_authority testi addr_of_mut, exclusive acquire, request take, S244 publish ve S400 constructor sembollerini birlikte reddeder.",
      "Focused s397_does_not_publish_s398_s399_or_s400_modules_early testi kernel main ve simulation lib içinde ilerideki modül kimliklerinin yokluğunu exact doğrular.",
      "Board-qemu build logu 110081 B / ba233ddf8be0f55203eb9d78d5d52780691a35b91143b328a79317a6472b79ee SHA-256 ve 293 warning header taşıdı; zero-warning iddiası yoktur.",
      "Board-rpi4 build logu 148593 B / 5f37fee788803f51b2d7be3c05f8fd1ccd28690464e37fcf936152cd6c14b48b SHA-256 ve 391 warning header taşıdı.",
      "Board-rpi5 build logu 673572 B / 467db98013519f9143e3557d10f2e978e647c0fb51a4115f4b9fd4d5c26ee833 SHA-256 ve 1564 warning header taşıdı.",
      "Board-rpi5+smp build logu 673514 B / 47e0b90f695df497ebfc335203146b3d4b5bd7986295a00e74afeb0906ee070b SHA-256 ve 1564 warning header taşıdı.",
      "QEMU acceptance S136 stale rejection ve exact EL0 ACK transportunu ortak ürün senaryosunda yeniden geçirir; S397 inspection service board-rpi5 cfg'sinde kaldığı için bu sonuç yalnız regresyon kanıtıdır.",
      "Dependency normalization yalnız elapsed timing suffix'lerini kaldırır; target sırası, test isimleri, pass sayıları ve status alanları kanonik özdeşliğin parçası kalır.",
      "S397 Code publication sözleşmesi modül ve focused testin parça kesiti yerine complete-file boundary ile gösterilmesini ister; kullanıcı her kapının test ettiği gerçek kodu görebilir.",
      "S397_WRITER_COVERAGE_RECONCILIATION_COMPLETE=true yalnız writer kapsamı sonucudur.",
      "S397_DIRECT_ACCESS_COVERAGE_RECONCILIATION_COMPLETE=false S398'i ayrı gate olarak korur.",
      "S397_PROVIDER_PREFLIGHT_COMPLETE=false S399'u ayrı gate olarak korur.",
      "S397_PRODUCTION_PROVIDER_AUTHORITY_SITES=0 ve S397_PRODUCTION_ADMISSION_PUBLISHER_SITES=0'dır.",
      "S397_WHOLE_SCHEDULER_EXCLUSION_COMPLETE=false sonucu 69/69 writer reconciliation'dan türetilmez.",
      "Selected regression S397 23/23, S396 50/50, S327 15/15 ve tarihsel dosya adı S246 olan S247 gate 14/14 ile 4 grup / 102/102 PASS verdi.",
      "Seçili regresyonda ilk orchestration denemesi tarihsel S247 test target'ını yanlış s247 filename ile çağırdığı için exit 101 verdi; bu ürün veya coverage RED'i değildir.",
      "Yanlış target çağrısından önce S397/S396/S327 toplam 88/88 geçmişti; doğru s246 target daha sonra 14/14 PASS verdi.",
      "S396'nın exact 160-target dependency listesi byte-for-byte korunup yalnız S397 sona eklendi.",
      "İki S238–S397 dependency koşusunun her biri 161 grup / 4173/4173 PASS verdi.",
      "Dependency run1 388415 B / e391ee450602287903770181657d12096c87c591892b34f409f3496a08d76a81 SHA-256'dır.",
      "Dependency run2 372244 B / a33178cd7951f8350a798ada4a203bb132c02a5e8958c27be3a879aa53264af8 SHA-256'dır.",
      "Yalnız elapsed timing suffix'leri normalize edilen 15616 B özetler b52fa9fcd4a3c241071bb992b75abcecbb488fb805130b5f99496ff4afa8290a ile byte-exact eşittir.",
      "Dependency artifact root /tmp/aselsanos-s397-dependency.NNpSP5'tir.",
      "Filtered serial workspace 360 result group / 6058 PASS / 0 fail / 7 exact historical filtered verdi.",
      "Filtered workspace raw 75862 B / 42cec9ab2db821038bf130dac74eb7c119d4d82afaa78e8a757117b8a81a5523 SHA-256'dır.",
      "Filtresiz workspace exit 101 ile yalnız frozen S96 wiring_does_not_mutate_timer_gic_boot_or_expand_runtime_scope assertion'ında RED kaldı.",
      "Filtresiz frozen S96 sınırı 313 completed result group / 5803 PASS / 1 failed group verdi; global workspace GREEN iddia edilmez.",
      "Filtresiz raw log 71084 B / f2dde5aa298861394bb2a9c7d5d383438f2975c68c79fdeac39481a55bb83495 SHA-256'dır.",
      "Workspace artifact root /tmp/aselsanos-s397-workspace.erNrPd'dir.",
      "Dört fresh isolated AArch64 profile qemu/rpi4/rpi5/rpi5+smp için 4/4 exit 0 verdi.",
      "Profile warning header sayıları 293/391/1564/1564'tür; zero-warning claim yapılmaz.",
      "QEMU ELF 12222344 B / 2a51245cbebc29f914f173368fe124c7e26e687446d60d18cc78b7d9d31d9dbe SHA-256'dır.",
      "RPi4 ELF 7421792 B / aca33b3eea4a1216cfc27e7742562ccdd954a7dc334ab7106f7b1f18dffcf08b SHA-256'dır.",
      "RPi5 ELF 11397080 B / fb67e5b1b257dbdfd38b4e6f6d9e5c7872b5ee0b6585316e0cdb29a06e6053fa SHA-256'dır.",
      "RPi5+SMP ELF 11374456 B / ddc534e409b1e1297adc6f849822139b7c06aa7347b0748612d2e086f0991e86 SHA-256'dır.",
      "Profile artifact root /tmp/aselsanos-s397-profiles.ygxhqf'tir.",
      "make verify-qemu exit 0 ve 114881 B / a740f4c7bbf7fa3b431daa68704d4632f94cea7568c1745fde00d1e718522412 SHA-256 log verdi.",
      "QEMU strict ELF W^X 31/31, S130–S154+S271, S136 transport, IPC reply 20/20 ve scheduler SEC5 PASS verdi.",
      "Board-qemu ortak regresyonu RPi5-only S397 inspection service runtime observation'ı değildir.",
      "cargo fmt --all -- --check, JSON parse, status renderer check ve git diff --check temizdir.",
      "S397 status manifest kaydı focused, dependency, workspace, profile, QEMU, model ve fiziksel sınırları ayrı alanlarda taşır.",
      "S397 proof docs/M8.1-RPi5-G8l-S397-Whole-Scheduler-Writer-Coverage-Reconciliation-Proof.md altında ayrı dosyadır.",
      "Pre-publication hedefi S1–S397 397/397 unique Code kartı ve S1–S327 327/327 tekil tarihsel kapsamdür.",
      "S1, S327, S328, S396 ve S397 exact birer kart; missing=none, duplicate=0 ve S398=0 olmalıdır.",
      "S397 Code kartı ayrı reconciliation module, focused target, proof ve complete Operations record kaynaklarını göstermelidir.",
      "S397 bir writer-guard kartı olarak yanlış etiketlenmemeli; focused reconciliation implementation olarak yayımlanmalıdır.",
      "İlk production publication öncesi generated Code registry S1–S397 aralığında 397/397 unique gate, 1155 exact excerpt, pre-S328 327/327, missing=none ve duplicate=0 verdi.",
      "İlk registry mapping 69 writer-guard + 226 focused-test + 94 command-contract + 8 operation-record = 397'dir.",
      "İlk generated JSON 9138402 B / c79a73d91eaa60e30f7e1effe68f44d639ea762d1d60af50a8c34e025b1a5d83 dosya SHA-256 ve 90676c202bfb4342013c8ee53a916062a8f315ddb935e1af34a5c1b23a78894c registry SHA-256 taşıdı.",
      "S397 Code kartı complete-file reconciliation implementation, complete-file 23-test target ve complete Operations record olmak üzere üç exact excerpt yayımlar; sourceBound/testBound/implementationSequenceBound=true'dur.",
      "İlk website kabulü 727/727 PASS, lint PASS, boş çıktılı TypeScript exit 0 ve 24/24 static page verdi.",
      "İlk export 200 dosyadır; Timeline ve yol-haritasi ayrı ayrı 236 data-gate-policy kartı taşır.",
      "İlk yayın öncesi S397 core policy 14687 karakter / 15187 UTF-8 byte, 112 evidence, 3 teknik terminal session ve 10 limitation ile S396 yoğunluk tabanının yüzde 84'ünün üstündedir.",
      "İlk production/main deployment 8d856830-f4e1-4b8f-8e9c-9b676d55ffee ile https://8d856830.aselsan-microkernel.pages.dev adresine 115 upload + 84 existing = 199 asset ve _headers yayımladı.",
      "Wrangler production deployment-list kaydı 9509 B / 59eb0b094aa29b120519b591da0001ead75c421224debdfe95a9658169e0f396 SHA-256'dır.",
      "Cache-busted custom-domain /code/ 25517931 B / f888d06409c9eec047dd43a009f40af10b02ac301a8ecbc646b29e97003be2fb SHA-256 ile HTTP 200 ve deployment out'una raw byte-exact=true verdi.",
      "Cache-busted custom-domain /operations/ 15940249 B / a73557728175f77f11311f68d8457fe32a4e5b309e8312078e1581e5bd235cc7 SHA-256 ile HTTP 200 ve raw byte-exact=true verdi.",
      "Cache-busted custom-domain /timeline/ 6768138 B / 4e47f16ec152c4b0bf6bfdfa7e9357e83aa26058213a08ec7dd46049ddbef4e1 SHA-256 ile HTTP 200 ve raw byte-exact=true verdi.",
      "Cache-busted custom-domain /yol-haritasi/ 6767886 B / e5f8ef715ca03dee99cea8a2f9843a2a88c49273b4bfa6252675a2fc64fe93aa SHA-256 ile HTTP 200 ve raw byte-exact=true verdi.",
      "Canlı Code literal gate labels total=397, unique=397, pre-S328=327, S1/S327/S328/S396/S397 exact birer ve S398=0'dır.",
      "Canlı /code/ yanıtı Cache-Control no-transform ve X-Content-Type-Options nosniff taşır; Cloudflare email rewrite marker sayısı 0'dır.",
      "İlk custom-domain readback artifact root /tmp/aselsanos-s397-readback-initial.KEowly'dir.",
      "Immutable 8d856830 hostname probe'u curl exit 28 / HTTP 000 timeout verdi ve custom-domain byte-exact PASS yerine geçirilmedi.",
      "S397 için güç, SD kart, Mac kart erişimi, UART capture, raw validation, archive veya promotion yapılmadı: physical/device operations=0.",
      "RUNBOOK_EXECUTED_IN_S397=NO; fiziksel RPi5 runtime veya device acceptance iddiası yoktur.",
      "Bağlayıcı olmayan S397 projeksiyonu R1 S397–S427, R2 S452–S502, R3 S581+, risk aralığı S557–S607 ve merkez yaklaşık S582'dir.",
    ],
    commands: [
      "CARGO_INCREMENTAL=0 cargo test -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s397_whole_scheduler_writer_coverage_reconciliation -- --test-threads=1",
      "run S397, S396, S327 and historical-filename S247 shared-gate target serially",
      "run S238-S397 dependency list twice and normalize timing fields",
      "run filtered and unfiltered serial workspace audits",
      "run four fresh isolated AArch64 profile builds",
      "CARGO_INCREMENTAL=0 make verify-qemu",
      "npm run code:generate && npm test && npm run lint && npx tsc --noEmit && npm run build",
      "npm run deploy and cache-busted custom-domain byte comparison",
    ],
    terminalSessions: [
      {
        id: "g8l-s397-focused-source-contract",
        title: "S397 focused whole-scheduler writer reconciliation",
        commandLines: [
          "CARGO_INCREMENTAL=0 cargo test -p aselsan_microkernel_simulation --test g8l_target_dispatch_scheduler_owner_scheduler_mutation_production_migration_lifecycle_s397_whole_scheduler_writer_coverage_reconciliation -- --test-threads=1",
        ],
        outputLines: [
          "initial result: compile RED; S397 source and simulation export absent",
          "final result: ok; 23 passed; 0 failed",
          "source/model/production/open writers: 69/69/0; distinct gates=69; raw acquires=74",
          "S398 direct access, S399 provider preflight and S400 constructor remain open",
        ],
        exitCode: 0,
        outputMode: "complete",
      },
      {
        id: "g8l-s397-selected-regression",
        title: "S397/S396/S327/S247 selected reconciliation regression",
        commandLines: [
          "run S397, S396, S327 and historical-filename S247 shared-gate target serially",
        ],
        outputLines: [
          "corrected final result: 4 groups / 102 passed / 0 failed",
          "initial orchestration exit 101 was only the S247-versus-S246 target filename error",
          "S327 source inventory and S396 production membership remain independent inputs",
        ],
        exitCode: 0,
        outputMode: "complete",
      },
      {
        id: "g8l-s397-full-acceptance",
        title: "S397 dependency, workspace, profiles and QEMU acceptance",
        commandLines: [
          "run S238-S397 dependency list twice and normalize timing fields",
          "run filtered and unfiltered serial workspace audits",
          "run four fresh isolated AArch64 profile builds",
          "CARGO_INCREMENTAL=0 make verify-qemu",
        ],
        outputLines: [
          "dependency: 161 groups / 4173/4173 twice; normalized summaries byte-equal",
          "filtered workspace: 360 groups / 6058 PASS / 7 filtered; unfiltered frozen-S96 remains RED",
          "four profiles: 4/4 exit 0; warning/log/ELF identities recorded separately",
          "QEMU W^X 31/31 + S130-S154 + S136 + IPC 20/20 + SEC5 PASS; not an S397 runtime observation",
        ],
        exitCode: 0,
        outputMode: "complete",
      },
      {
        id: "g8l-s397-production-publication",
        title: "S397 Operations/Timeline/Code production publication",
        commandLines: [
          "npm test && npm run lint && npx tsc --noEmit && npm run build",
          "npm run deploy",
          "cache-busted curl + cmp for /code/, /operations/, /timeline/ and /yol-haritasi/",
        ],
        outputLines: [
          "website tests 727/727 PASS; lint PASS; TypeScript exit 0 with empty output; static routes 24/24",
          "registry S1-S397: 397/397 gates; 1155 exact excerpts; S1-S327 327/327; missing=0; duplicate=0",
          "deployment 8d856830-f4e1-4b8f-8e9c-9b676d55ffee; 115 upload + 84 existing = 199 assets",
          "custom-domain code/operations/timeline/yol-haritasi HTTP 200 and byte-exact=true; email rewrite=0; no-transform/nosniff",
          "live Code total=397, unique=397, pre-S328=327, S397=1 and S398=0",
          "immutable hostname curl exit 28 / HTTP 000; custom-domain PASS not substituted",
        ],
        exitCode: 0,
        outputMode: "complete",
      },
    ],
    terminalSessionsNote:
      "TAM ÇIKTI oturumları compile RED→23/23 focused geçişini, düzeltilmiş 102/102 seçili regresyonu, iki kez 4173/4173 dependency tekrarını, filtered/unfiltered workspace ayrımını, dört fresh profili, QEMU kabulünü ve production publication/readback'i karıştırmadan taşır. S397 yalnız writer-coverage reconciliation'dır; S398 direct-access, S399 provider preflight ve S400 constructor ayrı kapılardır.",
    limitations: [
      "S398 direct scheduler access reconciliation açık kalır.",
      "S399 provider preflight ve S400 provider-authority constructor açık kalır.",
      "S397 S247 acquire etmez, yeni writer eklemez veya scheduler mutation yapmaz.",
      "S397 S245 request'i tüketmez ve S244 admission yayımlamaz.",
      "Whole-scheduler exclusion false kalır.",
      "CPU1 service inspection/preflight-only'dir.",
      "Supported-profile runtime observation=0'dır.",
      "QEMU PASS fiziksel RPi5 S397 observation kanıtı değildir.",
      "Filtresiz workspace frozen S96'da RED kalır; global GREEN iddia edilmez.",
      "Physical/device operations=0 ve RUNBOOK_EXECUTED_IN_S397=NO'dur.",
    ],
  },
snippet sha256: 0b122d5cd9a2file 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_s397_whole_scheduler_writer_coverage_reconciliation -- --test-threads=1
proof: docs/M8.1-RPi5-G8l-S397-Whole-Scheduler-Writer-Coverage-Reconciliation-Proof.md
Registry schema v5 · generator website/scripts/generate-code-gates.mjs · Tam SHA-256: 91d38c7b6222f0b4c117be786454853543da55a160e543d9b951057cc20dcc06