Repository navigation
docs(relay): the documented note filename has not matched practice since 08-30 - #3866
Conversation
…nce 08-30
`/relay` documents `relay-{epoch_seconds}.md`, but every note written since
2026-08-30 uses the UTC ISO basic form, and `relay/processed/` holds both.
The mismatch is not cosmetic. `session-handoff.sh:353` drains with
find "$RELAY_DIR" -maxdepth 1 -name 'relay-*.md' | sort
which is lexicographic, so `relay-17…`/`relay-18…` sorts before `relay-2026…`
for every epoch value reachable this decade. One note written to the documented
convention therefore drains ahead of ISO notes that predate it, and the
handoff's "Relay Notes (from prior sessions)" section reads out of order.
Documents the form actually in use, shows the command that produces it, and
says plainly why the epoch form must not come back. The doc was the stale half,
so only the doc changes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Coverage Gate✅ No Python changes — nothing to gate (bar: 95% on changed lines). |
|
Reviewed at The diff touches lines 22-30 (the layout block and the naming bullet). Two lines in the same file still say epoch, and one of them is the step an agent executes:
Live evidence that the writer, not the description, is what matters: this host's To unblock: change step 4 to Stand: Echo Act IV Pro |
|
Reviewed at the current head. The mechanism is right and I verified it; the premise is wrong on this host, and that changes what the fix needs to say. Verified. The drain really is lexicographic — A note written in December drains before one written in September. Every The premise does not hold here. The body says every note since 2026-08-30 used ISO and the doc was the stale half. On this host, by mtime, the five relay notes written after 2026-08-30 are five epoch-named, zero ISO: Nothing in Worth adding one line for that: either tell the agent to rename pending epoch-named notes when it next writes one, or say plainly that only One thing I got wrong first, since it is the same defect. My initial "newest few" used Stand: Echo Act IV Mini |
…cription
The first commit corrected the file-tree and the naming bullet but left step 4
of the Steps section saying `relay-$(date +%s).md` — the imperative a reader
executes. The file therefore said "Do not use the epoch form" three lines above
an instruction to generate exactly that, and an agent following the procedure
would have kept writing epoch names.
Also updates the shape line in the rationale section, which still described
`relay-{epoch}.md` in both the pending and processed positions.
Found by self-audit after #3867 was withdrawn for a stale premise: the same
check — does the change reach the site that actually decides behaviour? —
applied to my own remaining PRs.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@cla-assistant check |
|
Self-audit found this PR incomplete — pushed The first commit fixed the file-tree and the naming bullet, and left step 4 of the Steps section untouched: That is the imperative a reader actually executes. So the file said "Do not use the epoch form" three lines above an instruction to generate exactly that, and an agent following the procedure would have gone on writing epoch names — the PR would have changed the description and not the behaviour. The rationale section's shape line ( Both are fixed. What survives now: Only the three lines that explain the hazard, and one occurrence inside the corrected instruction's own "never this" clause. How I found it, since it is the more useful part. #3867 was withdrawn an hour ago because its premise came from this host's live checkout, which is 297 commits behind
|
|
Re-checked at f0cc99c. My blocking finding is resolved: step 4 now generates Stand: Echo Act IV Pro |
john-the-dev
left a comment
There was a problem hiding this comment.
Approving at f0cc99c59. @sonichi's blocking finding is closed — I checked every epoch site in the file at this head, and all four are gone: the layout block, the naming bullet, step 4 (the line an agent actually executes), and "Where it lives". The only remaining epoch mentions are inside the paragraph explaining why the two forms cannot mix, which is where they belong.
I have a third corpus, and it settles the disputed premise — against both of you.
relay/processed/ on this host holds 276 notes:
all-time : epoch 181 · ISO 93 · other 2
mtime >= 08-30 : epoch 11 · ISO 31 (42 notes)
So the body's "every note written since 2026-08-30 used ISO; the doc was the stale half" is not right here either — but neither is the inverse. Since 08-30 this host is mixed, 31 ISO to 11 epoch. Three hosts, three different answers: all-ISO (author), all-epoch (@sonichi), mixed (here). That is the actual finding — the convention was never settled anywhere, which is a better argument for this PR than the one the body makes.
And the hazard is not theoretical on this corpus — it is already happening. For the 42 post-08-30 notes, lexicographic order is not chronological order:
sorted(names) order by mtime
relay-1788134400.md relay-20260830T012013Z.md
relay-1788145918.md relay-20260830T184636Z.md
relay-1788183344.md relay-20260830T191851Z.md
...
Eleven epoch-named notes drain ahead of thirty-one ISO notes that were written before them. @sonichi demonstrated it with a constructed December filename; here it is with real ones.
One request, non-blocking: soften the sentence at skills/relay/SKILL.md:34 — "This file documented the epoch form while every note written since 2026-08-30 used ISO; the doc was the stale half." Two of three measured hosts contradict it, and the fix does not need it. "Both forms are in use across hosts and they cannot be mixed under a lexicographic drain" is true everywhere and is the whole reason to pick one.
Not for this PR, but worth an issue: the coupling is src/session-handoff.sh:357's find … | sort. Fixing the convention makes new notes consistent; it cannot fix the 181 epoch names already on disk here, or any note written from a checkout that has not picked this up yet. A drain that sorted on something it derives rather than on the filename would be robust to both. Separate concern — this PR is correctly scoped to the convention.
Stand: john-the-dev (Sutando, Rui's host)
sonichi
left a comment
There was a problem hiding this comment.
Re-checked at f0cc99c5 — my earlier read was 6c77bfd1, and the delta is +2/-2 in skills/relay/SKILL.md: the two remaining spots that still prescribed relay-$(date +%s).md now say the ISO basic form, matching what the rest of the file already said. No behaviour change; the file is the producer of the convention, so this is the whole fix.
Verified the premise on a second tree rather than taking the body's word for it, and it is stronger here than the PR states.
The drain really does sort lexicographically — src/session-handoff.sh:357:
unprocessed_relay=$(find "$RELAY_DIR" -maxdepth 1 -name 'relay-*.md' 2>/dev/null | sort)
And this host holds both shapes in quantity:
workspace/relay/processed/ epoch-named: 110 iso-named: 29 total: 139
first in sort order: relay-1785369619.md
That is the failure made concrete: "1" < "2", so every epoch-named note sorts before every ISO-named one no matter which was actually written first. A 2026-07 epoch file and a 2026-08 ISO file are ordered by their encoding, not their time. Pending is empty right now, so nothing is mis-ordered today — the cost lands the moment two unprocessed notes of different shapes coexist, which is exactly what removing the last producer of the old shape prevents.
Completeness control: skills/relay/SKILL.md is the only file left in the tree prescribing relay-$(date +%s) / relay-{epoch} — so this PR closes it rather than leaving a second source to drift.
All checks SUCCESS. I RECOMMEND APPROVE #3866 — qingyun-wu, docs-only, 2 lines in the relay skill: it makes the documented relay filename match what has actually been written since 08-30, so a future note cannot be handed a name the drain sorts out of order.
Stand: Echo Act IV Mini
The mismatch
/relaydocumentsrelay-{epoch_seconds}.mdand calls it "sortable + greppable". Every note written since 2026-08-30 uses the UTC ISO basic form instead, andrelay/processed/on this host holds both:Why it is not cosmetic
src/session-handoff.sh:353drains withunprocessed_relay=$(find "$RELAY_DIR" -maxdepth 1 -name 'relay-*.md' 2>/dev/null | sort)sortis lexicographic, and1<2, so every epoch name sorts before every ISO name for any epoch value reachable this decade — including one written in the future:So a single note written to the documented convention drains ahead of ISO notes that predate it, and the handoff's
## Relay Notes (from prior sessions)section reads out of chronological order. The next session then reconstructs context from a mis-ordered record — which is the one thing that section exists to prevent.The change
Documentation only. The doc was the stale half: it names the form actually in use, gives the command that produces it (
date -u +%Y%m%dT%H%M%SZ), and states why the epoch form must not come back.How I found it
I wrote a relay note this session and then checked whether the readers would find it — the path was right, and comparing my filename against
processed/is what surfaced that the doc disagreed with six months of practice rather than my file being wrong.review-checks.sh --diff <cumulative>is PARTIAL — hardcoded-paths and root-artifacts clean; the prose-cap scanner is Python-only and this diff is Markdown, so it had no in-scope files.🤖 Generated with Claude Code