Sibling articles under this feature previously restated requirements in inconsistent forms.
Incremental scheduling and determinism - Design model
Platform spec article
Incremental scheduling and determinism - Design model
Spec standingStandard
-
This feature hub owns normative MUST/SHOULD contract text for Incremental scheduling and determinism.
Context
Decision
This feature hub owns normative MUST/SHOULD contract text. Sibling articles must not redefine hub requirements and should link here for authority.
Consequences
Contract changes start on the hub or in linked ADRs, then propagate to articles and implementation anchors.
Verification anchors
site/website/src/content/docs/platform-spec/compiler/compiler-mods/incremental-scheduling-determinism/index.mdxarticle bundle under the same feature directory.
-
Platform-spec text supersedes informal crate comments for Incremental scheduling and determinism.
Context
Implementation crates accumulated informal notes that diverged from published contracts.
Decision
Normative platform-spec prose and ADRs under this feature supersede informal comments in implementation crates until explicitly migrated into spec text.
Consequences
Engineers file spec/ADR updates when behavior changes; crate comments are non-authoritative for conformance arguments.
Verification anchors
compiler/crates/beskid_analysis/src/analysis/rules/staged/compiler/crates/beskid_lsp/
-
Incremental mod runs produced unstable ordering.
Context
Incremental mod runs produced unstable ordering.
Decision
Invalidation keys and dirty sets for mod pipelines must replay deterministically for identical inputs (Collector scope + syntax snapshot hashes).
Consequences
LSP rescan triggers share the same keys as batch compile.
Verification anchors
compiler/crates/beskid_lsp/compiler/crates/beskid_analysis/src/analysis/rules/staged/.
- Incremental scheduling and determinism - Contracts and edge cases Cache boundaries, invalidation keys, and replay guarantees for mod outputs and Mod SDK reads.
- Incremental scheduling and determinism - Design model Cache boundaries, invalidation keys, and replay guarantees for mod outputs and Mod SDK reads.
- Incremental scheduling and determinism - Examples Cache boundaries, invalidation keys, and replay guarantees for mod outputs and Mod SDK reads.
- Incremental scheduling and determinism - FAQ and troubleshooting Cache boundaries, invalidation keys, and replay guarantees for mod outputs and Mod SDK reads.
- Incremental scheduling and determinism - Flow and algorithm Cache boundaries, invalidation keys, and replay guarantees for mod outputs and Mod SDK reads.
- Incremental scheduling and determinism - Verification and traceability Cache boundaries, invalidation keys, and replay guarantees for mod outputs and Mod SDK reads.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
This article documents the design model for Incremental scheduling and determinism.
Language alignment
Section titled “Language alignment”Isolating capture yields narrow dirty sets; aggregating capture widens invalidation by language intent—encoded as explicit graph edges here.
Persistent entities
Section titled “Persistent entities”- Compilation instance — implicit handle to the compilation under construction (Compiler Mod SDK /
Beskid.Compiler.Compilation). - Syntax snapshot — immutable tree with stable node identities suitable for incremental keys.
- Capability tokens — host-granted permissions for I/O, diagnostics, and emit operations during mod execution.
Boundaries
Section titled “Boundaries”- Mod SDK facades never bypass the host bridge for effects.
- Generation logic in the reference compiler remains Rust-internal; Beskid sees only the generated
Beskid.Compiler.*projection.
Anchored code paths
Section titled “Anchored code paths”compiler/crates/beskid_analysis/src/analysis/rules/staged/— precedent for staged invalidation.compiler/crates/beskid_lsp/— incremental document models and rescan triggers.
Invalidation keys (normative)
Section titled “Invalidation keys (normative)”Hosts must record, per mod contract schedule, at minimum:
syntax_generation_id— Monotonic per compilation unit (or workspace slice) counter bumped whenever a new parse snapshot replaces the previousProgram.capture_fingerprint— Hash of stable syntax node identities and predicate parameters bound during capture (isolating capture narrows this hash to declared roots; aggregating capture mixes in workspace-wide generation ids).manifest_generation_id— Hash of relevantProject.proj/Workspace.proj/ lockfile bytes affecting mod package identity, capabilities, or dependencies.capability_set_id— Canonical encoding of granted capabilities for the active mod schedule.
Replay must reuse cached process outputs when and only when all four ids match prior committed work. Any mismatch must drop cached process/emit artifacts before running the next round.
Isolating vs aggregating (implementation mapping)
Section titled “Isolating vs aggregating (implementation mapping)”- Isolating — Dirty set includes only items whose capture fingerprints reference changed syntax ids or directly imported modules touched on disk.
- Aggregating — Declarations in language-meta force inclusion of
syntax_generation_idfor every compilation unit in the attach target when any file in the member changes; hosts must record an explicit graph edge so tools can explain broad invalidation.
Atomicity
Section titled “Atomicity”Within one syntax.generation commit boundary, emit applications and diagnostic emissions must commit atomically: downstream semantic stages must not observe partially applied generator edits (Typed emitter and transforms).