Skip to content

docs(project): fix package documentation inconsistencies and regenerate coupling report#1902

Merged
josecelano merged 16 commits into
torrust:developfrom
josecelano:1669-fix-package-docs-inconsistencies
Jun 11, 2026
Merged

docs(project): fix package documentation inconsistencies and regenerate coupling report#1902
josecelano merged 16 commits into
torrust:developfrom
josecelano:1669-fix-package-docs-inconsistencies

Conversation

@josecelano

@josecelano josecelano commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Documentation maintenance and coupling analysis across EPIC #1669.

Package docs fixes

  • EPIC.md: link packages/AGENTS.md and the dependency diagram; add documentation audit checklist to the Scope section
  • docs/packages.md: remove ghost torrent-repository directory, add missing e2e-tools, events, persistence-benchmark, swarm-coordination-registry; fix Package Catalog entries
  • packages/AGENTS.md: remove ghost torrent-repository from diagram and catalog; fix primitives description; remove extracted packages table (redundant — extracted crates are normal Cargo dependencies)

Dependency diagram

  • New Mermaid diagram docs/media/packages/dependencies-workspace-packages.md showing all 22 workspace packages across 7 layers plus 7 external torrust-* crates

Workspace coupling reports

  • Preserve original baseline as workspace-coupling-report-2026-05-19.md
  • Regenerated report workspace-coupling-report-2026-06-10.md with:
    • Measurable improvements from completed EPIC subissues (29→25 packages)
    • Detailed coupling analysis with thin/acceptable/cluster dependency classification
    • Production vs test import breakdown for each finding
    • 3 draft subissues with explicit dependency ordering

