Repository navigation
console: retire the queue-transport-alert Worker — the console probes the broker itself (#13503 slice 2) - #16283
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
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
Gate that remains unverified:
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. |
|
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):
Gate still unverified:
Wake condition (exact): merge under standing authority as soon as, on this PR, either (a) a comment posts the health evidence — |
…eblock-marks fix(id): refuse marks on text inside a code_block collab slice (#1618 slice 6)
…ide seams remain
…d-sse-cap fix(acp-adapter): cap delimited SSE events at EVENT_BUFFER_MAX_BYTES before JSON.parse
…tick wiring + tests
…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)
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
…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).
Landed — lane 0637-G (alpha DRIVE, 2026-11-28 06:37 CST) — MERGEDTakeover 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): Exact-head verification (head
Merge: merged 2026-11-28T12:56:56Z under standing authority, merge commit 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 |
#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/healthzthrough Cloudflare Access and advances the watch state it keeps.pm-stack/console/edge/src/queue-transport.tsports the retired Worker'slogic.js/run.js/github.js/queue.js/status.jssemantics field-for-field: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;repo-health:v1:triage:developing-today/code:issue:<N>); a failed enqueue rides the pending list;QueueTransportshape; stale after 25 min, as the Worker's/statusderived it).Behaviour mapping for the retired Worker's channels (acceptance: prove equivalent console coverage for each, copy no unavailable credentials):
/healthzvia Access, every 10 minGITHUB_TOKEN(direct mode), same prefix/labels, never closes/enqueue+BROKER_AGENT_TOKENqueueEnqueue, itsQUEUE_TOKEN), same packet + dedupe key/console/health'squeueTransportverdict (slice 1's surface)Retired/removed:
pkgs/queue-transport-alert/(Worker source and its queue configuration),.github/workflows/queue-transport-alert-deploy.yml, thepm-stack/platform/workers.jsonrow (the Platform screen entry is drawn from that file, so it goes with the row), theQUEUE_TRANSPORT_ALERTservice 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_SECRETWorker secrets, applied byinfra/pm-cloudflare(state namesPMCF_BROKER_ACCESS_ID/PMCF_BROKER_ACCESS_SECRETrepository secrets, holding the vault'scloudflare.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
789140c2619df3e690eea5443a05b7c2e5ea1410(lane 0637-G Git-API refresh merge of main; the same suite was green on the pre-refresh head in run 46055387260)pm-console-edge-deployon this ref), thenhttps://pm-console-edge.developing-today.workers.dev/console/healthshowsqueueTransportwith a freshcheckedAtfrom a subsequent tick andversion= this head: deploy run 46146511859 completed/success on789140c2619df3e690eea5443a05b7c2e5ea1410; health fetched by lane 0637-G 2026-11-28:version=789140c2619df3e690eea5443a05b7c2e5ea1410(= this head),queueTransportstatusup, subsequent ticklastCheck2026-11-28T12:55:32Z with freshcheckedAt— full evidence comment by lane 0637-G on this PRqueueTransport(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_versionwhile 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-botwith what you need.