Repository navigation
feat(check): add kind:check-roster — run a declared bed set as one gate - #55
Conversation
A check-roster entity (schema/checkroster.cue) enumerates disposable beds via the ONE namespace-aware resolver (spec Beds/ResolveBed), selects/excludes by glob, refuses host-local beds by default, auto-derives exclusive-token serial chains, runs the rest through the existing R10 engine on a bounded lane pool, and aggregates honest exit codes. Retires the /verify-beds redirect; adds roster unit coverage. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
Adopt the merged spec tag carrying CliRequest.env, the namespace-aware bed resolver, and the multi-alias template-fold fix. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
The roster runner reads the entity body the plugin received at OpLoad via a process-local cache, rather than re-deriving from the opaque uf.PluginKinds fold. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
runOne called wg.Done AND its per-chain goroutine deferred wg.Done — a double-Done panicked 'negative WaitGroup counter' once a bed finished (the bed itself passed, then the aggregate crashed). runOne keeps only the lane semaphore; the chain goroutine owns the single wg.Done. Adds the balanced-accounting regression test. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
Address validator findings on the roster runner: - buildRosterChains UNION-merges every chain a bed's tokens touch, so two chains never share a token (A[t1],B[t2],C[t1,t2] -> one chain). - cpu/ram thread to 'charly vm create --cpus/--ram' via bedRunOpts (were decoded but ignored). - aggregateRoster: a prereq-skipped bed is counted separately; all-skipped -> CheckSkippedError (exit 3), skip+pass -> PASS. - coverage: union-merge + skip-aggregation + capped vm-create tests. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
OpLoad may run across goroutines under a concurrent load; the package-level map was unguarded. putRosterBody/getRosterBody under a RWMutex. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: Go plugin runtime code + candy config ( Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…not .) Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
Assisted-by: opencode deepseek-v4.1-flash (documentation reviewed)
Review — BLOCKHead SHA: Change class: Go plugin runtime code + candy config ( Security screen: PASS — no T1–T4 finding: no secrets/egress, no guardrail weakening, no new non-transitive deps (the two Placement (B16): CORRECT — the capability (kind + runner + schema) lands in the plugin candy; no new Blocks
Comment intake: comment 5824585547 (head Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…eds param - Remove the superseded globMatch doc block and the pre-union-merge buildRosterChains comment (my earlier edits left both, self-contradicting). - selectRosterBeds no longer takes the unused uf parameter. Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)
Assisted-by: opencode deepseek-v4.1-flash (documentation reviewed)
Review — PASSHead SHA: Security screen: PASS — no T1–T4 finding (no secrets/egress, no guardrail weakening; the two Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary of changes
Add
kind: check-rosterto candy/plugin-check — the config-declared, plugin-native roster that runs a declared set of disposable check beds together (in parallel) as one gate. Replaces the/verify-bedsagent-workflow fan-out.schema/checkroster.cue— the self-contained#CheckRosterInputCUE def (select glob, exclude, expected_fail, lanes, cpu/ram, refuse_host_local, var). FLAT kind.roster_helpers.go(NEW) — host-free helpers:numCPU()andisRosterEntity()(routescharly check run <name>to the roster path).roster.go— the runner: loads the project plugin-side (loaderkit), enumerates beds via the ONE namespace-aware resolver (spec.UnifiedFile.Beds()), selects/excludes by qualified-name glob, classifies (runnable / expected_fail / iterate-excluded / host-local-refused), auto-derives exclusive-token serial chains by UNION-MERGING every chain a bed's token set touches (two chains never share a token), runs the rest through the EXISTING R10 engine (runCheckBed) on a boundedlanespool, threads the roster'scpu/ramtocharly vm create --cpus/--ram, and aggregates honest exit codes (0 pass / 1 infra / 2 checks-failed / 3 all-skipped). Negative controls pass when they fail on checks (exit 2).plugin.go/provider.go— advertise thecheck-rosterkind (+schemaFSembed); handleOpLoad, caching the RESOLVED body in a mutex-guardedrosterCache(the pipelineentityCacheprecedent).run_cmd.go— acheck-rosterentity name routes torunCheckRoster; the/verify-bedsredirect is DELETED.bed_run.go—bedRunOptsgainsCpus/Ram(the roster-enforced VM shape), threaded tovmCreateArgs.anchored.go—vmCreateArgsappends--cpus/--ramfrombedRunOpts.bed_session.go— use the one resolver (uf.ResolveBed) and qualify a namespaced bed's barefrom:with its namespace prefix.roster_test.go— unit coverage: selection, host-local refusal, iterate exclusion, globs, serial chains (incl. union-merge), expected-fail, exit aggregation (incl. all-skipped), balanced WaitGroup accounting;anchored_test.gocovers the capped vm-create argv.go.mod/go.sum— pinspecv0.2026267.2224+sdkv0.2026267.2238(merged namespace fixes); adds theopencontainers/go-digest+opencontainers/image-specindirects transitively.R5 sweep (real, verbatim):
git grep -n 'verify-beds' -- candy/plugin-check→ (no matches).Closes / relates to: producers opencharly/spec#154/#155 + opencharly/sdk#281/#283 (MERGED).
Breaking change + rollback: new optional kind only; the
run_cmdempty-name error text changes. Rollback is a revert.Change class
Go plugin runtime code + candy config. Gate:
go build ./... && go test .+ a pasted live roster run.How R10-tested — exact gate, commands, and pasted output
GOWORK=off go build ./... && GOWORK=off go test .+ a livecharly check run <roster>on a disposable bed.check-roster-proof(proof-a+proof-bsharingrequires_exclusive: [proof-lock],proof-cindependent;lanes: 2), driven end to end.charlybinary is built by the charly leg; this plugin is a library.runCheckRoster/runRosterBedran live (pasted §2).lanes>1pool AND a shared-token serial chain (timeline pasted).1. Gate output (verbatim):
2. CHANGED run path executing LIVE (verbatim — THREE beds, lanes=2, incl. a shared-token serial pair):
Three proof beds:
proof-a+proof-bboth declarerequires_exclusive: [proof-lock](a serial chain);proof-cis independent (lanes: 2). Each ran the FULL R10 sequence (image-build → check-image → deploy → config → start → check-live → feature-run → fresh update → check-live-rebuild → cleanup) at exit 0.Parallel + serial both proven in the log timeline (verbatim line numbers, same file):
proof-c's steps interleave withproof-a's throughout (parallel);proof-bbegins only afterproof-a's cleanup releases the shared token (serial)..check/proof-{a,b,c}/<calver>/summary.yml→ok: trueeach; zero panics.3. Changed paths executing under
-v: allTestSelectRosterBeds_*,TestGlobMatch,TestBuildRosterChains_*(incl._UnionMergesSharedTokens),TestAggregateRoster_*(incl._AllSkipped),TestRosterWaitGroup_BalancedConcurrency,TestVmCreateArgs_BuildsCreateArgv— PASS.Attribution tier
fully tested and validated— the changed run path executed live (pasted §2) at zero warnings, plus unit coverage.Harness rulebook compliance — state HOW each is satisfied (or
N/A — <reason>)/charly-internals:plugin,/charly-check:check,/charly-internals:go.spec.Beds()resolver; serial grouping reads bed declarations./verify-bedsfan-out.git grep -n 'verify-beds' -- candy/plugin-check→ (no matches).git statuschecked; no destructive action.charly check run <roster>pasted.summary.ymlcarriesok/errors/warnings.N/A(library).disposable: truebeds run; unit coverage that fails without the orchestration.disposable: truebeds.gofmtclean;go testgreen.N/A— post-merge bytag-on-merge.Assisted-by: opencode deepseek-v4.1-flash (fully tested and validated)