Skip to content

feat(packages): extract torrust-clock to standalone repository#1880

Merged
josecelano merged 5 commits into
torrust:developfrom
josecelano:1879-1669-extract-torrust-clock-to-standalone-repo
Jun 5, 2026
Merged

feat(packages): extract torrust-clock to standalone repository#1880
josecelano merged 5 commits into
torrust:developfrom
josecelano:1879-1669-extract-torrust-clock-to-standalone-repo

Conversation

@josecelano
Copy link
Copy Markdown
Member

Summary

Closes #1879

Extracts the torrust-clock crate from the tracker workspace into its own standalone repository at https://github.com/torrust/torrust-clock.

Changes

  • Publish torrust-clock v3.0.0 on crates.io (standalone Cargo.toml with no workspace path deps)
  • Remove packages/clock/ from the tracker workspace (git rm -r)
  • Remove packages/clock from workspace members in root Cargo.toml
  • Migrate 13 workspace consumers from path dep to crates.io version dep (torrust-clock = "3.0.0"):
    • Cargo.toml (root)
    • packages/axum-health-check-api-server
    • packages/axum-http-server
    • packages/axum-rest-api-server
    • packages/http-protocol
    • packages/http-tracker-core
    • packages/metrics
    • packages/primitives
    • packages/swarm-coordination-registry
    • packages/tracker-core
    • packages/torrent-repository-benchmarking
    • packages/udp-server
    • packages/udp-tracker-core
  • Update docs: AGENTS.md, packages/AGENTS.md, docs/packages.md — remove clock from workspace package catalog and architecture diagram
  • Update EPIC Overhaul: packages #1669 tables: clock extraction row set to DONE

Notes

  • torrust-clock was previously published as torrust-tracker-clock. Both READMEs include a rename/deprecation notice.
  • CI setup, AI agent configuration, and release process for the standalone repo are deferred to a future issue against torrust/torrust-clock (the crate is mature and has not changed recently).
  • cargo build --workspace passed locally before commit (7m build after dep migration).

Related to #1669

- Move spec from drafts/ to open/ as 1879-1669-17-extract-torrust-clock-to-standalone-repo.md
- Update frontmatter: status draft→open, github-issue null→1879, spec-path, branch
- Fix workspace consumer list: 11→13 (corrected 3 stale folder names, added metrics and primitives)
- Update EPIC torrust#1669: clock extraction row now references torrust#1879, consumer count corrected, draft list updated
- Fix torrust#1790 closed-issue frontmatter: status open→closed, spec-path corrected
- T1–T5: prerequisites verified, standalone repo created, files copied,
  Cargo.toml made self-contained, build and tests pass
- T6: CI deferred — crate is mature; CI, AI agent config, and release
  process will be set up when the first change to torrust-clock is needed
- packages/clock/README.md: add rename notice (torrust-tracker-clock →
  torrust-clock)
…st#1879)

- Publish torrust-clock v3.0.0 on crates.io (extracted from packages/clock/)
- Remove packages/clock/ from the workspace (git rm -r)
- Remove packages/clock from workspace members in root Cargo.toml
- Migrate all 13 workspace consumers from path dep to crates.io version dep:
  torrust-clock = "3.0.0"
  (Cargo.toml root, axum-health-check-api-server, axum-http-server,
   axum-rest-api-server, http-protocol, http-tracker-core, metrics,
   primitives, swarm-coordination-registry, tracker-core,
   torrent-repository-benchmarking, udp-server, udp-tracker-core)
- Update AGENTS.md, packages/AGENTS.md, docs/packages.md: remove clock
  from workspace package catalog and architecture diagram
- Update EPIC torrust#1669: clock extraction row set to DONE
- Update issue spec torrust#1879: T7-T13 progress recorded

Closes torrust#1879
Copilot AI review requested due to automatic review settings June 5, 2026 11:59
@josecelano josecelano self-assigned this Jun 5, 2026
The clock package was extracted to a standalone repository (torrust-clock
v3.0.0 on crates.io) in the previous commit. The Containerfile still
referenced packages/clock/ in three places (COPY Cargo.toml, COPY src,
and COPY src/lib.rs stubs). Remove all three to fix the container build.

