Skip to content

docs(issues): [#2670] specify building shipped artifacts without test features - #2671

Merged
josecelano merged 5 commits into
torrust:developfrom
josecelano:2670-2482-build-shipped-artifacts-without-test-features-spec
Oct 27, 2026
Merged

josecelano merged 5 commits into
torrust:developfrom
josecelano:2670-2482-build-shipped-artifacts-without-test-features-spec

Conversation

@josecelano

Copy link
Copy Markdown
Member

Related to #2670

Spec-only pull request for row 9 of sub-EPIC #2482: build the container image's shipped binaries (torrust-tracker and http_health_check) without test features, and fail CI if a workspace testing feature reaches them (rule A.5 of the ADR 20261021190318). It contains no code, Containerfile or workflow change; the implementation follows in a separate pull request.

What changes

  • Refreshes the row 9 draft against develop (audit of every command that builds a shipped artifact) and moves it to docs/issues/open/2670-2482-build-shipped-artifacts-without-test-features/ISSUE.md.
  • Records the design settled with the maintainer on 2026-10-27, with options, strengths, weaknesses and rejected alternatives: two builds (D1), the native-tracker container tests run against the shipped binary through a new TORRUST_TRACKER_BINARY variable (D2), a Rust check over cargo tree -e normal,build (D3), a host job in testing.yaml (D4), --all-features kept in the test archives (D5) and a dedicated shipped cook (D6).
  • Sets row 9 of the Reorganize test support code shared between workspace packages (EPIC #1669) #2482 Subissues table to IN_PROGRESS, adds a Progress Log entry, fixes the table's intro sentence (rows 8 and 9 were still listed as drafts) and updates the inventory link.

Worth a look

D3 departs from the first choice ("a Rust check over cargo metadata"): on a scratch workspace cargo metadata reports a testing feature that only a dev-dependency requests, while cargo build -p does not enable it, so it would flag correct builds. The spec's "Design evidence" section shows the outputs. The maintainer approved the refinement together with the spec.

Row 9 passes vacuously until row 3 adds the first testing feature, which is why the check gets an automated scratch-workspace red test.

…ut test features

Refresh the row 9 draft against develop, settle its design with the maintainer (two builds, the native-tracker tests run against the shipped binary, a Rust check over cargo tree run as a testing.yaml job), create issue torrust#2670 and move the spec to docs/issues/open/. Update row 9 of the torrust#2482 Subissues table and its Progress Log.

Co-authored-by: Copilot <[email protected]>
@josecelano
josecelano requested review from da2ce7 and a balanced review from Copilot October 27, 2026 08:47
@josecelano josecelano self-assigned this Oct 27, 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.

🟡 Changes recommended

The specification needs consistent test-preservation criteria and explicit required test-design review gates before implementation.

3 open issues
What changed in this PR

This documentation-only PR prepares issue #2670, row 9 of EPIC #2482, to keep test features out of shipped container binaries before the test-support migrations begin.

Changes:

  • Promotes the draft to an open issue specification with settled build and feature-checking decisions.
  • Defines implementation tasks, regression tests, acceptance criteria and manual verification.
  • Updates the parent EPIC’s status and inventory link; no runtime, container or workflow code changes.
File Description
docs/​issues/​open/​2670-2482-build-shipped-artifacts-without-test-features/​ISSUE.md Adds the refreshed specification and verification plan.
docs/​issues/​open/​2482-1669-reorganize-shared-test-support/​test-support-inventory.md Points row 9 to the open issue specification.
docs/​issues/​open/​2482-1669-reorganize-shared-test-support/​EPIC.md Records issue #2670 and marks row 9 in progress.
docs/​issues/​drafts/​2482-build-shipped-artifacts-without-test-features/​ISSUE.md Removes the superseded draft.

Review effort: Balanced

josecelano and others added 4 commits October 27, 2026 09:04
…er stops in the spec

The plan adds tests in T2 and T3, so the Regression Test Strategy and the Commit Points now require the recorded prose-first Arrange-Act-Assert review after each increment and the maintainer-review stop after the final increment of each task.

Co-authored-by: Copilot <[email protected]>
…recorded delta

T2 adds unit tests to a module that the lifecycle and configuration test targets include, so the container's test count can rise above the T1 baseline. The spec now records the baseline test list and requires every baseline test to remain present and passing, with the delta for new tests recorded, instead of an equal count.

Co-authored-by: Copilot <[email protected]>
… build commands

Docker defaults to a Dockerfile, which the repository root does not have, so scenario M1's baseline command failed before collecting the baseline. It now passes --file Containerfile for both targets, as docs/containers.md does.

Co-authored-by: Copilot <[email protected]>
@josecelano

Copy link
Copy Markdown
Member Author

ACK 6ec28a9

@josecelano
josecelano merged commit 249216a into torrust:develop Oct 27, 2026
1 check passed
josecelano added a commit that referenced this pull request Oct 28, 2026
…ssues/closed

e66f1f7 docs(pr-reviews): [#2670] record the second Copilot review of PR 2679 (Jose Celano)
171ed10 docs(pr-reviews): [#2670] record the review of PR 2679 (Jose Celano)
f784dfb chore(issues): archive closed issue #2670 spec to docs/issues/closed (Jose Celano)

Pull request description:

  Related to #2670

  Archives the spec of #2670 (row 9 of sub-EPIC #2482), which PR #2676 implemented and closed. The spec folder (`ISSUE.md`, evidence, retrospective and the baseline test list) moves from `docs/issues/open/` to `docs/issues/closed/`, its status becomes `done`, and the remaining checkpoint boxes that are now true are ticked.

  Live references are repaired: row 9 of the #2482 Subissues table is DONE with a Progress Log entry, the inventory row says "Resolved by #2670", and the audits of PR #2671 and PR #2676 point at the new path. Docs only; no code, workflow or `Containerfile` change.

ACKs for top commit:
  josecelano:
    ACK e66f1f7

Tree-SHA512: 4b10df990b1f1c221053e636762acf8ddff1345718c4afb25e078cd68bbd28bbb9a9458821a4a26047e1bd6d23210ada52b38503979c56863a029b97e3a54a73

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed at 6ec28a96a14385178b4f6c96fca572b3004698a9 (post-merge). Recomputed from the bytes at the merged head, against the base 72fbeacc1; the PR merged on 2026-10-27 at 11:53:26Z as 249216aed.

Label: POST_MERGE_FINDINGS — Review requested 2026-10-27T08:47:14Z; the PR merged before this round ran. The findings below stand at the merged head for a follow-up; no ACK follows a merged PR.

Scope: the draft is replaced by an open issue specification; the parent row and inventory point to it. Five commits change five files (+553/-219), with no executable, container or workflow change. The build-command inventory matches the pre-implementation files; the root has no feature table and no workspace package defines testing.

Records: the specification contains the issue-template planning, ownership, test strategy, commit points and verification sections; its implementation acceptance remains open. D1–D6 distinguish the two builds, normal/build feature checking and the explicitly deferred archive-feature change. Approval and scratch-run claims have no independent event or execution artifact in this capture.

The review bot: one substantive review with three concerns, all agreed and addressed. The final spec adds incremental test-design review and maintainer stops, requires preservation of the baseline test set plus an explained delta, and supplies --file Containerfile for both baseline builds. All three captured threads are resolved; the audit’s sources, reply ids and unique fix subjects match. The original R3 identifier is retained in the F3 detail.

Hygiene: conventional subjects and matching author/committer identities; attribution footers are present, with no located prohibition. No description closing-pattern match. Changed Markdown file targets resolve. The specification’s final update stamp precedes its carrying commit; no implementation test result is claimed here.

Findings: F4 Minor, an overstatement of what the planned check can establish. Checked, no finding: scope separation from PR #2676, baseline-preservation correction, explicit archive-feature deferral, and the dependency order before the first testing feature.

Checks

On the loop's compute hub at the merged head, against the base 72fbeacc1 (receipt server-gates-sojka-481; the PR merged as 249216aed): pre-commit profile gate exit 0 (103 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 16 errors / 4 warnings at the merged head and 16 / 4 at the base re-measured, the same 20 diagnostics by path and category; the audit validator over docs/pr-reviews/pr-2671-review/PR-REVIEW.md with the review comments and commit list captured at gate time: ok, 3 rows, 1 log entries, 0 failures. GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is 968099d93.

`NEXTEST_BIN_EXE_torrust-tracker`. The `test` and `test_debug` stages set it to the shipped
binary, so the black-box native-tracker tests exercise exactly what ships, in the build
environment. Everywhere else the variable is unset and behaviour is unchanged.
3. Both builds use the same image, compiler, profile and `RUSTFLAGS`; the check proves the feature

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Minor][F4] Limit the claimed proof to the feature check’s actual input

D3 specifies a check of one shipped package’s normal/build dependency tree, while D4 runs it in a host job. That input contains neither the test build’s configuration nor the compiler, profile, image or flags used to produce either artifact. It cannot prove that features are the only difference between the builds as D2 claims. Describe common build settings as a separately maintained invariant, and the check as evidence only that the selected shipped dependency graph has no forbidden feature. The same statement is carried forward by PR #2676 and the archive PR #2679.

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.

3 participants