Make site hosting layouts deployment-selected #168
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!168
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/hosting-layout-profile"
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?
A site-enabled binary now has one deployment-owned hosting profile compiled in; a public-html build targets
shared:public_html/<domain>with no filter file.No runtime flag, environment variable, or
site.tomlkey can change that destructive sync target.Existing builds retain the exact DirectAdmin destination, exclusion filter, and generated rclone arguments by default.
Tests prove both layouts, the unchanged default argv, named-config forwarding, table validation, and failure before remote/build/sync effects.
To roll back a public-html deployment, remove its linker override (or set
directadmin) and rebuild the deployment package.Closes allod/tools#165
Risk
Moderate: the compiled profile changes a destructive sync destination. Only validated built-in profiles are accepted; invalid compiled values or tables fail before credential checking or building.
public-htmlis the concrete second layout from the issue, and its empty exclusions assume ACME is served elsewhere. The backend, remote, config path, backup path, and DirectAdmin data are unchanged.Validation
nix develop -c go test -count=1 ./...nix develop -c go test -count=1 -tags site ./...nix develop -c go vet ./...nix develop -c go vet -tags site ./...nix build .#checks.x86_64-linux.go-checks .#packages.x86_64-linux.allod --no-linkbuildGoModuleusingtags = [ "site" ]; ldflags = [ "-X main.siteHostingProfileName=public-html" ];built successfully; its dry-run output observedTarget: shared:public_html/example.comwith inert nix/rclone stubs.--filter-from, all validator constraints, invalid build values, and a sabotaged table before authenticated remote/build/sync calls.The aggregate
nix flake checkremains blocked only by the pre-existingallod-parityexpectation thatsection-prompt.mdcontainnot decoration; the Go check and package build pass independently.Depends on: #167
Independent review found one authority defect and two validation/documentation defects. Please fix these additively before merge; default DirectAdmin bytes, empty-filter handling, failure ordering, and named-config forwarding otherwise passed review.
ALLOD_SITE_HOSTING_PROFILEis inherited from the invoking repository’s environment and directly selects the destructive sync destination/exclusions. That is not structurally deployment-owned: a repo-controlled dev shell or direnv can redirect today’s default deployment. Replace runtime environment selection with a build-time, deployment-owned profile value (for example, a validated linker-set variable) so each installed binary has one immutable layout.<domain>placeholder, a safe relative docroot with no empty/./..segments or controls, and single-line exclusion-only filter rules. Add one sabotaged-table witness that proves the validator fails closed.Addressed additively in
6a8a49dand integrated with the final #167 head at0ca5b9d.ALLOD_SITE_HOSTING_PROFILEfrom production entirely.siteHostingProfileNamenow defaults todirectadminat compile time and can only be set by the deployment package with-X main.siteHostingProfileName=public-html.<domain>placeholder, safe relative docroot segments without controls, a present DirectAdmin default, and single-line exclusion-only filter rules.site.tomldomain-only and make rollback a package rebuild.buildGoModuleldflagssyntax by building the tagged command and running it against inert stubs; the compiled binary reportedTarget: shared:public_html/example.com.Post-integration tagged/untagged Go tests and vet pass, as do the focused Nix Go check and allod package build.