Nishi FamilyCompare › Debugging and Diagnosis (Doctor)

Nishi Compare · measured, not asserted

Debugging and Diagnosis (Doctor)

Nishi vs the field — every Nishi cell is measured against real organ source at emit time; each gap names the watch contract that will close it.

Nishi vs rr and GDB and Delve and C-Vise

Layer 1 · Executive

Where we are. The Nishi doctor is a DIAGNOSIS-AND-IMMUNIZATION culture the field does not ship: the splice bisector names the guilty function, ccdiag surfaces the muted compiler error in one step, the shape prober fuzzes for the class, and every fixed bug becomes a permanent probe organ that re-runs forever (exceed), wired into one self-healing circuit (exceed). As of 2026-08-07 emitted ELFs carry DWARF v5 .debug_line under -g, validated by GNU readelf. What it lacks is the field's whole interactive half: no stepping debugger, no record-replay, no watchpoints, no .debug_info, no core-dump analysis, no remote attach, no DAP, no reduction at C-Vise scale.

Where we need to go. A sovereign debugger GDB-class on our own binaries -- break, step, inspect with types -- then the time-travel and reduction tools rr and C-Vise define, then the DAP door so any editor drives it; each rung landing as the permanent witness the doctor already knows how to keep.

The unit. 1 u = one measured session-leg (estate calibration: graphics R21 in one leg 2026-08-15). Local evidence: .debug_line with section headers and external readelf validation landed in one leg on 2026-08-07; estimates are relative to that.
Where we are: 8 open rungs. Diagnosis culture ahead; the interactive debugger half absent. Counts measured at emit below this line.
Cost to a breakpoint: 3 u. DT1 the minimal stepping runner over ptrace with the line table we already emit -- the root of every other rung.
Cost to inspection and time travel: 8 u. DT2 watchpoints, DT3 core-dump analysis, DT4 remote attach, DT5 record-replay -- each built on the DT1 runner.
Cost to the field's tooling ring: 6 u. DT6 DAP so editors drive it, DT7 input reduction at C-Vise scale, DT8 LLM-assisted diagnosis over the T# register.

Research bar. GDB is measured on breakpoints, watchpoints, post-mortem, gdbserver. Theirs: the debugger bar. Ours: DT1 DT2 DT3 DT4 measured on this page.

Research bar. rr 5.9.0 is measured on record-replay with reverse execution. Theirs: the time-travel bar. Ours: DT5.

Research bar. C-Vise 2.12.0 is measured on test-case reduction at scale. Theirs: the reduction bar. Ours: DT7.

8 of 17 capabilities measured|1 of them measured exceeds|9 open|coverage 470/1000|adoption 1 full / 7 partial

Layer 2 · Roadmap

Do this next — computed by the ranker, never chosen by a seat

Order from nx_compare_rank (nx_dr_ocm: (deficit + cost-of-delay + option + enables) x sponsor x self-sufficiency x momentum / cost). FINISH rows are rungs whose symbol is present but whose organ is short of full adoption: the cheapest closures on this board, listed before any new work. Stamp: # asof=1787883305 domain=doctor target_version=0.1 rungs=11 done=4 open=7 finish=3 ranker=nx_dr_ocm

#StageRungPriorityDerivation
FFINISHPer-function miscompile bisection (DO0) sb_try_frankenSOURCE-ONLYsource exists, never compiled: /api/build it
FFINISHPermanent regression witnesses (DO1) OptPROMOTED-UNREGISTEREDa real binary nobody can call over MCP: /api/tools/register it; no execution surface runs it either (clock, cron, daemon, roster, actlog and surfaced forks checked)
FFINISHDWARF .debug_line under -g (DO2) nx_dwline_headerSOURCE-ONLYsource exists, never compiled: /api/build it
#10.1Core-dump analysis (DT3) cd_dump_analyze1866v=14 m=2 c=15
#2laterWatchpoints (DT2) wp_watch_addr1200v=9 m=2 c=15
#3laterRemote attach (DT4) rmt_attach_pid900v=9 m=2 c=20
#4laterDebug Adapter Protocol (DT6) dap_serve700v=7 m=2 c=20
#5laterRecord and replay (DT5) rr_record_trace466v=7 m=2 c=30
#6laterInput reduction at scale (DT7) rd_reduce_input200v=2 m=2 c=20
#7laterLLM-assisted diagnosis (DT8) ld_suggest_fix150v=1 m=3 c=20

