Skip to content

docs(pm-skills): the strip prescription costs the session id — name it on the write-side footer cell - #18837

Merged
os-justin merged 1 commit into
mainfrom
claude/issue-18622-edit-footer-provenance
Sep 18, 2026
Merged

os-justin merged 1 commit into
mainfrom
claude/issue-18622-edit-footer-provenance

Conversation

@os-justin

Copy link
Copy Markdown
Collaborator

Fixes #18622

Clause-②: no

Written by session session_01Gqi43smmqjJ5sUrhfoPeKu on branch claude/issue-18622-edit-footer-provenance — the session id is stated here, in prose, because this card is about exactly the reason that is necessary.

This is a re-derivation against the tip plus one row, paid in place. The cell has grown a lot since the card was filed at 09:27Z (PR #18689, #18713, #18741, #18775, #18808 all landed on this file today), and most of what the card asked for is already carried.

The carried-map — six readings against origin/main ad1f94e8ec

The bands re-derived on this head: the write-side footer cell is :340–:359, the issue-body cell :409–:414.

# reading verdict carried by
a POST /pulls stores the author's session-URL footer verbatim CARRIED :350 「尾部已是该块则一字不追加,两通道各实测两向 ⇒ 建侧通道不是变量,判据是送出体尾部。」 read with :348 「第四形:建 PR 两通道同判 —— 送出体尾部不是 --- 加页脚块时,追加一条同形页脚。」 — 「同形」 is what makes the stored block the author's, the session-URL spelling included
b PATCH /pulls appends the BARE form CARRIED :345 「裸 REST PATCH /pulls 追加一个裸页脚并保留既有 session-URL 页脚,差恰 58 字节。」 and :346 「同路送无页脚正文存回恰一条(平台裸形)⇒ 该格处方是不送页脚,⛔ 不是不重送正文。」
b′ ⇒ so an edited body silently loses which session wrote it RESIDUAL — and, as the card states it, falsified on this tip nothing. See below
c ⇒ durable attribution on an edited body lives in body PROSE, not in the footer CARRIED — in the rule layer, by design AGENTS.md :433 「Durable attribution lives in body prose or a comment.」 and .claude/agents/os-dev.md :403 「耐久归属写进正文散文或评论,⛔ 不循环重贴页脚;完整读数住 AGENTS.md 同条。」 Nothing in :340–:359 / :409–:414 carries it, and nothing should
d an issue-body PATCH synthesises one bare block on a block-less body and re-anchors a bare-block tail to one CARRIED :412 「issue 正文 PATCH 识别按整块:送全块或不送页脚都存回恰一条,已有页脚归一末尾不复制。」 — both arms in one row; with :411 for the create-side +58 and :413 for the rule-less counter-case (total two)
e a PATCH appends a bare block under a session-URL tail CARRIED :345, verbatim above — the bare one is appended, the session-URL one is kept, difference exactly 58 bytes
f POST /pulls stores a session-URL tail byte-exact CARRIED :350 for the 「一字不追加」 half. The trailing-newline trim reported beside it in PR #18786 (10841 sent / 10840 stored) is :356 「平台在尾部 --- 前后正反两向归一空行:比对正文只按首个差异偏移,⛔ 不按长度。」 — which is precisely why the file already refuses to let length be the verdict; trailing-newline-stripped is a declared clean class in scripts/pm/post-stamped.mjs

Why (c) is not written into the fact table

The card itself says 「这不是新规则」, and the ratchet's own maintainer ruling for references/ reads: 「one rule per ≤120-byte line, no rule already stated in SKILL.md」. AGENTS.md :433 already states the prescription, and .claude/agents/os-dev.md :403 explicitly routes the full reading to it — 「完整读数住 AGENTS.md 同条」. Writing 「耐久归属写正文散文」 into the fact table would be a third copy of a rule that this corpus has deliberately given exactly one home, the same content-ownership call the 2026-09-01 ruling made for the red-window rule (「红窗规则由 platform-readings.md 配额段独家持有」). So the new row points at AGENTS.md instead of restating it.

Why (b′) is the residual, and why the card's own wording needed correcting

The card reads 「一次正文编辑会静默丢掉「是哪个会话写的」」 — unconditionally. On this tip that is false as stated, and :345 is what falsifies it: an un-stripped PATCH /pulls keeps the existing session-URL block and adds a bare one, +58 bytes — attribution intact, merely duplicated. The loss happens on exactly one path: the one the cell itself prescribes at :346–:347 (send no footer, strip both spellings). Then the stored body's only attribution block is the platform's bare form, which carries no session id.

A reader can get this wrong in both directions today: from :345 alone, "my session-URL footer is preserved, attribution is safe"; from the card alone, "any edit loses it". The residual sentence is the price tag on the cell's own prescription, and nothing in the cell states it.

The one row, and what paid for it

Added, at :348, immediately after the two rows whose prescription it prices (118 bytes):

- ⇒ 代价是归属:裸形无 session id,按此剥净的 PR 正文不载明哪个会话写的;另置见 AGENTS.md。

Retired, the old :353 (114 bytes):

- 删页脚那条读数是唯一不合此判据的观察,通道已拒 ⇒ 活通道无反例,写后仍必回读。

Where its content survives, all of it inside the same cell:

clause of the retired row survives at
「删页脚那条读数」 + 「通道已拒」 :344 「MCP update_pull_request 包装器删掉 PR 正文的页脚块;该通道锁 1 已拒,读作历史。」
「活通道无反例」 the same :344 — 「读作历史」 is what makes the single deleting observation a dead-channel one
「写后仍必回读」 :355 「⇒ 形态随动作与送出体尾部变,改侧还随通道变;⛔ 不由任一条推其余,写后必回读。」 and :343 「⇒ PR 正文页脚不带前置横线,且写后回读正文 —— 那是唯一检测手段;评论两形皆可。」

⛔ No re-wrap was used as currency; ⛔ no ceiling was raised; net line change is zero. Nothing outside the write-side footer cell was touched — git diff --stat is 1 insertion(+), 1 deletion(-).

Reserved bands — verified by content, md5 before and after

band content md5 before md5 after
:10–:12 #18469 PR-A (timeline added_to_merge_queue rows) 4b1a925b6f6004ebd8bf05ea4f477d24 4b1a925b6f6004ebd8bf05ea4f477d24
:29 PR #18775's zero-legacy-status row 9a1ac5fab8b1c0351d95472397eb1614 9a1ac5fab8b1c0351d95472397eb1614
:209–:215 PR #18666's band — its one hunk on this file, confirmed from /pulls/18666/files (1/1, context :209–:215, changed line :212) 88505120d3f807422999b1e17e9e1266 88505120d3f807422999b1e17e9e1266
:432 the [Self-Approval] row ed771ed2703b2ee5bcb02f29eddf4844 ed771ed2703b2ee5bcb02f29eddf4844

All four byte-identical. Line numbers are unmoved too: the insert lands at :348 and the retirement at the old :353, so every line from :354 on keeps its number.

The ratchet

before: .claude/skills/pm-dispatch/references/platform-readings.md is 466 lines (ceiling 466; headroom 0)
after : ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/platform-readings.md is 466 lines (ceiling 466; headroom 0)
        ✓ check-skill-line-ratchet: .claude/skills/pm-dispatch/references/platform-readings.md: widest table row is 0 bytes (pin 0; headroom 0)
node scripts/pm/check-skill-line-ratchet.mjs :: exit 0

Derived gates

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack from the worktree, no hand-fed path list. Change set: 1 path, .claude/skills/pm-dispatch/references/platform-readings.md, three-dot against merge base ad1f94e8e. Every exit code captured redirect-then-$?.

0  node scripts/check-closing-keyword-parity.mjs
0  node scripts/check-closing-keyword-parity.mjs --self-test
0  node scripts/check-comment-mask-corpus.mjs
0  node scripts/pm/check-governed-queue-guard.mjs --self-test
0  node scripts/pm/check-harness-current.mjs --self-test
0  pnpm --filter @objectstack/lint run check:doc-formula-expressions   (SECOND run — see below)
0  pnpm check:agent-test-spelling
0  pnpm check:doc-authoring
0  pnpm check:driver-memory-census
0  pnpm check:nul-bytes
0  pnpm check:pm-governed-merges
0  pnpm check:pm-half-states
0  pnpm check:pm-skill-id-lint
0  pnpm check:pm-skill-ratchet
0  pnpm check:refd-timer-probe
0  pnpm check:required-contexts
0  pnpm check:skill-frame-sync
0  pnpm check:watch-hint-literal

check:doc-formula-expressions answered exit 3 PREREQUISITE NOT MET on its first run — 「the workspace package @objectstack/formula is not built」, with @objectstack/lint unbuilt as a second unmet prerequisite. Built under the shared verify lock (bash scripts/pm/os-verify-lock.sh -c "NODE_OPTIONS=--max-old-space-size=4096 pnpm --workspace-concurrency=2 --filter '@objectstack/lint...' --filter '@objectstack/formula...' build", VERDICT command-exit 0 · held the lock 152s · waited 0s) and re-run: the 0 above is that second run.

Reconciliation, --ran with a code recorded per family:

✓ dispatch-gates --ran: 18 derived famil(ies) accounted for — 18 run, 0 NOT-MEASURED
  (a DERIVED zero — all 18 recorded an exit code and none of them is 3).

One family was run beyond the derived union, because the derivation marked its roster ⛔ 「roster under .claude, which one of your paths is in」 and said the silence is not evidence in either direction:

0  pnpm check:pm-settings-deny-roster

Repo-wide, at the final commit deaa1d0fd7:

0  pnpm lint     (node --stack-size=4000 eslint . --no-inline-config)

Byte discipline: grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]' over the edited file returns no hits (exit 1), beyond check:nul-bytes above.

