Skip to content

A bed's verdict is about the local tree, not about what the PR would land — wrong @github pins and unpushed local pins both pass #340

Closed

Description

@atrawog

An unresolvable @github candy pin passes every bed, by design

Both open ollama submodule PRs pin a candy at a tag where that candy does not exist:

$ git ls-tree v2026.227.0914 candy/ | grep -c ollama-cuda   -> 0     # distro-fedora#18 pins this
$ git ls-tree v2026.201.0706 candy/ | grep -c ollama-cuda   -> 0     # distro-cachyos#15 pins this
$ git ls-tree HEAD           candy/ | grep -c ollama-cuda   -> 1     # exists only on charly#309

candy/ollama-cuda and candy/ollama-rocm are NEW in charly#309. Every tag that predates it — which is every tag those PRs could have pinned when they were written — lacks them. A production charly box build of either box resolves the pin from the remote tag and fails.

Both PRs' beds pass anyway, and that is not a fluke. charly check run <bed> auto-appends a CHARLY_REPO_OVERRIDE for the bed project's own superproject (bed_session.go), pointing every @github.com/opencharly/charly/candy/... ref at the local working tree and ignoring the :vTAG. That behaviour is correct and deliberate — it is what makes a submodule bed test the in-development candy tree instead of a stale published one. The side effect is that the bed is structurally incapable of failing on a wrong or unresolvable tag, because it never resolves the tag at all.

So a bed being green says nothing about whether the pin it declares is real.

Why this is not simply "B6 handles it"

/charly-internals:git-workflow B6 already prescribes the sequence: land the producer, tag it, charly box reconcile the consumer to that tag, then run the consumer's R10 against the real tag. That is exactly the plan for these two PRs, and it is why they are currently held.

The gap is that B6 step 4 does not do what its wording implies for a bed-based consumer. It says the consumer's R10 "now fetches A from the pushed v<CalVer_A>" — but if the consumer's R10 is charly check run <bed>, the override is applied again and the tag is still not fetched. The step that would actually prove the pin is a production build without the override, or charly box reconcile's own verification, not the bed.

Suggested shape of a fix

Something that resolves declared @github pins without the local override and fails on an unresolvable one — a charly box validate --pins style check, or a reconcile-time assertion that every declared candy/<name>:<tag> exists at that tag. It wants to run in CI on the consumer repo, since that is where the wrong pin lives.

Worth noting the failure is quiet in the worst way: the pin is syntactically fine, the candy exists locally, the bed is green, and the break only appears for someone building from a clean checkout — which is exactly the reader R4a is written for.

Related

  • charly#318 — the other class of "the gate runs nowhere automatic".
  • distro-fedora#18, distro-cachyos#15 — the two PRs currently carrying the unresolvable pins. Both are held pending charly#309's merge and tag, and will be reconciled to that tag; this issue is about the gate that did not catch it, not about those PRs.

Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)