Critical path — contract, done-rule, executor, cost

RungCloses withDefinition of done (pre-declared)ExecutorEst.
Per-function miscompile bisection (DO0)sb_try_frankenSplice frankenbuilds name the guilty function -- LANDEDOrgan0 u
Permanent regression witnesses (DO1)OptEvery pinned bug re-runs forever as a probe organ -- LANDEDOrgan0 u
DWARF .debug_line under -g (DO2)nx_dwline_headerFunction-granularity line table, externally validated -- LANDED 2026-08-07Organ0 u
Stepping debugger (DT1)
after DO2
dbg_step_overA minimal sovereign runner: ptrace the child, set a breakpoint at a file:line resolved through our own .debug_line, step over, print registers; gate proves a breakpoint on nx_probe_dbgtiny.nx line 5 stops at 0x400096 (the address readelf already validated) and a bad line is refused with the nearest legal one namedOrgan3 u
Watchpoints (DT2)
after DT1
wp_watch_addrHardware debug-register watch on an address range with the faulting instruction reported; gate proves a planted write to a watched global stops at the writer and a read-only run completesOrgan1.5 u
Core-dump analysis (DT3)
after DO2
cd_dump_analyzeParse a core plus our ELF to print the faulting PC as file:line and the register set; gate proves a deliberately crashed probe yields the right line and a non-core file is refusedOrgan1.5 u
Remote attach (DT4)
after DT1
rmt_attach_pidAttach the DT1 runner to a running sovereign daemon by pid over the mgmt API with the same break and step verbs and detach without killing it; gate proves attach, break, detach leaves the daemon servingOrgan2 u
Record and replay (DT5)
after DT1
rr_record_traceRecord syscall results and nondeterministic inputs of a run and replay it deterministically to any breakpoint; gate proves two replays of one recording stop at identical register state and a replay of a tampered trace is refusedOrgan3 u
Debug Adapter Protocol (DT6)
after DT1
dap_serveA DAP server fronting the DT1 runner so VS Code-class editors break and step our binaries; gate proves the initialize, setBreakpoints, continue and stopped messages round-trip against a recorded client transcriptOrgan2 u
Input reduction at scale (DT7)
after DO0
rd_reduce_inputDelta-debugging reduction of a failing NishiLang input under an interestingness predicate, built on the splice bisector's harness; gate proves a 2000-line miscompile fixture reduces to a witness under 50 lines that still reproduces and a passing input is left wholeOrgan2 u
LLM-assisted diagnosis (DT8)
after DO0,DO1
ld_suggest_fixThe sovereign model proposes a fix from the T# register entry plus the bisector's named function, VERIFIED by the forge's byte-exact judge before it is shown; gate proves a known pinned bug yields a fix the judge accepts and an unverifiable proposal is labelled, never appliedOrgan2 u

Milestones

MilestoneRungsCumulative
M1 · A breakpoint and a post-mortem on our own binaryDT1,DT34.5 u
M2 · Inspect and travelDT2,DT4,DT511 u
M3 · In every editor, at scaleDT6,DT7,DT817 u
Layer 3 · Engineering
How this is scored. Every Nishi mark is measured: the generator reads the real organ source on disk and requires the implementing symbol to exist (no self-grading). A watching tag names the organ and symbol contracted to close a gap — the mark flips itself on the next compare beat when that workstream ships, and the comparewatch- plane row flips with it. The flip is necessary, not sufficient: it proves the symbol exists, never that the capability is good. The bar is the rung's pre-declared done-rule, proven by its gate — a symbol shipped without the behaviour behind it is a defect, and the flip is exactly what makes that defect visible instead of quiet. Competitor marks record documented capability presence — presence, not depth or scale. Adoption is measured too: every measured row carries where its organ stands on the estate's ladder (source → built → promoted → registered → invoked; libraries by importer reach minus validation importers; gates by the execution surfaces that run them). A row is fully adopted only at the top of its ladder; anything short is tagged partial with the exact remedy, so a build nobody promoted can no longer read as shipped. Census stamps: importers asof 1787849099, gate census asof 1787855507 (unix seconds; -1 = census absent).

Capability matrix — measured against source

leads / measured exceed present partial absent · click any capability for its evidence

CapabilityNishirrGDBDelveC-Vise
Per-function miscompile bisection (names the breaker)Measured: sb_try_franken exists in runtime/nx_cc_splice_bisect.nx, verified at emit. Function-splice frankenbuilds isolate the guilty codegen; C-Vise reduces INPUTS, ours bisects FUNCTIONS -- complementary halves Adoption: SOURCE-ONLY — PARTIAL: source exists, never compiled: /api/build it.
adoption SOURCE-ONLY
Compile-fail diagnosis in one stepMeasured: cd_run_cc exists in runtime/_hdl_build/nx_ccdiag.nx, verified at emit. Re-runs the compiler with stderr VISIBLE and prints the real error (the empty-.s trap is usually a muted source error); the wrapper now self-diagnoses too Adoption: BUILT-UNPROMOTED — PARTIAL: compiled, never promoted to the serving root: /api/promote it.
adoption BUILT-UNPROMOTED
Codegen-shape fuzz generationMeasured: sp_atoi exists in runtime/nx_shapeprobe.nx, verified at emit. Shape-axis generator found a real nx_cc bug (about 1500 early-exit blocks = empty .s, 2026-07-05) Adoption: BUILT-UNPROMOTED — PARTIAL: compiled, never promoted to the serving root: /api/promote it.
adoption BUILT-UNPROMOTED
Permanent regression witnesses (probe organs)Measured: func main exists in runtime/nx_probe_ctor.nx, verified at emit. Every pinned bug becomes a tiny organ that re-runs forever; nx_probe_ctor re-verified the enum-ctor SIGSEGV FIXED 2026-07-09; nx_probe_float still honestly RED Adoption: PROMOTED-UNREGISTERED — PARTIAL: a real binary nobody can call over MCP: /api/tools/register it; no execution surface runs it either (clock, cron, daemon, roster, actlog and surfaced forks checked).
adoption PROMOTED-UNREGISTERED
Living trap register (T# taxonomy)Open — no implementing organ is measured for this axis yet. Every debugging war ends in a T#-tagged register entry with the diagnosis path -- the raw material of the make-it-unrepresentable ladder
Autonomous health witnessMeasured: run_argv exists in runtime/nx_cc_health.nx, verified at emit. Generate-build-verify witness runs autonomously (exec engine 3/3, 2026-07-06); a compiler regression is an ALARM, not a surprise Adoption: SOURCE-ONLY — PARTIAL: source exists, never compiled: /api/build it.
adoption SOURCE-ONLY
Breakpoint debugger (step, inspect, frames)Measured: dbg_step_over exists in runtime/nx_dbg_step.nx, verified at emit. GDB is the bar [gdb-docs]; we have NO interactive debugger at all -- printf-and-bisect is the story Adoption: LIVE — fully adopted (top of its ladder).
Record-replay time-travel debuggingOpen — watching runtime/nx_record_replay.nx : rr_record_trace, re-measured on every compare beat. Ship that symbol and this mark flips itself; the comparewatch- plane row flips with it. rr 5.9.0 is the bar [rr-docs] (reverse execution over recorded traces); nothing sovereign records execution [ocallahan2017]
watching rr_record_trace
Watchpoints and memory breakpointsOpen — watching runtime/nx_watchpoint.nx : wp_watch_addr, re-measured on every compare beat. Ship that symbol and this mark flips itself; the comparewatch- plane row flips with it. GDB hardware watchpoints are the bar; our memory bugs are hunted by canary prints
watching wp_watch_addr
DWARF / source-line debug infoMeasured: nx_dwline_header exists in runtime/nx_dwarf_line.nx, verified at emit. WAS the root blocker, CLOSED 2026-08-07 at FUNCTION granularity and validated by an EXTERNAL tool rather than our own reader: compiler -g emits .file/.loc, nxasm builds a DWARF v5 .debug_line plus a section header table [dwarf5], and GNU readelf 2.42 [binutils-readelf] resolves nx_probe_dbgtiny.nx line 5 at 0x400096 and line 9 at 0x4000ad on a real sovereign ELF. The emitter bytes are byte-for-byte identical to a gcc-derived fixture. HONEST LIMITS: function granularity only (the IR carries no line numbers -- Tok has them, Instr does not), no .debug_info (types/vars), OPT-IN via -g so a default build stays byte-identical and the 168-byte minimal-binary exceed is intact. GDB can now find file:line on our binaries; stepping and inspection still need the rows below. Adoption: SOURCE-ONLY — PARTIAL: source exists, never compiled: /api/build it.
adoption SOURCE-ONLY
Test-case reduction at scaleOpen — watching runtime/nx_reduce.nx : rd_reduce_input, re-measured on every compare beat. Ship that symbol and this mark flips itself; the comparewatch- plane row flips with it. C-Vise is the bar [cvise]; our reductions are hand-swept thresholds (shapeprobe N-sweeps) [regehr2012]
watching rd_reduce_input
Core-dump / crash analysisOpen — watching runtime/nx_coredump.nx : cd_dump_analyze, re-measured on every compare beat. Ship that symbol and this mark flips itself; the comparewatch- plane row flips with it. GDB post-mortem is the bar; our crashes are exit-code + last-print forensics
watching cd_dump_analyze
Remote / attach debuggingOpen — watching runtime/nx_remote_debug.nx : rmt_attach_pid, re-measured on every compare beat. Ship that symbol and this mark flips itself; the comparewatch- plane row flips with it. gdbserver is the bar; our remote diagnosis is log tails over the mgmt API
watching rmt_attach_pid
IDE debug protocol (DAP)Open — watching runtime/nx_dap.nx : dap_serve, re-measured on every compare beat. Ship that symbol and this mark flips itself; the comparewatch- plane row flips with it. Delve powers VS Code Go debugging [delve]; ties to the lang census LSP gap [dap-spec]
watching dap_serve
LLM-assisted debugging and repairOpen — watching runtime/nx_llm_debug.nx : ld_suggest_fix, re-measured on every compare beat. Ship that symbol and this mark flips itself; the comparewatch- plane row flips with it. The cross-roster convergence gap (lang mom 145, janitor mom 111); nobody in THIS field ships it either yet
watching ld_suggest_fix
Diagnosis wired into the self-healing loopMeasured exceed: sb_write_franken in runtime/nx_cc_splice_bisect.nx, verified at emit. Fuzz (shapeprobe) to detect (equiv oracle) to bisect (splice) to immunize (probe organ) to bless (never-brick install) -- ONE in-substrate circuit; the field's tools are islands a human ferries between Adoption: SOURCE-ONLY — PARTIAL: source exists, never compiled: /api/build it.
adoption SOURCE-ONLY
Every fixed bug becomes a permanent witnessOpen — no implementing organ is measured for this axis yet. Immunization by construction: the probe that pinned the bug re-runs on every sweep forever -- fixed classes cannot silently regress; the field closes tickets

Risk register

RiskLikelihood x impactMitigation
A debugger runner that requires .debug_info we do not emit stalls on typeslikely x mediumDT1 done-rule is line-granularity break and step only; .debug_info is named depth, not a DT1 conjunct.
ptrace on a supervised daemon that stays stopped trips the crash-loop guardpossible x highDT4 detaches on any error path by construction and the gate asserts the daemon still serves.
On these two registers. Rows are declared in the domain's plan file and carry the debt id, which is the join key back to the sovereign debt plane — that plane, not this page, is the authority on state. Reconciling them automatically (the regen reading the plane and refreshing these rows) is a named, owed rung; until it lands, treat an id here as a pointer to look up, not a status to trust.
Honest verdict. The Nishi doctor is a DIAGNOSIS-AND-IMMUNIZATION culture rather than a debugger: when something breaks, the splice bisector names the guilty function, ccdiag surfaces the muted compiler error in one step, the shape prober fuzzes for the class, the fix lands, and a permanent probe organ re-runs forever so the class can never silently return (the enum-ctor probe re-verified its bug FIXED on 2026-07-09, two weeks after filing). What it does NOT have is the field's entire interactive half: no breakpoint debugger, no record-replay time travel (rr is the bar), no watchpoints, no core-dump analysis, no remote attach, no DAP protocol -- THE ROOT BLOCKER IS GONE AS OF 2026-08-07: emitted ELFs now carry a DWARF v5 .debug_line and a section header table under -g, and GNU readelf -- an implementation nobody here wrote -- resolves PC to file:line on a real sovereign binary (nx_probe_dbgtiny.nx line 5 at 0x400096, line 9 at 0x4000ad). It was validated against an EXTERNAL ruler on purpose: our own decoder nx_addr2line has no header support, so a round-trip against it would have proved only that two organs by one author agree with each other. It is FUNCTION granularity (the IR carries no line numbers), OPT-IN via -g (a default build is byte-identical and the 168-byte minimal-binary exceed is untouched), and carries no .debug_info -- so GDB can now locate our code but still cannot inspect its types. The remaining climb is unchanged in shape and shorter by one rung: a minimal sovereign breakpoint runner, then statement-granularity rows (needs line numbers threaded through the IR), then input reduction at C-Vise scale.

Person · product · place — not yet measured for this domain

Every compare carries this layer. Declare knowledge/compare/doctor.ppp (rows surface|nishi or c1..c4|label|url|connect naming OUR live surface and each rival's front door), run nx_ppp_probe domain doctor, and this section fills itself on the next beat: the same ruler on both sides — privacy and CX (third-party hosts, tracker classes, cookies, security headers), design and longevity (design hygiene, computed WCAG contrast, render-blocking resources, unsized media, script weight, theme and motion queries), findability (landmarks, skip link, on-site search, breadcrumb, headings, internal links).

References

Beyond a link list. Every reference below resolves twice — the publisher's copy and, where banked, the estate's own non-rottable library mirror with a content pin — and carries its evidence class plus the exact claim on this page it grounds. Keyed marks like [key] in the matrix notes jump here. A dash means honestly absent, never assumed.
  1. [rr-docs] rr project. rr: lightweight recording and deterministic debugging -- record-and-replay of Linux processes with reverse execution under gdb (rr 5.x). Project page. Accessed August 2026. publisher · read in our library knowledge/fetched/cmp_doctor_rr-docs.html · pin h7d01202e7fa5cf57e98366307dcd396330575df027d3c2b9fb4585df53cf1455 · accessed 2026-08-18 · vendor-docGrounds: The rr column (bar rr 5.9.0): Record-replay time-travel debugging is coded Best for rr (reverse execution over recorded traces) and the row is _ABSENT_ for Nishi -- nothing sovereign records execution; also rr's Part on Breakpoint debugger and Core-dump / crash analysis.
  2. [ocallahan2017] O'Callahan, R., Jones, C., Froyd, N., Huey, K., Noll, A., Partush, N. Engineering Record And Replay For Deployability. USENIX ATC 2017; extended technical report arXiv:1705.05937. publisher · read in our library knowledge/fetched/cmp_doctor_ocallahan2017.html · pin h229417e8dd8df699c631c21fc3b0d95e5897afd138059e02f0166611df2820f1 · accessed 2026-08-18 · published-paperGrounds: Record-replay time-travel debugging -- the published design behind the rr bar: user-space record and replay on stock hardware and kernels with low overhead, the basis of the reverse-execution debugger the row grades against; the constraints it names (Intel CPUs, Linux, deterministic replay of low-parallelism workloads) are what a sovereign nx_record_replay would have to meet.
  3. [gdb-docs] Free Software Foundation. GDB: The GNU Project Debugger -- documentation index (Debugging with GDB manual, current release). Accessed August 2026. publisher · read in our library knowledge/fetched/cmp_doctor_gdb-docs.html · pin h6e7219c7c44766de1c6f895fc02203f434d3efc4c56cce574c9beccb59351259 · accessed 2026-08-18 · vendor-docGrounds: The GDB column: Breakpoint debugger (step, inspect, frames), Watchpoints and memory breakpoints, Core-dump / crash analysis and Remote / attach debugging (gdbserver) are all coded Best for GDB, and Nishi is _ABSENT_ on each -- the manual is the bar the verdict says GDB can now locate but not inspect our code against.
  4. [delve] Derek Parker and the go-delve contributors. Delve -- a debugger for the Go programming language (repository README, DAP server, v1.x). Accessed August 2026. publisher · read in our library knowledge/fetched/cmp_doctor_delve.html · pin h690a5998c6b611f6e829b0f3044de79ff5e480b636999b26afe0cf851dd36b10 · accessed 2026-08-18 · vendor-docGrounds: The Delve column (bar v1.27.0): IDE debug protocol (DAP) is coded Best for Delve (it powers VS Code Go debugging) and Breakpoint debugger coded Yes; Nishi has no nx_dap and the row ties to the lang census LSP gap.
  5. [cvise] Martin Liska (marxin) and contributors. C-Vise -- a super-parallel Python port of the C-Reduce test-case reducer (repository README, v2.x). Accessed August 2026. publisher · read in our library knowledge/fetched/cmp_doctor_cvise.html · pin h163f3dffc43c9a5837980afb5d361f0bc587cd93e48d4a640035ca0941faa79b · accessed 2026-08-18 · vendor-docGrounds: The C-Vise column (bar v2.12.0): Test-case reduction at scale is coded Best for C-Vise and _ABSENT_ for Nishi (hand-swept shapeprobe N-sweeps); Per-function miscompile bisection notes that C-Vise reduces INPUTS where nx_cc_splice_bisect bisects FUNCTIONS -- complementary halves.
  6. [regehr2012] Regehr, J., Chen, Y., Cuoq, P., Eide, E., Ellison, C., Yang, X. Test-Case Reduction for C Compiler Bugs. PLDI 2012 (ACM SIGPLAN Conference on Programming Language Design and Implementation), doi 10.1145/2254064.2254104. Author-hosted preprint mirrored. publisher · read in our library knowledge/fetched/cmp_doctor_regehr2012.pdf · pin ha351d4eba11d7c167a5fd801b4b886dffde78b7c85566d7514d83547e42da360 · accessed 2026-08-18 · published-paperGrounds: Test-case reduction at scale -- the C-Reduce paper C-Vise ports: domain-specific reducers driven by a fixpoint of modular transformations that yield small, valid (UB-free) compiler test cases, versus delta debugging; the method the named nx_reduce rung would implement.
  7. [dwarf5] DWARF Debugging Information Format Committee. DWARF Debugging Information Format Version 5 (February 2017): merged .debug_info, new line-number program header, .debug_names, .debug_loclists and .debug_rnglists. Standard landing page with the PDF link. Accessed August 2026. publisher · read in our library knowledge/fetched/cmp_doctor_dwarf5.html · pin h85fb79ca401b4e2df172e6d87ca6d0198848a77c738ab07cb6bd334ac4c14e07 · accessed 2026-08-18 · published-standardGrounds: DWARF / source-line debug info -- the row that WAS the root blocker: nxasm now emits a DWARF v5 .debug_line plus section header table under -g, and this is the standard that line-number program conforms to; the honest limit (no .debug_info, function granularity) is stated in the same standard's terms.
  8. [binutils-readelf] GNU Binutils documentation. readelf -- displays information about ELF files, including --debug-dump of DWARF sections. Accessed August 2026. publisher · read in our library knowledge/fetched/cmp_doctor_binutils-readelf.html · pin h097abf4b2a48648228ca9c4f9eda0ef3c5efc353eb9100860e36b33865fc5c07 · accessed 2026-08-18 · vendor-docGrounds: DWARF / source-line debug info -- the EXTERNAL ruler the row insists on: GNU readelf 2.42 (an implementation nobody here wrote) resolves nx_probe_dbgtiny.nx line 5 at 0x400096 and line 9 at 0x4000ad on a real sovereign ELF, so the DWARF claim is validated against binutils rather than our own nx_addr2line reader.
  9. [dap-spec] Microsoft. Debug Adapter Protocol -- specification and overview (the wire protocol between development tools and debuggers). Accessed August 2026. publisher · read in our library knowledge/fetched/cmp_doctor_dap-spec.html · pin haf5dd0d09202b51ae44e92842ec63585e3b644895d91704dbfa9050e21080d11 · accessed 2026-08-18 · published-standardGrounds: IDE debug protocol (DAP) -- the protocol Delve implements (Best) and GDB partially; the row's _ABSENT_ nx_dap would speak this specification, which is why the row ties to the LSP gap in the lang census.

generated by nx_swcompare_matrix (sovereign NishiLang organ) from knowledge/compare/doctor.matrix · every Nishi cell verified against organ source at emit time · watch cells re-measured on every compare beat · zero JS, zero trackers