Skip to content

batch: 9 CHANGELOG H1s still carry their author-time CalVer after a merge-time rename (charly 1, sdk 6, spec 2) #332

Closed

Description

@atrawog

The class

A CHANGELOG entry is authored under a placeholder CalVer, and the merging validator renames the file
to the merge-time stamp. git mv moves the file and never touches the H1, so the heading keeps
the author-time stamp while the filename and release tag carry the merge-time one.

The validator spec already requires rewriting the heading and self-verifying it. That step is
skippable and gets skipped: plugins#207 exists solely to repair one instance.

Measured — 10 instances, freshly fetched origin/main per repo

Only genuine own-stamp disagreements: the H1 carries a well-formed CalVer that differs from its
own filename. Entries with no version prefix at all (a separate legacy class, ~25 in plugins at
days 185–188) are excluded, as are titles that merely cite another version.

repo      n   filename            H1 says
charly    1   2026.210.1559       2026.210.1445
plugins   1   2026.230.1808       2026.229.9999      <- plugins#207 fixes this one
sdk       6   2026.197.0738       2026.197.0800
              2026.197.2042       2026.197.2230
              2026.198.2057       2026.198.1944
              2026.213.2129       2026.213.2116
              2026.223.1626       2026.223.1018
              2026.228.0209       2026.227.2115
spec      2   2026.214.0434       2026.214.0900
              2026.215.1748       2026.215.1928
