nx_jobclaim_reap.nx
buildroot/runtime/nx_jobclaim_reap.nx
about
nx_jobclaim_reap.nx -- THE SANCTIONED WAY TO RETIRE A DEAD _jobs CLAIM.
WHY THIS EXISTS (debt 1787259805, measured 2026-08-20). nx_joblost_gate correctly reports LOST=4
against a ratchet floor of 1 and is therefore RED. The four claims are real: ids 1786132743,
1786239344, 1786732031 and 1786927039, aged 3.8 to 13.0 days, reservations that were made and
never came back. THE GATE IS CORRECT AND THE FLOOR MUST NOT BE RAISED -- loosening a ratchet to
flatter a number is editing the detector instead of fixing what it found.
The blocker was that the estate had NO VERB for removing a dead claim: nx_retire_path refuses
`_jobs/x` as too shallow, and nx_capsearch over 1,187 tools finds no incumbent (nx_orphan_reap
reaps DAEMONS by cmdline, nx_tmpstore_reap reaps seg-store FAMILIES, nx_claims reap works the
session-lease JOURNAL, nx_toolreg_reap works allowlist ROWS). Four things were blocked by one
missing verb: the gate cannot be bite-proven while its baseline is RED, so nx_gate_bite reports
UNCONTROLLED, so nx_gate_roster_run correctly refuses to admit it to the 630-row roster.
THIS ORGAN IS THE ACTUATOR, NOT THE CENSUS. It takes ids and acts on exactly those.
The WORKLIST comes from nx_joblost_gate, which already scans the plane and prints
`LOST job_<id> age=<n>s`. Building a second directory scanner here would be a duplicate ruler,
and a sweep verb would make every reap an unnamed bulk act instead of an auditable one.
IT DOES NOT DELETE. It APPENDS a tombstone (rule 13): the claim keeps its original marker and
gains `state=REAPED ts=<now> age=<n>s by=nx_jobclaim_reap`. The reader that must understand that
tombstone -- nx_joblost_gate -- imports the SAME classifier from nx_jobclaim_lib, because a
reaper shipped alone is a no-op that looks like a fix.
EVERY REFUSAL NAMES ITS RULE. ABSENT, DONE, HAS-OUT, TOO-YOUNG and UNPARSED are five different
answers with five different remedies; a single "refused" would send the reader to re-derive by
hand the examination this organ just performed.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_jobclaim_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 33 | const JRC_EXIT_OK: i64 = 0 |
| 34 | const JRC_EXIT_REFUSED: i64 = 1 |
| 35 | const JRC_EXIT_USAGE: i64 = 2 |
| 36 | const JRC_EXIT_BLOCKED: i64 = 3 |
| 37 | const JRC_ARGV_VERB: i64 = 1 |
| 38 | const JRC_ARGV_FIRST: i64 = 2 |
| 39 | const JRC_MIN_ARGC: i64 = 3 |
functions
| 41 | func jrc_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 43 | func jrc_n(v: i64) -> i64 |
| 50 | func jrc_usage() -> i64 |
| 61 | func jrc_opt(arg: *u8, key: *u8) -> *u8 |
| 70 | func main(argc: i64, argv: *i64) -> i64 |