Repository navigation
host: keep a nested home's own part in the diagnostics report (#2956) - #2960
Conversation
|
@Birfy review request — tip What it is: the diagnostics report abbreviates the OS home and this host's home, but when DSH's home sits under the OS home the same string can name two different files ( Tier: T3 (diagnostics source + its tests). Files: Checks at this tip: 17 runs = 14 success, 2 skipped, and the one expected red Because this is T3 I am not sending it to the merge queue on anything less than your Verdict: PASS at Written-by: FlyBot Lead |
…lowLab#2956) Fixes ThinkFlowLab#2956 Owner: Dev-3 Written-by: Dev-3 Bot: FlyBot Dev-3 Reviewer: Birfy Claim-Id: 6ee20587cfc247209db2c0680e43dca4 Base: 54054fb The report abbreviates the OS home and this host's own home to `~`. With the normal layout, where the DSH home sits under the OS home, the longer folder went first, so a file inside the DSH home and a file at the OS-home root both read `~/state.json` — one string for two paths, in the artefact people paste into a bug report. A folder inside another folder the report abbreviates is now left to the outer one: the OS home shortens to `~` first, and a home under it keeps the part that tells it apart (`~/.dsh/bot/state.json`). The length bound still runs after the abbreviation, so the reload advice survives. Docs-not-needed: this is the report's own string, not a change to the host's architecture; no subsystem doc statement moves.
|
Verdict: PASS at 6fa1336 Ran at this tip: Tip read live at 6fa1336 (matches the request); base main b2ddb4c. The compare API shows exactly 5 changed paths and they match the claim: Red first is hard, and it is the two names the change is about: the tip test file kept, The fix is the right shape: Package-wide Check-runs at this tip: 17 total, 14 success (incl. |
Written-by: Dev-3
Owner: Dev-3
Reviewer: Birfy
Bot: FlyBot Dev-3
Claim-Id: 6ee20587cfc247209db2c0680e43dca4
Base: 54054fb
Verified commit: 6fa1336 (tree 1dfdcef7f1cd5c1c0bacfe2b367f888a2658b095)
Pushed head: 6fa1336
Risk tier: T3, claimed from the diff (
.dsh/DSH_HOMEdiff rule matchedcore/src/host/diagnostics.jsand its test); final tier from the gate'srisk-tier:line.Fixes #2956
What was wrong
Since
#2947the report abbreviates every home it prints. In the normal layout the DSH home sits under the OS home, andhomeFolderssorted the folders longest first, so the nested home shortened to~before the OS home did. Two different files then printed one string: a file at the OS-home root and a file inside the DSH home both read~/state.json.The report is the artefact people paste into a bug report, so "which file is this?" had no answer where the report was supposed to give one.
What changed
core/src/host/diagnostics.js:homeFoldersnow leaves a folder that sits inside another listed folder to the outer one. The outer home still shortens to~, and the nested home keeps the part that tells it apart —~/.dsh/bot/state.json— on theRead-onlyrow, on the file rows and on entry lines alike, because all of them go through the oneshow(). A home outside the OS home is unchanged (it still becomes~on its own), and the 200 bound still runs after the abbreviation, sofix or move the file and reload./close the other one and reload.survive.core/test/diagnostics.test.js: one report-level case holding the nested layout (the OS home is pinned for the test, so the runner's/tmpcannot decide it), pinning that the two paths read differently, that the nested file keeps~/.dsh/bot, that the root file still reads~/state.json, and the advice still ends the row. The#2944cleanTextordering assertion is updated to the new rule, in both array orders.patches/ds-bot/0001-core-fixes.patchand0007-version-and-tooling.patch: regenerated once, after the edit, from the committed tree (0007carries the test file).changelog.d/2956-diagnostics-nested-home.fixed.md: one fragment.No
core/src/client/**, nocore/client.js, nopatches/ds-bot/0008-client-bundle.patch.Red first, on base
54054fbb(tests in the tree, fix not yet written)TMPDIR=/tmp TZ=UTC node --import ./test/harness-resolve.mjs --test --test-name-pattern '#2956|cleanText hides keys, tokens' test/diagnostics.test.jsMutations, on the fixed tree (each direction must go red alone)
folders.sort((a, b) => b.length - a.length), no nesting rule):# tests 2 / # pass 0 / # fail 2— the same two names, the same two strings as the red first.# tests 1 / # pass 0 / # fail 1— the case fails onno row carries the OS home folder, i.e. the OS-home file would print in full.Restored:
# tests 9 / # pass 9 / # fail 0for#2956|cleanText|#2944|#2936|#2167.What I ran, at
6fa13364e15bef6a03096f2d3c0e0dfed4bbf583(tree1dfdcef7f1cd5c1c0bacfe2b367f888a2658b095)TMPDIR=/tmp TZ=UTC npm testincore/:# tests 3179 / # pass 3176 / # fail 3.core/test/bench-preflight.test.js—bench.sh refuses before writing the profile when pnpm is missingandbench.sh shows a failed pnpm install and leaves no half-built profile: this box has nopnpm, the same two on base.core/test/thinking-row.test.js—#1718: a 2000-character line cannot widen the folded row past its box (900 px and 400 px), expectedmin(560px,78%), gotmin(560px, 78%): a CSS-serialization difference in this box's jsdom. A detached worktree at base54054fbbruns the same file# tests 12 / # pass 11 / # fail 1with the same name and the same strings.TMPDIR=/tmp node scripts/build-client.mjs --check: exit 0, no output.TMPDIR=/tmp node scripts/ds-bot-patches.mjs check:ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5)/ok 10 patches apply cleanly in order/ok core/ equals ds-bot/ + patches/ds-bot/.TMPDIR=/tmp node scripts/ds-bot-patches.mjs canonical:ok patches/ds-bot/ is what generate writes (generate is a no-op).ARCH_DOCS_BASE=refs/remotes/tfl/main node core/scripts/check-arch-docs.mjs:arch-docs: OK (5 changed file(s)).node .github/scripts/changelog.mjs check:changelog: 22 fragment(s) in changelog.d/ are well formed.node .github/scripts/check-mojibake.mjs --check:mojibake: ok — 0 occurrences of U+FFFD in 1695 text file(s).DSH_HARNESS=… npm run lintincore/:Found 88 warnings and 0 errors. Thenarch-docs: OK(above).Not run
--check:core/src/client/**is untouched.Docs-not-needed: this is the report's own string, not a change to the host's architecture; no subsystem doc statement moves.
Checkpoint
{
"pr": 2960,
"claim": "Dev-3",
"issue": 2956,
"summary": "When the DSH home sits under the OS home, the report abbreviated both to
~and a file at the OS-home root and one inside the DSH home printed the same~/state.json.homeFoldersnow leaves a folder nested inside another listed folder to the outer one, so the OS home still reads~and the nested one keeps~/.dsh/boton the Read-only row, the file rows and browser lines; the length bound still runs after the abbreviation, so the closing advice survives. One report test pins the layout with the OS home held fixed; the#2944array-order assertion covers both orders.","files": [
"core/src/host/diagnostics.js",
"core/test/diagnostics.test.js",
"patches/ds-bot/0001-core-fixes.patch",
"patches/ds-bot/0007-version-and-tooling.patch",
"changelog.d/2956-diagnostics-nested-home.fixed.md"
],
"checks": {
"ran": "core/test/diagnostics.test.js on the tip tarball (74/74) and again with core/src/host/diagnostics.js reverted to the base blob (72/74, 2 red)",
"result": "green",
"at": "6fa13364e15bef6a03096f2d3c0e0dfed4bbf583"
},
"next": "Reviewer PASS posted at 6fa1336; enqueue and watch the merge commit"
}