Refs torrust#1879
Copy link
Copy Markdown

Copilot AI left a comment

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 extracts the torrust-clock crate from the torrust-tracker Cargo workspace into a standalone crates.io dependency (torrust-clock = "3.0.0"), removes the in-repo packages/clock/ crate, and updates workspace documentation and issue tracking docs to reflect the change.

Changes:

  • Migrates all in-workspace consumers from a path dependency (../clock) to the published crate (torrust-clock = "3.0.0") and updates Cargo.lock accordingly.
  • Removes the packages/clock/ crate sources/tests/manifest from this repository.
  • Updates package/architecture docs and EPIC/issue specs to reflect the extraction (with some spec status consistency issues noted in review comments).

Reviewed changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Cargo.toml Switches workspace dependency registration for torrust-clock to crates.io 3.0.0.
Cargo.lock Updates torrust-clock to registry source + checksum for 3.0.0.
packages/axum-health-check-api-server/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/axum-http-server/Cargo.toml Migrates torrust-clock dependency from path to crates.io version (also appears in dev-deps).
packages/axum-rest-api-server/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/http-protocol/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/http-tracker-core/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/metrics/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/primitives/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/swarm-coordination-registry/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/torrent-repository-benchmarking/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/tracker-core/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/udp-server/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/udp-tracker-core/Cargo.toml Migrates torrust-clock dependency from path to crates.io version.
packages/AGENTS.md Removes clock from the workspace-layer diagram/catalog and updates the testing note to reference the crates.io crate.
AGENTS.md Removes clock from the workspace package catalog table.
docs/packages.md Removes clock from the packages list and catalog table formatting.
docs/issues/open/1879-1669-17-extract-torrust-clock-to-standalone-repo.md Updates the issue spec metadata/progress, but contains inconsistent statuses/checklists and a duplicate progress log entry (see comments).
docs/issues/open/1669-overhaul-packages/EPIC.md Marks clock extraction as DONE and links to #1879/spec.
docs/issues/closed/1790-move-duration-since-unix-epoch-to-torrust-tracker-clock.md Updates issue spec frontmatter status/spec-path for closure, but uses a non-canonical closed status value (see comments).
packages/clock/Cargo.toml Removes the extracted crate’s in-repo manifest.
packages/clock/README.md Removes the extracted crate’s in-repo README.
packages/clock/src/lib.rs Removes the extracted crate’s in-repo library entrypoint.
packages/clock/src/clock/mod.rs Removes the extracted crate’s in-repo clock module.
packages/clock/src/clock/working/mod.rs Removes the extracted crate’s in-repo working clock implementation.
packages/clock/src/clock/stopped/mod.rs Removes the extracted crate’s in-repo stopped clock implementation and tests.
packages/clock/src/conv/mod.rs Removes the extracted crate’s in-repo conversion helpers and tests.
packages/clock/src/static_time/mod.rs Removes the extracted crate’s in-repo static time helper.
packages/clock/tests/integration.rs Removes the extracted crate’s in-repo integration test.
packages/clock/tests/clock/mod.rs Removes the extracted crate’s in-repo clock test module.
Comments suppressed due to low confidence (3)

docs/issues/open/1879-1669-17-extract-torrust-clock-to-standalone-repo.md:108

  • The implementation plan table is internally inconsistent: T6 is marked DONE but its note says the work is deferred, and T10/T13 are still TODO even though the progress log below says they are done and the PR includes those updates. Align the status values (and the Status values: hint) with the actual state (e.g., use DEFERRED for T6 and DONE for T10/T13).
    docs/issues/open/1879-1669-17-extract-torrust-clock-to-standalone-repo.md:136
  • The workflow checkpoints currently mark "Source moved with history preserved" and "CI set up and passing" as completed, but the implementation plan/notes and acceptance criteria indicate history preservation and CI are deferred/not yet verified. Update these checkboxes so the checkpoints reflect the actual state.
    docs/issues/open/1879-1669-17-extract-torrust-clock-to-standalone-repo.md:152
  • Progress log contains two near-identical entries for the same timestamp/update (T10/T13 done; T11/T12 deferred). Keeping only one avoids confusion when tracking the issue history.

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