Activity

  1. atrawog commented on Aug 19, 2026

    @atrawog
    ContributorAuthor

    Widening: the class is "a bed's verdict is about the LOCAL TREE, not about what the PR would land"

    Raised by docs#83's validator, who flagged it explicitly as an inference from two separately-established facts rather than a measurement. I checked the mechanism before widening, and the generalisation holds — but it is two mechanisms, not one, which matters because the fix differs.

    Mechanism A — @github refs, redirected by the override

    charly check run <bed> auto-appends a CHARLY_REPO_OVERRIDE for the bed project's own superproject, pointing every @github.com/opencharly/charly/candy/... ref at the local working tree and ignoring the :vTAG. This is the original filing: a wrong or unresolvable tag cannot fail the bed, because the tag is never resolved.

    Confirmed: distro-fedora#18's ollama box carries 4 @github candy refs, and candy/ollama-cuda exists at neither pinned tag.

    Mechanism B — local candies, read locally because they ARE local

    candy/docs-site is a candy in the superproject itself, not an @github ref. The bed reads it from the working tree simply because that is where it lives — no override involved.

    Observed this round: check-docs asserted DOCS_REF 5337fb63 while the pushed PR head still carried 6b7819c. The run was real and its log proves what it built; it was just evidence about an unpushed working tree, not about anything a reviewer could fetch.

    Why one issue rather than two

    Different mechanisms, identical consequence, and it is the consequence that bites: a green bed is a statement about the tree it ran in. Reading it as a statement about what the PR would land is only safe when those are the same tree, and nothing in the gate checks that they are.

    Every pinned reference a bed touches inherits this — @github candy tags via A, DOCS_REF and any other locally-declared pin via B. The ollama pins are one instance, not the class.

    What this does NOT mean

    The override is correct and deliberate: it is what makes a submodule bed test the in-development candy tree rather than a stale published one, and a bed reading local candies locally is the entire point of a bed. Neither behaviour is a bug. The gap is that nothing distinguishes "green on the tree that will land" from "green on a tree only this session can see", and the second reads exactly like the first.

    Practical shape of a fix

    Something that answers "is the tree under test the tree this PR would land?" — e.g. a bed-run preamble that reports which declared pins were satisfied from the local tree rather than resolved, and refuses to call itself acceptance evidence when the working tree differs from HEAD. The honest minimum is that a bed result should carry the tree identity it was produced against, so a reviewer can compare it to the PR head instead of assuming.

    This is the project's own mutation test applied to the harness: ask what mutation would make this gate go red. For a wrong :vTAG, or for a pin that is correct only locally, the answer today is none.

    Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)

  2. changed the title [-]A bed cannot fail on an unresolvable @github candy pin: the bed runner overrides the superproject to the local tree, so the declared tag is never resolved[/-] [+]A bed's verdict is about the local tree, not about what the PR would land — wrong @github pins and unpushed local pins both pass[/+] on Aug 19, 2026
  3. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

    Validation (2026-08-28) — STILL VALID, needs bed verification

    Verified against current charly main. CHARLY_REPO_OVERRIDE still exists (charly/charly/check_cmd.go:52, host_build_box_fetch_resolve.go:15) and still points every @github.com/opencharly/charly/candy/... ref at the local working tree, ignoring the :vTAG. A bed verdict is still about the local tree, not the PR head.

    Full verification requires a live bed run demonstrating the override behavior (a bed passing on a wrong @github pin). The fresh pr-validator mitigates the practical impact, but the design property is unchanged.

    Value: MEDIUM — verification integrity. Worth fixing (documenting the constraint or making the override explicit in the verdict), but mitigated by the fresh-validator model.

  4. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

    Final validation (2026-08-28) — VERIFIED LIVE (confirmed still valid)

    Live demonstration with a fresh worktree-built charly and a project pinning a candy at a bogus tag:

    $ charly box list candies test-candy        # no override
    charly: error: ... could not resolve ref "v0.0.0-NONEXISTENT-TAG" in https://github.com/opencharly/charly.git
    
    $ CHARLY_REPO_OVERRIDE=opencharly/charly=<local charly> charly box list candies test-candy
    charly: error: ... scanning remote candy github.com/opencharly/charly: parsing charly.yml: /home/.../charly/charly.yml: ...
    

    Without the override the bogus tag FAILS; with CHARLY_REPO_OVERRIDE the :vTAG is IGNORED and the ref resolves to the LOCAL tree — exactly the issue's claim. SelfSuperprojectOverridePair (spec/proc/repo_override.go) auto-appends this for bed projects, so a bed passes on a wrong pin.

    Status: VERIFIED — keep open. Value: MEDIUM (verification integrity; mitigated by the fresh validator, but the override is a footgun).

  5. atrawog commented on Aug 29, 2026

    @atrawog
    ContributorAuthor

    Closing: the fix landed and merged on main. Verified against the current state of main — the fix is present (see the validation comment for the specific evidence).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions