Skip to content

Investigate: is the import topology declared, enforced, and is the declaration itself checked? #285

Description

@Polichinel

What to check

Whether this repository's internal import topology is declared and enforced, and — the sharper question — whether anything that is declared is itself checked, rather than only being the thing the code is checked against.

Measured across all views_platform repos on 2026-08-18: 4 of 18 carry import cycles, 7 have some form of import-enforcement test, and only 1 has a declared topology contract.

This repo: 3 subpackages · 0 cycles · enforcement test: none

My assessment

In order, and the platform's best-behaved repo — which makes locking it in worth more, not less.

Zero cycles across crafd|unfao → contract → delivery. No enforcement test.

Worth stating plainly: this is the only register on the platform that fully converges — 78 concerns arrived, 78 resolved, open count flat at 22 over four months. Whatever is happening here is working.

The namespace-package concern raised in issue #284 was tested and disproved — grimp builds the graph fine, 37 modules, all four packages found. No __init__.py is needed.

Suggestions

  1. Apply the contract from issue Proposed: import-linter contract to lock in the current cycle-free layering #284. It passes on arrival.
  2. Mutation-test it before trusting it.
  3. Note this repo uses poetry, not uv — the dev group is [tool.poetry.group.dev.dependencies] and CI is run_pytest.yml.

For examples / inspiration

  • views-datafactory #457/#458test_the_declared_graph_is_acyclic and test_every_package_on_disk_is_declared. Two assertions in an existing file. No new dependency, no graph library, no new module. The insight is worth stealing verbatim: an assertion about conformance standing in for an assertion about the property.
  • views-frames pyproject.toml [tool.importlinter] — two layers contracts, | between siblings meaning independent (that is what prevents a cycle; : permits one), each recording the direction the code already has. Note the comment explaining why the contract and tests/test_import_enforcement.py deliberately overlap.

Investigative issue filed by Claude Opus 5 at Simon's request, after a census of import structure across all views_platform repos. Nothing was changed in this repository.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions