Skip to content

Module graph: index.ts <-> dashboard-writer.ts cycle; state.ts imports upward from client.ts #371

Description

@TheAmericanMaker

What

Two module-graph findings (mechanical 1.1, 1.2), both harmless under the current toolchain and both cheap to remove:

  • core/index.ts:24 re-exports dashboard-writer.ts, and core/dashboard-writer.ts:14-27 imports eleven bindings back from ./index.ts — a cycle that resolves only because every binding is used inside a function body.
  • core/broadside/state.ts:15 imports BROADSIDE_TERMINAL_ENTRY_STATUSES from the downstream client.ts, against the layer order the barrel documents (refactor: split core/broadside.ts into core/broadside/ modules #353).

Fix

dashboard-writer.ts imports from the specific modules it needs; the two terminal-status constants move to core/broadside/constants.ts. Pin both with the import-graph check used for #353 (no cycles at runtime; no upward edges).

Found by the 2026-09-15 self-audit (full-with-deep-audit on this repository at a159d6c, v0.25.0 + #353, ollama-cloud/deepseek-v4.1-flash); confirmed by reading before filing. Report and finding id in self-audit/2026-09-15-v0.25.0-full-with-deep-audit/REVIEW.md.

🤖 Generated with Claude Code

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

    enhancementNew feature or requestself-auditFiled from a CodeCartographer self-audit run

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions