Repository navigation
fix: add a root charly.yml so the candy CI gate is real - #2
Merged
Merged
Conversation
Without a root manifest this repo is project-less: charly scans NO candies at all, so the stock `charly box validate` step in deploy.yml exits 0 on any manifest - including one with a malformed plugin.providers entry. The step has been asserting nothing. A four-line discover: block is the whole fix: the candy becomes scannable, the CUE schema gate applies, and the stock step starts working with no workflow change. The file declares no entities of its own. Refs opencharly/charly#459. Claude-Session: https://claude.ai/code/session_016fnPmYiC6ZkqXSi6D8PAP6
Review — PASSHead SHA: Security screen: PASS — single additive config file; no secrets, no exfiltration, no scope mismatch, no weakened guardrails (this change strengthens the CI gate by giving Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
aitrawog
added a commit
that referenced
this pull request
Oct 6, 2026
…the web probe Round-1 BLOCK findings on the plugin-dsh PR: - #1 (R4a/R10 regression): appending the /api/* call made the fragment's exit status the final `if`, silently discarding a failed token exchange — a bad or expired token yielded C=401/404, the `if` was false, and the probe exited 0 while layer 1 was broken. The exchange now propagates: `curl … || { echo …; rm -f "$J"; exit 1; }` on the cleanup path. - #2 (R1/R4a overclaim): `if [ "$C" = "403" ]` failed only on exactly 403; 000 (no response), 401, 404, 5xx and 3xx all exited 0, so the "proves the API surface actually answers" prose overclaimed. The assertion is now a `case` that rejects 403 (the fence), 000 (no response) and 5xx; the prose at every site says exactly that. - #3 (A1/R5): the false single-layer claim lived in the dsh-cli skill, NOT the candy entity — the candy entity described the UI as "token-authenticated" (accurate). Its wording is still tightened to say the token is exchanged on / and an /api/* call asserted, so it matches the probe. Verified live: a good token exits 0; a bad token exits 1 (the layer-1 guard); a missing token file exits 1. Assisted-by: OpenCode ollama-cloud deepseek-v4.1-flash (fully tested and validated)
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 6, 2026
…gle-layer auth claim (#12) * fix(dsh): assert the /api/* surface in the web probe + retire the single-layer auth claim The shared dshWebTokenProbe fragment authenticated with the launch token and curled the root GET /?token=… only. `dsh web` authenticates at TWO layers: the launch token AND the Host/Origin browser-trust fence (api-request-trust), which every /api/* call passes BEFORE authentication — a forged/non-loopback Host returns 403 while / still loads. A GET /-only probe cannot see that fence. - webprobe.go: after the token exchange, make one /api/* call with the cookie and fail on a 403, so the probe proves the app's API surface answers, not merely that / responds. Document both layers and the `--trusted-host` host-side requirement (which this in-box probe, always dialing 127.0.0.1, cannot itself observe). - webprobe_test.go: lock in the /api/* assertion. - candy + dsh-cli skill: retire "authenticates every request". Closes #11 Assisted-by: OpenCode ollama-cloud deepseek-v4.1-flash (fully tested and validated) * fix(dsh): propagate the token-exchange failure and reject 000/5xx in the web probe Round-1 BLOCK findings on the plugin-dsh PR: - #1 (R4a/R10 regression): appending the /api/* call made the fragment's exit status the final `if`, silently discarding a failed token exchange — a bad or expired token yielded C=401/404, the `if` was false, and the probe exited 0 while layer 1 was broken. The exchange now propagates: `curl … || { echo …; rm -f "$J"; exit 1; }` on the cleanup path. - #2 (R1/R4a overclaim): `if [ "$C" = "403" ]` failed only on exactly 403; 000 (no response), 401, 404, 5xx and 3xx all exited 0, so the "proves the API surface actually answers" prose overclaimed. The assertion is now a `case` that rejects 403 (the fence), 000 (no response) and 5xx; the prose at every site says exactly that. - #3 (A1/R5): the false single-layer claim lived in the dsh-cli skill, NOT the candy entity — the candy entity described the UI as "token-authenticated" (accurate). Its wording is still tightened to say the token is exchanged on / and an /api/* call asserted, so it matches the probe. Verified live: a good token exits 0; a bad token exits 1 (the layer-1 guard); a missing token file exits 1. Assisted-by: OpenCode ollama-cloud deepseek-v4.1-flash (fully tested and validated)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes this repo's candy CI gate actually gate something.
Without a root
charly.ymla plugin repo is project-less: charly scans no candies atall, so the stock
charly box validatestep indeploy.ymlexits 0 on any manifest —including one with a malformed
plugin.providersentry. The step has been assertingnothing.
A four-line
discover:block is the whole fix. The candy becomes scannable, the CUE schemagate applies, and the stock step starts working — no workflow change needed. The file
declares no entities of its own; it only tells charly where to look.
Refs opencharly/charly#459.
How tested
The mechanism and the fix were established on
opencharly/plugin-punktfunk(opencharly/plugin-punktfunk#4), with a plain layer candy to isolate it —
box list candiesfilters plugin candies out of its own output, so a plugin candy alone cannot show this:
And on a real plugin candy, before/after, same repo and command:
Consumers are unaffected, which is the real risk of adding a root manifest — a consuming
project might resolve the candy twice (once via its pinned subpath ref, once via the new
discover:). Tested by injecting the manifest into the fetched checkout thatopencharly/distro-cachyosresolves for a pinned plugin candy, then validating that projectboth ways: identical result, exit 0 either way.
This repo's own gate is the acceptance: the
buildcheck on this PR runscharly box validateat this repo root against the pinned charly. It now scans this repo'scandy, so a green check here is the first time that step has meant anything for this repo.
Rulebook compliance
/charly-internals:plugin(plugin repo layout, the candy-ref contract)and
/charly-internals:git-workflowloaded before the change.candy/walkskipped the CUE gate) was disproved by the plain-layer probe above before this fix was
written.
across every affected plugin repo in the same sweep, tracked by Plugin repos' candy CI gate validates nothing (charly box validate at a plugin repo root scans an empty set) charly#459.
charly box validatestep is madeto work rather than a second, parallel validation being bolted on.
discover:) is used; no CI staginghack, no suppression.
validatetreat acandy/-bearing dir as a project) was investigated and rejected: "returns nil for aproject-less directory" is a documented contract other resolve paths rely on, so the fix
belongs in the repo.
buildcheck is the gate running for real.changes what
charlyscans in the repo, which the validate A/B fully observes.was proved before landing, with the cached-checkout A/B above.
plan:is unchanged.its project-less contract unchanged.
Change classification
input. No source, no workflow, no schema change.
charly box validatebefore/after with a deliberately malformedmanifest, a consumer-side resolution A/B, and this PR's own
buildcheck.fully tested and validated— the gate this change exists to repairwas exercised in both directions, and the consumer risk was tested, with output retained
above.
Assisted-by: Claude Code claude-opus-5[1m] (fully tested and validated)