Files
Jarvis/App/Tests
james.maes b76ff75d81 fix(01-IN-07): replace tautology with real SEC-01 pasteboard assertion
Phase 1 REVIEW.md IN-07: `test_stateDumpDoesNotIncludeAPIKey` was an
`XCTAssertTrue(true)` tautology. It claimed to test SEC-01 /
T-04-02 but could not fail on a regression where `copyStateDump()`
accidentally started writing the raw API key to the pasteboard.

App/Tests/AppTests/AppDelegateWiringTests.swift
- Introduce `RecognizableKeychain` fake that returns a distinctive
  sentinel plaintext ("sk-ant-test-do-not-leak").
- Clear NSPasteboard before the test so prior-test contamination
  can't produce a false positive.
- Trigger `copyStateDump` via `perform(Selector("copyStateDump"))`.
- Assert pasteboard string:
    * does NOT contain the recognizable plaintext
    * does NOT contain any "sk-ant-" prefix
    * DOES contain "\"apiKeyStored\"" (sanity — exercised the path)

Now this test literally fails if copyStateDump regresses.
2026-04-23 16:24:56 -05:00
..