Comment thread packages/axum-http-server/Cargo.toml Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.72%. Comparing base (0723daa) to head (d98ddbe).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1880      +/-   ##
===========================================
- Coverage    80.83%   80.72%   -0.11%     
===========================================
  Files          368      363       -5     
  Lines        27575    27429     -146     
  Branches     27575    27429     -146     
===========================================
- Hits         22291    22143     -148     
+ Misses        4983     4977       -6     
- Partials       301      309       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano
Copy link
Copy Markdown
Member Author

ACK d98ddbe

@josecelano josecelano merged commit 2c5d032 into torrust:develop Jun 5, 2026
26 checks passed
josecelano added a commit that referenced this pull request Jun 5, 2026
…omote drafts, add new subissues

6ee41da chore(issues): archive closed #1881 SI-16 bencode spec; update EPIC #1669 (Jose Celano)
1293cc3 chore(issues): address Copilot PR review comments on #1886 (Jose Celano)
e159b61 chore(issues): promote draft #1885 SI-20 extract-torrust-net-primitives to open; update EPIC #1669 (Jose Celano)
35fd55c chore(issues): add draft spec SI-20 extract-torrust-net-primitives; update EPIC #1669 (Jose Celano)
975b78d chore(issues): promote draft #1884 SI-19 move-bittorrent-peer-id to open; update EPIC #1669 (Jose Celano)
555108e chore(issues): add draft spec for moving bittorrent-peer-id to torrust-bittorrent; update EPIC #1669 (Jose Celano)
8b29e9c chore(issues): promote draft #1882 extract-torrust-metrics to open; update EPIC #1669 (Jose Celano)
f34fddc chore(issues): archive closed issue specs #1854, #1864 to docs/issues/closed (Jose Celano)
2717f63 chore: move issue 1879 spec from open to closed (Jose Celano)

Pull request description:

  ## Summary

  Routine issue spec maintenance on branch `chore/issue-specs-updates`.

  ### Changes

  | Commit | Description |
  |--------|-------------|
  | `698e00c0` | Move issue #1879 spec from `open/` to `closed/` (PR #1880 merged) |
  | `69fd8f2c` | Archive closed issue specs #1854 and #1864 to `docs/issues/closed/` |
  | `a595d38c` | Promote draft #1882 SI-18 (extract torrust-metrics) to `open/`; update EPIC |
  | `34214084` | Add draft spec for moving `bittorrent-peer-id` to `torrust-bittorrent` |
  | `f3e405fa` | Promote draft #1884 SI-19 (move bittorrent-peer-id) to `open/`; update EPIC |
  | `e3af4fb9` | Add draft spec SI-20 for extracting `torrust-net-primitives` to standalone repo |
  | `a9eff126` | Promote draft #1885 SI-20 (extract torrust-net-primitives) to `open/`; update EPIC |

  ### New GitHub issues created

  - [#1882](#1882) — SI-18: Extract `torrust-metrics` to standalone repository
  - [#1884](#1884) — SI-19: Move `bittorrent-peer-id` to `torrust/torrust-bittorrent` as `torrust-peer-id`
  - [#1885](#1885) — SI-20: Extract `torrust-net-primitives` to standalone repository

  ### Related

  Part of EPIC #1669 — Overhaul: Packages

ACKs for top commit:
  josecelano:
    ACK 6ee41da

Tree-SHA512: 8cb1b18a3712a8110afce92b4fecdca6f5e7e5ba7b741bfb45aaa433e0536d1218e7473fa5de9987f4b5198ddeda0675afcb7e1d819795b74ac649e79db12942
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract torrust-clock to a standalone repository

2 participants