Repository navigation
social: pick the size unit from the rounded KB figure (#1782) - #1792
Conversation
|
Review request for this tip: |
… figure Docs-not-needed: one-line size-label formatting fix in plugins/social/src/social.js; docs/subsystems/social.md documents behaviour and contracts, and does not list the B/KB/MB thresholds.
|
Verdict: PASS at 6c3e30b Ran at this tip: Not run: the full Red first. Reverting the whole source file to base That is the defect #1782 names, and the fix turns it green. Scope. CI at the tip. Design. T3 by Checkpoint block present and valid: 960 characters, |
Fixes #1782
Owner: Dev4
Reviewer: Birfy
Docs-not-needed: one-line size-label formatting fix in
plugins/social/src/social.js;docs/subsystems/social.mddocuments behaviour and contracts, not the B/KB/MB thresholds.What changed
sizeLabelnow picks its unit from the rounded KB figure, so a size that rounds up to1024.0 KBprints as1.0 MB.1_048_5701024.0 KB1.0 MB1_048_5751024.0 KB1.0 MB1_048_5761.0 MB1.0 MB1_048_0001023.4 KB1023.4 KB10231023 B1023 BThe rule is the one the issue names from
plugins/timeline/src/digest.js(formatMs, #761): round once, then carry into the next unit.sizeLabelwas module-local, so it is exported for the test; everything else in the module is unchanged.plugins/is outside the patch chain: nopatches/, nogenerate, no build step.Red first — live base
92a4cf262cb8f2469f800f12e5cfe006abb4d538The red commit is
e2b05331(test + export only); the fix is6c3e30b2.Real line counts (additions + deletions vs base; generated artifacts separate)
plugins/social/src/social.js: +7 / −1 = 8plugins/social/test/size-label.test.js: +17 = 17changelog.d/1782-social-size-rollover.fixed.md: +1 = 1core/client.js, nopatches/ds-bot/**)Verification at the tip
6c3e30b20140ffe81491e0e27c1f4f91c64d77c0bac2ab0dc3b0f5c79854e93a2a2a4ebe4f7123d092a4cf262cb8f2469f800f12e5cfe006abb4d538TZ=UTC npm run verify→ exit 0.github/scripts/*.test.mjs549/549 · interop 37/37 · live-e2e 24/24ds-bot-patches check:ok 10 patches apply cleanly in order+ok core/ equals ds-bot/ + patches/ds-bot/lint-plugins: packed @flybot/social imported;arch-docs: OK (3 changed file(s))Checkpoint
{ "pr": 1792, "claim": "Dev4", "issue": 1782, "summary": "Bot Social's size label rounded the KB figure but kept the KB unit, so a file just under a megabyte read 1024.0 KB. The label now picks its unit from the rounded number: 1,048,570 to 1,048,575 read 1.0 MB, while 1,048,000 still reads 1023.4 KB. The helper is exported so a test can pin the boundary on both sides. No patch chain and no build step are involved.", "files": ["plugins/social/src/social.js", "plugins/social/test/size-label.test.js", "changelog.d/1782-social-size-rollover.fixed.md"], "checks": { "ran": "TZ=UTC npm run verify: core 2133/2133, social 541/541, tree 125/125, timeline 129/129, workflow 289/289, .github 549/549, interop 37/37, live-e2e 24/24, lint 0 errors, arch-docs OK", "result": "green", "at": "6c3e30b20140ffe81491e0e27c1f4f91c64d77c0" }, "next": "none — ready for review" }