Repository navigation
build(workspace): extract sefer-policy and sefer-platform (P1.3, P1.4, P1.6) and give ghost-zero-cost an extraction mode - #257
Open
PHPCraftdream wants to merge 13 commits into
Open
PHPCraftdream wants to merge 13 commits into
PHPCraftdream wants to merge 13 commits into
Conversation
… crate (plan step P1.3) Move the pure policy and configuration code of src/alloc_core/config (large cache config and mode, medium promotion, the small-segment pool config, and policy/: profile, small and large cache policy, large_thp, large_thp_observation, large_thp_runtime with its cadence, learning, tuple and budget-ledger cells) into the new path-dependency crate crates/core/sefer-policy. What stays in the root is continuation_bounds and the segment geometry: they move together with sefer-segment at plan step P2. The root keeps every `crate::alloc_core::config::...` path and the whole public API through thin re-exports in src/alloc_core/config/mod.rs. 120 items became `pub` at the crate boundary (pub(crate) or private before); none of them depends on a raw pointer (raw_pointer_items is 0). The itemised list is in docs/perf/P1_3_visibility_widening.json, produced by scripts/policy_visibility_report.mjs and described in docs/perf/P1_3_SEFER_POLICY_EXTRACTION.md. The moved files differ from their originals only by: crate-path rewrites of `crate::alloc_core::config::…` imports to the sefer-policy crate root (and the rustfmt re-flow of a few statements those rewrites shortened), the visibility widening listed in the report, comment-only edits (root-crate intra-doc links demoted to plain code spans), `#[macro_export]` on the two medium_promotion macros, and the additions listed below. No `#[inline]` was added to any existing accessor. Deviations from a pure move. First, three `impl Default` blocks were added (ThpCadenceCell, ThpLearningCell, ThpTupleCell) so clippy::new_without_default stays quiet now that the constructors are public across the crate boundary. Second, a new additive `LargeThpRequestGroup::index()` (#[inline], exhaustive match with no wildcard) replaces the two matches over the enum in the root crate (advise_fresh_large.rs and observe_large_control.rs) and the duplicate group_index mapping inside sefer-policy; the values and all subsequent arithmetic are unchanged. `#[non_exhaustive]` on LargeThpRequestGroup is PRESERVED, so the public type sefer_alloc::LargeThpRequestGroup (re-exported from src/lib.rs under alloc-core and alloc-decommit) keeps its contract: adding a variant stays non-breaking and downstream matches still need a wildcard arm. The new test crates/core/sefer-policy/tests/large_thp_request_group_index.rs asserts the index values at every bucket boundary. The dependency is optional under alloc-core, so the default build pulls in neither sefer-policy nor aligned-vmem. The feature mesh forwards weakly (`sefer-policy?/x`), so enabling a root feature never activates the optional crate on its own. Five lock files are updated for the new path dependency: Cargo.lock, fuzz/Cargo.lock, and the compile_fail fixtures tests/compile_fail/r2_01_segment_bases_outlives_owner/Cargo.lock, tests/compile_fail/r6_t38_public_tail_private/Cargo.lock and tests/compile_fail/route_publication_requires_unsafe/Cargo.lock. Behavior, versions and features are unchanged. The loom and J13b targets under tests/ are rewired to the new file locations through their #[path] attributes, and the ghost catalog (39 changed rules, 42 changed path-entry strings) follows the new paths. CI: full Invariant-Check: thp-learning/diagnostic-load-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-learning/diagnostic-load-inventory (ThpRuntime::learning_telemetry): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P27 still holds, as the entry states: I6: exactly one independent Relaxed load for each applied and dropped counter; these diagnostics are not a coherent whole-array snapshot or estimator input (guarded terms: applied, dropped, Relaxed, independent) Covered-by: fixture:tests/ghost_lint_fixtures/p27_diagnostic_load_inventory, tests/j13b_learning_runtime.rs, tests/j13b_control_concurrent_ordinal.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-learning/update-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_learning_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-learning/update-inventory (ThpLearningCell::try_observe_with_prior): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P27 still holds, as the entry states: I2/I4: one load and one syntactic strong CAS site operate on the packed pair in the single update loop, and the prior estimate is derived from the predecessor pair that CAS replaced (a second load or snapshot would add an ordered site); no external publication (guarded terms: packed pair, Relaxed, compare_exchange, predecessor) Covered-by: fixture:tests/ghost_lint_fixtures/p27_update_inventory, tests/loom_thp_learning_cell.rs, tests/j13b_learning_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs Invariant-Check: thp-learning/snapshot-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_learning_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-learning/snapshot-inventory (ThpLearningCell::snapshot): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P27 still holds, as the entry states: I1/I4: snapshot obtains both components from one Relaxed load of the packed pair (guarded terms: snapshot, packed pair, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p27_snapshot_inventory, tests/loom_thp_learning_cell.rs, tests/j13b_learning_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs Invariant-Check: thp-learning/update-bounded Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_learning_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-learning/update-bounded (ThpLearningCell::try_observe_with_prior): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P27 still holds, as the entry states: I3: the CAS is dominated by attempts < MAX_ATTEMPTS; forced rejection terminates after eight attempts (guarded terms: bounded, attempts, MAX_ATTEMPTS) Covered-by: fixture:tests/ghost_lint_fixtures/p27_update_bounded, tests/loom_thp_learning_cell.rs, tests/j13b_learning_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs Invariant-Check: thp-learning/cas-after-observe Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_learning_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-learning/cas-after-observe (ThpLearningCell::try_observe_with_prior): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P27 still holds, as the entry states: I2: the CAS expects the observed current pair, so a competing update cannot be overwritten blindly (guarded terms: observed, current, compare_exchange) Covered-by: fixture:tests/ghost_lint_fixtures/p27_cas_after_observe, tests/loom_thp_learning_cell.rs, tests/j13b_learning_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_learning_cell.rs Invariant-Check: thp-cell/claim-cas Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/claim-cas (ThpTupleCell::publish): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I1: the single winner is elected by one strong CAS UNSET to PUBLISHING with AcqRel/Acquire; a weaker CAS or a second CAS breaks the single-winner election (guarded terms: claim, compare_exchange, AcqRel, single winner) Covered-by: fixture:tests/ghost_lint_fixtures/p24_claim_cas, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/published-release Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/published-release (ThpTupleCell::publish): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I2: the PUBLISHED state store is the only Release store of the cell; it publishes the five Relaxed word stores to an Acquire reader, and no other state store may exist in publish (guarded terms: PUBLISHED, Release, store, publish) Covered-by: fixture:tests/ghost_lint_fixtures/p24_published_release, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/word-stores-relaxed Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/word-stores-relaxed (ThpTupleCell::publish): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I2: exactly five Relaxed word stores precede the Release store; Release on a word would be dead weight and a missing word would publish a torn tuple (guarded terms: five words, Relaxed, store, publish) Covered-by: fixture:tests/ghost_lint_fixtures/p24_word_stores_relaxed, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/words-before-published Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/words-before-published (ThpTupleCell::publish): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I2: the last word store precedes the PUBLISHED Release store in publish; a word stored after PUBLISHED would be seen torn by a reader that already observed PUBLISHED (guarded terms: words, PUBLISHED, before, last word) Covered-by: fixture:tests/ghost_lint_fixtures/p24_words_before_published, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/claim-before-words Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/claim-before-words (ThpTupleCell::publish): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I1/I3: every word store follows the claiming CAS, so only the single winner ever writes words and a loser cannot overwrite a published tuple (guarded terms: claim, words, before, winner) Covered-by: fixture:tests/ghost_lint_fixtures/p24_claim_before_words, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/words-sole-writer Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/words-sole-writer: the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I3: the word array is stored only inside publish (after the claiming CAS); a store anywhere else, such as the reader or the word loader, writes words after PUBLISHED (guarded terms: words, publish, never written, write-once) Covered-by: fixture:tests/ghost_lint_fixtures/p24_words_sole_writer, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/publish-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/publish-inventory (ThpTupleCell::publish): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I4: the ordered operations of publish are exactly one claiming CAS, five Relaxed word stores and one Release store; any other atomic access (a spin on the state, a weak CAS retry) is a wait in the loser path (guarded terms: inventory, publish, no loop, loser) Covered-by: fixture:tests/ghost_lint_fixtures/p24_publish_inventory, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/no-spin-primitive Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/no-spin-primitive: the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I4: nothing in the cell file may call spin_loop; a loser that meets PUBLISHING reports a conflict instead of waiting for the winner (guarded terms: spin_loop, loser, never waits, PUBLISHING) Covered-by: fixture:tests/ghost_lint_fixtures/p24_no_spin_primitive, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/reader-acquire Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/reader-acquire (ThpTupleCell::read): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I4/I5: the reader performs exactly one Acquire load of the state; Relaxed would not pair with the Release store and a second load is a wait loop (guarded terms: reader, Acquire, PUBLISHED, one load) Covered-by: fixture:tests/ghost_lint_fixtures/p24_reader_acquire, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/reader-needs-published Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/reader-needs-published (ThpTupleCell::read): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I5: the reader decodes the words only in the branch that observed PUBLISHED through an Acquire load; unpublished or PUBLISHING yields the default tuple (guarded terms: reader, PUBLISHED, decode, default tuple) Covered-by: fixture:tests/ghost_lint_fixtures/p24_reader_needs_published, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/loser-needs-published Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/loser-needs-published (ThpTupleCell::publish): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I5: a loser reads the words only in the arm that saw PUBLISHED (the failed CAS loaded it with Acquire); the PUBLISHING and any other arm must not read half-written words (guarded terms: loser, PUBLISHED, words, PUBLISHING) Covered-by: fixture:tests/ghost_lint_fixtures/p24_loser_needs_published, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-cell/word-loads-relaxed Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_tuple_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cell/word-loads-relaxed (ThpTupleCell::load_words): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P24 still holds, as the entry states: I5: the word loader performs exactly five Relaxed loads, ordered only by the caller Acquire load of PUBLISHED or by the failed-CAS Acquire; no state access and no loop live here (guarded terms: five words, Relaxed, load, load_words) Covered-by: fixture:tests/ghost_lint_fixtures/p24_word_loads_relaxed, tests/j13b_thp_publish_first_wins.rs, tests/j13b_thp_publish_concurrent.rs, tests/j13b_thp_unpublished_default.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_tuple_cell.rs Invariant-Check: thp-ledger/used-relaxed Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_budget_ledger.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-ledger/used-relaxed (ThpBudgetLedger::used): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P25 still holds, as the entry states: I4: the observer read of used is one Relaxed load; nothing is published through used so no stronger order is needed (guarded terms: used, Relaxed, load, ledger) Covered-by: fixture:tests/ghost_lint_fixtures/p25_used_relaxed, tests/j13b_thp_budget_ledger.rs, tests/j13b_thp_budget_ledger_stress.rs, tests/j13b_thp_budget_conservation.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs Invariant-Check: thp-ledger/reserve-load-relaxed Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_budget_ledger.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-ledger/reserve-load-relaxed (ThpBudgetLedger::try_reserve): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P25 still holds, as the entry states: I1/I4: try_reserve observes used with one Relaxed load per attempt; the CAS validates the value, so a stale read only fails the CAS (guarded terms: try_reserve, Relaxed, observed, load) Covered-by: fixture:tests/ghost_lint_fixtures/p25_reserve_load_relaxed, tests/j13b_thp_budget_ledger.rs, tests/j13b_thp_budget_ledger_stress.rs, tests/j13b_thp_budget_conservation.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs Invariant-Check: thp-ledger/reserve-cas-relaxed Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_budget_ledger.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-ledger/reserve-cas-relaxed (ThpBudgetLedger::try_reserve): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P25 still holds, as the entry states: I1/I4: a reservation is exactly one compare_exchange_weak Relaxed/Relaxed from the observed value, so used never exceeds the budget; a fetch_add or store reserve overshoots under contention (guarded terms: compare_exchange_weak, Relaxed, reservation, never exceeds) Covered-by: fixture:tests/ghost_lint_fixtures/p25_reserve_cas_relaxed, tests/j13b_thp_budget_ledger.rs, tests/j13b_thp_budget_ledger_stress.rs, tests/j13b_thp_budget_conservation.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs Invariant-Check: thp-ledger/give-back-fetch-sub Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_budget_ledger.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-ledger/give-back-fetch-sub (ThpBudgetLedger::give_back): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P25 still holds, as the entry states: I3: give_back is one fetch_sub Relaxed; a store of a recomputed value would lose a concurrent reservation or return (guarded terms: give_back, fetch_sub, Relaxed, single) Covered-by: fixture:tests/ghost_lint_fixtures/p25_give_back_fetch_sub, tests/j13b_thp_budget_ledger.rs, tests/j13b_thp_budget_ledger_stress.rs, tests/j13b_thp_budget_conservation.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs Invariant-Check: thp-ledger/reserve-bounded Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_budget_ledger.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-ledger/reserve-bounded (ThpBudgetLedger::try_reserve): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P25 still holds, as the entry states: I2: the reserve CAS sits only inside the loop bounded by attempts < MAX_ATTEMPTS, so a persistent loser gives up with zero bytes instead of spinning (guarded terms: bounded, MAX_ATTEMPTS, attempts, try_reserve) Covered-by: fixture:tests/ghost_lint_fixtures/p25_reserve_bounded, tests/j13b_thp_budget_ledger.rs, tests/j13b_thp_budget_ledger_stress.rs, tests/j13b_thp_budget_conservation.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs Invariant-Check: thp-ledger/cas-after-observe Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_budget_ledger.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-ledger/cas-after-observe (ThpBudgetLedger::try_reserve): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P25 still holds, as the entry states: I1: the reserve CAS expects the value loaded earlier in the same iteration (cur), so the budget check made against that value still holds when the CAS succeeds (guarded terms: observed, compare_exchange_weak, cur, from the observed value) Covered-by: fixture:tests/ghost_lint_fixtures/p25_cas_after_observe, tests/j13b_thp_budget_ledger.rs, tests/j13b_thp_budget_ledger_stress.rs, tests/j13b_thp_budget_conservation.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_budget_ledger.rs Invariant-Check: thp-control/ordinal-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/ordinal-inventory (ThpRuntime::next_control): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I1: exactly one Relaxed fetch_add issues the ticket; a load/store replacement, missing increment, added retry RMW, or stronger ordering changes this inventory (guarded terms: CONTROL_ORDINAL, fetch_add, Relaxed, one ordinal) Covered-by: fixture:tests/ghost_lint_fixtures/p26_ordinal_inventory, tests/j13b_observation_control_selector.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/ordinal-probe-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/ordinal-probe-inventory (ThpRuntime::control_ordinal_probe): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: the bench-internals diagnostic probe is exactly one Relaxed CONTROL_ORDINAL load; any mutation, second read, or stronger ordering changes this inventory (guarded terms: probe, CONTROL_ORDINAL, load, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p26_ordinal_probe, tests/j13b_control_concurrent_ordinal.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/ordinal-before-decision Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/ordinal-before-decision (ThpRuntime::next_control): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I1/I2: the fixed-seed pure selector receives the ticket returned by the preceding ordinal RMW; it does not observe or publish shared state (guarded terms: CONTROL_SEED, ordinal, decision_at, after) Covered-by: fixture:tests/ghost_lint_fixtures/p26_ordinal_before_decision, tests/j13b_observation_control_selector.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/diagnostic-counter-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/diagnostic-counter-inventory (note_group_counter): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I3: helper counter updates are exactly one Relaxed wrapping fetch_add, not a load/store read-modify-write (guarded terms: inventory, diagnostic, fetch_add, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p26_diagnostic_counter_inventory, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/telemetry-load-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/telemetry-load-inventory (ThpRuntime::control_telemetry): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I4: the stats array is assembled from eight independent Relaxed loads; it is diagnostic and is not a coherent multiword snapshot (guarded terms: eight, Relaxed, telemetry, independent, snapshot) Covered-by: fixture:tests/ghost_lint_fixtures/p26_telemetry_load_inventory, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/ticket-log-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/ticket-log-inventory (record_control_ticket): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I3/I5: the ticket log records exactly one Relaxed cursor fetch_add plus, inside the cap, one Relaxed ticket-slot store and one Relaxed level-slot store per consumed ticket; any second or stronger atomic changes the bounded record path tests rely on (guarded terms: ticket, log, cursor, level, Relaxed, diagnostic) Covered-by: fixture:tests/ghost_lint_fixtures/p26_ticket_log_inventory, tests/j13b_control_concurrent_ordinal.rs, tests/j13b_cadence_native.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/ticket-log-after-decision Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/ticket-log-after-decision (ThpRuntime::next_control): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I1/I2: the ticket log must capture the decision the runtime actually computed for the ticket fetched in the same call, so the record call sits in a position dominated by the fixed-seed decision_at (guarded terms: decision, ticket, record, after) Covered-by: fixture:tests/ghost_lint_fixtures/p26_ticket_log_after_decision, tests/j13b_control_concurrent_ordinal.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/ticket-log-reset-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/ticket-log-reset-inventory (ThpRuntime::ticket_log_reset): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I5: the reset helper performs exactly one Relaxed CONTROL_TICKET_CURSOR store and nothing else atomic; a fetch_add replacement or stronger ordering changes the bounded reset path tests rely on for quiescent windows (guarded terms: reset, cursor, store, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p26_ticket_log_reset_inventory, tests/j13b_control_concurrent_ordinal.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-control/ticket-log-snapshot-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-control/ticket-log-snapshot-inventory (ThpRuntime::ticket_log_snapshot): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P26 still holds, as the entry states: I5: the snapshot helper reads each log slot and the cursor with exactly one Relaxed load each; a second slot load, a store, or a stronger ordering changes the bounded read path tests rely on (guarded terms: snapshot, cursor, load, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p26_ticket_log_snapshot_inventory, tests/j13b_control_concurrent_ordinal.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Invariant-Check: thp-cadence/level-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_cadence_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cadence/level-inventory (ThpCadenceCell::level): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P29 still holds, as the entry states: I1: the level is derived from exactly one Relaxed load of the group word; a second load or a stronger ordering changes this inventory (guarded terms: level, single, load, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p29_level_inventory, tests/loom_thp_cadence_cell.rs, tests/j13b_cadence_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs Invariant-Check: thp-cadence/agree-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_cadence_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cadence/agree-inventory (ThpCadenceCell::note_agree): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P29 still holds, as the entry states: I3: an agreement update is one load and one syntactic strong CAS site on the group word; a blind store (which loses concurrent updates), a second RMW or a stronger ordering changes this inventory (guarded terms: agreement, load, compare_exchange, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p29_agree_inventory, tests/loom_thp_cadence_cell.rs, tests/j13b_cadence_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs Invariant-Check: thp-cadence/agree-bounded Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_cadence_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cadence/agree-bounded (ThpCadenceCell::note_agree): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P29 still holds, as the entry states: I3: the CAS is dominated by attempts < MAX_ATTEMPTS, at most eight attempts; forced rejection drops the agreement after exactly eight (guarded terms: bounded, attempts, MAX_ATTEMPTS, eight) Covered-by: fixture:tests/ghost_lint_fixtures/p29_agree_bounded, tests/loom_thp_cadence_cell.rs, tests/j13b_cadence_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs Invariant-Check: thp-cadence/agree-cas-after-load Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_cadence_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cadence/agree-cas-after-load (ThpCadenceCell::note_agree): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P29 still holds, as the entry states: I2/I3: the CAS expects the observed current word, so a competing reset or increment cannot be overwritten blindly and the run never exceeds its bound (guarded terms: observed, current, compare_exchange, load) Covered-by: fixture:tests/ghost_lint_fixtures/p29_agree_cas_after_load, tests/loom_thp_cadence_cell.rs, tests/j13b_cadence_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs Invariant-Check: thp-cadence/disagree-inventory Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_cadence_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cadence/disagree-inventory (ThpCadenceCell::note_disagree): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P29 still holds, as the entry states: I4: a disagreement is exactly one wait-free Relaxed fetch_and on the group word and no CAS, so it can never be dropped by contention; a bounded-CAS reset or a stronger ordering changes this inventory (guarded terms: disagreement, wait-free, fetch_and, Relaxed) Covered-by: fixture:tests/ghost_lint_fixtures/p29_disagree_inventory, tests/loom_thp_cadence_cell.rs, tests/j13b_cadence_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs Invariant-Check: thp-cadence/run-clear-sole-path Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/state/thp_cadence_cell.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cadence/run-clear-sole-path: the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P29 still holds, as the entry states: I4: the run bits are cleared only by note_disagree; any other fetch_and on them would be a second, unreviewed reset path (guarded terms: run, fetch_and, note_disagree, only) Covered-by: fixture:tests/ghost_lint_fixtures/p29_run_clear_sole_path, tests/loom_thp_cadence_cell.rs, tests/j13b_cadence_contention_bound.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/state/thp_cadence_cell.rs Invariant-Check: thp-cadence/level-read-guarded-by-candidate Change: catalog path entries only: src/alloc_core/config/policy/large_thp_runtime/thp_runtime.rs -> crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs; guarded code moved byte-identical (plus only the visibility widening to `pub` listed in the visibility report), no executable line changed; protocol unchanged Why: thp-cadence/level-read-guarded-by-candidate (ThpRuntime::next_control): the invariant is unchanged because only the catalog path of the guarded code moved to the sefer-policy crate; protocol P29 still holds, as the entry states: I5: the group level is read only inside the branch of a fixed-selector candidate; an unconditional read would tax the seven-in-eight non-candidate fresh path (guarded terms: candidate, level, guarded, next_control) Covered-by: fixture:tests/ghost_lint_fixtures/p29_level_read_guarded, tests/j13b_cadence_native.rs, tests/j13b_cadence_pure.rs, crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…exit into the sefer-platform crate (plan step P1.4) Moves the independent part of the old alloc_core/platform/os.rs and the fatal and process-exit helpers out of the root crate into the new crates/platform/sefer-platform: fatal.rs, process_exit.rs and os.rs (module `os`: Segment, SEGMENT/PAGE, the SEGMENTS_* counters, reserve/release/commit/decommit and the depot-overflow handling). The rest of the old platform directory stays in the root, which deviates from the plan: the plan named node as a whole, but node.rs (ContinuationBounds/SEGMENT and the raw-pointer free-list membrane), numa.rs (it needs os, node and fatal), sidecar.rs, sidecar_stats.rs and size_classes.rs are not clear platform leaves, and the directory trio os.rs (SegmentDirectory, sidecar, segment_header) depends on root types. process_exit moved without a ghost bridge: it never used crate::ghost. The seven functions that take raw pointers became `pub unsafe fn` with a `# Safety` section in the crate, and the root wraps each in a safe pub(crate) function with the previous signature (R25-1). The root keeps the paths alloc_core::os, alloc_core::fatal and global::process_exit through re-exports; behavior, feature set and versions are unchanged. Features are forwarded, with internals and bench-internals going through `sefer-platform?/`. The A0 module-graph script (scripts/module-graph/graph.mjs) recursed without end on a glob re-export of an extern crate module (`pub(crate) use sefer_platform::os::*;`); the glob resolver now guards re-entry and shares one resolution state, with a regression test in tests/module_graph.test.mjs. The lock files of the fuzz and compile_fail fixtures are updated, a new sefer-platform-gates CI job is added, and the release workflow, CI_TIERS and the decomposition digests follow. The evidence registry is untouched. CI: full Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rates (plan step P1.6) P1.3 and P1.4 moved small non-generic functions and one-line forwarders across crate boundaries; without LTO every hot call pays a call frame. Add #[inline] on the 7 root OS-aperture wrappers and their sefer-platform counterparts (forwarders, not syscall bodies; the large Segment::reserve* stay calls), on the Segment accessors used by the large/decommit paths, and on the sefer-policy const accessors and builders that run at allocator construction and registry reconfigure. Signatures, visibility, cfg, behaviour and unsafe contracts are unchanged; the J13b pinned files are untouched. The no-LTO IAI row is re-measured on CI. CI: full Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ed files - composite action ci-sefer-platform-gates: the last run step lacked shell - rustfmt: put the crate-level cfg attribute of r11_epoch_false_full.rs on one line - no_stale_doc_references: point the hard-coded file paths and the root manifest comments at crates/containers/sefer-concurrent/src/... - src/lib.rs: drop the phantom global::process_exit entry from the tier-1 seam list (the module only re-exports sefer-platform now) - structure_limits_baseline.csv: lower the row of the shrunken test file Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…an Ir threshold Moving production code into a new workspace crate changes the build graph, and cross-crate inlining changes the production `.text` of the moved callers, so the byte-identity proof of ghost-zero-cost is red by construction for every extraction (P1.3 and P1.4 were parked on exactly that). By the owner's decision to split the allocator into crates, the gate stays mandatory but gets an extraction mode: - it applies only when the range declares an extraction (`build(workspace): extract ...` or an `Extraction: <crate>` trailer), the root manifest adds a workspace member or a path dependency on one, and files really move from src/ to crates/ (renames in the range diff); - the changed lines of the moved Rust code carry no ghost code (`ghost_assert!`, `ghost_event!`, `cfg(sefer_ghost)`, the ghost cfg set, the ghost source paths); comments and doc comments are prose and do not count; - the callgrind Ir of the probe must stay within 0.1 percent of the base (the parked extraction moved it by about 0.02 percent); - anything else keeps the byte-identity proof. Counterfactuals pin every branch (comment-only manifest edits, a member without moved files, Ir beyond the threshold, ghost code in a moved line, a file with "miri" in its comments); the suite runs in docs-consistency and in the self-test of the gate. GHOST_CHECKS_PLAN.md documents the mode and CLAUDE.md points to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nto crates The owner decided on 2026-11-16: "we must split everything into crates in any case; everything must be atomic; this will certainly reduce the affected tests". G1 becomes DO: P1.3, P1.4 and P1.6 land, P2.0 to P2.5 and the crate-graph test selection (P1.5) are carried out. The G1 report keeps its measured inputs and adds the override with the quote; the plan's step statuses follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the P1.3 and P1.4 extractions - Root features that forward into sefer-platform use the weak form (`sefer-platform?/<feature>`), so a feature forward never activates the crate on its own, as for the other optional members. - Live counters and inventories follow the tree: fourteen companion crates, 30 tier-1 seams (21 in src/, 9 in crates/), 112 tier-2 allows in 34 files, the per-file table of the README, the crate list of src/lib.rs, ARCHITECTURE and the CI tier table, all recounted with the canonical grep of CLAUDE.md. CI: full Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd P1.4 extractions Tests that moved into sefer-policy and sefer-platform leave the root: first-config-wins targets go from 81 to 79. Regenerated once on the clean tip with scripts/classify-tests.mjs; the pin of tests/classify_tests.test.mjs follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aths, macro-only sefer-ghost link and cross-crate inline
Follow-up to the P1.3/P1.4/P1.6 extraction after its first full CI run:
- sefer-platform: intra-doc links that could not resolve under
--all-features (Segment from the crate root, Self::reserve_lazy which
numa-aware compiles out, links across mutually exclusive cfg gates)
become a qualified path or a code span.
- sefer-policy: drop redundant explicit link targets; short names where
they are in scope, a qualified single-bracket path where they are not.
- tests/oxx_r2_05_reserve_failure_accounting.rs: the reserve_aligned
accounting scanner also walks the moved caller crates (sefer-platform,
sefer-policy); the allowlist follows os.rs to its new path. The test
keeps its meaning: every raw reserve call must sit in a reviewed wrapper.
- src/lib.rs: in production builds sefer-ghost is a macro-only dependency
(`#[no_link] extern crate`), so its object file is not linked into the
production binary; checking builds (loom, miri, kani, sefer_ghost) keep
the linked crate and the re-export.
- #[inline] on the small non-generic cross-crate functions of the measured
hot paths that P1.6 missed: Segment::{drop, reserve, reserve_exact,
reserve_lazy, reserve_small_lazy, reserve_lazy_for_measurement},
the THP forwarders, reserve_depot_overflow, aligned-vmem
commit_range/try_commit_range/recommit, and the sefer-policy THP advice
and runtime accessors. Bodies, signatures and cfg are unchanged; the
no-LTO IAI row is re-measured on CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… only The production ghost-token check added with the extraction mode unioned the tokens of the base and head binaries. The base is main, which has linked the sefer-ghost crate since P1.1, so a base-side match would keep the gate red whatever the change does - it proved a property of main, not of the change. The verdict now takes the head tokens only; the base tokens are kept in the JSON as `tokens_base` diagnostics, and `tokens` stays the head list. The token regex, both scan sources (objdump -t and the raw bytes) and the rule "any head token is red" are unchanged. tests/ghost_extraction_policy.test.mjs gains the counterfactuals (base-only token passes and is reported, head token is red) and pins the runner's head-only wiring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PHPCraftdream
force-pushed
the
p13r-policy-platform-20261116
branch
from
November 16, 2026 17:34
b0c2978 to
f896651
Compare
…yte-identical, judge only new ghost tokens
CI run 43919775120 on the previous head:
- `#[no_link] extern crate sefer_ghost` is a deprecated attribute that the
nightly toolchain rejects (`deny(no_link_attributes)`, future
incompatible), which broke the sanitizer, fuzz and ghost-guard builds
(the three depot mutants were reported MISSED only because their checker
did not compile). It also did not remove the token, so it is removed.
- The two #[inline] attributes added to ThpRuntime::{publish, current}
changed crates/core/sefer-policy/src/policy/large_thp_runtime/thp_runtime.rs,
whose source hash is pinned by the J13b static reference; they are
dropped, and the file is again byte-identical to the extraction commit.
- ghost-zero-cost reported `sefer_ghost` in BOTH the base (main) and the
head production binaries: the token predates this change. The verdict now
takes `tokens_new` (head tokens absent from the base); `tokens` (head) and
`tokens_base` stay in the JSON as diagnostics. The matcher and its two
scan sources are unchanged, and any token the change introduces is red.
tests/ghost_extraction_policy.test.mjs executes the runner's own
difference and verdict-call fragment over shared, head-only and base-only
cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…20261116 # Conflicts: # .github/actions/ci-docs-consistency/action.yml # docs/verification/ci-decomposition-baseline.json
main gained tests/test_selection_impact.test.mjs (PR #258); the derived classification CSV and report are regenerated with scripts/classify-tests.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The owner decided on 2026-11-16 to split the allocator into crates in any case ("everything must be atomic"), overriding the G1 STOP of #256. This PR lands the extractions that were parked for G1 and the gate policy that makes extractions mergeable at all. Next in the same direction: P2.0 (back-edges, in progress in a separate PR), then the core split P2.1 to P2.4 and the crate-graph test selection P1.5.
sefer-policy(crates/core):alloc_core/configand the Large-THP policy runtime; the commit carries its 39Invariant-Checkblocks.sefer-platform(crates/platform): the root-independent part of the segment OS aperture,fataland the process-exit state; raw-pointer functions arepub unsafe fnwith# Safetyand safepub(crate)wrappers in the root.#[inline]on the hot calls that now cross the crate boundaries.ghost-zero-costextraction mode (build(ci)): moving production code into a new crate changes the build graph and the inlining of the moved callers, so the byte-identity proof is red by construction for any extraction. The gate stays mandatory; a declared extraction (subjectbuild(workspace): extract ...or anExtraction:trailer) that adds a workspace member, really moves files fromsrc/tocrates/, and adds no ghost code in the changed code lines (comments are prose) is judged by the callgrind Ir of the probe within 0.1 percent of the base instead of byte identity. Every other range keeps the identity proof. Counterfactuals pin each branch and run indocs-consistencyand in the gate's self-test. Run on the real range of this branch, the policy grants the extraction mode (two declared extractions, 32 renames, new memberssefer-policyandsefer-platform).docs/perf/G1_DECISION_REPORT.mdand the plan.sefer-platform?/forwards, fourteen companion crates, 30 tier-1 seams (21 insrc/, 9 incrates/), 112 tier-2 allows in 34 files, test classification and its pin.Checked locally before the push:
cargo checkand clippy on the CI rows,cargo metadata --lockedfor every lock, everynodestep ofdocs-consistency, YAML parse of all actions and workflows, step structure, CI decomposition digests, structure limits, evidence registry in strict mode, a clean tree after the checks. What CI must confirm (the range carriesCI: full): the new crate gates, Loom, Miri, Kani, MSRV and the no_std build with the new optional dependencies,ghost-guardon the trailers, andghost-zero-costin extraction mode, whose Ir verdict exists only on CI. The no-LTO IAI row after P1.6 is dispatched on this branch before the merge.🤖 Generated with Claude Code