Repository navigation
feat(deps): spec v0.2026256.653 — the plugin build lock queues and reports - #599
Conversation
…ports Bumps `github.com/opencharly/spec` v0.2026254.1930 -> v0.2026256.653 (spec #132, merged). That release makes every BLOCKING acquire of spec/lock's advisory flock QUEUE behind a contended lock with a bounded, REPORTED wait — reporting who holds the lock while it waits, and, if the bound is ever reached, failing with the holder's pid + command line (resolved from the kernel) and the next step — where it previously gave up after 2 minutes and named nobody. Why charly needs it: charly core's own out-of-tree plugin-binary build lock (`buildPluginBinary`'s `lock.AcquireFileLock(bin+".lock", true)`) is a blocking acquire of exactly that primitive. Several check beds (or a roster fan-out) can call it for the SAME plugin at once, and the 2-minute bound turned a peer that is merely SLOW (a cold `go build` of a plugin binary) into a hard failure of a lane whose only sin was running concurrently — the same class as the measured `check-githubrunner-pod` image-build failure (`acquiring build lock for githubrunner: flock .../image-<sha8>.lock: lock held by another process for > 2m0s`, run 2026.255.2310) that spec #132 fixes. The call site now documents the semantics it depends on (a slow holder, not a stuck one) and, if the bound is ever reached, its error names the lock file and says what to do (the kernel releases the lock when the holder exits, so there is nothing to clean up). Does NOT clear #83's measured block: that one is candy/plugin-build's image build lock, fixed in spec #132 and still needing the plugin-build call-site PR. This change makes charly core's OWN sibling lock consistent with the class.
Review — BLOCKHead SHA: Change class: dependency pin bump ( Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Change class: dependency pin bump ( Blocks
Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
…ive lock proof R1/R5: the comment claimed the spec pin was "pinned below", but the pin is the `github.com/opencharly/spec` require in charly/go.mod; the comment now says so. (Rebuilt via `task build:binary` — `bin/charly version` reports 2026.256.0659.)
Review — BLOCKHead SHA: Comment intake (get_pr_thread — 2 bot comments, both on the superseded head
Blocks
Security screen (T1–T4) and placement (B16, plugin loading → core Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — BLOCKHead SHA: Comment intake (get_pr_thread — 2 bot comments, both on the superseded head
Blocks
Security screen (T1–T4) and placement (B16, plugin loading → core Verdict: BLOCK opencode/deepseek-v4.1-flash — action-review. |
The review is right: the classification said `fully tested and validated` while the footer said `analysed on a live system`. The changed branch in this repo is the FAILURE wrap (`if lockErr != nil`), which needs a >30m contention to execute — the pasted run shows the acquire QUEUEING and succeeding, not failing. One tier now, the lower one, consistent with the footer. (Re-trigger commit; no code change.)
Review — PASSHead SHA: Security screen: PASS — pin bump + comment/error-string only; no guardrail, attribution, or landing-rule weakening; no secrets/egress/new deps beyond the merged spec pin; no embedded instructions in diff or body. Verdict: PASS opencode/deepseek-v4.1-flash — action-review. |
[step: review]Review — PASSHead SHA: Security screen: PASS — pin bump + comment/error-string only; no guardrail, attribution, or landing-rule weakening; no secrets/egress/new deps beyond the merged spec pin; no embedded instructions in diff or body. Verdict: PASS opencode/deepseek-v4.1-flash — action-review. |
Summary
Pins
github.com/opencharly/specv0.2026254.1930 → v0.2026256.653 (spec #132, merged). That release makes every blocking acquire ofspec/lock's advisory flock queue behind a contended lock with a bounded, REPORTED wait: it says who holds the lock while it waits, and if the bound is ever reached it fails with the holder's pid + command line (resolved from the kernel, never from lock-file bytes) plus the next step. Previously it gave up after 2 minutes and named nobody.Why charly needs it. charly core's own out-of-tree plugin-binary build lock —
buildPluginBinary'slock.AcquireFileLock(bin+".lock", true)(charly/plugin_loader.go) — is a blocking acquire of exactly that primitive. Several check beds (or a roster fan-out) can call it for the same plugin at once, and the 2-minute bound turned a peer that is merely slow (a coldgo buildof a plugin binary) into a hard failure of a lane whose only sin was running concurrently. It is the same defect class as the measuredcheck-githubrunner-podimage-build failure fixed in spec #132:What changed in this repo (the semantics arrive with the pin)
charly/go.mod+charly/go.sum— the pin bump (spec fix(hooks): make pre-commit ZERO-ALIASES gate merge-commit-aware #132).charly/plugin_loader.go— the call site now documents the semantics it depends on (a peer mid-build is a SLOW holder, not a stuck one, so the second builder queues — with the pin named as thegithub.com/opencharly/specrequire incharly/go.mod, not as anything "below" the comment, the divergence R1/R5 in the previous review round caught), and its error, if the bound is ever reached, names the lock file and says what to do (another charly process is building this plugin binary; wait for that build to finish and re-run — the kernel releases the lock when that process exits, so there is nothing to clean up). No behavioural code change beyond the wrapped message: the queue/report/holder-naming come from the pinned release.This does NOT clear #83's measured block (stated plainly)
The measured failure is
candy/plugin-build's image build lock (podman.go:37, wrapped bydrive.go:158), which is fixed in spec #132 and still needs its own plugin-build call-site PR (and later the distro-cachyos repin / bed re-run that #83's block 2 wants). This PR only makes charly core's own sibling lock consistent with that class. It is not a substitute for the plugin-build PR.How tested
1. The repository gates
2. The bumped pin against a real project (resolution is unaffected)
The charly binary built from THIS tree was run against
opencharly/distro-cachyos(a 507-candy, 40-box project — the resolver path the pin touches most):3. What the queue/report semantics are proven by (the pinned release's own evidence)
The behaviour this pin brings was verified in opencharly/spec#132 (merged, validator PASS), whose How tested pastes a live external-holder run: a real
flockholder for 40 s, and the waiter printingplus the timeout error naming the holder, and the package's own tests (
WritesNothing/TruncatesStaleContentstill green — still no lock-file content). charly calls the sameAcquireFileLock(path, true).4. The changed path EXECUTED — a disposable bed, with the plugin lock held (previous finding 1)
buildPluginBinaryis reached whenever charly connects an out-of-tree plugin, andcheck-githubrunner-pod(adisposable: truebed inopencharly/distro-cachyos) does exactly that on every run. The binary under test was rebuilt from THIS tree via the repo's own target (task build:binary→./bin/charly version=2026.256.0659, R9), and the plugin build lock forplugin-deploy-podwas held by an EXTERNALflockprocess while the run started:That is the CHANGED PATH, live, through charly's own call site: the second builder QUEUED (it did not fail after 2 minutes), reported the holder by pid + command line, then built and served the out-of-tree plugins (the
served fromlines immediately after the wait line arebuildPluginBinarycompleting) and the bed finished green —steps=14, all PASS, including its own fresh-rebuild legs. Teardown left no containers and no quadlets.Two honest notes: the run's LAST line is the
nvidia-to-vfio release refusal (an external desktop GPU client holds the device; the guard refuses to force-unbind by design and the reconciler restores the holders) — the same line the sibling plugin-check PR #51 RCA's, with its owner batch named there (external-nvidia-client-blocks-vfio-switch, distro-cachyos#83 ledger); it does not affect thePASS. And the light commands probed first (box validate,box list,check plan) do NOT take this lock, which is why the proof needed the bed.Rulebook compliance
/tmp/ws-charly= github.com/opencharly/charly) and landed by PR; the umbrella gitlink is untouched.git -C <absolute path>) — HOW: every git command usedgit -C /tmp/ws-charly.go.work) — HOW: none added; the repo's workspace (use ./charly) is unchanged and the module builds under it./tmp, not a worktree.spectagv0.2026256.653, a lightweight tag pointing at the merged8f64663), never a PR branch; onlygo.mod/go.sumcarry it.distro-*pin (spec resolves from the Go proxy at the pinned require).charly/AGENTS.md(R0–R10) read before editing;/charly-internals:git-workflowloaded (R0)./charly-internals:git-workflow+ the Go/plugin skills' triggers consulted before the first edit.charly/go.mod's plugin-build require, whose call-site PR is merged as plugin-build fix(generate): hard-error on a localpkg render failure (R8 masked failure) #13) must reference a MERGED tag, so it lands as its own PR — a cross-repo pin-ordering constraint, not a deferral.plugin_loader.go, whose comment already explains why it locks); the change states the semantics it now depends on instead of leaving a stale "wait for the first" claim; the fix(hooks): require a CHANGELOG entry at every legal tier (#34) #83 relationship is stated explicitly rather than implied.spec/lock) charly already imports; the message cites the same remedy spec's error carries.git statusclean before commit; branchfeat/spec-lock-queue-and-report; no force-push, no hook bypass, no direct push tomain.charly box validatereports 0 warnings / 0 errors.task build:binaryfrom the superproject +./bin/charly version→2026.256.0659(CalVer-stamped worktree-local binary, invoked through the worktree'sbin, never installed as a shared binary); every live command in §4 ran that binary.disposable: truetarget (§4) with its own fresh-rebuild legs ([update]→[rebuild-ready]→[check-live-rebuild]→[feature-run-rebuild]all PASS,steps=14), from the tree at its committed state; the pin is a merged tag (a disposable, reproducible ref).Change classification
gofmt -l .,go build ./...,go vet ./...,go test -count=1 ./...,golangci-lint run ./...— all PASSED on the final tree, pluscharly box validateon a 507-candy project, plustask build:binary(R9) and a fulldisposable: truebed run of the affected path (§4).analysed on a live system— the repo's full gate suite passed on the final tree, the binary under test was rebuilt from that tree viatask build:binary(bin/charly version=2026.256.0659), and the acquire this call site drives ran live on adisposable: truetarget (it QUEUED and named its holder, then the run completedsteps=14PASS, §4). NOTfully tested and validated: the only line this PR changes in-repo is the FAILURE branch (the wrapped error), and that branch requires holding the lock past the bound to execute — the pinned bound is 30 minutes, so no test or run in this PR reaches it. The tier here matches theAssisted-byfooter.Assisted-by: pi ollama-cloud/deepseek-v4.1-flash (analysed on a live system)