Repository navigation
test(doctor): use fixed OAuth sidecar vectors - #121986
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 6:54 AM ET / 10:54 UTC. ClawSweeper reviewWhat this changesThe branch replaces self-generated legacy OAuth-sidecar ciphertext in doctor tests with fixed historical AES-GCM vectors and removes test-only production bridges. Merge readinessNo blocking findings: the current head addresses the prior warning-order finding, retains migration behavior, and removes only test-only bridges. This maintainer-owned PR remains necessary because current main still has the self-generated-vector tests and Symbol bridges. Priority: P3 Review scores
Verification
How this fits togetherDoctor repairs legacy OAuth sidecar files by reading encrypted material and restoring inline credentials in affected auth-profile stores. The tests exercise migration, rejection, shared references, and the macOS Keychain-only warning without changing the repair flow. flowchart LR
A[Legacy OAuth sidecar] --> B[Doctor repair]
B --> C[Sidecar reader]
C --> D[Decrypt and validate]
D --> E[Inline auth profile]
F[Fixed compatibility vectors] --> G[Migration tests]
G --> B
Before merge
Agent review detailsSecurityNone. PR surfaceSource -103, Tests -63. Total -166 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Merge the focused test-boundary refactor once the remaining exact-head CI check is green; retain the fixed vectors and deleted test-only bridges. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR improves regression coverage for an existing migration contract rather than reporting a new user-facing failure. Is this the best way to solve the issue? Yes: fixed compatibility vectors test the migration boundary without preserving production-only encryption exports or global test hooks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 452cf09c07b4. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready proof for
ClawSweeper's P2 finding is addressed: the consolidated warning test runs Linux first while the latch is untouched, then runs Darwin twice to independently prove warning and one-shot deduplication. The fixed historical AES-GCM vectors retain migration and wrong-key compatibility without production test encoders or reset hooks. Production delta: −62 lines. Test support: −41 lines. Tests: −63 lines. Overall: −166. No proof gaps remain. |
|
Merged via squash.
|
* test(doctor): use fixed OAuth sidecar vectors * test(doctor): preserve Linux warning assertion
What Problem This Solves
Legacy OAuth sidecar migration tests generated ciphertext with production-only encryption helpers, then decrypted it with the same key/AAD implementation. A symmetric mistake could keep those tests green while breaking compatibility with bytes written by the historical sidecar format.
Those helpers were exposed through two process-global Symbols and forwarding
test-support.tsfiles. The one-shot macOS Keychain warning also required a production reset hook solely to isolate two tests.Why This Change Was Made
This change:
The fixed vectors independently lock the shipped contract: SHA-256 key derivation from the legacy seed, 12-byte IV, profile/ref/provider AAD, AES-256-GCM, 16-byte tag, and unpadded base64url fields.
AI-assisted: yes. Historical writer/reader commits, current migration callers, crypto contract, fixed-vector decryption, retained compatibility paths, and CI routing were inspected; fresh structured review found no actionable issue.
User Impact
No runtime behavior change. Doctor retains compatibility with historical encrypted and plaintext OAuth sidecars, with stronger tests and less test-only production surface.
Evidence
node scripts/check-changed.mjs -- ...for the six changed/deleted files — passed format, Plugin SDK API, type, lint, dead-export, boundary, architecture, auth, and safety gates through trusted local fallback because Blacksmith Testbox is unavailable on this host.git diff --check— clean.Production delta: −62 lines. Test support: −41 lines. Tests: −65 lines. Overall: −168 lines.