~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0

kcpapply serializes per set (finding 77 cause 2); plan 0040 notes

Merged johnandersen777.bsky.social asked to merge into main from socialweb.computer/socialweb-computer-kcp:fix-77b
docs/plans/0040-release-pipeline.md+11−2
@@ -158,8 +158,17 @@ Manifest, one `httpArtifact` per binary. The CID is CIDv1 raw sha2-256 of the bi
}
```
Written 2026-11-16: `software.release.project/socialweb-computer` (cid bafyreidnbxkyomi6gm6zaef2a5jn5xihw6repfzezje32rqxpvzwafkwke). No channel
yet: its first target is rc169 (the first published rc with the follower; rc168 never published, finding 75).
Written 2026-11-16 (as socialweb.computer):
| Record | rkey | CID |
|---|---|---|
| project | `socialweb-computer` | bafyreidnbxkyomi6gm6zaef2a5jn5xihw6repfzezje32rqxpvzwafkwke |
| manifest (rc169, releases/v0.0.0-rc169/binaries) | `3n2hdqpz65ksv` | bafyreif6jxta5bkq6yx6j5cxxfntqfue6cfawzkv6nrxw55sjpfrcv2ddu |
| version | `socialweb-computer:v0.0.0-rc169` | bafyreiclcz3szlchdf2wzaxectswaqvbqqyg2yfojwmwfffjetnerjhl7q |
| channel rc | `socialweb-computer:rc` | bafyreigve67ht3cyizva5kf5i45si3glntcamy5uxuccqf2nsbwd2hgp2a |
Prod (gateway, hat-7/8/9/10) rolled by hand to rc169 the same day; every bidder logs `releasefollow_on channel rc` and its
heartbeat names `v0.0.0-rc169`. From here a move of the rc channel upgrades prod.
Lexicons (built 2026-11-16): `lexicons/software/release/{project,defs,manifest,version,channel}.json`, Go types in
`internal/atproto/release` (lexgen).
docs/plans/0044-ci-by-hand.md+1−1
@@ -381,7 +381,7 @@ everything and exits (finding 5). If its cleanup reports errors (`cleanupErrors`
| 74 | Prod gate 3: 0007:restart, the four 0014 and 0015:pressure read PASS in 0-1 s, but each was `readings.skipped` (staging only); the test host now prints its tick lines on stdout before the JSON result, so gate.sh's `jq` of that file failed and fell through to PASS (and a FAIL's note to "exit 1: readings: ..."). Fix: gate.sh reads the document from its first `{` line | fixed |
| 75 | The v0.0.0-rc168 tag build (53cad0e3): `stage` "killed after 900s": two small PUTs to Spaces answered UnknownError (retried), the 545 MB arm64 binary uploaded in 26 s, the amd64 one's PUT never returned: `publish-spaces.ts` gives a request no time limit. Rerun (attempt 2). Fix: every S3 request gets a limit that grows with the file (60 s + 1 s per 5 MB), so a hung PUT is aborted and `attempt` retries it (owner, 2026-11-16: not a control) | fixed |
| 76 | CI test on 62841d92, 0005 FAIL "R2 not Held in 10 min". Cause: staging bidder b2 published no heartbeat until 17:31:48 (0006 reading `guestImageReadyAt`; b1 17:08:52), because a bidder writes no offering/heartbeat until its guest image verifies, and b2's 1.5 GB rootfs download from Spaces ran ~1 MB/s for 24 min (b1, same host, same object, same minute: 66 s; probes now 20-65 MB/s from hat-8 and from both staging VMs). `guestimage.fetchOne` had only the 30 min FetchTimeout, no per-attempt limit, no resume. R2 dropped b2 (`no fresh heartbeat`) and b1 was full. Fix: each attempt gets 60 s + 1 s per 5 MB still to fetch, then resumes with `Range` from the bytes already hashed (hand proof: a stream stalled at 10 of 40 MiB resumes and verifies in 70 s). Also: `requester_bidder_discovery` names each drop and its reason. Lesson: I cleaned up the frozen run before finding this; the cause came from the CI artifacts (0006 readings) | fixed |
| 77 | CI test on b8b8ed18, 0006 and 0008 FAIL: b2's one startup ERROR `the HostProcess supervisor stopped` at 20:08:33.874: `APIBinding hostprocesses in root ... metadata.labels[claimed.internal.apis.kcp.io/...]: Invalid value: ""`. Cause: the computevm component and the HostProcess supervisor apply the same hostprocesses set at once (20:08:33.632/.665/.861); kcpapply skips an unchanged APIBinding only on a strict spec match, and the live spec carries the server default `deletionPolicy: Delete`, so every re-apply was an update; one landed after the create (20:08:33) and before `kcp-apibinding` stamped the claimed label (20:08:34), and admission refused it. Fix: an APIBinding is unchanged when every field the manifest declares matches the live spec (`covered`), so repeated and concurrent applies send no update | fixed |
| 77 | CI test on b8b8ed18, 0006 and 0008 FAIL: b2's one startup ERROR `the HostProcess supervisor stopped` at 20:08:33.874: `APIBinding hostprocesses in root ... metadata.labels[claimed.internal.apis.kcp.io/...]: Invalid value: ""`. Cause: the computevm component and the HostProcess supervisor apply the same hostprocesses set at once (20:08:33.632/.665/.861); kcpapply skips an unchanged APIBinding only on a strict spec match, and the live spec carries the server default `deletionPolicy: Delete`, so every re-apply was an update; one landed after the create (20:08:33) and before `kcp-apibinding` stamped the claimed label (20:08:34), and admission refused it. Fix: an APIBinding is unchanged when every field the manifest declares matches the live spec (`covered`), so repeated and concurrent applies send no update Still red on bce9465b (the covered fix in): b1 `policy-binding.yaml` in set provider, computevm and hostprocess both applying it at 21:19:03.6, both reading no binding, so the second apply was an update before kcp stamped the label (live spec covered, managers socialweb-computer then kcp-apibinding 1 s later). Root: two components of one core apply the same set at once. Fix 2: kcpapply serializes Apply per (kcp, base, set name) in the process, so the second reads the created binding and sends nothing | fixed (2) |
## Runs
internal/controllers/runtime/kcpapply/kcpapply.go+20−0
@@ -172,8 +172,28 @@ func (a *Applier) ForWorkspace(path string) *rest.Config {
return c
}
var (
setLocksMu sync.Mutex
setLocks = map[string]*sync.Mutex{}
)
func setLock(key string) *sync.Mutex {
setLocksMu.Lock()
defer setLocksMu.Unlock()
l, ok := setLocks[key]
if !ok {
l = &sync.Mutex{}
setLocks[key] = l
}
return l
}
func (a *Applier) Apply(ctx context.Context, set manifests.Set, values any) (Report, error) {
set.Base = cmp.Or(set.Base, a.opts.Base)
l := setLock(a.base.Host + "|" + set.Base + "|" + set.Name)
l.Lock()
defer l.Unlock()
rep := Report{DryRun: a.opts.DryRun}
if set.BaseCluster == "" && set.Scope != manifests.ScopeKcp && set.Base != "" && set.Base != "root" {
id, err := a.ClusterOf(ctx, set.Base)
.plans.yaml+2−6
@@ -3,8 +3,8 @@
plans:
- plan: docs/plans/0040-release-pipeline.md
agent: ci-bootstrap
status: in progress; steps 1, 2, 4 built (4 not proven), step 3 lexicons
next: prove step 4 on an installed staging bidder; step 3 records and step 6 composition (first CI rc with the follower: rc169)
status: in progress; steps 1, 2 proven on prod (heartbeat names rc169), 4 built, step 3 records for rc169 written; prod rolled to rc169 and follows rc
next: composition 0020 on staging with two follower builds (bce9465b on); rc170 via the rc channel (first prod self-update); step 6 composition
- plan: docs/plans/0050-staging-pki-dns.md
agent: ci-bootstrap
status: in progress; steps 1-5 built, step 6 for the PLC (one https PLC, DNS/front on 53/443); staging 16/16 in cycle 25 (2e44de85)
@@ -41,10 +41,6 @@ plans:
agent: ci-bootstrap
status: finding 1 built (06376d20); finding 3 root cause (the core's restart at start) built; finding 2 open
next: cycle 14 proves 0006 and 0008; then finding 2
- plan: docs/plans/0040-release-pipeline.md
agent: ci-bootstrap
status: step 1 landed, 0019 PASS (cycle 12); the atlibs requester module needs discovery (own step)
next: the rest after a green main
- plan: docs/plans/0042-ci-two-workflows.md
agent: ci-bootstrap
status: the two workflows landed asked-only; the push triggers wait for 0044