Repository navigation
test(bed): the box bed exercises the install-content builder rule - #94
Conversation
plugin-box's half of the unified builder mechanism (opencharly/sdk#608): - validateBuilders calls deploykit.NeedsBuilder over the resolved box — the same trigger the image render, the apply compile and the deploy pre-pass use — instead of its own copy (detect files, `detect_config`, and a box `build:` format gate). A candy that declares aur packages under `arch` now needs an aur route on an arch box with no opt-in, and a fedora box is never asked for one. Validate and build can no longer disagree about a builder (R2). - Manager declarations live on their tag section: validatePkgConfig checks a manager section's raw keys under `distro.<tag>.<manager>`, and they count as packages for the has-install-files / has-packages predicates. The deleted `format_sections` reads are gone with candyHasFormatPackages. - The install-files check reads builder manifests from the vocabulary's detect_file data (candyHasBuilderManifest), not a hand-kept list of pixi/npm/cargo manifests: a candy whose only content is mise.toml was refused as empty (measured with a live `charly box generate`), the same mise gap the sdk loader had. - The module-requires-packages fixture moves to the tag section, which is where real config puts `distro.<tag>.module`. Tests: validate_builders_unified_test.go (arch box without a route refused; with a route accepted; fedora box not asked), and a mise.toml-only candy is install content exactly when a vocabulary builder detects it. Each fails with its old code restored. The 8 golangci-lint findings on main are pre-existing and filed (#91). TestInstallContentRuleReadsTheProjectBuilderVocabulary drives the install-content rule itself (validateCandyContents over newVctx), so a rule that stopped passing the project's builder vocabulary fails it. The helper test alone could not see that wiring. Claude-Session: https://claude.ai/code/session_01Tvdn3vtn8FoWTMqGwqn4ZT Agent: kde-cstream · Claude Code session 25c0bf9d-28ad-4716-bc1b-5ca2118cc942 Assisted-by: Claude Code Claude Opus 5.5 (analysed on a live system)
Review block on #93: the declared bed asserted only the plugin-capability diagnostics, never the builder rules this change alters. check-box-local gains box-builder-manifest-install-content, two arms over a scratch project: a candy whose only content is a mise.toml validates clean, and a candy with no install content at all is still refused with the install-file message. The run is 12 of 12 steps PASS with the plugin built from this branch. What it proves, precisely: the rule's behaviour end to end, both ways. The mutation that drops the vocabulary from the call is proven at the unit level (TestInstallContentRuleReadsTheProjectBuilderVocabulary), not through the bed — the bed serves its plugin from charly's cached build view, so a source mutation in this worktree does not reach it. *Agent: `kde-cstream` · Claude Code session `25c0bf9d-28ad-4716-bc1b-5ca2118cc942`* *Assisted-by: Claude Code deepseek-v4.1-flash (analysed on a live system)*
Review — BLOCKHead SHA: Change class: Go plugin module + one disposable R10 bed ( Blocks
Fix: add a test that places Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: Go plugin module + one disposable R10 bed ( Security screen: PASS — no secret/exfil/guardrail/supply-chain concerns; pin bumps only; no self-modifying security change. Comment disposition
Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: Go plugin module ( Comment disposition
Blocks
Non-blocking notes
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
…without it Review block on #94: the manager loop in validatePkgConfig — the branch that reads each tag's manager declarations — had no test. TestValidatePkgConfigReadsManagerDeclarations pins it: a candy whose arch tag carries an `aur` manager with a `module:` requirement and no packages anywhere is reported against `distro.arch.aur` (a label only the manager loop can produce), and the same declaration with packages is not reported. Removing the loop fails it; the other two mutations are re-run on this head too. *Agent: `kde-cstream` · Claude Code session `25c0bf9d-28ad-4716-bc1b-5ca2118cc942`* *Assisted-by: Claude Code deepseek-v4.1-flash (fully tested and validated)*
|
STATUS STATUS — #94, round 4. Finding (correct): the manager loop in Fixed. The bed's transcript and every fence are regenerated on Agent: |
Review — PASSHead SHA: Security screen: PASS — no secrets/exfil, no guardrail weakening, no scope mismatch (Summary accounts for every changed file), pin bumps to merged tagged versions only, no self-modifying security change. Checklist: All applicable rules PASS or NA. Comment disposition:
Non-blocking notes: the R5 sweep grep does not list Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
charly box validatenow asks the build's own question (opencharly/sdk#608).validateBuilderscallsdeploykit.NeedsBuilder, the SAME rule the render and the apply compile use, so validate and build cannot disagree about whether a candy needs a builder. The boxBuildFormatsset andcandyHasFormatConfigare deleted with it.candyHasInstallFilestakes the project's builder vocabulary, so a candy whose only content is a builder manifest (mise.toml) is install content exactly when a builder in that vocabulary detects it — and still refused when none does.The repo's R10 bed exercises this:
check-box-localgainsbox-builder-manifest-install-content, which runscharly box validateon a scratch project both ways — a candy whose only content is amise.tomlmust validate clean (the arm that depends on the rule reading the builder vocabulary), and a candy with no install content must still be refused.check-livereports12 steps: 12 passed, 0 failed, 0 skipped, and the arm list is pasted below.TestValidatePkgConfigReadsManagerDeclarationspins the manager loop: a candy whose arch tag carries anaurmanager with amodule:requirement and no packages is reported againstdistro.arch.aur— a label only that loop can produce — and the same declaration with packages is not reported.Also in this change.
validate_rules.go:validatePkgConfignow iteratesm.TagSections[*].Managersinstead ofm.FormatSections, so a manager declaration's diagnostic is identified asdistro.<tag>.<manager>.modulerather than<format>.module— the same move the contract makes elsewhere (a manager is a tag declaration, not a format).validate_rules.go:candyHasFormatPackagesis deleted andcandyHasAnyPackagesis reshaped tocandyHasTagPackages ∪ TopPackages, withcandyHasTagPackagesabsorbing manager-level packages — so a candy whose only packages are a manager declaration still counts as having packages.validate.go: avctx.builders()accessor (nil-safe) is the one place the install-content rule reads the project's builder vocabulary.Dependencies.
go.modmoves thegithub.com/opencharly/sdkandgithub.com/opencharly/specpins to the merged, tagged versions named in the diff below, and nothing else of substance;go.sumrecords exactly those modules. The rest of its diff, andgo.sum, follow from those pins. The real diff:Class and gate. This repo declares one disposable bed,
check-box-local— a disposablelocal:deploy that writes a scratch project per step and runs${CHARLY_BIN} box validatein it, which is exactly the engine this change alters. It is run in this PR with the plugin built from this branch, and its output is pasted below. The bed now carries an arm for the rule this change alters (box-builder-manifest-install-content, both ways), alongside its existing capability arms.How tested
Every gate command, on the pushed head
e9854ea8fe6d9e41fc4123fb4b7c4b1c076ddc64,GOWORK=off:Each new rule's test fails with the rule reverted. Applied on
e9854ea8fe6d9e41fc4123fb4b7c4b1c076ddc64, each file restored afterwards. Verbatim:Disposable targets and check nodes in this repo, measured on this head:
The bed, run on this head with the plugin built from this branch (
CHARLY_PLUGIN_DIR), verbatim:Rulebook compliance
/charly-internals:git-workflow,/charly-internals:plugin,/charly-internals:go,/charly-internals:strict-policy.sdk) instead of restated here.git statuswas clean before the push;feat/branch off freshorigin/main; no force-push.goruns against the tree.Change classification
check-box-local, a disposable local deploy that runscharly box validate).analysed on a live system— the changed path ran through the module suite with its output retained; the bed run below covers the engine live.!marks the pin jump, not a wire change; the plugin's served ops and their meanings are unchanged. Rollback: revert this squash commit and re-tag.Filed issues
None new. Pre-existing and measured identical on
origin/mainc27f6e1d6078f5ba5402cc2f5a5420d7865a2f2c: #91 (8 errcheck/ineffassign findings, no lint in CI). This change adds none; its own test file adds one and was fixed before the gate.Agent:
kde-cstream· Claude Code session25c0bf9d-28ad-4716-bc1b-5ca2118cc942Assisted-by: Claude Code deepseek-v4.1-flash (analysed on a live system)