Sibling articles under this feature previously restated requirements in inconsistent forms.
Dependency graph and cycle policy - Flow and algorithm
Platform spec article
Dependency graph and cycle policy - Flow and algorithm
Spec standingStandard
-
This feature hub owns normative MUST/SHOULD contract text for Dependency graph and cycle policy.
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/resolution-and-projects/dependency-graph-and-cycle-policy/index.mdxarticle bundle under the same feature directory.
-
Platform-spec text supersedes informal crate comments for Dependency graph and cycle policy.
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_tests/src/projects/corelib/layout.rscompiler/crates/beskid_tests/src/projects/corelib/mod.rscompiler/crates/beskid_cli/src/commands/doc.rs
-
Silent cycle handling broke workspace diagnostics parity.
Context
Silent cycle handling broke workspace diagnostics parity.
Decision
Directed cycles must be reported during graph build;
Modcycles must include mod id in the diagnostic path.Consequences
Policy knobs (
error,warn, permissive) select abort vs continue; default remains fail-closed for release builds.Verification anchors
beskid_analysis::projects::graphcompiler/crates/beskid_tests/src/projects/corelib/layout.rs.
- Dependency graph and cycle policy - Contracts and edge cases States the normative guarantees and what happens at boundaries or failure edges.
- Dependency graph and cycle policy - Design model Explains the persistent concepts, entities, and boundaries this feature relies on.
- Dependency graph and cycle policy - Examples Gives concrete newcomer-friendly scenarios mapped to real compiler paths.
- Dependency graph and cycle policy - FAQ and troubleshooting Answers common operator and contributor questions with practical next checks.
- Dependency graph and cycle policy - Flow and algorithm Walks through runtime/order-of-operations behavior in the implementation.
- Dependency graph and cycle policy - Verification and traceability Shows how the team proves this feature works and where evidence lives.
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).
Build algorithm
Section titled “Build algorithm”flowchart TD
nodes[Collect manifest nodes]
edges[Expand dependency edges]
topo[Topological sort attempt]
cycle{Cycle detected?}
diag[Emit cycle diagnostic]
ok[Freeze ResolvedGraph]
nodes --> edges --> topo --> cycle
cycle -->|yes| diag
cycle -->|no| ok
- Parse each member
Project.projand register a graph node (package id + project type). - Add edges for registry and path dependencies; normalize path roots against workspace policy.
- Run cycle detection on the directed graph; apply configured severity.
- Expose
ResolvedGraphtobuild_compile_plan_with_policyand doc workspace scan. Modnodes trigger additional capability validation before the graph is considered sound.
Anchored code paths
Section titled “Anchored code paths”beskid_analysis::projects::graph::resolvercompiler/crates/beskid_tests/src/projects/corelib/compiler/crates/beskid_cli/src/commands/doc.rs