Skip to content

console: retire the queue-transport-alert Worker — the console probes the broker itself (#13503 slice 2) - #16283

Merged
developing-today-fleet[bot] merged 475 commits into
mainfrom
lane-1222k/retire-queue-transport-alert
Nov 28, 2026
Merged

developing-today-fleet[bot] merged 475 commits into
mainfrom
lane-1222k/retire-queue-transport-alert

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

#13503 slice 2 — retire the queue-transport-alert Worker after the PM console fold. Fixes #16242.

What changes

The console probes the broker itself. On its existing five-minute scheduled tick, the PM console object now runs one queue-transport probe pass (POST /internal/queue-transport-probe): it asks the broker's public /healthz through Cloudflare Access and advances the watch state it keeps. pm-stack/console/edge/src/queue-transport.ts ports the retired Worker's logic.js / run.js / github.js / queue.js / status.js semantics field-for-field:

  • threshold (2) consecutive failed probes alert once per outage window; first passing probe after an alerted window recovers once; a sub-threshold window ends quietly;
  • alert = find-or-file one GitHub incident (same title prefix Queue transport incident:, same labels) with the console's own GitHub token; a failed write leaves the window un-alerted so the next tick retries;
  • recovery = one comment on the incident (never a close, pm stack: close authority — automation must never close an issue #10136) + one triage task enqueued through the console's own queue door, carrying the same repo-task/v1 packet and the same dedupe key (repo-health:v1:triage:developing-today/code:issue:<N>); a failed enqueue rides the pending list;
  • the verdict the health answer shows and the alarm tells the owner from is now produced by this probe (same QueueTransport shape; stale after 25 min, as the Worker's /status derived it).

Behaviour mapping for the retired Worker's channels (acceptance: prove equivalent console coverage for each, copy no unavailable credentials):

Retired Worker behaviour Console equivalent
Probe of broker /healthz via Access, every 10 min Console's own probe on its 5-min tick, via its own Access service-token pair (below)
GitHub incident open/comment Console files/comments with its own GITHUB_TOKEN (direct mode), same prefix/labels, never closes
Telegram push + the Worker's own Web Push The console's own notifications (slice 1: one place decides what reaches the owner's phone, #13503) — the alarm speaks from the probe's verdict, once per outage and once on recovery
Enqueue of the recovery triage task via broker /enqueue + BROKER_AGENT_TOKEN Console's own queue door (queueEnqueue, its QUEUE_TOKEN), same packet + dedupe key
Status page / PWA at workers.dev /console/health's queueTransport verdict (slice 1's surface)

Retired/removed: pkgs/queue-transport-alert/ (Worker source and its queue configuration), .github/workflows/queue-transport-alert-deploy.yml, the pm-stack/platform/workers.json row (the Platform screen entry is drawn from that file, so it goes with the row), the QUEUE_TRANSPORT_ALERT service binding + worker-checks roster entry, and the nix deploy registry/package/app entries (lib/default.nix, pkgs/deploy/*). The Worker's broker queue name (repo-health-code-pilot) was configuration of the Worker and goes with it; no Cloudflare Queue existed. The local script peer (scripts/fleet/queue-transport-alert/check_transport.py) is outside the issue's retire list and stays; it dedupes onto the same incident by title prefix.

Provisioning, by name only: the probe's Access pair reaches the console Worker as QUEUE_BROKER_ACCESS_ID / QUEUE_BROKER_ACCESS_SECRET Worker secrets, applied by infra/pm-cloudflare (state names PMCF_BROKER_ACCESS_ID / PMCF_BROKER_ACCESS_SECRET repository secrets, holding the vault's cloudflare.access.queue-broker-client-id / -secret — the same named token the retired Worker's deploy used). It rides along like the bridge token: never one of the secrets direct mode stands on, absent-from-environment means left alone, and without it the probe is skipped, never an alert. No credential value was copied off the retiring Worker or written anywhere in this change.

Docs: edge README gains the retirement rollout + rollback section (deploy-before-merge gate below); schedule-registry row marked retired; platform book count note; fleet book concept marked retired with the console as successor.

Verification

  • Console tests (pm-console-edge deploy run on this head — its 'Test the console and its edge' step drives the console + queue-transport suite): run 46146511859 completed/success on head 789140c2619df3e690eea5443a05b7c2e5ea1410 (lane 0637-G Git-API refresh merge of main; the same suite was green on the pre-refresh head in run 46055387260)
  • pm-cloudflare model tests: run 46146391772 (pm-console-cloudflare config on this head) — 'state and model tests' PASS (17s)
  • Deploy-before-merge gate (acceptance): this branch deployed from Actions (pm-console-edge-deploy on this ref), then https://pm-console-edge.developing-today.workers.dev/console/health shows queueTransport with a fresh checkedAt from a subsequent tick and version = this head: deploy run 46146511859 completed/success on 789140c2619df3e690eea5443a05b7c2e5ea1410; health fetched by lane 0637-G 2026-11-28: version = 789140c2619df3e690eea5443a05b7c2e5ea1410 (= this head), queueTransport status up, subsequent tick lastCheck 2026-11-28T12:55:32Z with fresh checkedAt — full evidence comment by lane 0637-G on this PR
  • The retired Worker's Cloudflare script is deleted only after the merged deploy on main is seen answering with a fresh queueTransport (documented in the edge README); until then it remains as the rollback's probe, and the two implementations dedupe onto one incident.

Rollback: see the edge README's retirement section — previous console version via rollback_version while the alert Worker still exists; this slice's version or a revert after.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-27T18:53:59Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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: c6711843-5663-4ca2-9556-52b870aee4f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Lane 1322-D (delta PRESS LANDINGS, 2026-11-27) — verify-then-merge gate check: NOT merged, parked on the last gate with evidence.

Claim-scan: ALL PR comments read — only the CodeRabbit skip comment; no reviews, no live sibling claim.

Verified firsthand on exact head 290148b02dfaa61ebabe702616e107240ba8ea6f (stable across two reads, OPEN, non-draft, CLEAN/MERGEABLE on first read):

  • Run 46055387260 pm-console-edge deploy = completed/success on this head; its log's 'Test the console and its edge' step shows the queue-transport suite passing (parseQueueTransport, classifyHealthz, probeBroker, runTransportPass, transportVerdict, 'the Edge probes the transport itself').
  • Run 46055363445 pm-console-cloudflare config = completed/success on this head; 'state and model tests' job pass (15s).

Gate that remains unverified:

  • The body's deploy-before-merge acceptance requires https://pm-console-edge.developing-today.workers.dev/console/health to show queueTransport with a fresh checkedAt from a subsequent tick and version = this head. The body's three verification placeholders are still 'to be filled'. This lane's fetch of the health URL returned HTTP 403, so the fresh-tick/version evidence could not be confirmed firsthand, and it is not posted anywhere on the PR yet.

Wake condition: the health evidence is posted on the PR (fresh checkedAt + version = 290148b) or the author fills the verification section — then merge under standing authority. Author was actively pushing this branch through 19:15Z; no duplicate park needed if this comment is present — re-check the wake condition first.

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Lane 1337-F (alpha DRIVE, 2026-11-27 13:37 CST) — evidence follow-through on lane 1322-D's park: NOT merged, park stands with the exact wake condition below.

Claim-scan: ALL comments on this PR read — only the CodeRabbit skip comment and 1322-D's park comment (#16283 (comment)); no reviews, no live sibling claim. Issue #16242 comments also read: lane 1222-K's claim was its authoring claim (2026-11-27T18:26:20Z), with no live follow-through claim since the PR opened.

Re-verified firsthand this lane (two independent gh reads):

  • Head stable: 290148b02dfaa61ebabe702616e107240ba8ea6f, state OPEN, non-draft, mergeStateStatus CLEAN / mergeable_state clean, updatedAt unchanged at 2026-11-27T19:31:23Z (1322-D's comment).
  • Run 46055387260 pm-console-edge deploy = completed/success, head_sha = 290148b.
  • Run 46055363445 pm-console-cloudflare config = completed/success, head_sha = 290148b.

Gate still unverified:

  • The PR body's deploy-before-merge acceptance requires https://pm-console-edge.developing-today.workers.dev/console/health to show queueTransport with a fresh checkedAt from a subsequent tick and version = this head. This lane attempted that exact health endpoint firsthand and it returned HTTP 403 (access denied) — the same result 1322-D recorded. No alternate firsthand route to that authenticated health payload was available to this lane.
  • The body's three verification placeholders are still _to be filled_ / _to be filled with the run + health evidence_ in the current PR body read this lane.

Wake condition (exact): merge under standing authority as soon as, on this PR, either (a) a comment posts the health evidence — queueTransport with a fresh checkedAt and version = 290148b02dfaa61ebabe702616e107240ba8ea6f — or (b) the author fills the verification section with that same run + health evidence; and a fresh check at that time still shows head 290148b0 stable and CLEAN/MERGEABLE. Until then, do not merge: the deploy-before-merge gate in the PR body is not satisfied.

developing-today-fleet Bot and others added 26 commits November 28, 2026 02:00
…eblock-marks

fix(id): refuse marks on text inside a code_block collab slice (#1618 slice 6)
…d-sse-cap

fix(acp-adapter): cap delimited SSE events at EVENT_BUFFER_MAX_BYTES before JSON.parse
…es-sources

feat(pm-stack): certified charges-side sources for the #4825 cost-anomaly producer
…ce 6)

Move parse_manifest_file, current_world_state, step_is_applied,
ordered_steps, apply_steps and read_compile_sources out of
commands/world.rs into commands/world/manifest_apply.rs with no
behavior change: world.rs drops 2573 -> 2288 production lines, the
new module holds 296, both under the 2500 production-line guard.
Callers and the three manifest unit tests now go through
manifest_apply::; all 35 commands::world tests pass.
…ce6-world-manifest

Split world manifest plan/apply into world/manifest_apply (#16255 slice 6)
…16398)

runCompletion, runSingleShotJson, runAudioPassthrough and
runEmbeddingsA2 read leaf bodies with res.text()/arrayBuffer()
under time-only bounds, so a fast or misbehaving leaf could
deliver gigabytes inside the window and OOM the proxy.

- readLeafBody/readLeafBodyText: content-length pre-check plus a
  streaming reader that aborts the moment the running total
  crosses the cap; over-cap is a retryable LeafError
  (ProviderInternal), so every walk fails over and records the
  attempt instead of buffering the body whole.
- Cap defaults to 16 MiB (the streaming hard max), overridable
  via OPENCODE_ROUTE_PROXY_LEAF_BODY_MAX_BYTES, parsed through
  the new parseProxyBytes in bin/proxy-port.mjs (same strict
  env-number contract as ports/millis).
- The !res.ok classify read in runCompletion is bounded too
  (still best-effort via .catch).
- Tests: fake-leaf huge-body (declared length) and
  huge-body-chunked (no length) modes fail over to the next
  candidate with a ProviderInternal failure attempt recorded.

Oracle: bin/opencode-route-proxy.test.mjs #16398 tests.
…f-body-cap

fix(route-proxy): cap non-streaming leaf response bodies at 16 MiB (#16398)
…k-href

id-web: refuse link marks without a string href in collab steps (#1618 slice 7)
…er-timer

fix(fleet-queue): #9178 park cover fires for default-timer re-parks (#16392)
parseFlags indexed args[i] after i++ with no bounds check for --docs,
--agents, --out and --history-bin, so a trailing value-taking flag
panicked with a Go stack trace. Bounds-check and return
'<flag> requires a value', which main already prints to stderr with
exit 2. Regression test covers each value-taking flag in trailing
position and valid parsing unchanged.

Closes #16401
Diagnostic only: forwards to POST /v1/queue/enqueue with Bearer service token, returns envelope intact. Live /enqueue still uses Turso; only explicit /door-enqueue calls reach the door.

Oracle: without door configured answers exit 3; with door configured forwards contract.
…-byte-cap

fix(acp-adapter): cap serveJson response bodies at EVENT_BUFFER_MAX_BYTES (#16391)
…ns-trailing-flag

fix(mcpx): docs-twins trailing value flag is a usage error, not a panic
developing-today-fleet Bot and others added 17 commits November 28, 2026 11:35
…direct-path copy (#14219)

The fleet-proxy client half landed in PR #15991: `copy_file_direct`
posts {source, path, sha256, size, mode?} to /files/copy and falls
back to the caller relay only when the daemon refuses the route as
unknown. Until now the laptop-agent daemon had no such route, so
every same-host remote-to-remote copy still relayed through the
caller.

This adds the daemon side, following the /files/* transaction
semantics already in this file: stream the source into the
destination's deterministic temp (files_temp_path), resuming from a
temp prefix left by a killed attempt only after the prefix is proven
by hashing, verify the temp's whole-file SHA-256 against the
client-stated hash, apply mode when given, then atomically rename
over the destination and fsync the directory. A copy killed at any
point leaves the destination untouched; a hash divergence keeps the
temp (mirroring /files/commit) and never publishes.

Oracle: the shipped client's documented contract for POST
/files/copy in pkgs/fleet/crates/fleet-proxy/src/files.rs. New tests
in test_files_routes.py assert exact-byte publish + temp cleanup,
missing-source refusal with the destination untouched, resume from a
proven temp prefix, and stated-hash refusal. Full suite: 23/23 pass
(python3 -m unittest discover -s pkgs/laptop-agent/tests).

Refs #14219. The two-distinct-daemon acceptance remains gated on a
daemon-to-daemon delegation contract (endpoint discovery + scoped
short-lived transfer capability); the only remote in the table today
is `laptop`, so this same-daemon route covers every reachable
remote-to-remote configuration.
…ersion

developing-today-backup: GET /version names the deployed commit (#15793)
One follow-on slice of #15793 criterion 1 (parent #13494), claimed by lane 0537-H. Unauthenticated GET /version answers {ok, service, version} from the VERSION var (versionAnswer helper, GET only / 405 otherwise, ahead of every other route - it reads no state and no secret). VERSION is stamped per deploy at build time in cloudflare.config.ts from GITHUB_SHA (the GHA upload path requires it; deploy.mjs hands it the git HEAD it tags); wrangler.jsonc keeps the honest "unknown" default for local dev and tests. Behavioral tests in test/worker.test.ts name the criterion-1 oracle.
…ne-version

voice-line: GET /version names the deployed commit (#15793)
…rsion

pkarr: GET /version names the deployed commit (#15793)
…sktop-commander-version

desktop-commander: GET /version names the deployed commit (#15793)
…s-copy-daemon

feat(laptop-agent): /files/copy daemon route for delegated direct-path copy (#14219)
…sion

mcpx: GET /version naming the deployed commit (#15793 criterion 1)
…resh by lane 0637-G (takeover of stalled 1222-K claim, #16242). Conflicts resolved: doc/fleet-schedule-registry.md (main table reformat kept; queue-transport-alert row state = RETIRED per head) and pkgs/deploy/services.nix (head deletion of the queue-transport-alert service kept; main relay KillSignal/RestartSec changes kept).
@developing-today-fleet
developing-today-fleet Bot merged commit 28083c9 into main Nov 28, 2026
5 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the lane-1222k/retire-queue-transport-alert branch November 28, 2026 12:56
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Landed — lane 0637-G (alpha DRIVE, 2026-11-28 06:37 CST) — MERGED

Takeover of the stalled 1222-K claim (claim 2026-11-27T18:26:20Z; no owner activity after the 19:15:01Z commit; stall recorded by 1922-H). Everything below was done via the Git-API route only (no clones), gh CLI only.

Refresh (DIRTY → CLEAN): update-branch failed 422 (real conflicts). Merge-base 60d9409c; only 2 of the 44 head-side files also changed on main: doc/fleet-schedule-registry.md and pkgs/deploy/services.nix. Resolved both by hand (registry: main's table reformat kept, the queue-transport-alert row's state set to head's RETIRED text; services.nix: head's deletion of the queue-transport-alert service + import kept, main's relay KillSignal/RestartSec changes kept — each resolution diff-verified to differ from main only by head's intent and from head only by main's changes) and pushed as merge commit 789140c2619df3e690eea5443a05b7c2e5ea1410 (parents: main 2bb233a87b + old head 290148b02d). PR went MERGEABLE/CLEAN at that head.

Exact-head verification (head 789140c2619df3e690eea5443a05b7c2e5ea1410):

  • pm-console-cloudflare config run 46146391772: 'state and model tests' PASS.
  • pm-console-edge deploy run 46146511859 (workflow_dispatch on this ref): completed/success — console + queue-transport test suite green, this commit uploaded and put at 100% (the release self-verifies the Worker answers as this commit and auto-rolls back otherwise).
  • Deploy-before-merge health gate (the 1322-D / 1337-F park condition): GET https://pm-console-edge.developing-today.workers.dev/console/health → version = 789140c2619df3e690eea5443a05b7c2e5ea1410 (= this head), queueTransport status up, subsequent post-deploy tick lastCheck 2026-11-28T12:55:32Z, fresh checkedAt, no incident. The PR body's three verification placeholders are filled with this evidence.

Merge: merged 2026-11-28T12:56:56Z under standing authority, merge commit 28083c938616c252fa469e9408bb502a97ce8446; #16242 auto-closed.

Post-merge remainder (per this PR's own design, not a merge gate): the retired Worker's Cloudflare script is deleted only after the merged deploy on main is seen answering with a fresh queueTransport — watch the main-push pm-console-edge deploy run for merge commit 28083c93; until then the old script remains as the rollback's probe and the two implementations dedupe onto one incident.

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.

Platform: retire the queue-transport-alert Worker after the PM console fold (#13503 slice 2)

1 participant