carlos / platform Public

moves-phase1-6

Squashed from moves-phase1-6 into main.
claude agent, operated by paul@keymail.dev bc25674a7a7acf29c4e9ea402f2c2ba4f0cda108 parent 43da77c
99 files changed, +11620 −386
  • approved_moves_copy_scan_test.go +325 −5
  • approved_moves_copy_test.go +779 −18
  • docs/site/cli.md +42 −0
  • docs/superpowers/plans/2026-10-06-moves-phase1-copy.md +90 −31
  • hostclaim_cli.go +107 −25
  • hostclaim_cli_test.go +156 −1
  • internal/console/apihostclaim.go +3 −1
  • internal/console/apiinstancemove.go +498 −19
  • internal/console/apiinstancemove_delete_test.go +110 −0
  • internal/console/apiinstancemove_j17_test.go +61 −0
  • internal/console/apiinstancemove_test.go +564 −3
  • internal/console/apiinstances.go +5 −0
  • internal/console/claim_authority_census_test.go +5 −0
  • internal/console/claim_purge.go +20 −0
  • internal/console/claim_retire.go +6 −0
  • internal/console/claim_runtime.go +7 −0
  • internal/console/movelog_retire_test.go +185 −0
  • internal/console/movesrecovery.go +366 −18
  • internal/console/movesrecovery_test.go +766 −1
  • internal/console/server.go +11 −3
  • internal/console/store.go +122 −0
  • internal/console/store_gate.go +1 −0
  • internal/console/testdata/claim-authority-sites.txt +2 −0
  • internal/console/view_test.go +10 −0
  • internal/host/agent.go +1 −1
  • internal/host/movesabort.go +7 −2
  • internal/host/movesarchive.go +1 −1
  • internal/host/movescut.go +10 −4
  • internal/host/movesevents.go +356 −0
  • internal/host/movesevents_test.go +822 −0
  • internal/host/movesfinal.go +9 −5
  • internal/host/movesfinal_test.go +10 −4
  • internal/host/movesfloorgate.go +14 −0
  • internal/host/movesfloorgate_linux.go +2 −3
  • internal/host/movesfloorgate_linux_test.go +14 −0
  • internal/host/movesinstall.go +16 −10
  • internal/host/movesland.go +9 −14
  • internal/host/movesland_probe_test.go +2 −2
  • internal/host/moveslandcommit.go +9 −2
  • internal/host/moveslandinstall.go +2 −2
  • internal/host/moveslandprobe.go +9 −8
  • internal/host/moveslogoutbox.go +321 −0
  • internal/host/movespaging.go +597 −0
  • internal/host/movespaging_test.go +857 −0
  • internal/host/movesparks.go +4 −2
  • internal/host/movespass.go +73 −10
  • internal/host/movespass_test.go +2 −2
  • internal/host/movesphase1.go +11 −2
  • internal/host/movesphase1_test.go +1 −1
  • internal/host/movesprobeattempts.go +68 −20
  • internal/host/movesprobeattempts_test.go +1 −1
  • internal/host/movesprobeowners.go +31 −10
  • internal/host/movesprobeowners_test.go +5 −5
  • internal/host/movesrecover.go +19 −13
  • internal/host/movesrecover_test.go +15 −7
  • internal/host/movesretry_test.go +64 −0
  • internal/host/movesrevert.go +16 −13
  • internal/host/movesrevert_test.go +4 −1
  • internal/host/movesrollback.go +19 −53
  • internal/host/movesrollback_finalfix_test.go +2 −2
  • internal/host/movesrollback_test.go +14 −7
  • internal/hostops/move_log_writer.go +157 −0
  • internal/hostops/move_log_writer_test.go +131 −0
  • internal/hostops/move_loss_authority.go +32 −0
  • internal/hostops/move_recovery_grant.go +23 −2
  • internal/hostops/recovery.go +11 −2
  • internal/moves/abort.go +10 −1
  • internal/moves/journal.go +104 −5
  • internal/moves/journal_lock_test.go +199 −0
  • internal/moves/journal_test.go +5 −5
  • internal/moves/log.go +194 −0
  • internal/moves/log_test.go +97 −0
  • internal/moves/operatorcopy.go +66 −0
  • internal/moves/staging.go +5 −4
  • internal/moves/staging_test.go +1 −1
  • internal/moves/timings_test.go +205 −0
  • internal/moves/transition.go +253 −0
  • internal/moves/transition_test.go +52 −0
  • internal/provision/plan9_b8_census_test.go +33 −23
  • internal/provision/provision.go +57 −11
  • main.go +12 −0
  • move.go +926 −0
  • move_test.go +1072 −0
  • testdata/moves-copy/file-note/readiness.go +13 −0
  • testdata/moves-copy/file-note/record.md +11 −0
  • testdata/moves-copy/list-join-two/head.go +15 −0
  • testdata/moves-copy/list-join-two/record.md +9 −0
  • testdata/moves-copy/list-join/head.go +11 −0
  • testdata/moves-copy/list-join/record.md +5 −0
  • testdata/moves-copy/list-producer/head.go +34 −0
  • testdata/moves-copy/list-producer/record.md +16 −0
  • testdata/moves-copy/list-template/elem.go +28 −0
  • testdata/moves-copy/list-template/head.go +42 −0
  • testdata/moves-copy/list-template/record.md +15 −0
  • testdata/moves-copy/quoted-verb/quoted.go +13 −0
  • testdata/moves-copy/quoted-verb/record.md +10 −0
  • testdata/moves-copy/sinks/provenance/emit.go +50 −0
  • testdata/moves-copy/sinks/server-text-maker/emit.go +29 −0
  • testdata/moves-copy/sinks/server-text-var/emit.go +16 −0

CI passed — run details

CI log
=== gate ===
cd launchctx && go vet ./... && go test ./... -count=1
ok  	amadan.net/carlos/platform.git/launchctx	0.011s
?   	amadan.net/carlos/platform.git/launchctx/controlname	[no test files]
?   	amadan.net/carlos/platform.git/launchctx/wireid	[no test files]
go vet ./...
gofmt -l .: clean
go test ./... -count=1 -timeout 30m
ok  	github.com/carlosframework/platform	312.728s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	3.112s
ok  	github.com/carlosframework/platform/internal/activator	228.029s
ok  	github.com/carlosframework/platform/internal/agentsock	0.015s
ok  	github.com/carlosframework/platform/internal/alerting	0.003s
ok  	github.com/carlosframework/platform/internal/analytics	0.018s
ok  	github.com/carlosframework/platform/internal/appconfig	2.236s
ok  	github.com/carlosframework/platform/internal/apperr	0.069s
ok  	github.com/carlosframework/platform/internal/applog	0.124s
ok  	github.com/carlosframework/platform/internal/awsinv	0.003s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.004s
ok  	github.com/carlosframework/platform/internal/boxid	0.896s
?   	github.com/carlosframework/platform/internal/boxid/boxidtest	[no test files]
?   	github.com/carlosframework/platform/internal/boxid/internal/signtest	[no test files]
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.008s
ok  	github.com/carlosframework/platform/internal/caps	0.012s
ok  	github.com/carlosframework/platform/internal/certwarm	0.003s
ok  	github.com/carlosframework/platform/internal/cgroup	0.186s
ok  	github.com/carlosframework/platform/internal/changelog	0.245s
ok  	github.com/carlosframework/platform/internal/clamd	0.055s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/console	351.413s
?   	github.com/carlosframework/platform/internal/controlname	[no test files]
?   	github.com/carlosframework/platform/internal/controlsock	[no test files]
ok  	github.com/carlosframework/platform/internal/dbdoor	5.951s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.010s
ok  	github.com/carlosframework/platform/internal/dbverify	0.010s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.010s
ok  	github.com/carlosframework/platform/internal/docsite	0.010s
ok  	github.com/carlosframework/platform/internal/domains	1.994s
ok  	github.com/carlosframework/platform/internal/doorkey	0.010s
ok  	github.com/carlosframework/platform/internal/economics	0.010s
ok  	github.com/carlosframework/platform/internal/edge	25.874s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.010s
ok  	github.com/carlosframework/platform/internal/fleetapi	0.142s
ok  	github.com/carlosframework/platform/internal/gate	1.655s
ok  	github.com/carlosframework/platform/internal/genselect	0.016s
ok  	github.com/carlosframework/platform/internal/geo	0.016s
ok  	github.com/carlosframework/platform/internal/geoip	0.031s
ok  	github.com/carlosframework/platform/internal/host	46.221s
ok  	github.com/carlosframework/platform/internal/hostactors	0.377s
ok  	github.com/carlosframework/platform/internal/hostbox	1.323s
ok  	github.com/carlosframework/platform/internal/hostclaim	0.236s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.015s
ok  	github.com/carlosframework/platform/internal/hostexec	0.309s
ok  	github.com/carlosframework/platform/internal/hostfence	0.038s
ok  	github.com/carlosframework/platform/internal/hostfiles	4.152s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.017s
ok  	github.com/carlosframework/platform/internal/hostguard	0.143s
ok  	github.com/carlosframework/platform/internal/hostops	1.229s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.004s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.141s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.002s
ok  	github.com/carlosframework/platform/internal/infraview	0.002s
ok  	github.com/carlosframework/platform/internal/instancectl	1.701s
ok  	github.com/carlosframework/platform/internal/instanceexec	2.691s
ok  	github.com/carlosframework/platform/internal/instancefs	0.006s
ok  	github.com/carlosframework/platform/internal/instancekey	0.004s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.010s
ok  	github.com/carlosframework/platform/internal/layout	1.326s
ok  	github.com/carlosframework/platform/internal/lease	9.438s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	0.005s
ok  	github.com/carlosframework/platform/internal/ledger	0.013s
ok  	github.com/carlosframework/platform/internal/mail	0.160s
ok  	github.com/carlosframework/platform/internal/maintenance	0.086s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	5.506s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.077s
ok  	github.com/carlosframework/platform/internal/metrics	0.008s
ok  	github.com/carlosframework/platform/internal/moves	21.143s
ok  	github.com/carlosframework/platform/internal/moves/archive	0.736s
ok  	github.com/carlosframework/platform/internal/objstore	0.164s
ok  	github.com/carlosframework/platform/internal/ops	0.160s
ok  	github.com/carlosframework/platform/internal/park	0.191s
ok  	github.com/carlosframework/platform/internal/privatefile	0.007s
ok  	github.com/carlosframework/platform/internal/provision	3.124s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.007s
ok  	github.com/carlosframework/platform/internal/registry	3.618s
ok  	github.com/carlosframework/platform/internal/relay	7.226s
ok  	github.com/carlosframework/platform/internal/release	17.893s
ok  	github.com/carlosframework/platform/internal/rollout	1.482s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.004s
ok  	github.com/carlosframework/platform/internal/rootaws	0.006s
ok  	github.com/carlosframework/platform/internal/s3compat	0.005s
ok  	github.com/carlosframework/platform/internal/safefile	0.003s
ok  	github.com/carlosframework/platform/internal/schedule	2.220s
ok  	github.com/carlosframework/platform/internal/sim/hostlife	2.313s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	4.384s
ok  	github.com/carlosframework/platform/internal/status	0.035s
ok  	github.com/carlosframework/platform/internal/steering	0.006s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.133s
ok  	github.com/carlosframework/platform/internal/svcrole	0.002s
ok  	github.com/carlosframework/platform/internal/telemetry	0.004s
ok  	github.com/carlosframework/platform/internal/termfence	0.004s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.004s
ok  	github.com/carlosframework/platform/internal/unixdial	0.002s
ok  	github.com/carlosframework/platform/internal/updatewords	0.002s
ok  	github.com/carlosframework/platform/internal/usage	0.004s
ok  	github.com/carlosframework/platform/internal/version	0.002s
ok  	github.com/carlosframework/platform/internal/vet	1.532s
=== cross ===
--- shard 0 of 5 ---
cross-compiling darwin/arm64
--- shard 1 of 5 ---
cross-compiling darwin/amd64
--- shard 2 of 5 ---
cross-compiling linux/arm64
--- shard 3 of 5 ---
cross-compiling windows/amd64
--- shard 4 of 5 ---
cross-compiling windows/arm64
=== minio-contract ===
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
  minio: cached, digest verified
  mc: cached, digest verified
  minio healthy on 127.0.0.1:20999
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
  buckets and scoped user ready
=== RUN   TestDeliveredContractMinio
=== RUN   TestDeliveredContractMinio/put
=== RUN   TestDeliveredContractMinio/get_round-trips_the_body
=== RUN   TestDeliveredContractMinio/list_shows_the_key
=== RUN   TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN   TestDeliveredContractMinio/delete_removes_it
=== RUN   TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.02s)
    --- PASS: TestDeliveredContractMinio/put (0.00s)
    --- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
    --- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
    --- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.01s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
    --- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
    --- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.022s
=== RUN   TestT4StorageProbeMinio
2026/10/11 21:54:36 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18DD984B6624C02F, HostID: 7c420053e0fbcd7f41653fdd92ffa2802c903d05303b1aa15adc2e8bb65d183f, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
--- PASS: TestT4StorageProbeMinio (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.014s
minio contract: PASS
approved_moves_copy_scan_test.go

Loading diff…

approved_moves_copy_test.go

Loading diff…

docs/site/cli.md

Loading diff…

docs/superpowers/plans/2026-10-06-moves-phase1-copy.md

Loading diff…

hostclaim_cli.go

Loading diff…

hostclaim_cli_test.go

Loading diff…

internal/console/apihostclaim.go

Loading diff…

internal/console/apiinstancemove.go

Loading diff…

internal/console/apiinstancemove_delete_test.go

Loading diff…

internal/console/apiinstancemove_j17_test.go

Loading diff…

internal/console/apiinstancemove_test.go

Loading diff…

internal/console/apiinstances.go

Loading diff…

internal/console/claim_authority_census_test.go

Loading diff…

internal/console/claim_purge.go

Loading diff…

internal/console/claim_retire.go

Loading diff…

internal/console/claim_runtime.go

Loading diff…

internal/console/movelog_retire_test.go

Loading diff…

internal/console/movesrecovery.go

Loading diff…

internal/console/movesrecovery_test.go

Loading diff…

internal/console/server.go

Loading diff…

internal/console/store.go

Loading diff…

internal/console/store_gate.go

Loading diff…

internal/console/testdata/claim-authority-sites.txt

Loading diff…

internal/console/view_test.go

Loading diff…

internal/host/agent.go

Loading diff…

internal/host/movesabort.go

Loading diff…

internal/host/movesarchive.go

Loading diff…

internal/host/movescut.go

Loading diff…

internal/host/movesevents.go

Loading diff…

internal/host/movesevents_test.go

Loading diff…

internal/host/movesfinal.go

Loading diff…

internal/host/movesfinal_test.go

Loading diff…

internal/host/movesfloorgate.go

Loading diff…

internal/host/movesfloorgate_linux.go

Loading diff…

internal/host/movesfloorgate_linux_test.go

Loading diff…

internal/host/movesinstall.go

Loading diff…

internal/host/movesland.go

Loading diff…

internal/host/movesland_probe_test.go

Loading diff…

internal/host/moveslandcommit.go

Loading diff…

internal/host/moveslandinstall.go

Loading diff…

internal/host/moveslandprobe.go

Loading diff…

internal/host/moveslogoutbox.go

Loading diff…

internal/host/movespaging.go

Loading diff…

internal/host/movespaging_test.go

Loading diff…

internal/host/movesparks.go

Loading diff…

internal/host/movespass.go

Loading diff…

internal/host/movespass_test.go

Loading diff…

internal/host/movesphase1.go

Loading diff…

internal/host/movesphase1_test.go

Loading diff…

internal/host/movesprobeattempts.go

Loading diff…

internal/host/movesprobeattempts_test.go

Loading diff…

internal/host/movesprobeowners.go

Loading diff…

internal/host/movesprobeowners_test.go

Loading diff…

internal/host/movesrecover.go

Loading diff…

internal/host/movesrecover_test.go

Loading diff…

internal/host/movesretry_test.go

Loading diff…

internal/host/movesrevert.go

Loading diff…

internal/host/movesrevert_test.go

Loading diff…

internal/host/movesrollback.go

Loading diff…

internal/host/movesrollback_finalfix_test.go

Loading diff…

internal/host/movesrollback_test.go

Loading diff…

internal/hostops/move_log_writer.go

Loading diff…

internal/hostops/move_log_writer_test.go

Loading diff…

internal/hostops/move_loss_authority.go

Loading diff…

internal/hostops/move_recovery_grant.go

Loading diff…

internal/hostops/recovery.go

Loading diff…

internal/moves/abort.go

Loading diff…

internal/moves/journal.go

Loading diff…

internal/moves/journal_lock_test.go

Loading diff…

internal/moves/journal_test.go

Loading diff…

internal/moves/log.go

Loading diff…

internal/moves/log_test.go

Loading diff…

internal/moves/operatorcopy.go

Loading diff…

internal/moves/staging.go

Loading diff…

internal/moves/staging_test.go

Loading diff…

internal/moves/timings_test.go

Loading diff…

internal/moves/transition.go

Loading diff…

internal/moves/transition_test.go

Loading diff…

internal/provision/plan9_b8_census_test.go

Loading diff…

internal/provision/provision.go

Loading diff…

main.go

Loading diff…

move.go

Loading diff…

move_test.go

Loading diff…

testdata/moves-copy/file-note/readiness.go

Loading diff…

testdata/moves-copy/file-note/record.md

Loading diff…

testdata/moves-copy/list-join-two/head.go

Loading diff…

testdata/moves-copy/list-join-two/record.md

Loading diff…

testdata/moves-copy/list-join/head.go

Loading diff…

testdata/moves-copy/list-join/record.md

Loading diff…

testdata/moves-copy/list-producer/head.go

Loading diff…

testdata/moves-copy/list-producer/record.md

Loading diff…

testdata/moves-copy/list-template/elem.go

Loading diff…

testdata/moves-copy/list-template/head.go

Loading diff…

testdata/moves-copy/list-template/record.md

Loading diff…

testdata/moves-copy/quoted-verb/quoted.go

Loading diff…

testdata/moves-copy/quoted-verb/record.md

Loading diff…

testdata/moves-copy/sinks/provenance/emit.go

Loading diff…

testdata/moves-copy/sinks/server-text-maker/emit.go

Loading diff…

testdata/moves-copy/sinks/server-text-var/emit.go

Loading diff…