Skip to content

refactor(test): keep TLS parser coverage in its shared owner - #176780

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-shared-tls-20261019
Oct 19, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/test-audit-shared-tls-20261019

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The desktop suite repeats a TLS parser test already owned by the shared Rust Gateway client.

User Impact

No user-visible change. Remove one redundant test without changing TLS validation or desktop behavior.

Why This Change Was Made

The shared-client extraction in #116050 left a desktop test calling the imported tls_trust function directly. All three assertions remain verbatim in the shared crate's keeper, alongside certificate matching checks.

Keep the desktop-specific TLS error-state and reconnect-policy tests, the real TLS integration tests, and all production code unchanged. This removes 13 test lines and no production lines.

Evidence

  • git diff --check and the scoped check:changed lane pass. Its formatter does not handle Rust; Rust formatting is covered by the unchanged-input workspace proof below.
  • Independent preservation review found no actionable defects or distinct coverage loss.
  • Rust workspace proof passed on October 19 at 9d013baeb67c283c51bdcc3928b4330c7ccf5d97. Both its complete crates tree (a33691516bf1b071407f81249f3bfef766770a2e) and conformance workflow (a6940dc659b2b55b391699af6d6c2c31e42a93ab) are identical to this candidate's inputs.
  • The inspected Rust log confirms the parser keeper and all four TLS integration cases pass, including pin mismatch, signature verification, approval ordering, and rejection/timeout/cancellation. This is reused unchanged-input keeper proof.
  • Exact-head PR CI and desktop platform validation passed for 06c8ef735b6cd035c33d94f2ebab147db892846a. Linux, macOS, and Windows validation passed; Windows installer packaging completed successfully at 02:32:31 UTC on October 19. No local Rust execution is claimed.
  • Native squash landing completed at 02:36:02 UTC on October 19 as 3307a08100748c3894fc1e4586e0f4d06422fa2e. Remote MERGED state, main ancestry, the removed desktop replay, and the retained shared parser keeper were verified.

@vincentkoc vincentkoc self-assigned this Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 19, 2026 01:48
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes a redundant desktop TLS parser test already covered by the shared Rust Gateway client.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A minimal, correct cleanup supported by retained contract tests and hosted validation; evidence is test-based rather than a shipped-entry-point demonstration.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test deletion changes no runtime behavior; preservation is supported by source comparison, exact-head Linux tests, and successful shared-workspace validation with identical inputs.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-authored direction reduces duplicate test maintenance and preserves every distinct covered boundary.

Merge readiness

✅ Ready for maintainer review

This PR is a sound, maintainer-authored cleanup: the removed assertions remain in the shared owner, desktop-specific coverage is preserved, and no actionable defect was found.

Priority: P3
Reviewed head: 06c8ef735b6cd035c33d94f2ebab147db892846a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Linux desktop passes its optional certificate fingerprint to the shared Gateway client's TLS parser, which selects system roots, produces an exact certificate pin, or rejects invalid input.

flowchart LR
  A[Desktop Gateway configuration] --> B[Shared TLS parser]
  B --> C[System roots or certificate pin]
  C --> D[Gateway TLS connection]
  E[Shared parser tests] --> B
  F[Desktop error state tests] --> A
Loading

Technical review

Best possible solution:

Keep parser assertions in the shared crate while retaining desktop-specific failure-state and reconnect coverage.

Do we have a high-confidence way to reproduce the issue?

There is no reported runtime bug; source comparison verifies that both tests invoke the same imported parser with identical assertions.

Is this the best way to solve the issue?

The deletion is the smallest complete cleanup: it removes duplicate coverage without changing the parser, desktop integration, or distinct security tests.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 84dffb7ec632.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Gio Della-Libera: Raw commit f9a7f10 adds apps/linux/src-tauri/src/gateway_ws.rs:3863 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f9a7f104c22a; files: apps/linux/src-tauri/src/gateway_ws.rs)
  • Peter Steinberger: Raw commit 7dbeb96 adds apps/linux/src-tauri/src/gateway_ws.rs:4027 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7dbeb96c3981; files: apps/linux/src-tauri/src/gateway_ws.rs)

PR surface

Source -13. Total -13 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 0 13 -13
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 0 13 -13

Review metrics

Metric Value Why it matters
Production versus test LOC Production +0; tests -13 Removes duplicate assertions without reducing the shared parser contract or adding machinery.

Labels

Label changes:

  • add P3: Low-risk test maintenance with no user-visible behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: Low-risk test maintenance with no user-visible behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 18, 2026, 10:04 PM ET / October 19, 2026, 02:04 UTC.

@vincentkoc
vincentkoc merged commit 3307a08 into main Oct 19, 2026
143 checks passed
@vincentkoc
vincentkoc deleted the refactor/test-audit-shared-tls-20261019 branch October 19, 2026 02:36
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: linux P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant