Repository navigation
Conversation
Greptile SummarySummary
Confidence Score: 4/5Not safe to merge until cancellation consistently invalidates requests that were already admitted. A reproduced correctness failure allows an invalidated credential operation to return its backend result. Files Needing Attention: src-tauri/src/linux_credential_worker.rs
What T-Rex did
Prompt To Fix All With AI### Issue 1
src-tauri/src/linux_credential_worker.rs:175
**Preserve invalidation ordering**
The request marks the worker busy before it snapshots the cancellation generation. If `invalidate()` runs in that interval, the request records the new generation, so both later generation checks succeed and its backend result is delivered even though the request was already admitted when cancellation occurred. Capture the generation before admission, or make admission and generation capture atomic with respect to invalidation, so cancelled credential work cannot be applied.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "Add bounded Linux credential worker foun..." | Re-trigger Greptile |
| { | ||
| return Err(WorkerError::Busy); | ||
| } | ||
| let generation = self.state.generation.load(Ordering::SeqCst); |
There was a problem hiding this comment.
Preserve invalidation ordering
The request marks the worker busy before it snapshots the cancellation generation. If invalidate() runs in that interval, the request records the new generation, so both later generation checks succeed and its backend result is delivered even though the request was already admitted when cancellation occurred. Capture the generation before admission, or make admission and generation capture atomic with respect to invalidation, so cancelled credential work cannot be applied.
Artifacts
- Evidence file captured while the check ran.
- The full command output behind this check.
- The full command output behind this check.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review.
Path: src-tauri/src/linux_credential_worker.rs
Line: 175
Comment:
**Preserve invalidation ordering**
The request marks the worker busy before it snapshots the cancellation generation. If `invalidate()` runs in that interval, the request records the new generation, so both later generation checks succeed and its backend result is delivered even though the request was already admitted when cancellation occurred. Capture the generation before admission, or make admission and generation capture atomic with respect to invalidation, so cancelled credential work cannot be applied.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Closes #722. Depends on #721; intentionally targets linux-support per the integration-branch workflow. Incremental worker commit: 0614c5b (parent db48185).
Adds one blocking credential worker with single-operation admission, bounded async waits, cancellation generations, stale-result suppression and fixed errors. Validates request/response bounds and documents non-cancellable native writes and stuck-worker recovery. Not connected to the unavailable Linux runtime: no Bluetooth, pairing or input activation.
Validation
Remaining gates
Production runtime ownership/startup migration, real Secret Service qualification and Bluetooth subscriber isolation are not implemented or claimed here. No hardware/keyring state was modified.