Skip to content

unison: refpulse, the live DOI check behind the site's button - #67

Merged
h0ffmann merged 5 commits into
mainfrom
feat/unison-refpulse
Oct 15, 2026
Merged

h0ffmann merged 5 commits into
mainfrom
feat/unison-refpulse

Conversation

@h0ffmann

@h0ffmann h0ffmann commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Task

The site's Live section gets a button, "Check the DOIs now". The button calls refpulse, a
Unison HTTP service, and shows if each DOI of the book resolves at doi.org (owner's request:
"I want the DOI check to be implemented in the website ASAP").

  • unison/refpulse/refpulse.u: the service. GET /health, and GET /check?doi=… (8 DOIs at
    most), JSON with Access-Control-Allow-Origin: *.
  • unison/refpulse/README.md, "In plain words", and a short paragraph on the site: what Unison
    is, and that the deploy is the remote computation (the function itself is sent to Unison Cloud),
    while the click is an ordinary GET. Fanning out over machines (Remote.fork) is the next step.
  • site/: the button, its states, and ?refpulse=<url> for a local test. The site still works
    when the service is down.
  • just unison-install, just unison-serve, just unison-deploy. ucm comes from the new
    .#unison dev shell.
  • .claude/settings.json: the mattpocock-skills plugin is on for every reader of the
    repository (owner's request), listed in .claude/skills/README.md.

Proof

The site, built with just site-build, in headless Chrome, with no ?refpulse= override. The
button is answered by refpulse deployed on Unison Cloud:

The Live button: 5 of 5 DOIs resolve, each 302

  • just unison-install: exit 0. refpulse.u compiles against @unison/base 7.20.0,
    @unison/cloud 27.3.1 and @unison/routes 7.0.2.
  • curl: /health gave 200. /check gave 302 for the book's DOI and 404 for a made-up DOI, with
    the CORS header.
  • just check: pass. cd site && gleam test: 20 passed.

Deployed. just unison-deploy put refpulse on Unison Cloud. refpulse_url is its hash URL,
https://h0ffmann.unison-services.cloud/h/uidn3rn5oag2ww53c5h4tltjlje76o3nlm44ct7tyjarcn24j2eq;
/health gave 200, and /check 302 and 404, with CORS. Open: naming the service
(/s/refpulse) failed with 401 Unauthorized. A hash URL changes when the code changes, so put
/s/refpulse in refpulse_url once the name works.

Checklist

  • A fact changed in prose/ is changed in prose-ste/ and prose-pt-BR/ too. (No prose changed.)
  • Every new Markdown file has its cite line (PERSONAS.md).
  • A change to a hard rule links its change proposal in docs/2-engineering/changes/. (No hard rule changed.)
  • A journal entry is added if this change met a challenge worth recording.

🤖 Generated with Claude Code

h0ffmann and others added 5 commits October 15, 2026 14:06
Force the routes thunk ((health <|> check)()) and install @unison/base
directly, so IO.net.URI.parse is no longer ambiguous. just unison-serve
answered /health 200 and /check 302 / 404 with CORS *. The deploy to
Unison Cloud still waits for the owner's login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
just unison-deploy put refpulse on Unison Cloud; the button now asks its
hash URL. Naming the service (/s/refpulse) failed with 401, so the name
waits. The screenshot is the built site answered by the deployed service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What Unison is (code named by its hash), and which step is a remote
computation: the deploy sends the function itself to Unison Cloud; the
click is an ordinary GET. Running the checks on many machines
(Remote.fork) is named as the next step, not claimed. Each fact quotes
a page of unison-lang.org or unison.cloud, read 15 October 2026.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@h0ffmann
h0ffmann merged commit 13e6f11 into main Oct 15, 2026
5 of 6 checks 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