Repository navigation
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
Contributor
Reviewer's GuideAdds a plan-only ExecPlan for documenting and implementing cycle-detection semantics: order-only dependencies will become cycle-detection edges, implicit outputs will be explicitly documented and tested, serial ordering will remain outside the dependency graph, and the behavior will be covered by implementation, verification, documentation, and migration work. Sequence diagram for order-only cycle rejectionsequenceDiagram
participant User
participant Netsuke
participant IR as IR validation
participant Ninja
User->>Netsuke: generate or build manifest
Netsuke->>IR: BuildGraph.detect_cycles()
IR->>IR: visit_known_edge()
IR->>IR: visit_dependencies(order_only_deps)
alt cycle detected
IR-->>Netsuke: CircularDependency
Netsuke-->>User: localized diagnostic / JSON error
Netsuke-->>Ninja: no Ninja invocation
else no cycle
IR-->>Netsuke: validated graph
Netsuke->>Ninja: generate or run build
end
Flow diagram for dependency-kind participationflowchart TD
Start[Dependency graph validation] --> Kinds{Dependency kind}
Kinds -->|sources| Traverse[Traverse dependency edge]
Kinds -->|deps| Traverse
Kinds -->|order_only_deps| Traverse
Traverse --> Cycle{Back edge found?}
Cycle -->|yes| Reject[Reject with CircularDependency]
Cycle -->|no| Continue[Continue graph validation]
Alias[Explicit or implicit output alias] --> Resolve[Resolve producing edge]
Resolve --> Traverse
Serial[dependency_order: serial] -. adds no edge .-> Continue
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Plan roadmap item 4.4.2: decide which dependency kinds take part in IR cycle detection, document the rule in the users' guide, and align the implementation and tests with it. Planning evidence shows Ninja 1.11.1 rejects cycles closed by order-only dependencies and by implicit outputs, while Netsuke's IR check skips order-only dependencies, so `netsuke generate` can emit a Ninja file Ninja refuses. The draft proposes that every dependency kind participates (ADR-041), pins the existing implicit-output alias behaviour, and records that serial dependency ordering adds no arcs. The plan is DRAFT and awaits expert review and approval; no implementation is included. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Fold in the conditions from the expert-panel design review, which returned "proceed with conditions": - Keep new Kani harnesses in `cycle_verification.rs`, moving its canonicalization helpers to a harness-free support file, so harness paths match the mutation-evidence contract's module derivation. - Add a typed cycle slot to the BDD world so scenarios assert the cycle path, not bare failure (a YAML 1.1 Boolean name would otherwise pass). - Gate the serial end-to-end build on real Ninja, pin locale and filters for the JSON snapshot, and prove Ninja is never started. - Rebuild the oracle strategy on a DAG base with one optional back arc per dependency kind, and add an obligation for missing order-only dependencies. - Correct the breaking-change risk: Ninja ignores cycles it is not asked to build, so affected manifests could have built before. The three release-admission canaries contain no `order_only_deps`. - Record the tiered-rollout and reachable-subgraph alternatives, recalibrate tolerances, and make the stale-rule search multiline and live. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Record explicit user approval for D1 before rebasing or starting implementation.
Update source paths and ADR allocation to match the rebased tree. Record exact rebase evidence and the current documentation contract gates before implementation proceeds.
Update the plan for the merged Terms of Reference and current user guide headings. Correct Rust module path attributes and record that the Kani baseline timed out before harness enumeration, leaving the post-change proof run as a required gate.
Traverse explicit inputs, implicit dependencies, and order-only dependencies when checking the whole manifest, and resolve output aliases to their producing edge. Expose the localized cycle path in human diagnostics while preserving the JSON envelope. Record the breaking behaviour change in ADR-0060 and the user, design, developer, and migration documentation, with unit, property, BDD, end-to-end, and Kani coverage.
leynos
force-pushed
the
4-4-2-document-cycle-detection-scope
branch
from
October 26, 2026 08:20
6d5d1cf to
d388bf2
Compare
Refine the independent property oracle and Kani fixtures to address CodeScene findings. Keep assumptions and assertions in the Kani proof harnesses, where the pinned verifier handles them. Keep manifest-derived cycle paths in human diagnostics, and log only the fixed circular-dependency category. Add a regression test and document the logging boundary in ADR-0060. Validation: make check-fmt, lint, typecheck, doc-coverage, test, markdownlint, nixie, and capped kani-ir (17 harnesses) pass.
This branch has not been deployed
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.
Summary
Align whole-manifest cycle detection with the build graph. The detector follows
explicit
sources, implicitdeps, andorder_only_deps, and resolvesexplicit and implicit output aliases to their producing edge. Human diagnostics
show the localized cycle path; tracing records only a fixed error category. The
JSON diagnostic envelope is unchanged.
Contract and compatibility
records why every prerequisite kind participates in whole-manifest cycle
detection;
dependency_order: serialremains a scheduling policy that addsno dependency arc.
when its targets are not requested. The v0.1.0 migration guide explains how
to remove the back edge.
cycles, implicit-output aliases, missing paths, serial ordering, and the
human and JSON diagnostics.
diagnostic. No issue is filed without maintainer agreement.
Validation
make check-fmt,make lint,make typecheck, andmake doc-coveragepassed; doc coverage is 98.19%.
make testpassed 4,742 tests with 7 skipped; doctests passed.make markdownlintpassed for 202 files with zero issues;make nixie,make test-documentation-contracts(15 passed), andmake test-workflow-contracts(1,351 passed, 3 skipped, plus 27 scripttests) passed.
make kani-irrun passed all 17 harnesses.References