Repository navigation
Conversation
|
Self-test: FAIL at 8bbc566 Measured on the tip tree, not from the PR body. No Four groups: all pass
Artifacts are regenerated, not hand-edited: 3 added / 5 modified, and Blocking finding: the flattened trace is still copied
The new test only feeds Non-blocking, same family: a fence that wraps a trace ( Not a defect here: a plain as of my read: 0 comments; this is the first. |
7357a97 to
85df0d4
Compare
|
Self-test: PASS at 85df0d4 Measured on the tree, not read off the PR body. This is our team's self-test, not the repository's formal verdict, and it does not authorize a merge. What this tip changes, and what I measured where
Red, then green, then the knife
The Knife — only the read-side loop reverted in place ( The ruler, item by itemFour flat forms, verbatim —
Two paragraph shapes, verbatim:
No names: Single line: Same class for Multi-paragraph invariant ( For the first two, Gates at this tip
Process items
as of my read: 1 comment, newest |
85df0d4 to
3b5e72b
Compare
|
Self-test: PASS at 3b5e72b Measured on this tree, not read off the PR body. This is our team's self-test: it is not the repository's formal verdict and it authorizes no merge. Ran: blob and per-file delta compare against the pre-rebase head The rebase is mechanicalThe four hand-written files are the same blobs as on Per file, the PR delta (
The generated files changed, and only because the base moved
Two generated files differ from the pre-rebase head, and both are base-introduced:
Because both scripts reproduce the generated files exactly from the current base plus these sources, nothing here is a hand edit. Gates at this head
Attribution, measured rather than assumed: on base One environment note only: main has since advanced from A note on the body's red and knife blocksThose blocks are measurements from the pre-rebase tree, and the sources they exercise are byte-identical here, so they hold as written; I did not re-run the knife at this tip because there is no new code to run it against. What I did measure at this tip is the green side: 8/8 in the suite run. Process items
as of my read: 2 comments, newest |
3b5e72b to
eeee4a5
Compare
|
Self-test: PASS at eeee4a5 Measured on this tree, not read off the PR body. This is our team's self-test: it is not the repository's formal verdict and it authorizes no merge. Ran: blob and per-file delta compare against the previous tip The second rebase is mechanical tooThe five hand-written files are the same blobs as on That is the base, not this branch: main moved Gates at this head
and
Attribution, measured: the base Process items
as of my read: 3 comments, newest |
…race and its fence
eeee4a5 to
4235606
Compare
Fixes #1406
Owner: Dev4
Reviewer: Reviewer
Written-by: Dev-4
Tip:
d0dbbc10004a350c740a6a4166ee95f5db50ccddBase:
fe6c90693f5ff32c1147d0b618041b1acaaa0d76(main,#1503)Tree:
e8874349f128cc7a5e0e1624571f1337e722aa7aWhat changed
The details drawer's copy export handed the clipboard the raw stored turn.
transcriptOf(core/src/client/details-drawer.js:21) built its text fromstripHeader(entry.response).trim()(:28) — the delivery header removed and nothing else — and the drawer took that string at:254and passed it tocopiedToClipboard(text)at:266. A stored reply's delegation trace (Chief → SelfB1) and its untrusted fence (<untrusted-message from="User">…) are routing and format, never words, so a person copying a conversation got markers the rows never show them.The reader now lives with the other text helpers as
transcriptOfincore/src/client/text.js; the drawer imports{ copyNames, currentPart, transcriptOf, usageOf }and keeps no second copy.copyBodyOf(text, names)reads a stored reply line by line:stripHeader, until it stops moving);visibleText(<untrusted-message …>is a wrap, not words); what that empties was never a paragraph, so the line is dropped rather than kept as a blank;Chief → SelfB1— is routing and is not copied;Chief → Product Hi there) only when its first hop is a Bot's name, whole and exactly, taken from the roster (copyNames(roster): every name the drawer knows, longest first, soDev Leadnever matches asDev). With no names — or an empty list — nothing is stripped at all;trim()). A reply written in three paragraphs is copied as three paragraphs.Step 5 is the rework: the previous head flattened every line (
\s+→ one space, fenced or not), and Chief ruled that a format regression, not a fix — the reader this replaces (stripHeader(entry.response).trim()) kept the newlines, and D2'sexchange.jskeeps them too. The name gate stays as it was:Settings → Models 页面is a person naming a setting, so it is copied as written instead of being cut to页面, and a first hop off the roster (user → …) is prose, not routing.Read side only: no write path, no
previewOfchange, novoice.js, nopalette.js, andentry.promptkeeps its**You:**label.changelog.d/1406.fixed.mdis the user-visible note.The rebase onto
fe6c9069, and why0008is hand-builtThe PR had been
mergeable: false/dirtysincemainmoved; it carried no Verdict and no review, so the rebase cost no reviewed state. The only conflicting file waspatches/ds-bot/0008-client-bundle.patch;core/client.js,core/src/client/text.js,core/src/client/details-drawer.js,docs/and0001/0012merged cleanly.#1484's and#1490's lines are untouched: the only deletions indetails-drawer.jsandclient.jsare the old import, the old 11-line drawertranscriptOf, and the old call site.Method
Main's
0008is the base; exactly three edits were applied by hand, one per realclient.jschange:@@ -1494,6 +1494,13becomes+1494,79: the 66-line helper block goes in afterstripTrace, and the hunk still ends on context.@@ -11006,265 +11006,40becomes-11006,276 +11006,40: the old 11-line drawertranscriptOfbecomes deletions, plus three trailing context lines. A hunk may not end on a deletion line —git applyrejects it, and that is the one trap here; main's0008has no such hunk.@@ -11457,7 +11457,7hunk at the call site:… roster.exchangeTurns[part], copyNames(roster)).0002and0014stay at main's bytes.0001(+91 −1) carries only the 90-linetext.jshelper;0012(+27 −6) only the drawer's new import and call site.Evidence
node scripts/ds-bot-patches.mjs check— three ok lines (quoted under What I ran).0001…0008onto a pristineds-bot/checkout leavesclient.jsbyte-identical to this branch'score/client.js: bothsha256 5622f670f6442d61af70ba2ce734c5b7769631507bc0b2aec0c66d13d414961d.node core/scripts/build-client.mjs --check— exit 0.0008against main:1 file changed, +91 −5, and the whole diff is the three regions above — no reflow, so a reviewer can read the three edits directly.Known limit:
generatereflows0008node scripts/ds-bot-patches.mjs generateon this tree rewrites0008by +1678 −1521 (3199 lines). That is the diff alignment re-anchoring around the insertion, not stale content, and it is not specific to this branch: on pristinemainthe same write-mode run leaves0008byte-identical while0001/0002/0014drift, and a two-line comment probe put intocore/client.jsalone makes0008churn 129 lines (67+/62−). Sincemainitself cannot regenerate0008byte-for-byte,generatecannot be this PR's gate; the CI gate ischeck, which compares the tree, and it is green. Same generator family as P-59; recorded in the backlog.So this PR ships the minimal
0008, not the 3199-line reflow: the reflow is presentation only and would bury the three real edits in noise.Trade-offs, narrowed to what this actually fixes
Chief → Product Hi thereand multi-hopChief → Dev Lead → Product …are stripped; a first hop that is not on the roster (Settings → …, a quoteduser → …) is kept — the price of never eating prose. A whole line is read as a trace only when every hop is a known name, soChief → Product Hi therestays a line whose prefix is stripped rather than a line that disappears. The fence-with-a-trace-inside shape is not handled here; it stays open on#1408item ①.<untrusted-message …>is read as a wrap. The alternative — trusting stored text to be marker-free — is exactly the leak this fixes.Red before, green after (same command)
From
core/:node --import ./test/harness-resolve.mjs --test test/details-copy.test.jsAt the old head
8bbc566c(old reader, new tests) — 5 of 8 red; tests 1, 2 and 7 pass:页面andsecond paraare the old reader eating the setting name and the first line; test 7 passes there only because that head flattened fenced lines, not unfenced paragraphs.At the rejected head
f7af3cc3(same tree content: local513319d,text.jssha25624601d1dea966e65d62bdb6e5f93a5416c0639a4bc372f36e6351ffcc775fed4, the one Chief and Test measured) — 4 of 8 red, the paragraph fold:At this tree:
Knife
With only the read-side loop reverted in place —
copyBodyOfback tobody = COPY_FENCE.test(body) ? visibleText(body) : body.replace(/\s+/g, ' ').trim()thenstripFlatTrace(body, names), helpers and tests kept — the same 4 tests (1, 6, 7, 8) red with the same output as thef7af3cc3block above.core/src/client/text.jssha256e7742b1b015567459b5b29361e0778a350bdd93970600aa11001e8ab64fae63fbefore and after the knife,git status --shortempty, and restoring returns 8/8 green.core/client.jsis not read by this test — it reads the sources.What I ran
TZ=UTC npm run verifyat this tree — exit 0. (Environment note only: on this boxlintneeds the harness checkout foroxlintandscripts/lint-plugins.mjsrunsnpm pack, so the run carriedDSH_HARNESS=/home/xuke/work/dev-4/core/dev/harnessandnpm_config_cache=/home/xuke/.dsh/bot/workspace/.npm-cache; nothing in the tree changes.)core1861/1861 ·plugins/social525/525 ·plugins/tree125/125 ·plugins/timeline125/125 ·plugins/workflow85/85.github/scripts548/548 ·dev/interop37/37 ·dev/live-e2e24/24node core/scripts/build-client.mjs --checkexit 0;core/scripts/check-arch-docs.mjsOK (10 changed files vsfe6c9069)node --test core/test/details-copy.test.js8/8 green at this treenode scripts/ds-bot-patches.mjs check:Not run: a PASS request — that waits for the lead's word. No issue comment, no label change.
The
0012hunk, correctedEarlier I called the
patches/ds-bot/0012-room-membership.patchchange a pure hunk-header shift. That was wrong:0012also patchescore/src/client/details-drawer.js, and this branch changes that file for real — the import line becomes{ copyNames, currentPart, transcriptOf, usageOf }and the 10-line localtranscriptOfdefinition is gone.0012therefore carries a source change of its own (removed lines + the new import), plus the hunk-header move. Its room-membership logic is untouched, but the patch is a mirror of the source edit, not a context shift.Changed files (vs
fe6c9069)changelog.d/1406.fixed.mdcore/client.jscore/src/client/details-drawer.jscore/src/client/text.jscore/test/details-copy.test.jsdocs/subsystems/core-client.mdpatches/ds-bot/0001-core-fixes.patchpatches/ds-bot/0008-client-bundle.patchpatches/ds-bot/0012-room-membership.patchpatches/ds-bot/files/test/details-copy.test.js10 files, +574 −39.
0001/0012are the rebase merge's generated form;0008is the hand-built minimal one described above. The gates that hold arecheck(tree comparison) andbuild-client --check, both green.Coordination with
#1409Same family as
#1409(the flat-line reader) and#1395(which addsreadableLine(text, names)). Once#1395is onmain, whichever of this PR and#1409merges later rebases and switches its reader (copyBodyOfhere,speechOfthere) to that sharedreadableLine(text, names); this PR keeps its own line reader andstripFlatTraceuntil then.Checkpoint
{"pr":1410,"claim":"Dev4","issue":1406,"summary":"A stored reply was copied flattened: the reader sat in the drawer, dropped only the delivery header, and joined every line. It now lives in text.js and reads line by line: a trace-only line goes, the first line loses a leading trace only when its first hop is a roster Bot name, every other line and blank line is kept, and visibleText runs only on a fence-marker line. Eight tests: 5 red at 8bbc566c, 4 red at f7af3cc3, green here. Rebased onto fe6c9069 with main's 0008 plus exactly the three client.js edits.","files":["changelog.d/1406.fixed.md","core/client.js","core/src/client/details-drawer.js","core/src/client/text.js","core/test/details-copy.test.js","docs/subsystems/core-client.md","patches/ds-bot/0001-core-fixes.patch","patches/ds-bot/0008-client-bundle.patch","patches/ds-bot/0012-room-membership.patch","patches/ds-bot/files/test/details-copy.test.js"],"checks":{"ran":"TZ=UTC npm run verify (exit 0: core 1861, social 525, tree 125, timeline 125, workflow 85, scripts 548, interop 37, live-e2e 24); build-client --check; ds-bot-patches check; arch-docs OK","result":"green","at":"d0dbbc10004a350c740a6a4166ee95f5db50ccdd"},"next":"review: the hand-built 0008's three edits; once #1395 (readableLine) is on main, the later merge switches copyBodyOf to readableLine(text, names)"}