Skip to content

fix(pm-console): finish the edge cutover and address the first review - #12511

Merged
dezren39 merged 1 commit into
mainfrom
claude/pm-edge-fixes
Nov 22, 2026
Merged

dezren39 merged 1 commit into
mainfrom
claude/pm-edge-fixes

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Why

After #12505 the Worker was deployed and healthy, but the hostname still went straight to the laptop. expose.py judged the Worker "not deployed": its health check went out as Python-urllib, which Cloudflare answers with a 403 (curl from the same machine got the JSON). Reproduced from a second machine: -A Python-urllib/3.12 → 403, a named client → 200.

What changes

Cutover

  • The health check names its program (and nothing else), asks three times before believing a failure, and only accepts a Worker that says it is built for this hostname (/console/health now includes host).

Review findings on #12505

  • An action could run twice when the laptop did it and the answer was lost on the way back. An action is now named at the edge before it is relayed; the laptop records the name before starting and the outcome after; a held action offered under a known name is answered from that record, and one still running is left to finish.
  • A section the laptop could no longer read looked healthy at the edge. Every report now carries each section's read failure; the edge shows it with the last good copy, across its own restarts.
  • A late answer the dashboard refused was logged as done. Now logged as not recorded, with the reason.
  • Notifications after the move. The app checks on opening whether the sender still holds this device and under which key, and re-makes or re-registers the subscription without asking. The sender names the devices it holds by a short mark, never the address.
  • expose.py --check --edge off previews that choice instead of ignoring it.
  • redeploy.sh reads quoted settings the way systemd does.
  • build.mjs and edge-smoke.ts refuse arguments they do not take.
  • The no-answer message for actions that are not held no longer claims the action did not happen.

Not asked for

  • The contact handed to push services with every notification was the owner's address. It is now the project's page; delivery does not depend on it.

Checks

  • bun test: 104 pass (was 98). New: answer lost after the work; edge gives up while the work is still running; refused late answer; section health through a restart; subscription state; the two mark implementations agree, against a value worked out separately with hashlib.
  • python3 -m unittest: 15 pass (was 12). New: the request the health check really makes; one unanswered check does not take the hostname off the edge, three do, and it comes back; --check previews both directions and keeps nothing; a Worker built for another hostname is not routed.
  • shfmt and shellcheck clean on redeploy.sh; ruff, biome, prettier clean.
  • The app loaded in Chrome through the edge code on this branch: every main screen, no console errors.
  • Live: the new fetch_json against the deployed Worker returns its health JSON.

Not in this change


Generated by Claude Code


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The hostname was not going through the Worker: the setup script's health
check went out as Python-urllib, which Cloudflare answers with a 403, so
the Worker looked undeployed. The check now names its program, asks
three times before believing a failure, and requires the Worker to say
it is built for this hostname.

Review findings on #12505:
- An action whose answer was lost could run twice. It is now named at
  the edge before it is relayed; the laptop records the name before
  starting and the outcome after, and answers a held action it already
  knows from that record.
- A section the laptop could no longer read looked healthy at the edge.
  Each report now carries every section's read failure.
- A late answer the dashboard refused was logged as done.
- Notifications after the move: the app re-makes or re-registers this
  device's subscription when the sender's key changed or the sender
  lost it. The sender names the devices it holds by a mark, not an
  address.
- expose.py --check --edge off previews that choice; redeploy.sh reads
  quoted settings as systemd does; build.mjs and edge-smoke.ts refuse
  arguments they do not take.

The contact given to push services with each notification was the
owner's address; it is now the project's page.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 11:46
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 856c6bd6-3f72-4047-b3c7-05e169f37760
Commits

Reviewing files that changed from the base of the PR and between 7bfcaff and cd6390f.

Files selected for processing: 18

  • doc/2026-11-22T11-10-00Z_architecture_pm_console_edge/2026-11-22T11-10-00Z_architecture_pm_console_edge.md
  • pm-stack/console/edge/build.mjs
  • pm-stack/console/edge/src/edge.ts
  • pm-stack/console/edge/src/entry.ts
  • pm-stack/console/public/app.js
  • pm-stack/console/redeploy.sh
  • pm-stack/console/scripts/edge-smoke.ts
  • pm-stack/console/scripts/expose.py
  • pm-stack/console/scripts/test_expose.py
  • pm-stack/console/src/docs.ts
  • pm-stack/console/src/edge-proto.ts
  • pm-stack/console/src/push.ts
  • pm-stack/console/src/server.ts
  • pm-stack/console/src/sync.ts
  • pm-stack/console/test/app.test.ts
  • pm-stack/console/test/edge.test.ts
  • pm-stack/console/test/push.test.ts
  • pm-stack/console/test/redeploy.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T11:48:19.910484Z cd6390f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

2 participants