Skip to content

t27f: list every spec on an import cycle (deps_cycles in spec_deps.t27) #10693

Closed

Description

@gHashTag

The T27F dependencies view (specs/t27f/spec_deps.t27, #10680) flags only whether the focus spec is on a cycle. Its own honest-limits block says: "A cycle among other specs is not reported." #10682 was found only because a corpus run asked the question for every spec, one at a time, in a scratch loop. After #10689 the corpus has no import cycle. But the view has no law that answers "which specs are on a cycle?" for the whole edge list, so a new cycle has nothing to check it against.

Competitors make this check a rule, not a view. dependency-cruiser has a no-circular rule and madge has --circular: both list every module on a cycle and fail the build. Bazel and Nx refuse a cyclic target graph outright.

Boundary

User Scenarios

  • Given the use-edges list of any tree, a reader gets every spec that is on an import cycle, each once, and an empty list for an acyclic tree.

Requirements

  • deps_cycles reuses deps_walk and deps_on_cycle. It copies no body (duplicate-bodies).
  • Each importer is walked once. Specs that import nothing are never on a cycle and are not walked.
  • If the output, a walk's set or the walked list does not fit, or a walk goes deeper than DEPS_MAX_DEPTH, the answer is refused whole (cap + 1), never cut off.
  • Tests must cover:
    • the old igla pair, where both specs are listed;
    • a DAG, which gives an empty list;
    • a cycle the first spec is not on;
    • a self-import;
    • two separate cycles plus a repeated line;
    • the refusals.

Success Criteria

Success Criteria

  • t27c test-report specs/t27f/spec_deps.t27 exits 0
  • t27c test-report specs/t27f/spec_deps.t27 reports 0 vacuous tests
  • python3 tools/dupe_scan.py exits 0

Activity

  1. added
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 18, 2026
  2. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

    Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.

    • missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
  3. added a commit that references this issue on Oct 18, 2026
    cf660f1
  4. removed
    shape-refusedClosed by the issue-shape gate (specs/policy/issue_shape.t27); a passing edit reopens it
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions