Skip to content

The projection gate runs nowhere automatic: candy skill edits land on main without their plugins projections, and only whoever runs drift locally ever sees it #318

Closed

Description

@atrawog

charly marketplace generate / marketplace drift is the gate that catches a candy skill: edit landing without its plugins/ projection. It runs in no CI workflow, so it is red only for whoever happens to run it locally — and the debt accumulates silently on main.

Measured

.github/workflows/                          ci.yml, release-binary.yml   (two, at 876365c7)
git grep -lE 'marketplace|drift' -- .github/workflows/   ->  no matches

Corrected 2026-08-18. This block originally read "contains exactly one file: release-binary.yml". That was true when filed and went false when ci.yml landed via charly#310 (876365c7), which runs go test ./charly/... and gofmt -l charly candy tools. The issue's actual claim is unaffected — no workflow runs marketplace generate/drift, which is what makes the projection gate unautomated. Only the supporting measurement was stale, and it is the same stale fact charly#289 is currently blocked on at six other sites.

Nothing automatic regenerates or checks the projection. Compare git grep-style local invocation: the drift result belongs to whoever ran it, in the tree they ran it in.

The debt it let through

Four commits landed candy skill: edits on charly/main without their projections: 258a72df, 1a0ec344, a9f0195b, 876365c7. A discriminating per-artifact measurement (source present on charly/main, projection absent from both the pinned and the head plugins checkout):

sun_path prose, charly origin/main  candy/charly-internals  : 1
sun_path prose, plugins pin         61f5e9bf go/SKILL.md    : 0
sun_path prose, plugins head        212626df go/SKILL.md    : 0

Regenerating adds (+102/−2 on that artifact) — it completes the projection rather than reverting anything.

Attribution across the stale set, stated as a floor rather than a count because the method samples up to four long added lines per file and asks whether they exist in origin/main's candy:

18 artifacts   main's debt only          <- a FLOOR, sampling test
12 artifacts   MIXED (main's debt AND an in-flight PR's edits in the same file)
 0 artifacts   the in-flight PR only

The figure that carries no sampling error, and the one that matters operationally: 12 artifacts contain both.

Why the debt cannot be paid separately — this is the sharp consequence

A generated artifact is emitted whole from its source. For those 12 files there is no "main's half" to land: each projects from one candy whose current content holds both sets of edits, so emitting the file emits both. Landing the backlog separately would require the generator to project a subset of a source, which it cannot do and should not.

The rulebook already says this, at candy/charly-internals/charly.yml:3954 (B6a step 3):

Regeneration rewrites the generated trees WHOLESALE, so a mirror already behind cannot be brought forward selectively: every pending page lands with the next commit or none of them do. Budget for carrying someone else's backlog when the mirror has drifted.

So the design is already explicit that the backlog rides the next projection PR. The defect is not the wholesale rule — it is that nothing forces the backlog to be small. With no automatic gate, "budget for carrying someone else's backlog" grows without bound, and the cost lands on whichever unrelated PR next regenerates: that PR's claim stops describing its own contents, and files arrive at its validator unvalidated.

A compounding effect worth naming

Among the currently stale artifacts are internals/skills/git-workflow/SKILL.md and internals/agents/pr-validator.md — the landing rulebook and the validator's own spec. Validators read those pages to decide how to land things, so the gap is not cosmetic: it can leave the published landing rule differing from its source. See also #317, a contradiction inside that same source, and #303, whose stale-page count does not reconcile with an independent measurement.

Remedy

Run the projection gate somewhere it binds for everyone rather than for whoever remembers. That is a CI/workflow change plus a decision about where it runs (superproject PR, or a scheduled check), and it is deliberately not specified here — the point of filing is that no gate exists, and every finding above followed from that.

Filed from watchdog observation; the debt was surfaced by an in-flight PR whose own drift was red for 30 artifacts of which only 2 were its own. That tree revealed it and should not be the owner of it.

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

