tracker
All repositories: gitoria
1.1 KB
// The helpers must change the caller's list and keep the old tie order, without returning a rebuilt list.import { insertByFollowDesc } from '../lib/follows.hl'import { insertByReleaseAsc } from '../components/schedule.hl'oldInsert = (&sorted, &row, &release) => {out = []let inserted = falsefor (x of sorted) {if (!inserted && (release ? row.release <= x.release : row.followedAt >= x.followedAt)) {out.push(row)inserted = true}out.push(x)}if (!inserted) { out.push(row) }return out}verify = () => {for (release of [false, true]) {actual = []let expected = []let i = 0for (value of [0, 9, 2, 9, 1, 0, 12, 2]) {row = { id = '' + i followedAt = value release = '2026-11-' + (value < 10 ? '0' : '') + value }expected = oldInsert(&expected, &row, &release)if (release) { insertByReleaseAsc(&actual, &row) }else { insertByFollowDesc(&actual, &row) }if (JSON.stringify(actual) != JSON.stringify(expected)) { hlError('order or caller mutation differs after insertion ' + i + ', release=' + release) }i = i + 1}}console.log('16 insertions match historical order, including ties; caller mutation verified')}verify()
Branches
Latest commits
- ed4cbab2status timemre
- e982c26dlog: HM65 mergedmre
- 6e72f9d1Merge hm65-fields: episode boot scan reads three fieldsmre
- 07a5c883HM65 report measured field projection and complete validationmre
- 0eab858fRead only catalog date fields during the episode boot scanmre
- d3179273log: HM65 hl:heap vendoringmre
- cb78a1a0HM65 report missing heap diagnostic package with repromre
- 89606a5cHM65 briefmre
- 096ce0d4log: DP69 live on day48mre
- b3d8a80bDP69 brief, RV48 mergedmre
- ce6d7d32Merge rv48: Hybriel day48mre
- 3da2ea86RV48: report day48 cold starts, gates and cleanupmre
- 8d9ecdfeRV48: re-vendor Hybriel set day48 (source b6a8f429, bin 660a9524)mre
- 4a802ae7status: RV48 runningmre
- 0a5412b6RV48 brief, day48 outmre
- 56665efelog: CB69 mergedmre
- 05448a98Merge cb69-imports: appTitle in a dependency-free topicmre
- e55b379dKeep shared app title independent of the route import graphmre
- 9a99659blog: hybriel#334, batch waits for day48mre
- 85fa6c9blog: CB68 result, CB69 startedmre