#36497 test: Add coverage for TorControl `SAFECOOKIE` authentication

ReviewabilityReviewsAgreementSize
#36497 winterrdog test: Add coverage for TorControl `SAFECOOKIE` authenticationReady1Strong0 + 206 tests
  • Add automated test coverage for Tor controller SAFECOOKIE authentication
  • Prevent regressions in Tor controller handshakes and error handling
  • Ready to review
  • Substantive support with no open objections
  • Verified by testing against intentional code mutations that pass on master (mercie-ux)
  • Approval without stated reasons (jpk68)
  • 0 lines added or modified outside tests
  • 206 lines added or modified in tests
  • 0 lines removed in total
  • 1 files, 1 commits
Uncategorized15 PRs, unranked
1 rejected
  • Test infrastructure: not a member. Touches only test/functional/feature_torcontrol.py (+206/-0) with maintainer label 'Tests'.
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.

Goal

Adds functional test coverage for TorControl SAFECOOKIE authentication in feature_torcontrol.py. A mock Tor control server tests successful authentication handshakes as well as error handling for challenge failures, invalid server nonces, mismatched server hashes, and missing or short cookie files.

Problem: TorControl SAFECOOKIE authentication has no automated functional test coverage, allowing protocol regressions or errors in Tor controller communication to go undetected.

Evidence of importance:

  • Author note in description: 'while working on #35292, i realised we did not have coverage for SAFECOOKIE authentication either, so i added it here'

Risk of a mistake: low (tests). Only modifies functional test code in test/functional/feature_torcontrol.py.

Changed since the previous assessment: None; the diff matches the previous description.

Reviewability

Ready

Nothing known that would invalidate a review now.

Waiting on (from the thread read):

  • nothing: no pending items

Agreement

Strong

substantive support, no open objection (mercie-ux)

Thread notes: Added Concept ACK from mercie-ux who tested the functional test changes against intentionally mutated torcontrol.cpp code.

Objections, suggestions, and questions: none recorded.

Support:

  • jpk68 (contributor) (ACK, 2026-10-20): (no reason given) [not substantive]
  • mercie-ux (contributor) (Concept ACK, 2026-10-21) [tested: torcontrol.cpp]: verified the new tests catch mutations in torcontrol.cpp that pass on master

Participants:

  • jpk68 (contributor, support, 1 statements 2026-10-20 to 2026-10-20): ACKed commit hash
  • mercie-ux (contributor, support, 1 statements 2026-10-21 to 2026-10-21): Concept ACK with mutation testing

Files

206 lines under test/bench/ci.

  • test/functional/feature_torcontrol.py +206/-0

Card

The short text the ranking pass compares across PRs.

Adds functional test coverage for TorControl SAFECOOKIE authentication in feature_torcontrol.py. The node's SAFECOOKIE authentication handling previously lacked functional test coverage, risking undetected regressions in Tor control connection management. Tests exercise both successful authentication flows and failure handling for invalid nonces, corrupted server hashes, failed challenge responses, and invalid cookie files.

Data

dossier JSON · extract JSON · model ledger, generated 2026-10-22T01:16, confidence high, input hash 9a56c9c469c4cc4b
thread read through 2026-10-21 (3 statements), head 6827006f4f
labels: Tests