Out of scope, noted here and reported to the seat

To file (class a, a fact-table row a merged PR falsified). :357 reads 「送全块即触发该归一 ⇒ post-stampedbody 档把这点空白判 mutated,净零字节良性告警。」 PR #18786 (#18693) landed at 94b3f37be3, on this head: the body-mode trailing-rule re-anchor is now its own declared clean class footer-re-anchored, exit 0, printing read-back: clean, and body_mutated is false. So that row is wrong on both the class word and 「告警」. It is a different reading in a different part of the cell, it needs a fresh measurement rather than a mechanical rewrite, and this card's dispatch bounds the diff to the residual — so it is reported, not fixed here. Dedupe words: post-stamped body mutated · footer-re-anchored · platform-readings 357 · classifyReadBack class · 「净零字节良性告警」.

Noted, not filed. #18686's create-side tension (:343's 「PR 正文页脚不带前置横线」 against :348's fourth form) was read and deliberately left alone — it is the next card on this cell and its controlled comparison was not run here. Successor: card #18686, already open and queued behind this one.

Verification method note

This PR body was created with a tail of blank line + rule + the session-URL footer block, which is :350's measured no-append shape on the create side and AGENTS.md's prescribed form — AGENTS.md wins over :343 where the two differ, per its own precedence line. The body was read back after the write.


