Skip to content

Commit 957f84e

Browse files
docs: improve LandFixTier.rs module header
1 parent bcc4525 commit 957f84e

1 file changed

Lines changed: 26 additions & 29 deletions

File tree

Source/LandFixTier.rs

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,43 @@
1-
//! # LandFixTier - Mountain's runtime tier banner
1+
//! # LandFixTier
22
//!
3-
//! Emits one ISO-timestamped line at boot listing every tier variable's
4-
//! compiled value. Because the values are resolved at compile time via
5-
//! `env!("Tier…")` (populated by `build.rs::PropagateTierGating`), the
6-
//! banner is always correct for *this particular binary*, not "whatever
7-
//! is in the env right now".
3+
//! Emits a single ISO-timestamped boot banner listing the compiled-in value of
4+
//! every tier variable. Because all `env!("Tier…")` calls are resolved by
5+
//! `build.rs::PropagateTierGating` at compile time, the banner always reflects
6+
//! the exact configuration baked into *this* binarynot whatever the host
7+
//! environment happens to export at runtime.
88
//!
9-
//! ## Why this shape
9+
//! ## Design Rationale
1010
//!
11-
//! Three distinct audiences need the banner:
11+
//! Three distinct audiences depend on this banner:
1212
//!
13-
//! | Audience | Reason |
14-
//! | ----------------------- | ----------------------------------------------------------------- |
15-
//! | Log readers (humans) | A pasted session log must show at-a-glance which tier was active. |
16-
//! | Regression triage | Confirms the binary on disk matches the `.env.Land` that shipped. |
17-
//! | Cross-Element agreement | Pairs with Cocoon's `[LandFix:Tier] Cocoon tier set resolved:` and Sky's `[LandFix:Tier] Sky tier set:` - if Mountain disagrees with either, configuration drift is the root cause. |
13+
//! | Audience | Why it matters |
14+
//! |---|---|
15+
//! | Log readers (humans) | A pasted session log must show at-a-glance which tier was active when the problem occurred. |
16+
//! | Regression triage | Confirms the binary on disk was built from the same `.env.Land` that shipped. |
17+
//! | Cross-element agreement | Pairs with Cocoon's `[LandFix:Tier] Cocoon tier set resolved:` and Sky's `[LandFix:Tier] Sky tier set:`. A mismatch between any two signals configuration drift as the root cause. |
1818
//!
19-
//! ## Call site
19+
//! ## Call Site
2020
//!
2121
//! `LogResolvedTiers()` is called unconditionally from `Binary/Main/Entry::Fn`
22-
//! before the Tokio runtime starts spawning tasks, because `dev_log!` is
23-
//! synchronous and the banner should land before any extension code runs.
22+
//! before the Tokio runtime begins spawning tasks. `dev_log!` is synchronous,
23+
//! so the banner is guaranteed to land in the log before any extension code runs.
2424
//!
25-
//! Runtime overhead is zero - all `env!(...)` invocations resolve to string
26-
//! literals at compile time and Rust's `println!`/`dev_log!` codegen inlines
27-
//! the format arguments into a single write call.
25+
//! Runtime overhead is zero — all `env!(...)` invocations become string
26+
//! literals at compile time and are inlined into a single write call.
2827
//!
2928
//! ## References
3029
//!
31-
//! See `Documentation/GitHub/Workflow/TierGatedImplementationSelection.md`
32-
//! (rendered at
33-
//! <https://github.com/CodeEditorLand/Land/tree/Current/Documentation/GitHub/Workflow/TierGatedImplementationSelection.md>)
34-
//! for the end-to-end workflow and the matching call sites in Cocoon, Wind
35-
//! and Sky. Every capability listed in the banner below maps to one or more
36-
//! tier-marker comments of the form `// Tier:<Capability>:<Value>` at the
37-
//! corresponding dispatch site.
30+
//! See `Documentation/GitHub/Workflow/TierGatedImplementationSelection.md` for
31+
//! the end-to-end tier-gating workflow and the matching call sites in Cocoon,
32+
//! Wind, and Sky. Every capability listed in the boot banner maps to one or
33+
//! more `// Tier:<Capability>:<Value>` comments at its dispatch site.
3834
3935
use crate::dev_log;
4036

41-
/// Emits one line at boot listing every tier variable's compiled value.
42-
/// Call once, from `tauri::Builder`'s setup hook, after the logging
43-
/// infrastructure is ready.
37+
/// Emits one ISO-timestamped line at boot listing the compiled-in value of all
38+
/// 17 tier variables (`TierRemoteProcedureCall` … `TierTelemetry`). Call once,
39+
/// from `Binary/Main/Entry::Fn`, after the logging infrastructure is ready and
40+
/// before the Tokio runtime spawns any tasks.
4441
pub fn LogResolvedTiers() {
4542
dev_log!(
4643
"lifecycle",

0 commit comments

Comments
 (0)