Repository navigation
Close 0.8.0's loose ends (LOOP-PLAN Phase 3, items 1-8) - #92
Merged
Merged
Conversation
…PR builds off latest - Legacy cancel/retry make the owner check and legacy enqueue the shell/admin check, through one shared module (collector/src/api/policy.ts) that /api/v1 also uses. - ci-enqueue moves to /api/v1 with fleetr's exit codes (4 on skipped); ci-enqueue and ci-upload send FLEET_RUNNER_TOKEN/FLEET_TOKEN as a bearer. - x-artifact-channel: pr; "latest" never resolves to a pr build. Both CI scripts set it on pull_request events or --channel pr. - fleet/package.json bin points at dist/bin/fleet.mjs and packs dist/. - version.mjs writes the desktop app's Cargo.toml and tauri.conf.json (0.8.0). - check-examples runs the API's strict schema and params manifests (spec-check.ts, shared with routes.ts); CHECK_NAMES drops names nothing raises. - FLEET_PEER_TOKENS for the peers proxy; explore mirror frames send FLEET_TOKEN; timer intervals validated (>= 1000 ms); stale discovery comments fixed. - Schedule templates: an empty job_id is dropped with a warnings entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
Owner
Author
|
Self-review: read policy.ts (owner + shell checks shared by /api/v1 and the legacy routes; internal bypass uses the per-process random secret), the ci-enqueue exit-code change and the artifact channel. All checks green. Merging (LOOP-PLAN Phase 3). |
This was referenced Oct 16, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LOOP-PLAN Phase 3, items 1–8 as briefed. Not #82, and not the OpenAPI 422 description (another branch owns the generated output).
routes.tschanges only inside handler bodies and imports.gen-api --checkshowsopenapi.jsonandapi.gen.tsunchanged.collector/src/api/policy.ts, holdsnotOwned()andneedsAdmin()./api/v1'sowned()andprepareSpec()call them, and so doPOST /api/jobs/:id/cancel|retry.POST /jobsandPOST /api/jobscallneedsAdmin()./api/jobshas to ask itself, because its forward to/jobsarrives as an internal request. Nothing changes with auth off.deploy/auth.mdandapi.mdare corrected.ci-enqueue/ci-upload.ci-enqueueusesPOST /api/v1/jobsandGET /api/v1/jobs/{id}/waitthrough the generated client.fleetr: 0 passed, 1 failed, 2 usage/invalid, 3 still running, 4 skipped, 5 refused/unreachable.FLEET_RUNNER_TOKEN(orFLEET_TOKEN) as a bearer token, and still sendFLEET_DASH_TOKENasx-fleet-token.replaced-by-uploadsubstitution is kept.collector/ci/README.mdand both workflow templates are updated.latest.artifacts.channelcolumn. Existing rows are NULL, so they count as merged builds.x-artifact-channel: prputs an upload on theprchannel. Any other value is a 400, checked before any bytes are read.resolveLatestBuildskipsprbuilds.GITHUB_EVENT_NAMEispull_requestorpull_request_target, or when given--channel pr|main.fleet/package.json.binnow points atdist/bin/fleet.mjsfor bothfleetandfleetr. I also added"files": ["dist/"]:fleet/.gitignorelistsdist/, so without itnpm packleft the bundle out entirely.scripts/version.mjsnow also writesdesktop/src-tauri/Cargo.toml(matched inside[package]) andtauri.conf.json. Both are set to 0.8.0. There is no committed Cargo.lock. The CIversionjob runs the same script, so it covers them. CONTRIBUTING's caveat is gone, and the CHANGELOG count goes from eleven to thirteen.check-examples.tsnow runs the API's strict schema plus the params manifests. The compiled validators moved fromroutes.tsinto a newsrc/api/v1/spec-check.tsthat both import.CHECK_NAMESdropsregression,agent_stuckandleash. Nothing raises them. Reads don't validate the name, so a stored row would still show.bug-garden/defects.jsonusesleash/regressionas bench labels, not as finding check names, so it is untouched.FLEET_PEER_TOKENSis a JSON map from peer URL to token, sent as a bearer token to that peer only. It is documented under "More than one brain".Authorization: Bearer $FLEET_TOKEN.FLEET_SWEEP_MS,FLEET_SCHEDULER_TICK_MSandFLEET_ALERT_TICK_MSmust be whole milliseconds, at least 1000. Anything else falls back to the default with a startup warning.job_id.POST /schedulesalready refused a non-emptyjob_id. The silent case was an empty ornullone: it was stored and then replaced at every firing. That is now dropped, and the reply carries awarningsarray (passed through by/api/schedules). A stored template that still has one gets a log line when it fires. Documented inapi.md.Not verified / not done
/api/v1artifact document and the OpenAPIuploadArtifactdescription don't mentionchannel/x-artifact-channel. That would change generated output, which another branch owns.GET /api/artifactsdoes showchannel.cargo check. The only change there is the version string, and CI's desktop job will cover it.ci-uploadnow exits 5 instead of 1 when the upload is refused or the collector is unreachable.Test evidence (ultra, Node 24)
collector:CI=true npm testpasses, 0 FAIL lines.check-examples: "ok — 37 example job specs pass /api/v1's strict schema and their params manifests"gen-api --check:ok openapi.json,ok src/client/api.gen.tscheck-auth: ALL PASS, 60 checks. New checks cover legacy owner/shell, eachci-enqueueexit code (0/1/2/3/4/5),ci-uploadwith and without a token and the pr channel, and a second collector reading this one throughFLEET_PEER_TOKENS.job_idwarning, and interval/peer-token parsing.fleet:npm testpasses: tests 80, pass 80, fail 0, skipped 0 (runner-machine deps installed).node scripts/version.mjs check: version: ALL PASS.mkdocs build --strict: rc 0.npm packoffleetinstalled into a temp prefix:fleet --versionandfleetr --versionboth print 0.8.0.🤖 Generated with Claude Code