ReviewOS

stacks/uplink

feat: add an end-to-end self test, because nothing today proves the whole chain

#14
Open glennmichael123 opened this 9 days ago ·
9 days ago

Part of #5. This is what makes the other setup fixes verifiable.

What is there today

Neither install path can prove the chain before a phone is the only way to find out it is broken.

buddy uplink:ask (app/Commands/Uplink.ts#L134) covers one seam: config, then detectWorkdir, then ClaudeEngine.run. It does not open chat.db, does not exercise classify() (app/Uplink/filter.ts#L36), does not resolve allowed or own handles, and never calls the sender. It therefore passes on a Mac with no Full Disk Access, no Automation grant and no discoverable handles.

The downloaded app has no equivalent at all. The tray menu offers "Check Claude sign-in", which is probeClaude (app/Uplink/desktop-agent.ts#L320), the same narrow slice.

The chain has five links and the two existing checks cover the middle one:

  1. read chat.db (Full Disk Access)
  2. resolve own and allowed handles
  3. classify a message as a command
  4. run the engine
  5. send a reply through Messages (Automation grant)

Proposal

  1. Add a self test that runs all five in order and reports which link failed: synthesize a message row through the same classify() the daemon uses, run a trivial prompt, and send the answer to the user's own handle.
  2. Expose it in both surfaces: a button in the popover and buddy uplink:selftest. The popover is the one that matters, since the DMG is the primary install path.
  3. Report per link, not pass or fail overall. "Link 5 failed: Messages refused to send" is actionable; "self test failed" is not.
  4. The reply it sends is the proof. Tell the person to look at their phone, and say what the text will say so they know what they are looking for.

Requirements

  • It must use the real code paths, not parallel copies. A self test that calls its own version of classify() proves nothing about the daemon.
  • Only ever send to the user's own handle.
  • Do not require a phone. The test proves the Mac's half; the person confirms receipt.
  • Keep it cheap. One trivial prompt, not a real task.

Acceptance

  • With Full Disk Access revoked, the test names link 1.
  • With Automation declined, it names link 5.
  • On a working install, all five pass and a text arrives.

Sign in to comment on this issue.