Authenticate site deploys before building #166
No reviewers
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/tools!166
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/site-auth-preflight"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Site deploy now logs in to the hosting remote before building, so a bad credential fails immediately instead of wasting a full build.
Missing remotes, unreadable configuration, rejected usernames or passwords, and unreachable hosts each get one actionable sentence; raw rclone probe output stays hidden.
The destination, exclusion rules, build, sync, dry-run, and HTTPS verification behavior are unchanged after a successful preflight.
Configure no longer tells the operator to run rclone, which is unavailable on their PATH; it says the next deploy will perform the check.
Focused success and sabotage tests cover probe ordering, exact arguments, every diagnosis, selected-config remedies, reserved exit status 7, and truthful sync failure wording; all tagged and untagged Go tests and vet checks pass.
The repository flake gate remains blocked by an unrelated baseline failure in PR-explain component test 23, described under Validation.
Rollback is one revert; deploys then return to the previous name-only remote check.
Closes allod/tools#162
The shared
siteRemoteCheck(configPath string)probe runsrclone lsd shared:against the default configuration, or adds--config <path>when a later caller supplies one.reportSiteRemoteFailure(result, configPath)contains command-neutral wording so a no-publish credential check can reuse it without redirecting an explicit-path user to the default configuration. A preflight child exit 7 maps to exit 1 because allod reserves 7 for a completed deploy whose HTTPS verification failed; other nonzero child statuses are preserved.Risk
R2: classification necessarily consumes rclone's human-readable failure text. The known rclone 1.72.1 and live FTP 530 forms are pinned in tests; unfamiliar wording fails closed with a generic check failure before the build. The probe lists the remote root but does not write it.
Validation
nix develop -c sh -c 'go test -tags site ./cmd/allod -run "Test(SiteDeployReportsRemoteFailuresBeforeBuilding|ReportSiteRemoteFailureUsesSelectedConfig|RcloneSiteRemoteCheck)$"'nix develop -c sh -c 'test -z "$(gofmt -l .)" && go vet ./... && go test ./... && go vet -tags site ./... && go test -tags site ./...'nix flake checkremains blocked by the unchangedallod-paritycomponent test 23:pr-explain/section-prompt.mdlacks its expectednot decorationphrase. Reproduced directly with a freshly built allod binary; this branch does not modify that file or test.Independent review found two behavior defects and one validation-claim defect. Please fix these additively before merge; the exact probe argv, output suppression, sync/config wording, and secret handling otherwise passed review.
requireSiteRemotepropagates arbitrary rclone exit statuses, including 7, but this command reserves 7 for “sync completed, HTTPS verification failed.” A pre-build authentication failure must never return the post-deploy verification code.reportSiteRemoteFailurehas no selected config path, so the reusable explicit-config path can diagnose a missing/rejected credential and then tell the operator to edit the default file. Remediation must carry the same selected--configpath safely.nix flake checkcurrently fails in unchangedallod-paritytest 23 becausesection-prompt.mdlacks the expectednot decorationphrase. Update the PR summary/Validation to report that baseline failure rather than saying the full gate passes.Addressed additively in
b705cb0.reportSiteRemoteFailure(result, configPath)now carries the selected path. Explicit-path remedies quote it safely, stay on one line even with control characters, and never point to defaultallod site configstate.Focused tests plus tagged and untagged Go tests and vet checks pass.
b705cb02b5to4215e60a8dStatus of the gate this chain reports as blocked, measured today.
The
allod-parityfailure attests/pr-explain/components.shtest 23 no longer exists on master:f7c57b8changed that assertion to the section prompt's current wording, so the "not decoration" expectation the four PR bodies name is gone. Nothing in this chain touches that file.All four branches merge cleanly with current master. As a witness, I merged the chain tip (
agent/site-credential-lifecycle, 17 commits over master) with master in a scratch clone and ran the fullnix flake check: every check passed, includingallod-parity,go-checks, and the cascade and flake-status suites. Nothing was pushed.So the chain is ready to merge in order: #166, then #167, #168, #169. Each PR's Validation section still says the aggregate flake gate is blocked; that sentence is stale, and the rest of each body stands.