Draft subissues created (EPIC #1669)

  1. Remove udp-protocol PeerId re-exportdocs/issues/drafts/1669-remove-udp-protocol-peer-id-re-export.md
  2. Move Driver enum to primitivesdocs/issues/drafts/1669-move-driver-enum-to-primitives.md
  3. Decouple rest-api-core from UDP internals (production code) — docs/issues/drafts/1669-decouple-rest-api-core-from-udp-internals.md
  4. Relocate axum-rest-api-server test environmentdocs/issues/drafts/1669-relocate-axum-rest-api-server-test-environment.md
  5. Relocate udp-server test environmentdocs/issues/drafts/1669-relocate-udp-server-test-environment.md
  6. Relocate axum-http-server test environmentdocs/issues/drafts/1669-relocate-http-server-test-environment.md

Decisions recorded

  • DEC-11: Accept server → client-library dependency for health checks
  • DEC-12: Accept http-tracker-coretracker-core coupling as by design
  • DEC-13: Relocate server test environment infrastructure to src/testing/

Copilot PR review comments

All 11 Copilot review comments resolved with fixes and explanations.

Verification

  • cargo machete — pass
  • linter all — pass
  • cargo test --doc --workspace — pass
  • Pre-push hooks — pass

Copilot AI review requested due to automatic review settings June 10, 2026 12:57
@josecelano josecelano self-assigned this Jun 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs documentation maintenance for EPIC #1669 (“Overhaul: packages”) by aligning package/architecture docs with the current workspace structure, adding a workspace dependency Mermaid diagram, and adding updated workspace coupling reports for tracking dependency reductions over time.

Changes:

  • Updated package documentation (docs/packages.md, packages/AGENTS.md, EPIC checklist) to remove/rename “ghost” packages and reflect extracted crates.
  • Added a new Mermaid dependency diagram for workspace packages and external torrust-* crates.
  • Added/updated workspace coupling report artifacts (baseline + regenerated).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
project-words.txt Adds “leafification” to the project dictionary.
packages/AGENTS.md Updates architecture diagram and package catalog/extracted packages tables.
docs/packages.md Updates workspace package listing, package catalog, and extracted packages table.
docs/media/packages/dependencies-workspace-packages.md Adds a new Mermaid diagram of workspace package dependencies.
docs/issues/open/1669-overhaul-packages/workspace-coupling-report-2026-06-10.md Adds regenerated coupling report for 2026-06-10.
docs/issues/open/1669-overhaul-packages/workspace-coupling-report-2026-05-19.md Adds/preserves baseline coupling report for 2026-05-19.
docs/issues/open/1669-overhaul-packages/EPIC.md Adds links and a documentation audit checklist to keep docs aligned with reality.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/AGENTS.md Outdated
Comment thread packages/AGENTS.md
Comment thread docs/packages.md
- Thin dependencies: 6 edges identified with easy elimination paths
- Cluster dependencies: 3 architectural concern areas documented
- Layer violation: tracker-core -> configuration Driver enum flagged
- Prioritization table with estimated effort per improvement item

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Comment thread packages/AGENTS.md Outdated
Comment thread docs/packages.md Outdated
Comment thread docs/issues/open/1669-overhaul-packages/workspace-coupling-report-2026-06-10.md Outdated
Comment thread docs/media/packages/dependencies-workspace-packages.md
- docs/issues/open/1669-overhaul-packages/workspace-coupling-report-2026-06-10.md:
  add YAML frontmatter for consistency with other issue artifacts
- docs/packages.md: remove InfoHash from primitives description
  (it is an external dependency, not re-exported)
- packages/AGENTS.md: remove InfoHash from primitives description;
  add located-error to the Extracted Packages table
  (it was in the ASCII diagram but missing from the table)
- workspace-coupling-report-2026-06-10.md: correct the e2e-tools finding
  (uses torrust_tracker_lib:: not torrust_tracker::, so the scan missed it)
- docs/packages.md: automatic formatting alignment fix
- docs/packages.md: fix tracker-client label (it is a library crate,
  not a CLI client; the CLI client is at console/tracker-client)
- workspace-coupling-report-2026-06-10.md: fix config dep note
  (still depends on primitives for AnnouncePolicy)
- dependencies-workspace-packages.md: add YAML frontmatter with
  semantic-links for docs graph consistency
Split into "worth investigating" (actionable) and "acceptable"
(not worth addressing) to clarify which edges are real problems
vs architecturally expected. Remove tracker-core → events from
prioritization table accordingly.
Re-exporting RecvError through an intermediate package would
create a hidden transitive dependency. Better to keep the
direct and honest declaration.
Subissue of EPIC torrust#1669. Covers removal of the udp-protocol
re-export of PeerId/PeerClient with scope and ACs for all 4
consumers. Update coupling report to reference the draft spec.
Moves axum-server -> TslConfig from "worth investigating" to
"acceptable" with links to DEC-08 decision record and closed
issue torrust#1860. Removes from prioritization table accordingly.
…ale layer violation

- docs/issues/drafts/1669-move-driver-enum-to-primitives.md: new draft
  spec for moving Driver enum from configuration to primitives
- workspace-coupling-report-2026-06-10.md: add new "Domain concept
  misplacement" section for Driver; remove stale "Layer violation"
  section; update prioritization table
- DECISIONS.md: add DEC-11 documenting the decision to accept
  the udp-server -> client-lib dependency for health checks
- workspace-coupling-report: update acceptable deps to reference DEC-11
…eport

- DECISIONS.md: add DEC-12 documenting the decision to accept
  http-tracker-core -> tracker-core coupling as by design
- workspace-coupling-report: update cluster dep finding with
  import breakdown and reference to DEC-12
- DECISIONS.md: add DEC-13 for relocating server test environment
  infrastructure to src/testing/
- Replace combined axum-rest-api-server draft with 3 focused relocation
  drafts (one per server package) and updated rest-api-core production
  decoupling draft
- Add explicit dependency relationships between subissues
@josecelano

Copy link
Copy Markdown
Member Author

ACK 4d686fe

@josecelano josecelano merged commit 178d58a into torrust:develop Jun 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants