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
- e84586a7Mission AP56bmre
- 15917f03Record PR workflow rule (gitoria#50)mre
- 942ac995status: paused workers statemre
- 44b934e5log: respawn cleanupmre
- 03a80097Log: Anton GC A/Bmre
- c7cdef62Log: Apollo STOP, workers pausedmre
- d0c083fbLog: usage stopmre
- c6d464e5Log: Apollo GO backlog, AP56 and BS1 startedmre
- 1eb6f1a1Missions AP56, BS1mre
- 4871f8adLog: AP52 live on day52, browser gate greenmre
- d9bf2988Merge ap52: day52, tracker#58 server argument, #51 modal close rule, #56 keyed season rowsmre
- c4a60ef2Log: RT52 retest passed, AP52 startedmre
- 83760a55Browser gate: search results belong to the address form of the typed text (tracker#52 navigate replace)mre
- 6e951d91AP52: show-page rows are keyed records; closing a season is one upsert and removes (tracker#56, hybriel#331)mre
- 3bb4ccddAP52: modal close button refers to its nested rule with Style.buttonModalX (tracker#51, hybriel#333)mre
- ba16933fAP52: login callback and title route are static handlers taking the server as third argument (tracker#58, hybriel#332)mre
- 85153900AP52: re-vendor Hybriel set day52 (source 77cfca31, bin 0a8ed496)mre
- 7c051eddLog: hybriel#338 answermre
- d049b8b8Log: HM50 live, #52 donemre
- 6d05fa37Log: HM50 Part A mergedmre