Repository navigation
Commit 94b3f37
fix(pm): the issue-body footer cell is measured — give each footer shape its own clean class (#18786)
Fixes #18693
`Clause-②: no`
## What was left after PR #18758
PR #18758 (#18709) made `$?` answer 0 for both footer shapes and took
the prescription out of the status line. What it explicitly did not
touch is the CLASS: the body-mode footer append and the trailing-rule
re-anchor stayed `mutated`, `--json` kept reporting `body_mutated:
true`, and the header kept declaring the issue-body footer cell
UNMEASURED with two pinned controls holding it there. So the tool said
two things about one set of bytes on nearly every write a seat made —
"everything sent is on the platform" in `$?`, "MUTATED" on stderr — and
a warning that fires on nearly every write is one nobody reads, which is
what the read-back exists to be read.
This PR moves the cell, on a measurement.
## ① The controlled contrast — the triage seat's first ask (5716957331)
Two `--body` sends to one artefact this act owns (the body of this PR,
written through `PATCH /repos/OWNER/NAME/issues/NUMBER`, which is the
endpoint `--body` uses for a card and for a PR alike), differing ONLY in
whether the sent tail ends in the 58-byte footer block, each read back
byte-exact by the tool itself:
| arm | sent tail | sent | stored | delta | first differing byte | class
on `main` `2085be2b2d` | class on this branch | shape | `$?` |
|---|---|--:|--:|--:|--:|---|---|---|--:|
| **A** | prose — no block at all | 10749 | 10807 | **+58** | 10749 —
the seam, where the stored body keeps going | `mutated` |
`footer-appended` | `appended` | 0 |
| **B** | ends in the block plus one newline | 10808 | 10808 | **0** |
10751 | `mutated` | `footer-re-anchored` | `re-anchored` | 0 |
Both arms are the same body; arm B is arm A plus 59 bytes at the tail
(the 58-byte block and one newline) and nothing else —
`armB.startsWith(armA)` holds. Each was sent by `node
scripts/pm/post-stamped.mjs --body=18786
--repo=objectstack-ai/objectstack --file=… --json`, exit captured with
redirect-then-`$?`, and the stored bytes were then fetched again
independently and compared here:
- **A**: `stored === sent + PLATFORM_COMMENT_FOOTER` — exactly true. The
platform synthesised the block on a footer-less body, once, 58 bytes, on
this channel.
- **B**: `stored === head + "\n" + PLATFORM_COMMENT_FOOTER` — exactly
true, and the stored body carries exactly ONE attribution block, not
two. The newline this act sent after the block moved to before its rule:
equal length, one byte moved, zero lost.
What the status line says on the same bytes, `main` against this branch:
```
ARM A main : 1 parent a49e8ae commit 94b3f37
1 file changed
Lines changed: 242 additions & 176 deletions
0 commit comments