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
- c98e2043log: T36A rollbackmre
- ae905f15Merge t36a: tracker#36 apply rechecks, reportmre
- 796bfaceT36A: report validated fixes, failed live SSH check and verified rollbackmre
- 55257852log: #53 live, #56 mergedmre
- 78b39f1bMerge hm56-rows: tracker#56 list builders insert oncemre
- 7aea52batmdb fix: protect owners without slugs and record passing gatesmre
- 9b3c2559tmdb fix: revalidate planned identities and reserve target idsmre
- 6da612fclog: T36A tool defectmre
- d56ee0daT36A: report unsafe TMDB apply revalidation and stop before livemre
- 08e55255log: HM56 done, T36A startedmre
- 91bcdf0eAvoid per-row list copies and reproduce keyed-row blockersmre
- 5fd2ac75status: #36 GOmre
- 0d253b45mission: T36Amre
- 2aa22d23log: #36 GOmre
- 833aee2flog: #50 closed, HM56 startedmre
- ac58c1e5mission: HM56mre
- 58979c0clog: HM54 held for decision, DP65 startedmre
- bb2ebc67log: #64 live, #53 mergedmre
- 27cde42fMerge hm53-dom: tracker#53 inputs bound to membersmre
- 2156cc7flog: HM54 reviewmre