Activity

  1. atrawog commented on Aug 18, 2026

    @atrawog
    ContributorAuthor

    Correcting this issue: the "18 owed by main" figure is VOID, and the remedy I proposed would be destructive

    Two corrections to the body above, the second more serious than the first.

    1. The attribution figures are void

    The 18 artifacts — main's debt figure (already stated as a floor) counted projections that are not debt at all. It compared the stale set against charly/main only, so any artifact whose source sits in an open PR looked like an unpaid obligation of main's.

    At least one is exactly that: plugins@da76ec0 is an ancestor of plugins/origin/main — landed — and its subject is verbatim the title of charly#297, which is still OPEN:

    plugins@da76ec0   "the cmd emitter is a heredoc, and the named helpers do not exist"
    charly#297        "docs(build,internals): the cmd emitter is a heredoc, and two named helpers do not exist"
    charly#297 state  OPEN
    

    That is not debt. That is projection-first working exactly as B6a mandates — the projection lands first, the source follows. No replacement count should be quoted until every open PR's already-landed projection is excluded from the comparison, and I am not quoting one.

    2. The remedy I proposed would have caused real harm

    The body says the fix is to "run the projection gate somewhere it binds for everyone". A naive generate-and-fail-on-drift gate is destructive, and this is the substantive finding that replaces the original one:

    marketplace drift cannot distinguish two opposite situations. Red means only "sources and artifacts disagree". It is the same red whether that is (a) a source edit awaiting its projection — where running generate is correct — or (b) a landed projection whose source PR is still open, where running generate from a tree lacking that source silently deletes landed prose. The tool tells you to run the same command in both cases, and in the second it is the wrong action.

    A cutover walked into this today: a repo-wide regeneration would have removed 15 files' worth of #297's landed projection. Clean, green, and silent — no conflict, no warning, nothing for review to catch, because a wholesale regeneration legitimately rewrites those files.

    And the window is not an edge case. Under B6a every conforming skill change opens it, from the moment its projection merges until its source merges. So any cutover that regenerates while any projection-ahead PR is open can revert that PR's landed work. It recurs by construction.

    What the remedy actually has to do

    Not "run generate in CI". The gate must first be able to tell the two reds apart — i.e. know which artifacts are projections of a source that has landed versus one still in flight — otherwise automating it converts a silent manual hazard into an automatic one. Whether that means the gate consults open PRs, or projections carry their source commit, or drift reports the two classes separately, is a design question this issue should not pre-empt.

    The original observation stands unchanged and is what makes this urgent: no gate runs anywhere automatic (.github/workflows/ holds one file, nothing references marketplace), so today this is enforced entirely by whoever remembers to run it locally — and the correct action for them depends on state the command does not report.

    Corrections are mine: I filed both the void figure and the harmful remedy. The hazard was found and stopped by the cutover that hit it, before anything was pushed.

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

  2. atrawog commented on Aug 18, 2026

    @atrawog
    ContributorAuthor

    Figure correction: 14, not 15

    My correction above says a repo-wide regeneration "would have removed 15 files' worth of #297's landed projection". The number is 14. Verified:

    plugins@da76ec0 : 15 files changed
      of which CHANGELOG/ : 1     <- the generator does not emit CHANGELOG paths
      generator-emitted   : 14
    

    The CHANGELOG entry is not at risk from a regeneration, so it was never part of the destroyable set. Caught by a validator that ran the generator on its own tree and did the set intersection (comm -12) rather than counting the commit's files.

    The argument is unchanged at 14 — nothing here depends on the magnitude. I am correcting it because I have spent today insisting that other people's figures name their scope, and a count I published that is off by one for a reason I did not check is the same defect in miniature. The cause is the one this issue keeps circling: I counted the commit's files and reported it as the projection set, which are two different populations that happen to nearly coincide.

    Same correction applies wherever I have quoted 15 in this program's coordination threads.

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

  3. atrawog commented on Aug 18, 2026

    @atrawog
    ContributorAuthor

    Prior art: this hazard was hit and handled correctly before either of the findings above

    plugins@c061fee6 — the plugins state the current docs gitlink was generated from — says so in its own commit message:

    "regenerating from a tree lacking that source drags it backwards.

    Eight projections are held byte-identical to main because their prose has no candy source on the superproject yet; regenerating them would delete landed work."

    So the destructive-regeneration window was already known, already diagnosed with the same mechanism this issue describes, and handled with the correct manual remedy: hold the affected projections byte-identical rather than regenerate them. Eight of them, deliberately.

    That changes what this issue is asking for. It is not "discover whether this hazard is real" — someone established that, acted on it, and wrote down why. It is that the remedy is manual, undocumented outside a commit message, and has to be rediscovered by every author who regenerates. Two of us rediscovered it independently today, one of them a commit away from destroying 14 files.

    A second, cheaper instrument than the one this issue implies

    An ancestry test answers most of the question without a corpus, a generator run, or a baseline:

    superproject commit that last moved the docs gitlink : ca76c354
    plugins gitlink there — the state docs was generated from : c061fee6
    candidate plugins HEAD                                    : <head>
    
    git -C plugins merge-base --is-ancestor c061fee6 <head>
      rc=0  -> ANCESTOR  -> regeneration cannot lose that content   SAFE
      rc=1  -> not an ancestor                                      UNSAFE
      rc=128 -> unresolvable ref                                    REFUSE
    

    Separating rc=1 from rc=128 is load-bearing: an &&/|| chain collapses "not an ancestor" and "cannot resolve" into one branch, so a broken ref reads as a clean answer. That is the same false-zero class this issue's neighbours keep producing.

    What ancestry does NOT cover, stated so a validated instrument is not over-trusted: it answers "can regeneration lose content the docs source state had?" It says nothing about hand-edits — content added directly to docs/main from no plugins state at all. That needs a different check: regenerate at plugins@c061fee6 and byte-compare against docs/main; if they match, docs/main is faithful.

    So: one of two hazards has a cheap, validated check; the second is identified with its method named and not yet run.

    Consequence for whoever owns this

    The person who wrote c061fee6 has the domain knowledge, hit the hazard first, and chose the right remedy under it. Any gate built here should start from what they already did manually rather than from either of the reconstructions above.

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

  4. atrawog commented on Aug 18, 2026

    @atrawog
    ContributorAuthor

    charly#289 changed the danger, not the gate — this stays OPEN

    charly#289 merged as 9d839c55 (tag v2026.230.1856), and it was reported as clearing this issue.
    It clears half of it, and not the half in the title. Recording the split so nobody closes this on
    the strength of that merge.

    What genuinely changed — a regeneration is no longer destructive. The evidence-and-freshness
    source is now on main, so regenerating emits those pages with their source instead of without
    it. The specific hazard this issue described — deleting hundreds of lines of landed prose silently
    at exit 0 — is gone.

    What did not change — the gate still runs nowhere automatic, which is this issue's actual
    subject. Measured on origin/main after the merge:

    .github/workflows/                          ci.yml, release-binary.yml
    workflows referencing marketplace|drift     0
    

    charly marketplace drift is still red only for whoever happens to run it locally, and candy skill:
    edits still land on main without their plugins/ projections with nothing observing it. That is
    the sentence in the title, and it is as true today as when this was filed.

    Concretely, the debt is still accruing: 22 stale artifacts on main right now, owned by
    charly#303. Two of them are projections of lines #289 itself corrected —
    internals/skills/plugin/SKILL.md and internals/agents/pr-validator.md — so the published pages
    still serve the retracted CI wording
    until the plugins regeneration leg runs. A merge that fixes
    a source and leaves its projection stale is exactly the mechanism this issue is about, and #289
    produced two more instances of it while fixing one.

    Closing condition, unchanged: something automatic runs the projection check. Until a workflow
    (or an equivalent gate that cannot be skipped by not running it) fails on drift, this stays open no
    matter how many individual instances get cleared by hand.

    The correction is worth stating plainly because the reasoning was reasonable: the destructive
    property was the scariest thing this issue described, so clearing it feels like clearing the issue.
    The title names the unobserved gate, not the worst consequence of it.

  5. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

    Validation (2026-08-28) — RESOLVED

    Verified against current repos. The projection gate now runs automatically: marketplace/.github/workflows/deploy.yml is "THE SOLE OWNER of marketplace generation" — it clones the pinned charly at CI time, builds the binary, regenerates the entire corpus, and FAILS if the committed corpus does not match (the drift gate), on every push to main and every PR. The claim "runs in no CI workflow" is no longer true.

    Closing as resolved.

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