Skip to content

fix(build): remove fat LTO from development profile#2013

Merged
josecelano merged 11 commits into
torrust:developfrom
josecelano:1875-review-lto-fat-in-dev-profile
Jul 21, 2026
Merged

fix(build): remove fat LTO from development profile#2013
josecelano merged 11 commits into
torrust:developfrom
josecelano:1875-review-lto-fat-in-dev-profile

Conversation

@josecelano

Copy link
Copy Markdown
Member

Summary

  • remove the obsolete lto = "fat" override from [profile.dev], restoring Cargo's default development-profile behavior
  • retain fat LTO in [profile.release] for production execution performance
  • remove an empty Containerfile continuation line that produced Docker's NoEmptyContinuation warning
  • convert the issue specification to folder format and add the LTO investigation record

Validation

  • cargo test --tests --benches --examples --workspace --all-targets --all-features
  • docker build --target debug --tag torrust-tracker:debug --file Containerfile .
  • docker build --target release --tag torrust-tracker:release --file Containerfile .
  • docker build --target recipe --file Containerfile .
  • TORRUST_GIT_HOOKS_LOG_DIR=.tmp ./contrib/dev-tools/git/hooks/pre-commit.sh --format=json

Closes #1875

Copilot AI review requested due to automatic review settings July 21, 2026 10:35
@josecelano josecelano self-assigned this Jul 21, 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 improves developer build and CI iteration speed by removing an unnecessary lto = "fat" override from the development Cargo profile, while keeping fat LTO for production release builds. It also cleans up a minor Dockerfile warning and migrates the #1875 issue spec into the repository’s folder-based issue format with an attached research record.

Changes:

  • Remove [profile.dev].lto = "fat" to restore Cargo’s default dev-profile LTO behavior.
  • Keep [profile.release].lto = "fat" unchanged for optimized production artifacts.
  • Fix a Containerfile empty continuation line warning and convert the #1875 spec into folder format with a research note.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Cargo.toml Removes dev-profile fat LTO while retaining release-profile fat LTO.
Containerfile Removes an empty continuation line that triggered Docker’s NoEmptyContinuation warning.
docs/issues/open/1875-review-lto-fat-in-dev-profile/ISSUE.md New folder-format issue spec documenting scope, verification, and acceptance criteria.
docs/issues/open/1875-review-lto-fat-in-dev-profile/research.md Adds investigation notes and rationale for restoring dev-profile defaults.
docs/issues/open/1875-review-lto-fat-in-dev-profile.md Removes the old standalone issue-spec file in favor of the new folder format.

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

Comment thread docs/issues/open/1875-review-lto-fat-in-dev-profile/ISSUE.md
Copilot AI review requested due to automatic review settings July 21, 2026 10:42

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 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread docs/pr-reviews/pr-2013-copilot-suggestions.md
Copilot AI review requested due to automatic review settings July 21, 2026 10:55
@josecelano
josecelano requested a review from a team as a code owner July 21, 2026 10:55

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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread docs/pr-reviews/pr-2013-copilot-suggestions.md
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.51%. Comparing base (f797ea7) to head (f375d34).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2013      +/-   ##
===========================================
+ Coverage    81.20%   81.51%   +0.30%     
===========================================
  Files          340      340              
  Lines        24000    24000              
  Branches     24000    24000              
===========================================
+ Hits         19490    19564      +74     
+ Misses        4200     4147      -53     
+ Partials       310      289      -21     

☔ 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.

Copilot AI review requested due to automatic review settings July 21, 2026 11:07

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 10 out of 10 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

docs/pr-reviews/pr-2013-copilot-suggestions.md:32

  • The Workflow section still omits the required “reply before resolve” step, even though the template and the process-copilot-suggestions skill now require replying on every PR suggestion thread (including no-action) before resolving. This doc should match the template/skill so it doesn’t guide future audits to resolve threads without a visible PR reply.
3. Process suggestions one by one:
   - decide `action` or `no-action`
   - if `action`, apply change and validate
   - if needed, commit changes
   - reply on the PR thread with the fix commit and outcome, or the no-action rationale
   - resolve the PR thread

Copilot AI review requested due to automatic review settings July 21, 2026 11:16

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 10 out of 10 changed files in this pull request and generated 1 comment.

Comment thread docs/pr-reviews/pr-2013-copilot-suggestions.md
Copilot AI review requested due to automatic review settings July 21, 2026 11:28

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 10 out of 10 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings July 21, 2026 11:41

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 14 out of 14 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings July 21, 2026 11:47
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Jul 21, 2026
- reply-to-thread.sh: guard against empty/null REPLY_URL from GraphQL;
  exit 1 if the mutation returns no comment URL so callers detect failure.
- reply-and-resolve-thread.sh: same guard before proceeding to resolve,
  preventing a silent resolve when the reply was never posted.
- check-thread-reply-status.sh: replace printf JSON construction with
  jq -n / --argjson so url:null is emitted as JSON null instead of the
  string "null".

Addresses Copilot review threads PRRT_kwDOGp2yqc6Sj3Ce,
PRRT_kwDOGp2yqc6Sj3Cy, PRRT_kwDOGp2yqc6Sj3DE on PR torrust#2013.
@josecelano

Copy link
Copy Markdown
Member Author

ACK 309426b

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 14 out of 14 changed files in this pull request and generated 1 comment.

```bash
git add <files>
git commit -S -m "chore(review): <concise description>"
git commit -S -m "fix(review): <concise description>"
- reply-to-thread.sh: guard against empty/null REPLY_URL from GraphQL;
  exit 1 if the mutation returns no comment URL so callers detect failure.
- reply-and-resolve-thread.sh: same guard before proceeding to resolve,
  preventing a silent resolve when the reply was never posted.
- check-thread-reply-status.sh: replace printf JSON construction with
  jq -n / --argjson so url:null is emitted as JSON null instead of the
  string "null".

Addresses Copilot review threads PRRT_kwDOGp2yqc6Sj3Ce,
PRRT_kwDOGp2yqc6Sj3Cy, PRRT_kwDOGp2yqc6Sj3DE on PR torrust#2013.
Added rows for PRRT_kwDOGp2yqc6Sj3Ce, PRRT_kwDOGp2yqc6Sj3Cy,
PRRT_kwDOGp2yqc6Sj3DE — all resolved in commit 3039b38.
Copilot AI review requested due to automatic review settings July 21, 2026 13:24
@josecelano
josecelano force-pushed the 1875-review-lto-fat-in-dev-profile branch from 309426b to f375d34 Compare July 21, 2026 13:24
@josecelano

Copy link
Copy Markdown
Member Author

ACK f375d34

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 14 out of 14 changed files in this pull request and generated 2 comments.

Comment on lines +5 to +6
Issue and EPIC specs use a folder named after the GitHub issue. The primary specification file
inside the folder is `ISSUE.md` for issues or `EPIC.md` for EPICs.
Comment on lines +21 to +25
Output:
- JSON lines to stdout, one per unresolved thread:
{"thread_id":"...","path":"...","url":"...","has_reply":true|false}
- Summary line at the end:
{"summary":true,"total":N,"with_reply":N,"without_reply":N}
@josecelano
josecelano merged commit a4105db into torrust:develop Jul 21, 2026
20 checks passed
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.

Review and fix lto = "fat" in [profile.dev]

2 participants