Skip to content

test(tracker-core): [#2902] cover the SQLite persistence boundary - #3009

Merged
josecelano merged 49 commits into
torrust:developfrom
josecelano-bot:2902-1347-add-tests-tracker-core-sqlite
Nov 24, 2026
Merged

josecelano merged 49 commits into
torrust:developfrom
josecelano-bot:2902-1347-add-tests-tracker-core-sqlite

Conversation

@josecelano-bot

@josecelano-bot josecelano-bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Related to #2902

Slice S2 of #2902: tests for the SQLite persistence boundary of packages/tracker-core and the error conversions, plus one small refactor decided in the spec (Q4, finding F2): parse_valid_until and the key-and-expiry parse were copied in the SQLite, MySQL and PostgreSQL key stores, and now live once in databases/driver/mod.rs, taking the driver. Errors, messages and drivers are unchanged. The refactor was also run against local mysql:8.0 and postgres:16 containers (the Docker suites pass). It is the only production change of this PR; everything else is test code and documentation.

Each file went through the spec's per-file workflow: a plan approved by the maintainer, the tests, hand-made named mutations, and a completed-file review. The plans and their results are in docs/issues/open/2902-1347-add-tests-tracker-core/test-refactor-plans/.

Ledger row File Decision
8 sqlite/auth_key_store.rs and the shared key parsing the refactor above; 22 tests: the failure branches of the store on a temporary database with raw bad rows, the shared functions (rstest cases and one quickcheck property)
9 sqlite/torrent_metrics_store.rs 21 tests: bad counts, unparseable info-hashes, missing tables, save overwrites, increases never create a row; the store test setup moved into a shared fixture of the driver
10 sqlite/whitelist_store.rs 5 tests: a stored info-hash that does not parse or is not text, a missing table, a failed get and remove
11 sqlite/mod.rs 8 tests of the aggregate-metric helpers behind the global downloads total
12 sqlite/schema_migrator.rs each uncovered line challenged: 3 tests (a tampered migration history is refused, a closed pool when creating and when dropping); the mid-function ? lines are left with reasons, and one mutant survives as equivalent
13 databases/error.rs tables pin how every sqlx error is classified and that each conversion keeps its driver; five of eight mutants had survived the old tests despite full line coverage
14 databases/setup.rs the four stores share one migrated database, a database that cannot be opened, the two panics of the legacy factory; the MySQL and PostgreSQL arms stay with S3
15 error.rs a four-case table of the TrackerCoreError conversions and messages
16-17 databases/driver/mod.rs, databases/mod.rs, databases/traits/* no change, with the reasons recorded

Coverage of tracker-core (stable Rust 1.100.0, cargo-llvm-cov 0.9.1, against the develop base f73a359f8): unit-only lines 84.47% to 87.11% (281 unit tests, 201 on the base), aggregate the same. Details: coverage-evidence.md, section "Slice Measurements".

Also in this PR:

  • The branch was rebased on develop after Remove source locations from the errors of torrust-tracker-core #2916 removed the source locations from the tracker-core errors; one test of row 15 built errors with the removed field and was adapted in its own commit.
  • Two dev-dependencies are added to tracker-core, quickcheck and quickcheck_macros, for one property, as the spec decided in Q5; Cargo.lock gains only dependency edges of packages it already holds.
  • The EPIC Overhaul: Packages Testing #1347 rows of tracker-core hold the latest values; row 14 stays in progress.

Validation: cargo test -p torrust-tracker-core --all-features (281 unit, 15 integration and 18 other tests), cargo clippy -p torrust-tracker-core --all-targets --all-features, cargo +nightly fmt --all -- --check, cargo machete --with-metadata, the pre-commit gate on every commit as it was made (before the rebase onto develop), and the repository's pre-push checks on push. After the rebase, the commits from test(tracker-core): [#2902] pin the variant and the message of each tracker core error conversion up to the one before test(tracker-core): [#2902] adapt the tracker core error table to errors without source locations do not compile their test target, because that table builds errors with the location field that #2916 removed; the adapting commit fixes it, and the history was not rewritten to hide the step.

🤖 Generated with Claude Code

josecelano-bot and others added 30 commits November 23, 2026 16:12
…re tests

The first plan of S2 covers the failure branches of the SQLite key store and extracts the shared
`parse_valid_until` and `peer_key_from_row`, as the maintainer decided on Q4 and F2.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…etween the database drivers

The SQLite, MySQL and PostgreSQL key stores each kept a copy of `parse_valid_until` and repeated
the key-and-expiry parse twice, in `load_keys` and `get_key_from_keys`. Both now live once in
`databases/driver/mod.rs`, taking the driver, so the failure branches can be tested once and no
copy can drift. Errors, messages and drivers are unchanged. With the MySQL and PostgreSQL suites
run against local containers (`mysql:8.0`, `postgres:16`), the refactored stores pass.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…g of the database drivers

`parse_valid_until` and `peer_key_from_row` had no test of their own: the SQLite copies ran only
through the happy path and the server-driver copies only in the Docker suites. Cases cover a
valid, a negative, a zero and the largest expiry, a permanent and an expiring key, a key that is
too short and a key with a symbol, and that the error names the driver it is given; one property
says an expiry is accepted exactly when it is not negative. `quickcheck` and `quickcheck_macros`,
already in the lock file, become dev-dependencies of the package.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…SQLite auth key store

The store was tested only on its happy path. Tests over a temporary database cover a stored key
that does not parse or is not text, a negative or non-integer expiry and a missing table when the
keys are loaded or one is read, an expiry beyond the largest stored timestamp, a duplicate key
that must leave the first one stored, and a failed delete.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
The tests of the SQLite key store built their own store over a temporary database. The torrent
metrics, whitelist and driver tests need the same, so the store setup and the raw statement
runner move to a fixture module of the driver. The key store tests are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…SQLite torrent metrics store

The store was tested only on its happy path. Tests over a temporary database cover a stored count
below zero, above `u32` or not an integer, an info-hash that does not parse or is not text, and a
missing table, for the three reads and the three writes; that saving a torrent again overwrites
it, that the largest count round-trips, and that increasing the downloads of a torrent or the
global total never creates a row.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… metrics store tests

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…SQLite whitelist store

The store was tested on its happy path and one duplicate add. Tests over a temporary database
cover a stored info-hash that does not parse or is not text, a missing table when the whitelist
is loaded, and the failed query of a get and of a remove.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… of the SQLite driver

The helpers behind the global downloads total were tested only through the shared suite's happy
path. Tests on a temporary database cover a stored value below zero, above `u32` or not an
integer, a missing table on load and on save, that each metric name keeps its own row, that saving
a name again overwrites it, and that the largest `u32` round-trips.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…SQLite schema migrator

A migration history whose checksums no longer match the embedded migrations must be refused as a
migration error and must leave the existing tables alone, and a closed pool must surface as a
connection error when the tables are created or dropped. The legacy bootstrap tests are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…fied and which driver they keep

Line coverage showed the conversions of `databases/error.rs` as covered, yet moving `Tls`,
`PoolTimedOut`, `WorkerCrashed` or `Configuration` to the invalid-query arm, or hard-coding the
driver of the migration conversion, passed every test. Tables over the `sqlx` error variants and the
migration error pin which are missing rows, connection errors and invalid queries, and that every
conversion keeps the driver it was given. They replace the two tests that covered one case each.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…es one migrated driver

The one test of the factory asserted nothing. Tests now check that the four stores it returns share
one migrated database (dropping the tables through the schema migrator breaks the whitelist store),
that a database that cannot be opened returns an error, and that the legacy `initialize_database`
panics with its documented messages when the configuration has no database or it cannot be opened.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… each tracker core error conversion

The four `From` conversions into `TrackerCoreError` had no test. A table checks that each source is
wrapped in the variant of its area and that the message starts with the area it names, the text
the tracker logs for a failed announce or scrape.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…atabase driver module and traits

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… to errors without source locations

torrust#2916 removed the `location` field of the database, whitelist and authentication key errors. The
four-case table of `TrackerCoreError` built three of them with a location, so after rebasing on
`develop` it no longer compiled. It now builds them without one; its cases and assertions are
unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ment

The S2 branch, rebased on `develop` `f73a359f8`, is measured in the four default scopes next to its
base: unit-only lines 84.47% to 87.11%, aggregate the same. The aggregate still equals unit-only. The
EPIC's torrust#2902 rows hold the latest values; row 14 stays in progress.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@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 39cd93c0bf158abd5ff35fc050fea50ada1c50fe. Recomputed from the bytes at this head, against the merge base f73a359f8; git merge-tree against develop 6bc417424 still writes a tree with no conflict, and the merge base is unchanged. This round reads the seven commits since d4b4611ce (a fast-forward) and the review record since then.

Verdict: COMMENT, no approval at this head. The automated review posted at 16:54:40Z on d4b4611ce left three threads that have no reply and no row in the audit record, although they predate both the replies (17:01Z) and the record's commit (17:05Z); see F9. No finding blocks.

Process: the round 1 fixes follow process-pr-review: one commit per fix, a reply on each of the nine threads, and the record with nine rows. The validator's logic, run offline against the capture with the pull request's commits from the local range, passes (9 rows, 1 log entry, 0 failures).

The change against its claim: F1 to F8 are fixed at this head.

  • The setup test now also checks the key store and the metrics store after the drop.
  • The test module imports TempDir and tempdir.
  • The spec names the S2 branch and marks S1 done.
  • The four plans give head line numbers and say so, except one bullet (F10).
  • The plan row now says what the test asserts.
  • The description says the gate ran before the rebase and names the commits that do not compile, by subject.

Each commit body matches its diff, and the project dictionary gains the one name the record needs.

Hygiene: 38 commits; the seven new ones are Conventional with [#2902], and author = committer. git diff --check is clean, the commit-id check prints nothing, and there is no closing keyword in the title, the description or the folded messages. Each new commit carries one attribution footer line (no rule in the tree on it); the description carries one attribution footer line too.

Findings: F9 is Minor and F10-F11 are Nit, all inline.

Checked, no finding: the three must share one database assertions against the four DatabaseStores fields; load_global_downloads failing on a dropped torrent_aggregate_metrics; every refreshed line number against the head files; each row's verification command against the head; the record's shape against the S1 record.

Checks

On the loop's compute node at this head, against the merge base f73a359f8 (receipt server-gates-kranich-1396): the repository's pre-commit gate and lint roster exit 0 (98 s wall), and the audit validator passes on this PR's record (9 rows, 1 log entry, 0 failures). In the per-PR target directory, with the changed crates recompiled at this head, cargo test --workspace --no-fail-fast passes 4563 tests with 0 failed and 5 ignored across 131 binaries (87 s wall), cargo clippy --workspace --all-targets --all-features -- -D warnings is clean, and cargo deny check exits 5 with exactly the error set develop has. Checked against the bytes at posting: docs/pr-reviews/pr-3009-review/PR-REVIEW.md does not mention review 6025721446, so its three threads have no rows, as F9 says. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "CodeRabbit: completed/neutral; Greptile Review: completed/success". At posting, develop is 6bc417424.

josecelano-bot and others added 2 commits November 23, 2026 17:21
… in one numbering

The refresh of the line numbers left one bullet of the key store plan in the baseline numbering
while the next gave head numbers. It now gives the head numbers and names the baseline's.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…o date

The stamp still read 16:27 although the spec was edited again at 16:56 and 16:57, for the branch
field and the S1 row.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…rrust#3009

The record now names the three reviews of round 1, says which head each was of, and gives
da2ce7's second review its rows. F6 no longer claims a row for every finding of the round.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
da2ce7
da2ce7 previously approved these changes Nov 23, 2026

@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 691a2bce24d47cbe267196412383c23c6cb24ac4. Recomputed from the bytes at this head, against the merge base f73a359f8; git merge-tree against develop 6bc417424 still writes a tree with no conflict, and the merge base is unchanged. This round reads the three commits since 39cd93c0b (a fast-forward) and the review record since then.

Process: the third round 1 review is now handled under process-pr-review. Its three threads have replies on their own threads, rows F10-F12 in the record (one superseded by F1 with the exact reply form, two fixed in their own commits), and are resolved. The validator's logic, run offline against the capture with the pull request's commits from the local range, passes (12 rows, 2 log entries, 0 failures). Every thread opened before this head's last record commit (17:16Z) has a reply, a row and a resolution.

The change against its claim: the two panic tests now carry the it_should_ prefix, with their should_panic texts unchanged. Each of the eight S2 plans has a Prose-First AAA Review section that says it was written after the fact. I read every row against the test it names and each matches, except one reason in the setup plan (F12).

Still open from round 2. These threads were posted after this head's last record commit, so they do not hold the verdict, but each still needs a reply and a row:

  • F9 is fixed in substance, but the record's intro still opens "Round 1 is two reviews".
  • F10 and F11 are unchanged at this head.

Hygiene: 41 commits; the three new ones are Conventional with [#2902], author = committer, and their bodies match their diffs. git diff --check is clean, the commit-id check prints nothing, and there is no closing keyword in the title, the description or the folded messages. Each new commit carries one attribution footer line (no rule in the tree on it); the description, unchanged since round 2, carries one attribution footer line too.

Findings: F12 (Nit), inline. F9-F11 carry over as above; none blocks.

Checked, no finding: the renamed tests against the two expect messages; each record row's verification command at this head (F11's prints 10 and F12's prints 0); each Reply URL on its own source thread; the superseded reply against the Completion Rules form.

Checks

On the loop's compute node at this head, against the merge base f73a359f8 (receipt server-gates-kranich-1400): the repository's pre-commit gate and lint roster exit 0 (62 s wall), and the audit validator passes on this PR's record (12 rows, 2 log entries, 0 failures). In the per-PR target directory, with the changed crates recompiled at this head, cargo test --workspace --no-fail-fast passes 4563 tests with 0 failed and 5 ignored across 131 binaries (86 s wall), cargo clippy --workspace --all-targets --all-features -- -D warnings is clean, and cargo deny check exits 5 with exactly the error set develop has. Checked against the bytes at posting: the two legacy-factory panic tests in packages/tracker-core/src/databases/setup.rs are now named with the it_should_ prefix. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "CodeRabbit: completed/neutral; Greptile Review: completed/success". At posting, develop is 6bc417424.

@da2ce7

da2ce7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

ACK 691a2bc — every review thread opened before this head's last record commit is answered, recorded and resolved, the validator logic passes on twelve rows, and the renamed tests and the eight prose-first reviews match the code

josecelano-bot and others added 2 commits November 23, 2026 17:30
… an assertion

`it_should_initialize_the_sqlite_database` called the factory and asserted nothing. It now checks
that a freshly initialized database has its tables and an empty whitelist; skipping the table
creation fails it on its own.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e setup tests

The Prose-First AAA review said the assertion-less setup test was kept because the other tests use
it as their fixture, which is not true. The plan now says so, and records the changes made in review:
the test names, the four-store assertion and the assertion given to the existing test.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@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 213e450a0e055a95dc37474cac59b71300a1ecb3. Recomputed from the bytes at this head, against the merge base f73a359f8; git merge-tree against develop 6bc417424 still writes a tree with no conflict, and the merge base is unchanged. This round reads the three commits since 691a2bce2 (a fast-forward) and the review record since then.

Verdict: COMMENT, no approval at this head. The automated review 6026192696 (17:23:10Z, on 691a2bce2) left one thread on PR-REVIEW.md:71. It has no reply and no row, although it predates this head's record commit (17:25Z); see F13. No finding blocks.

Process: round 2 is recorded under process-pr-review. Each of its three threads has a reply on its own thread, a row (F13-F15, renumbered because the IDs collide, as the skill says) and a resolution. The validator's logic, run offline against the capture with the pull request's commits from the local range, passes (15 rows, 3 log entries, 0 failures).

The change against its claim: round 2's F9-F11 are fixed. The intro now names the three round 1 reviews and the head each was of, F6 no longer claims every finding, the plan bullet gives both numberings, and the stamp reads 17:22, the time of the commit that moved it. Each verification command prints what its row says (5, 1, 17:22).

Hygiene: 44 commits; the three new ones are Conventional with [#2902], author = committer, and their bodies match their diffs. git diff --check is clean, the commit-id check prints nothing, and there is no closing keyword in the title, the description or the folded messages. Each new commit carries one attribution footer line (no rule in the tree on it); the description, unchanged since round 2, carries one attribution footer line too.

Findings: F13 is Minor and F14 is Nit, both inline. F12 (17:27Z) postdates this head's record commit and carries over without holding.

Checked, no finding: the new intro against the review list (6025339962 on b7310eea0; 6025674705 and 6025721446 on d4b4611ce; 6025835445 with no finding); each new Reply URL on its own source thread; the log's order.

Checks

On the loop's compute node at this head, against the merge base f73a359f8 (receipt server-gates-kranich-1406): the repository's pre-commit gate and lint roster exit 0 (106 s wall), and the audit validator passes on this PR's record (15 rows, 3 log entries, 0 failures). The code is unchanged since 691a2bce2, where the workspace tests (4563 passed, 0 failed), clippy and deny ran as reported in round 3; the commits since change documentation only. Checked against the bytes at posting: row F10 of docs/pr-reviews/pr-3009-review/PR-REVIEW.md records Copilot's duplicate of F1 with the Relationship ORIGINAL, which the automated thread F13 describes asks to be a re-raise. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "CodeRabbit: completed/neutral; Greptile Review: completed/success". At posting, develop is 6bc417424.

…rust#3009

F10 is a re-raise of F1 and resolves to its reply URL, as the Completion Rules ask, and the two new
findings of the round have their rows.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK 213e450

josecelano-bot and others added 2 commits November 23, 2026 17:43
…e their fixing commits as references

F6, F13 and F17 were fixed by edits to the review record itself, so their resolution reference is
the subject of the commit that made the edit, as the skill asks; a reply URL stays the reference
only for a fix outside the tree (F5) or a `NO_ACTION` row (F10).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@josecelano

Copy link
Copy Markdown
Member

ACK e97fe40

@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 266a5ccb6de5b38473c76e05c432fed4bf99b68e. Recomputed from the bytes at this head, against the merge base f73a359f8; git merge-tree against develop 6bc417424 still writes a tree with no conflict, and the merge base is unchanged. This round reads the five commits since 213e450a0 (fast-forwards through e97fe40d5) and the review record since then.

Process: every review thread, all nineteen of them opened before this head's last record commit (17:46Z), has a reply on its own thread, a row in the record and a resolution. The validator's logic, run offline against the capture with the pull request's commits from the local range, passes (19 rows, 5 log entries, 0 failures).

The change against its claim:

  • F12 is fixed: the setup smoke test asserts an empty whitelist, which fails if the table creation is skipped, and the plan says the old reason was untrue.
  • F13 is fixed: the F10 row is RE_RAISE_OF:F1 with its reply URL.
  • F14 is fixed: rows F6, F13 and F17 now cite the commits that edited the record, and every FIXED row cites a commit subject except F5, whose fix is the description.
  • Rows F18 and F19 record round 4, and each verification command prints what its row says (RE_RAISE_OF:F1 and 4; 1).

Hygiene: 49 commits; the five new ones are Conventional with [#2902], author = committer, and their bodies match their diffs. git diff --check is clean, the commit-id check prints nothing, and there is no closing keyword in the title, the description or the folded messages. Each new commit carries one attribution footer line (no rule in the tree on it); the description, unchanged since round 2, carries one attribution footer line too.

Findings: F16 (Nit), inline; it does not block.

Checked, no finding: the smoke test's assertion against the factory; the round 3 and round 4 paragraphs against the review list; every Reply URL on its own source thread; the log's order; that no review thread or comment other than an issue-comment acknowledgement appeared after 17:44Z.

Checks

On the loop's compute node at this head, against the merge base f73a359f8 (receipt server-gates-kranich-1416): the repository's pre-commit gate and lint roster exit 0 (165 s wall), and the audit validator passes on this PR's record (19 rows, 5 log entries, 0 failures). The code is unchanged since e97fe40d5, where cargo test --workspace passed 4563 tests with 0 failed and 5 ignored across 131 binaries, clippy was clean and cargo deny check matched develop exactly (receipt server-gates-kranich-1412); the commits since change only the audit record. Checked against the bytes at posting: the Findings table of docs/pr-reviews/pr-3009-review/PR-REVIEW.md now holds 19 rows, one for each review thread. The head was confirmed with git ls-remote before posting. GitHub checks at this head at posting time: "CodeRabbit: completed/neutral; Greptile Review: completed/success". At posting, develop is 6bc417424.

@da2ce7

da2ce7 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

ACK 266a5cc — all nineteen review threads are answered, recorded and resolved, the validator logic passes on nineteen rows, and every in-tree fix in the record cites its commit

@josecelano

Copy link
Copy Markdown
Member

ACK 266a5cc

@josecelano
josecelano merged commit 057bcdf into torrust:develop Nov 24, 2026
54 of 60 checks passed
josecelano pushed a commit that referenced this pull request Nov 24, 2026
…1 test plans

The review of #3009 found the section missing from the plans of the statistics files and the
temporary-database fixture; it belongs before the completed-file review. Each table is written
from the plan's Test Design and compared with the code; smells found are recorded, none is fixed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
josecelano pushed a commit that referenced this pull request Nov 24, 2026
…ord the fifth review round of #3009

The F18 row said its fix was already pushed when the review was written; it landed 44 seconds
after the review was submitted. The maintainer's approval review of the next head pointed this out
(his F16, recorded as F20).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
josecelano added a commit that referenced this pull request Nov 24, 2026
…view to the S1 test plans

da2ae70 docs(pr-reviews): [#2902] say commit time, not push time, for the F18 fix (josecelano-bot)
fe86c78 docs(pr-reviews): [#2902] give F20 its reply URL and log entry (josecelano-bot)
9765f36 docs(pr-reviews): [#2902] correct when the F18 fix was pushed and record the fifth review round of #3009 (josecelano-bot)
61f6b8f docs(issues): [#2902] add the missing Prose-First AAA Review to the S1 test plans (josecelano-bot)

Pull request description:

  Related to #2902

  Documentation only, follow-up to #2988 and #3009. The review of #3009 found that the test plans of slice S1 lack the Prose-First AAA Review that the per-file workflow requires before the completed-file review, and that one sentence of the #3009 audit record is wrong. This PR changes no code.

  - **Six S1 plans** (`statistics/persisted/mod.rs`, `persisted/downloads.rs`, `event/listener.rs`, `event/handler.rs`, `statistics/mod.rs` and the temporary-database fixture) get the section, written after the fact from each plan's Test Design and compared with the code, like the S2 plans in #3009. It is marked temporary prose for that reason. Smells found are recorded and none is fixed: the three older tests of `downloads.rs` have no AAA comments and read back inside the Act, and one handler test has mock expectations without call counts. The fixture plan adds no test, so its section says so.
  - **The audit record of #3009**: the F18 row said its fix "was already pushed when the review was written"; the commit landed 44 seconds after the review was submitted. The row and the round 4 log entry are corrected, and da2ce7's finding F16 on that sentence is recorded as F20 (his ID collides with an existing row).

  Validation: the pre-commit gate ran on both commits.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
  <!-- coderabbit-ai-generated:v1 -->

  ## Summary by CodeRabbit

  * **Documentation**
    * Expanded test plans with reviews of test setup, actions, expectations, and coverage observations.
    * Updated a pull request review record with a follow-up finding, corrected fix timing, and revised processing details.
  <!-- end of auto-generated comment: release notes by coderabbit.ai -->

ACKs for top commit:
  josecelano:
    ACK da2ae70

Tree-SHA512: e5bf4d7301afb9cc1d7dfbd57e66dadf334c966f8f8cb30139540179591a831b592f1740e3698c20071ad5de5f08ebc453060f8b4bf9f839cff948ff18f574f4

This branch was previously deployed

1 inactive deployment
coverage — 266a5ccb Deployed Nov 23, 2026 by josecelano-bot via Generate Coverage Report #3415
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.

4 participants