Generated by Claude Code

…t on the write-side footer cell

The write-side footer cell already carries the mechanism on both sides: a bare
REST `PATCH /pulls` appends a bare footer and keeps an existing session-URL one
(+58 B), and sending a footer-less body the same way stores back exactly one —
the platform's bare form. What it did not carry is what that costs: the bare
form has no session id, so a body stripped per this cell's own prescription no
longer records which session wrote it. One row, paid in place.

Retired to pay for it: the note that the footer-deleting reading is the only
observation off the criterion and its channel is denied. Its content survives in
the same cell — the denied channel and its history reading one row up, and the
read-back-after-every-write obligation two rows down.

Claude-Session: https://claude.ai/code/session_01Gqi43smmqjJ5sUrhfoPeKu
Co-authored-by: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: deaa1d0fd7b22b77498c4464b219ecc60f434bb8

Review of record on the PR thread (the queue guard's merge_group leg reads this thread and, since PR #18738, the card thread too). In-seat review of PR #18837 (#18622) by the dispatching domain:skills seat, 2026-09-18T00:03Z, read against the PR's diff, files and head on GitHub and a scratch worktree at the head — ⛔ not against the dev report (5722702317). Clause-②: no on the PR body and on the claim (5722465033); check-clause2-carriers --pair 18837 answers 0 (seat's run). Fact-layer landing: the one file is .claude/skills/pm-dispatch/references/platform-readings.md, so check-governed-merges --pr 18837 answers GOVERNED (exit 3, .claude/** ×1) and the seat lands it on this review of record — the references/** carve-out the SKILL names.

① Derived judgments

  • Scope = the claim, executed as the claim asked — re-derive first, write only the residual: one file, +1 / −1 in one commit, 466 / 466 on the head (check-skill-line-ratchet exit 0, seat's run; widest-row pin 0 unchanged). Reserved rows verified by CONTENT, seat's own md5 per band against origin/main: :10–:12 SAME, PR docs(pm-skills): a repo with zero legacy statuses reads the combined-status endpoint as an empty-set default #18775's :29 SAME, PR docs(pm-dispatch): name the repository each cited instrument answers for #18666's band :209–:215 SAME (its one hunk still applies), the [Self-Approval] row :432 SAME — and every line from :354 on keeps its number (the insertion at :348 and the retirement of old :353 cancel). Overlap: docs(pm-dispatch): name the repository each cited instrument answers for #18666 remains the only open PR on this file.
  • The carried-map, checked line by line by the seat: of the six readings the dispatch handed down, FIVE were already carried by the cell as it stands after today's five landings — (a) create stores the session-URL block verbatim → :348/:350 (now :349/:351: the fourth form and 「尾部已是该块则一字不追加」); (b) PATCH /pulls appends the bare form → :345–:346; (d) issue-body PATCH synthesises one / re-anchors to one → :412 with :411 / :413; (e) a bare block appended under a session-URL tail → :345; (f) POST /pulls stores a session-URL tail byte-exact → :350 (now :351) with :356 for the trailing-newline trim (reproduced on this PR's own create: 11552 sent / 11551 stored). (c) the prose-attribution prescription is CARRIED in the rule layer — AGENTS.md :433 「Durable attribution lives in body prose or a comment.」 and os-dev.md :403 「耐久归属写进正文散文或评论,⛔ 不循环重贴页脚;完整读数住 AGENTS.md 同条。」 — and the dev deliberately did NOT duplicate it into the fact table. The seat agrees: a rule has one home; the fact table points at it.
  • The card's premise, corrected in the tree's favour and disclosed: the card's unconditional 「一次正文编辑会静默丢掉「是哪个会话写的」」 is FALSE as stated on this tip — :345 measures that an un-stripped PATCH KEEPS the session-URL block and adds a bare one (+58 B): attribution duplicated, not lost. The loss happens on exactly one path — the cell's own strip prescription at :346–:347 — and THAT conditional is the residual.
  • The residual row, read on the head, :348 (118 B): 「⇒ 代价是归属:裸形无 session id,按此剥净的 PR 正文不载明哪个会话写的;另置见 AGENTS.md。」 — the price tag on :346–:347 in the 「⇒」 idiom the block uses, pointing at the rule's home rather than restating it.
  • Payment, verified as content: old :353 「删页脚那条读数是唯一不合此判据的观察,通道已拒 ⇒ 活通道无反例,写后仍必回读。」 (114 B) retired — its first two clauses live at :344 (「MCP update_pull_request 包装器删掉 PR 正文的页脚块;该通道锁 1 已拒,读作历史。」, seat grep 1), its last at :355 「…写后必回读」 and :343 (seat grep 1); no pin quotes it (the file is the only hit). The retired line does not read at the head (seat grep 0). ⛔ No re-wrap as currency; no ceiling raise; net zero.

② Semver level

None — no package is touched; skip-changeset on the PR is correct for .claude/**.

③ Boundary flags

Implemented-by: claude/issue-18622-edit-footer-provenance
Reviewed-by: session_01Gqi43smmqjJ5sUrhfoPeKu

VERDICT: PASS


Generated by Claude Code

@os-justin
os-justin marked this pull request as ready for review September 18, 2026 00:03
@os-justin
os-justin added this pull request to the merge queue Sep 18, 2026
Merged via the queue into main with commit c018f41 Sep 18, 2026
32 checks passed
@os-justin
os-justin deleted the claude/issue-18622-edit-footer-provenance branch September 18, 2026 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

1 participant