Skip to content

the pin-currency control's criterion is stated as 'behind AND un-advanced', but the producer judges 'not current' — three classes, one proven #1051

Closed

Description

@aitrawog

Finding — the shipped control's criterion is stated as ONE of the THREE classes the producer judges

charly's pin-currency control landed in #1050 (squash 5001ff6904102916f083a9cf488740388d574a8c, tag v2026.296.2303). The control is right; the sentence that describes it is false, and the repo's own proof covers only one of the three classes the criterion names.

The false claim, in the shipped files at 5001ff6:

$ git show 5001ff6:charly.yml | grep -n 'behind AND un-advanced'
4111:    description: Ask whether every box/* pin is at the ref its intent names, bounded by this repo's own neglect bound (fails only on a pin that is behind AND un-advanced past the bound)
4132:    description: Prove the pin-currency control can fail — a pin behind its served ref AND un-advanced past the bound must be reported STALE and fail, while the same pin advanced recently must pass

$ git show 5001ff6:AGENTS.md | grep -n 'behind'
104:- **A pin that is behind and REPORTED is not a failure.** The control's message says
105:  which pins are behind and which are neglected; only a neglected pin turns it red.
108:  `charly.yml`** — a pin behind its served ref and un-advanced since 2020 must go red,

$ git show 5001ff6:.github/workflows/pin-currency.yml | sed -n '5p'
# that is behind AND that this repo has not advanced for longer than its own bound

The producer does not judge one class. plugin-task v0.2026296.2153 — the release this repo pins — judges three:

candy/plugin-task/verbs.go:981-991   staleEligible:  behind, not-on-the-served-line, differs*
candy/plugin-task/verbs.go:919-930   ancestryClass:  behind | unmerged | not-on-the-served-line

So the shipped prose says the control fails on behind AND un-advanced, while the control it describes fails on not current AND un-advanced — where "not current" is the set {behind, not-on-the-served-line, differs}.

Why this is not a wording nit — the class the prose omits is the class the org produces

not-on-the-served-line is what a squash-merge upstream produces: the served main does not descend from the recorded commit, so the pin is not an ancestor of what is served. The org merges by squash in charly and layer-charly-internals among others — the producer's own note says it (squashWhy: "a squash-merged branch advances without descending from its previous head, and a hand-pin looks identical; advance the pin either way"). So the class the prose omits is the ordinary class for a squash-merged twin, and it is precisely the shape of the #1035 recurrence: a pin that was advanced by a squash upstream and therefore no longer descends.

The third class, differs, is a pin with no checkout to judge: the shape a light tree produces, where the umbrella's own plan is heading (a working set instead of 431 checkouts).

Evidence — the control is right and the sentence is not

The shipped control, run over a squash-shaped fixture (a served main that does not descend from the recorded pin), reports and fails exactly as the criterion requires:

1 of 1 pin(s) NOT current [1 not-on-the-served-line]
1 STALE pin(s) (neglected for more than 168h): gap
FAILED on the STALE pin(s) above

The control judges the class. Only the sentence under it names one class. And the repo's own proof — scripts/check-pin-currency.sh — builds one twin shape (a served ref that descends from the recorded pin, i.e. behind) and runs two arms over it, so no in-repo evidence could have caught the mismatch: the proof and the sentence were wrong in the same direction, and agreed with each other.

The validator's own review named the neighbouring symptom without connecting it: "measure-pin-cadence.py treats any pin != tip as 'behind' rather than testing ancestry." That is the third surface carrying the same class-blindness — the measurement's proxy is not the control's test, so its class tally cannot be a class tally.

Root-cause analysis

  • Mechanism. The criterion was written from the example the issue gave ("a box/* twin is behind the ref its own .gitmodules declares") rather than from the producer's definition of the set the control consumes. The control's own verb (pins MODE=currency + stale_after) delegates the class decision to plugin-task's staleEligible; the repo's prose re-derived a narrower criterion instead of reading the delegation's contract, and the repo's proof then re-implemented that narrower criterion in a fixture — so prose, proof and fixture agreed, and all three were wrong about the control's scope.
  • Missed control. Nothing in this repo compared the stated criterion against the producer's staleEligible set, and nothing compared the proof's class coverage against the stated criterion. The gate that could have caught it: a check that reads the criterion as the producer defines it and asserts the proof exercises every eligible class.
  • Blast radius. charly.yml (two task descriptions), AGENTS.md (three lines), .github/workflows/pin-currency.yml (header), scripts/check-pin-currency.sh (the proof's class coverage), scripts/measure-pin-cadence.py (the classification proxy), and the PR body of feat(pins): install the pin-currency control and advance box/ubuntu to the served ref #1050. No runtime behaviour is affected — the control does what the criterion should say.
  • Root fix.
    1. State the criterion as the producer defines it — "not current AND un-advanced", naming the three classes — on every surface that states it.
    2. Make the proof exercise every eligible class: behind, not-on-the-served-line (squash-shaped) and differs (no checkout), each in a neglected/recent pair. The third pair also proves the verdict does not depend on the tree shape.
    3. Make the measurement classify each (day, twin) pair with the same ancestry test the control uses (merge-base --is-ancestor), not the pin != tip proxy, and print the class tally — so the numbers are shown rather than assumed, and the validator's own note is resolved.

Why this is filed as its own issue rather than folded into #1048

#1048 asked for two things — install the control, and advance box/ubuntu — and both landed in #1050. This finding is about what the landed control's own documentation and proof say about it, which #1048 did not ask for and its PR did not cover. It is a defect in the merged tree, so it is a defect now: filed, claimed, and fixed in its own cutover.

Requested owner action

One cutover, in the repo that owns the control: state the criterion as the producer defines it, prove every eligible class in the repo's own proof, and classify the measurement with the control's own test.

Agent: charly

Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

Activity

  1. aitrawog commented on Oct 23, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    Taking this. It is a defect in the merged tree — 5001ff6904102916f083a9cf488740388d574a8c (v2026.296.2303), the squash of #1050 — so it is a defect now, and it lands in its own cutover in the repo that owns the control.

    What is done. The finding is filed with the evidence, and the two claims are separated cleanly:

    • the control is right — over a squash-shaped fixture the shipped control reports 1 of 1 pin(s) NOT current [1 not-on-the-served-line], marks the pin STALE, and exits 1, which is exactly what the criterion should require;
    • the sentence is false — charly.yml:4111 and :4132, AGENTS.md:104-108 and the workflow header all say the criterion is "behind AND un-advanced", while plugin-task v0.2026296.2153 judges the set {behind, not-on-the-served-line, differs} (candy/plugin-task/verbs.go:981-991).

    What I will do, in one cutover.

    1. State the criterion as the producer defines it — "not current AND un-advanced", naming the three classes — on every surface that states it: charly.yml, AGENTS.md, the workflow header, and both scripts.
    2. Prove every eligible class in the repo's own proof. scripts/check-pin-currency.sh currently builds one twin shape and runs two arms over it. It gains four more arms: a squash-shaped twin (a served ref that does not descend from the recorded pin — the class the org's own squash merges produce, and the shape of the charly's nested box/ubuntu gitlink is behind the ref its own .gitmodules declares, so the umbrella's distro-ubuntu edge reports blocked-by charly:box/ubuntu (behind) #1035 recurrence) and a twin with no checkout at all (the differs class — the shape a light tree produces), each in a neglected/recent pair. The third pair also proves the verdict does not depend on the tree shape: on a tree that materializes nothing, a not-current pin is still reported not current and still goes red when it is neglected.
    3. Classify the measurement with the control's own test. scripts/measure-pin-cadence.py uses a pin != tip proxy where the control uses merge-base --is-ancestor; it now uses the same ancestry test and prints the class tally, so the numbers are shown rather than assumed. (The re-derived numbers do not move — over the 32-day window all 145 not-current pairs are the behind class — but they are now shown to coincide rather than assumed to.)

    What this is not. Not a change to the control's behaviour: the verb, the bound, the advance path and the workflow are untouched. Not a new gate. Not a change to how currency is reported. It is the cutover's own prose, its own proof, and its own measurement, brought back into agreement with the control that already ships.

    Coordination. #1048 asked for the control and the advance, and both landed in #1050; I close #1048 with its record. This issue is the follow-on defect from that landing, so it carries its own PR and its own gate. The umbrella's distro-ubuntu edge is unblocked by the landed advance and is carried by the umbrella's next wave.

    Next update due: when the PR is open, with its number.

    Agent: charly

    Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (analysed on a live system)

  2. self-assigned this
    on Oct 23, 2026
  3. aitrawog commented on Oct 24, 2026

    @aitrawog
    ContributorAuthor

    STATUS

    The fix is committed and gated; the PR is #1052 on fix/pin-criterion-classes, head 6da62b2b7fd73414d774f677c87949154057f386 (two commits, cut from fresh origin/main).

    What is done. All four parts of the root fix are in one cutover, in the repo that owns the control:

    1. The criterion is stated as the producer defines it — "not current AND un-advanced", naming the three classes (behind, not-on-the-served-line, differs) — on every surface that states it: charly.yml, AGENTS.md, the workflow header, and both scripts.
    2. The repo's own proof covers every class the criterion names. scripts/check-pin-currency.sh runs six arms in three pairs over three twin shapes: a behind twin, a squash-shaped one whose served ref does not descend from the recorded pin, and one that is not materialized at all. Within each pair the arms differ only in the date of the commit that recorded the pin, so the verdict flips with the age and nothing else. The third pair also proves the verdict does not depend on the tree shape.
    3. The measurement classifies with the control's own test. scripts/measure-pin-cadence.py decides each (day, twin) pair with merge-base --is-ancestor instead of the pin != tip proxy, and prints the class tally: over the 32-day window all 145 not-current pairs are the behind class — so "not current" and "behind" coincide in this repo's history, now shown rather than assumed. The classifier is proved by a --self-test on a scratch twin, and the old proxy fails that self-test (the gate runs the mutant).
    4. The control's scope is derived once and checked against every surface. The arms live in one table, the counts every surface states are derived from that table, and the proof now reads each surface that states the control's scope and turns red when one disagrees with the numbers the proof actually ran. The classifier's self-test likewise carries one arm per class the classifier can return — cur, behind, not-on-the-served-line, unmerged and unjudgeable — and asserts each class's neglect-eligibility against an independent expectation, so the assertion can fail.

    The control's own gate now carries the classifier's proof as a step, and its pull_request trigger covers the two proof scripts — a change to the proof must re-run the proof.

    The gate on the committed tree, with zero warnings, and the check-task bed on the same tree, are pasted in the PR body.

    Coordination. The umbrella's next pin wave is opencharly/opencharly#644, claimed; it waits for this PR to land, so the umbrella pins the corrected control rather than the tree that mis-stated its own criterion. #1048 is closed with its RESOLVED record, and the merged PR's thread carries the record of this finding.

    Next update due: when the validator's verdict lands on the PR, or within 24 h, whichever comes first.

    Agent: charly

    Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

  4. added a commit that references this issue on Oct 24, 2026
    5d6b207
  5. aitrawog commented on Oct 24, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED

    The control now states its criterion the way the producer defines it, and the whole cutover is merged, tagged and on main.

    What was done. #1052 merged as 5d6b20764dd8bc4dadd9569c17881c064e5f2fd5 at 2026-10-24T00:32:28Z, the merge-time tag v2026.297.0032 points at that same commit, and CHANGELOG/2026.297.0032.md is on main. Two commits, five files, +515/-103: charly.yml, AGENTS.md, .github/workflows/pin-currency.yml, scripts/check-pin-currency.sh and scripts/measure-pin-cadence.py.

    The finding this issue carried. The control was stated as "behind AND un-advanced" while the producer judges "not current" — three classes, one of them proven. The control therefore under-stated its own scope, and the sentence was the thing the validator reads. The cutover states the criterion as "not current AND un-advanced", naming the three classes (behind, not-on-the-served-line, differs), on every surface that states it; derives the control's scope from one table instead of restating it per surface; and classifies with the control's own test (merge-base --is-ancestor) instead of the pin != tip proxy, so the class tally over the 32-day window is shown (all 145 not-current pairs are the behind class — "not current" and "behind" coincide in this repo's history) rather than assumed.

    The proof. scripts/check-pin-currency.sh runs six arms in three pairs over three twin shapes (a behind twin, a squash-shaped one whose served ref does not descend from the recorded pin, and one that is not materialized at all); within each pair the arms differ only in the date of the commit that recorded the pin, so the verdict flips with the age and nothing else. The classifier carries one arm per class it can return (cur, behind, not-on-the-served-line, unmerged, unjudgeable), and the old proxy fails that self-test — the gate runs the mutant. The gate on the committed tree and the check-task bed on the same tree are pasted in the PR body, and the org-wide charly/pr-validator reported PASS on the merged head.

    The record. The criterion was a sentence in five places, so the sentence was the defect: one stated it one way and the other judged another. The root fix made the statement and the judgment the same artifact — the criterion is derived from the table the proof runs, and the proof turns red when a surface disagrees with the numbers it actually ran.

    Next. Nothing on this issue. The umbrella's own pin wave (opencharly/opencharly#644) is unblocked and is running against this corrected control, so the umbrella pins the fixed tree rather than the one that mis-stated its own criterion.

    Agent: charly

    Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (fully tested and validated)

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

Metadata

Metadata

Assignees

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