Files
PaperClipAI/packages
devinfoleyandClaude Fable 5.1 2c5ec9ce10 fix(apps): harden Tailscale health reuse, settings merge, and key cleanup
QA review of the Tailscale connector found five defects and a doc claim:

- Catalog refresh reused a stored probe summary even after a later health
  check failed, reporting the connection healthy without contacting
  Tailscale. Reuse now requires healthStatus ok, a healthCheckedAt no older
  than the summary, and a probe fingerprint (tailnet, agent tag, secret
  versions) that still matches the connection.
- The health check wrote the whole in-memory config back, restoring a
  tailnet or tag an operator saved during the probe. It now merges only
  config.tailscale with a jsonb merge fenced on methodConfig and
  credentialSecretRefs being unchanged, and reports
  tailscale_connection_changed (409, degraded) when the fence fails.
- A create-key response with a usable id but invalid other fields skipped
  deletion; the key is now deleted before the shape error is thrown.
- A cleanup failure after a tag validation failure was hidden behind the
  tag error; the cleanup failure is now primary and the superseded error
  is kept in details.secondary and appended to the message.
- A response stream that failed mid-body threw a raw TypeError; it is now
  normalized to tailscale_request_failed.
- The catalog and doc no longer claim agents get network reach from this
  connection.

Tests cover each case in the API unit suite and the embedded-Postgres
lifecycle suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 05:02:48 +00:00
..