docs      0
pkg/*     0
box/*     0

9 survive after plugins#207. They cannot land in that PR — they are in four other repos, and
git grep does not cross a gitlink, which is exactly how the class was reported extinct: a sweep
labelled "the whole tree" that measured one repository.

Discriminating the measurement matters here. A naive "H1 does not start with # <filename>"
check returns 150, because it also catches every legacy no-prefix entry. The count that means
anything is "H1 carries a different CalVer", which is 10. A remediation driven by the first figure
would rewrite ~140 headings that are not defective.

Why the durable fix is not here either

The validator-spec text is generated from candy/charly-internals/charly.yml in the superproject,
and regenerating into plugins is currently destructive (charly#323). The mechanism is already
owned by charly#294, which registers this exact gap — including the observation that the
self-verify reads the working tree rather than the committed object, so it cannot fail. Note
#294's "three bad H1s" is understated; the measured figure today is ten.

So: charly#294 owns the gate, and this issue owns the 9 existing instances so they are routed
rather than presumed extinct.

Fixing them

Each is a one-line H1 rewrite in its own repo, batched per repo — 3 small PRs (sdk 6, spec 2,
charly 1). No content changes; the body of every entry is already correct. Worth pairing each with
a check that the repo's tag for that CalVer exists and points where the filename claims.

The trap that produces it, for whoever fixes these

git mv old new followed by git add old new fails the entire add (pathspec 'old' did not match), landing the rename and silently dropping the H1 edit — while git show --stat still lists
the file as old.md => new.md | 0. Presence passes; the tells are the | 0 magnitude and a leftover
M <new> in git status. Chain the rename and the rewrite in one command, then read back from the
committed object: git show HEAD:CHANGELOG/<VER>.md | head -1.

Found by plugins#207's validator; cross-repo figure independently re-derived.

Activity

  1. atrawog commented on Aug 18, 2026

    @atrawog
    ContributorAuthor

    Which probe you record matters, and spec is the wrong repo to demonstrate it on

    The issue body notes that a loose probe returns 150 and the discriminating one returns 10. A validator landing spec#39 added the practical half, and it is worth having here explicitly.

    In spec the two probes AGREE — both return 2 — because spec has zero entries whose H1 lacks a CalVer prefix. The 150-vs-10 divergence does not manifest there at all; it is concentrated in the repos carrying legacy no-prefix entries (plugins has ~25 at days 185–188, and charly and sdk carry the bulk).

    repo     loose probe ("H1 doesn't start with # <filename>")   discriminating ("H1 has a DIFFERENT CalVer")
    spec              2                                                    2      <- agree
    plugins          26                                                    1
    sdk              42                                                    6
    charly           74                                                    1
    

    So anyone spot-checking the sweep against spec alone would conclude the two formulations are equivalent, and carry the loose one into sdk, where it is off by a factor of seven. A verification repo that cannot distinguish the two probes provides no evidence about either.

    Two things follow for whoever picks up these nine:

    1. Record the discriminating question, not merely the one that happened to be used. "Does the H1 carry a different CalVer?" is the definition; "does it start with # <filename>?" is a heuristic that agrees with it only where no legacy entries exist.
    2. Demonstrate a probe on a repo where the candidate answers differ. sdk (42 vs 6) or charly (74 vs 1) are the useful ones; spec and docs prove nothing either way.

    This is the general shape of the trap rather than a detail of this issue: a check validated only where it cannot fail carries no information, and picking the validation sample is itself a decision that needs its own justification.

    Credit to spec#39's validator, which raised it against my own caveat rather than accepting it.

  2. atrawog commented on Aug 18, 2026

    @atrawog
    ContributorAuthor

    Direction is a discriminator — but it splits the nine, it does not confirm one cause

    sdk#144's validator proposed that every mismatch is backward (H1 earlier than filename), which would be the signature of an author-time placeholder surviving a git mv. I re-derived it and the split is 4 / 2 in sdk alone:

    file 2026.197.0738   H1 2026.197.0800   FORWARD   <- H1 LATER than filename
    file 2026.197.2042   H1 2026.197.2230   FORWARD   <- H1 LATER than filename
    file 2026.198.2057   H1 2026.198.1944   BACKWARD
    file 2026.213.2129   H1 2026.213.2116   BACKWARD
    file 2026.223.1626   H1 2026.223.1018   BACKWARD
    file 2026.228.0209   H1 2026.227.2115   BACKWARD
    

    The direction constrains the cause, which is why this matters for the fix rather than for the tally. A surviving placeholder is an author-time stamp, necessarily earlier than the merge-time filename. So:

    • BACKWARD is consistent with the diagnosed cause. The filename matches the release tag, so the filename is authoritative and the H1 is simply restamped.
    • FORWARD cannot be produced by that cause at all. Something else happened — an H1 edited after the rename, a filename stamped from an earlier moment, or a hand-correction that overshot. For these two it is not obvious which of the two stamps is wrong, so the history has to be read before choosing one.

    A uniform "restamp the H1 to match the filename" pass would silently impose the filename on the two FORWARD cases without anyone having established that the filename is the correct stamp there.

    So the remediation is not one batch of nine. It is:

    BACKWARD  ->  mechanical restamp, filename authoritative (matches the tag)
    FORWARD   ->  read the history first; the correct stamp is undetermined
    

    Worth checking the direction split in charly (1) and spec (2) before those are batched too — I have only measured sdk's six by direction so far.

    The idea was sound and I am keeping it, corrected. Direction is a cheap discriminator; it just partitions the set instead of confirming a single cause, and the partition is the informative part. This is the second time on this issue that a plausible whole-set generalization has turned out to describe a subset — the first was the loose-vs-discriminating probe (150 vs 10).

  3. atrawog commented on Aug 18, 2026

    @atrawog
    ContributorAuthor

    Correction to the "Fixing them" section — FORWARD is nearly half, not two of six

    My earlier direction note measured sdk only and reported 4 BACKWARD / 2 FORWARD. plugins#207's validator derived it across every repo and the FORWARD class is larger. I re-measured independently and reproduce its figure exactly:

    repo      BACKWARD   FORWARD
    charly       1          0
    sdk          4          2
    spec         0          2      <- BOTH spec entries are FORWARD
    docs         0          0
    plugins      0          0      (its one instance landed as b6594bd3, v2026.230.2051)
    ────────────────────────────
    surviving    5          4
    

    Four of the nine, not two. The issue body currently says "Each is a one-line H1 rewrite in its own repo" — applied uniformly, that imposes the filename on four entries where nobody has established the filename is the authoritative stamp.

    Why direction decides the remedy, restated because it now governs almost half the batch:

    • BACKWARD (H1 earlier than filename) — consistent with an author-time placeholder surviving a git mv. The filename matches the release tag, so the filename is authoritative and a mechanical restamp is correct.
    • FORWARD (H1 later than filename) — cannot be produced by that mechanism at all, since a placeholder is necessarily earlier. Something else happened, and which of the two stamps is wrong is undetermined until the entry's history is read. Check the tag: if a tag matching the filename exists and dereferences to the commit that added the entry, the filename wins; if not, the H1 may be the correct stamp and the filename the error.

    So this is two batches, not one:

    5 BACKWARD  ->  mechanical restamp, filename authoritative (verify the tag matches, then rewrite the H1)
    4 FORWARD   ->  read the history per entry FIRST; the correct stamp is not established
    

    This is the third time on this issue that a plausible whole-set generalization has described a subset — first the loose-vs-discriminating probe (150 vs 10), then my sdk-only direction split, now the tree-wide one. The pattern is consistent enough to be worth naming for whoever picks this up: measure per repo and state the scope of every figure, because git grep does not cross a gitlink and a single-repo sample keeps reading as the whole tree.

    Per-file direction tables are in plugins#207's round-2 comment and in the sdk listing above this one.

  4. atrawog commented on Aug 19, 2026

    @atrawog
    ContributorAuthor

    The population is now mechanically reproducible, and there is a tenth

    charly#309 adds scripts/verify-changelog-h1.sh, which reads each entry's H1 out of the object (git show <ref>:<path>) rather than the working tree. Run across the four repos it reproduces this issue's hand-counted population exactly:

    charly   CHANGELOG/2026.210.1559.md   H1 says 2026.210.1445
    spec     CHANGELOG/2026.214.0434.md   H1 says 2026.214.0900
    spec     CHANGELOG/2026.215.1748.md   H1 says 2026.215.1928
    sdk      CHANGELOG/2026.197.0738.md   H1 says 2026.197.0800
    sdk      CHANGELOG/2026.197.2042.md   H1 says 2026.197.2230
    sdk      CHANGELOG/2026.198.2057.md   H1 says 2026.198.1944
    sdk      CHANGELOG/2026.213.2129.md   H1 says 2026.213.2116
    sdk      CHANGELOG/2026.223.1626.md   H1 says 2026.223.1018
    sdk      CHANGELOG/2026.228.0209.md   H1 says 2026.227.2115
    

    charly 1, spec 2, sdk 6 — matching the title exactly. An independent re-derivation agreeing with a hand count is the evidence that the check is neither over- nor under-reaching.

    charly's single instance is fixed in charly#309, so that repo passes its own guard. sdk and spec are separate repos and stay here.

    A TENTH instance, and it is the informative one

    plugins/main acquired one while this issue was open: CHANGELOG/2026.231.0144.md with an H1 reading # 2026.230.2355 — …. It was committed by the pr-validator performing the merge-time stamp on plugins#210, and that validator reported it against itself and filed plugins#211.

    That matters because it rules out the obvious theory. This is not authors being sloppy about a convention — the agent whose Phase 3 is defined as stamping the CalVer produced the defect while executing that exact step, immediately after blocking another PR three times over the same class.

    The mechanism, which is what the fix should target

    Identical in every instance:

    1. git mv CHANGELOG/<placeholder>.md CHANGELOG/$VER.md — stages a rename
    2. edit the H1 — in the working tree
    3. git commit without -a

    The rename lands; the H1 edit does not. git status --short prints RM: a staged Rename plus an unstaged Modification. The M is the half that gets missed, and self-verification with head -1 <path> reads the working tree — where the fix is present — confirming a commit that does not contain it.

    So a durable fix is not "remember to rewrite the H1". It is either git commit -a / git add after the edit, or a post-stamp check that reads the object. The script is the second; the first belongs in the pr-validator's Phase 3 text.

    Scope note

    The check is deliberately narrow: it fires only when an H1 names a CalVer different from its filename. A first draft flagged anything not matching # <CalVer> — <title> and returned 35 hits on plugins/main where one was real — 34 entries predate the convention. A check that cries wolf 34 times gets disabled by whoever inherits it.

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

  5. atrawog commented on Aug 19, 2026

    @atrawog
    ContributorAuthor

    Update: the plugins instance is fixed, and this issue's count needs a correction

    plugins#211 merged as 192f9d96 (tagged v2026.231.0159) and fixed the instance plugins#210's merge-stamp created. Its validator classified all 220 CalVer entries in plugins by reading each H1 out of the object, and reports the class extinct there: 1 → 0.

    The correction this issue needs: its title and body say nine, measured after plugins#207. That count predates plugins#210, whose merge-stamp created another. So the population was ten at its peak, not nine, and the tenth is now closed. The remaining nine are unchanged: charly 1 (now fixed in charly#309), sdk 6, spec 2.

    The classification that matters, because a naive fix would damage ~140 entries

    plugins#211's validator separated three populations, and only one is this issue's defect:

    class test plugins count is it a defect?
    C H1 CalVer disagrees with filename 1 → 0 yes — this issue
    A CalVer agrees, no — <title> suffix 9 no — misstates nothing
    B no CalVer in H1 at all (pre-convention, days 185–188) 25 no — predates the rule

    Classes A and B misstate no date. Editing them would be a content change to merged entries with no correctness driver — which is exactly the case the immutability clause governs — whereas fixing class C restores the filename↔tag pairing that clause exists to protect. That distinction is what makes the repair legitimate rather than a history rewrite.

    This matches the methodology already stated in this issue, and it is worth restating because a naive # <CalVer> — <title> matcher returns ~150 hits across the repos and would rewrite ~140 non-defective headings.

    A mechanical check now exists

    charly#309 adds scripts/verify-changelog-h1.sh. It reads each H1 from the object (git show <ref>:<path>) and fires only on class C. Verified against ground truth rather than its own reasoning — plugins/main carried a live true positive while #211 was open:

    $ verify-changelog-h1.sh main   -C plugins   -> H1 NAMES A DIFFERENT CALVER … rc=1
    $ verify-changelog-h1.sh pr211  -C plugins   -> clean, 220 entries              rc=0
    

    Red on the real defect, green on its fix. My first draft flagged anything not matching # <CalVer> — <title> and returned 35 hits on plugins/main where one was real — precisely the ~140-entry damage this issue's methodology warns about, which is why the narrowing is the load-bearing part.

    The mechanism, unchanged and worth targeting directly

    git mv stages a rename → the H1 is edited in the working tree → git commit without -a. The rename lands, the edit does not. git status --short prints RM — staged Rename plus unstaged Modification — and the M is the half that gets missed. Self-verification with head -1 <path> then reads the working tree, where the fix is present, and confirms a commit that does not contain it.

    Two agents produced this defect during one cutover, both while executing a Phase 3 whose purpose is the stamp, and both self-reported it. It is not an attention failure; the durable fixes are git add after the edit, and a post-stamp check that reads the object.

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

  6. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

    Validation (2026-08-28) — STILL VALID (partially fixed)

    Verified against current repos. The charly (1) and plugins (1) instances are fixed, but the sdk and spec instances remain. Measured on fresh clones of sdk main and spec main:

    • sdk: 6 mismatches — 2026.197.0738 (H1=2026.197.0800), 2026.197.2042 (H1=2026.197.2230), 2026.198.2057 (H1=2026.198.1944), 2026.213.2129 (H1=2026.213.2116), 2026.223.1626 (H1=2026.223.1018), 2026.228.0209 (H1=2026.227.2115)
    • spec: 2 mismatches — 2026.214.0434 (H1=2026.214.0900), 2026.215.1748 (H1=2026.215.1928)

    Value: LOW-MEDIUM — 8 trivial renames for changelog correctness. Static-verified; no bed needed.

  7. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

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

    Static verification on fresh clones of sdk main and spec main: 8 H1-vs-filename mismatches remain — sdk 6 (2026.197.0738, 2026.197.2042, 2026.198.2057, 2026.213.2129, 2026.223.1626, 2026.228.0209), spec 2 (2026.214.0434, 2026.215.1748). The charly (1) and plugins (1) instances are fixed.

    Status: VERIFIED — keep open. Value: LOW-MEDIUM (8 trivial renames for changelog correctness; the validator spec requires the H1 to match the filename).

  8. 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