Skip to content

Add private remote attachment retrieval - #191

Merged
lastobelus merged 7 commits into
mainfrom
t3code/issue-187-slice-d
Aug 21, 2026
Merged

Add private remote attachment retrieval#191
lastobelus merged 7 commits into
mainfrom
t3code/issue-187-slice-d

Conversation

@lastobelus

@lastobelus lastobelus commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Closes the final implementation slice of #187 for the private two-host pilot.

What changed

  • projects checked managed attachments into private HTTPS retrieval URLs without exposing canonical filesystem paths;
  • runs the default-off canonical gateway on one fixed loopback-only TCP port so the sandboxed Tailscale Standalone extension can reach it;
  • keeps the existing Tailscale Serve root handler and Funnel state outside Markover's control;
  • stores a separate owner-only gateway credential and requires the remote profile to be an owner-only regular file;
  • uses challenge-response authentication for JSON: the shared credential never crosses HTTPS or loopback, requests are bound to a one-time nonce, method, path, and exact body digest, and responses are authenticated over their exact bytes;
  • accepts a bounded 60-second client clock difference while the canonical challenge store continues enforcing its exact 30-second expiry;
  • issues attachment URLs that expire after five minutes and are bound to the review, attachment, and running gateway instance; the client verifies the authenticated response, MIME type, and projected checksum;
  • preserves the exact Tailscale application-capability gate, fixed remote route allowlist, canonical-only activation, single-request drain, and existing local-service mutation engine.

Why the transport changed

The initial Unix-domain-socket pilot failed on the installed sandboxed macOS Tailscale network extension: direct owner access succeeded, while the extension was denied access to the socket under Application Support. A loopback TCP backend is compatible with Tailscale Serve, but another local account can reach loopback and can occupy a fixed port while Markover is stopped. The challenge-response protocol therefore proves server and client possession of the protected credential without transmitting it, and instance-scoped attachment grants prevent replay into a restarted gateway.

Validation

  • rebased full npm run ci:local
  • 859 tests passed
  • Electron smoke passed
  • focused independent security review found no remaining supported-use blocker
  • repository and GitHub hostname audit found no private hostnames in tracked code, documentation, or audited PR text
  • real cross-host authenticated /health returned HTTP 200 with the canonical protocol
  • real signed /reviews/pending returned HTTP 200 with a valid v1 response
  • real remote creation reached the canonical store with the exact source snapshot and remote-agent origin
  • real deep-link QA returned feedback plus one PNG; the client authenticated 315,844 bytes, verified MIME and SHA-256, and received no canonical path
  • real edit → get → revise completed and the current-thread pending list returned empty

Pilot status

The canonical deployment is additive on a separate tailnet-only HTTPS port; the existing root Serve handler remains unchanged and Funnel remains disabled. The authenticated health, pending, create, handoff, attachment-download, edit, and revise checks passed through the live Serve-to-loopback hop. The first sentinel open exposed historical parseable v1 artifacts that fail full portable validation; the bounded receipt-only audit proved uniqueness without returning or rewriting those artifacts. Deep-link QA returned human feedback and a screenshot, the signed bytes verified, and the review completed with no pending current-thread reviews.

@lastobelus

lastobelus commented Aug 19, 2026

Copy link
Copy Markdown
Owner Author

Pilot evidence (hostname-neutral): the canonical deployment used Tailscale Standalone 1.102.2 with one additive tailnet-only HTTPS port, the pre-existing root Serve handler unchanged, and Funnel disabled. Canonical doctor was healthy on the tested head. The owner-only remote profile completed authenticated health and pending checks, canonical-only creation with the exact remote source snapshot, deep-link activation, human feedback and PNG attachment handoff, authenticated 315,844-byte retrieval with MIME/SHA-256 verification and no canonical path, and edit → get → revise; the current-thread pending list ended empty.

The real store also exposed 53 parseable historical v1 artifacts rejected by full portable validation. The bounded receipt-only audit now proves idempotency-key uniqueness without returning or rewriting those artifacts and remains fail-closed on malformed JSON, headers, managed IDs, receipts, incompatible versions, and unreadable files. Full local CI passed with 859 tests and Electron smoke. The branch was subsequently rebased onto three unrelated mainline UI commits; GitHub CI and the full local suite are green on that exact rebased head.

Review follow-up: the packaged remote CLI now exposes verified get-attachment retrieval on head 99f173a; it writes only authenticated bytes to a new owner-only file and omits credentials and private URLs from stdout.

Second review follow-up: head 3783351 aligns local creation, remote projection, and download on the existing 32 MiB response ceiling. The exact-boundary focused suite, GitHub CI, and exact-head automated review are green; all review threads are resolved.

@lastobelus
lastobelus force-pushed the t3code/issue-187-slice-d branch from 49edb20 to c4d9f75 Compare August 21, 2026 01:00
@lastobelus
lastobelus marked this pull request as ready for review August 21, 2026 21:16
@lastobelus
lastobelus force-pushed the t3code/issue-187-slice-d branch from 4f933b7 to a80044d Compare August 21, 2026 21:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f933b704c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/markover.ts
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: a80044d344

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 99f173af4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/remote-attachments.ts Outdated
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 3783351e77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit abff523 into main Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant