code wiki / _hdl_build / nx_merge_queue.nx

nx_merge_queue.nx

buildroot/runtime/_hdl_build/nx_merge_queue.nx

2414 B44 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_merge_queue.nx -- the SPECULATIVE FIFO merge queue (the research-proven integration layer that GitHub merge queue / GitLab merge trains / Zuul all use; /deep-research wfb7jkc6h). Upgrades nx_workstream_git: each change is tested against the COMBINED state of base + all changes ahead in FIFO order; disjoint changes all land (parallel throughput), an overlapping change is DROPPED (must rebase + re-enter), and a drop does NOT cascade -- downstream changes are re-tested against the merged tip WITHOUT the dropped change (no false failures). This catches the canonical race (both pass alone, break together) that a shared branch misses. license_tier: ORIGINAL Pairs with nx_workstream_git isolation.

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_merge_queue.nx nx_orchestration2_test.nx nx_parallel_runner.nx

imports: nx_syscalls.nx

imported by: nx_orchestration2_test.nxnx_parallel_runner.nx

structs

none

consts

11const MQ_MERGED: i64 = 1
12const MQ_DROPPED: i64 = 2 // conflicts with an already-merged change -> rejected from this train, rebase + retry

functions

15func mq_clean(mask_a: i64, mask_b: i64) -> i64 { if (mask_a & mask_b) == 0 { return 1 } return 0 }
called by 1: main
20func mq_process(masks: *i64, n: i64, out_status: *i64) -> i64
39func mq_parallel_merged(masks: *i64, n: i64) -> i64
44func mq_status_label(s: i64) -> *u8 { if s == MQ_MERGED { return "MERGED" as *u8 } return "DROPPED(rebase+retry)" as *u8 }
called by 1: main