code wiki / _hdl_build / nx_team_pulse.nx
nx_team_pulse.nx source
↩ module page · 248 lines · 20275 B
1// nx_team_pulse.nx -- the CONDUCTOR's full team self-assessment PULSE, run as ONE unit (the RACI
2// clarification: "Conductor owns the grader loop"). Re-proves the claim set + refreshes every
3// grader role's durable output in sequence, then writes ONE PULSE verdict to
4// knowledge/status/team_pulse.log. This is the unit a scheduler (cron/boot/manual) repeats -- so the
5// scorecard's "run on the loop" race-to-exceed becomes real: each role's evidence is refreshed every
6// pulse, not only when a human drives a session. Orchestrates via fork/exec of the sovereign-built
7// /tmp/<name>.sov.elf binaries (built by nx_sov_build_run). license_tier: ORIGINAL
8import "nx_syscalls.nx"
9const K_MAGIC_100000: i64 = 100000
10const K_MAGIC_1000000: i64 = 1000000
11const K_MAGIC_2026: i64 = 2026
12func _p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
13func _pn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
14func _fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
15func _fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
16func tp_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
17// ---- CR4 intent WAL (crash-recovery ladder, spec 2026-06-10): the pulse JOURNALS itself
18// so a crash mid-pulse leaves an INTENT-START with no INTENT-DONE -- nx_boot_revive files
19// that orphan as a pm_plan row on next boot (work lost mid-flight stops being silent).
20// Best-effort: a WAL open failure never wedges the pulse. id = epoch*100000 + pid%100000.
21func tp_getpid() -> i64 { return __syscall(39, 0, 0, 0, 0, 0, 0) }
22func tp_intent_start() -> i64 {
23 let now: i64 = sys_now_realtime_sec()
24 let id: i64 = now * K_MAGIC_100000 + (tp_getpid() % K_MAGIC_100000)
25 let fd: i64 = sys_openat_append("knowledge/status/intent_wal.log" as *u8, 0x1a4)
26 if fd < 0 { return id }
27 _fp(fd, "INTENT-START id=" as *u8); _fn(fd, id)
28 _fp(fd, " name=nx_team_pulse epoch=" as *u8); _fn(fd, now)
29 _fp(fd, "\n" as *u8)
30 sys_close(fd)
31 return id
32}
33func tp_intent_done(id: i64, rc: i64) -> i64 {
34 let fd: i64 = sys_openat_append("knowledge/status/intent_wal.log" as *u8, 0x1a4)
35 if fd < 0 { return 0 }
36 _fp(fd, "INTENT-DONE id=" as *u8); _fn(fd, id)
37 _fp(fd, " rc=" as *u8); _fn(fd, rc)
38 _fp(fd, " epoch=" as *u8); _fn(fd, sys_now_realtime_sec())
39 _fp(fd, "\n" as *u8)
40 sys_close(fd)
41 return 0
42}
43// run /tmp/<name>.sov.elf, muted; return its exit code (or -1 if it could not exec).
44// SELF-HEALING (2026-06-10 crash lesson, same disease as the browser gate's certdata):
45// /tmp is tmpfs -- a reboot OR a concurrent session's cleanup deletes the step binary
46// and every step turns rc=127. If the /tmp binary is absent, fall back to the DURABLE
47// sovereign runner _offc/nx_sov_build_run.elf <name>, which rebuilds from settled
48// source, runs the module, and passes its exit through -- identical judgment, no 127s.
49func tp_run(name: *u8) -> i64 {
50 let path: *u8 = sys_mmap(256)
51 var o: i64 = 0
52 o = tp_cat(path, o, "/tmp/" as *u8); o = tp_cat(path, o, name); o = tp_cat(path, o, ".sov.elf" as *u8); path[o] = 0 as u8
53 var heal: i64 = 0
54 let probe: i64 = sys_openat_rd(path)
55 if probe >= 0 { sys_close(probe) } else { heal = 1 }
56 let pid: i64 = sys_fork()
57 if pid == 0 {
58 let argv: *i64 = sys_mmap(32) as *i64
59 let envp: *i64 = sys_mmap(16) as *i64; envp[0] = 0
60 let dn: i64 = sys_openat_wr("/dev/null" as *u8, 0x1a4); if dn >= 0 { sys_dup3(dn, 1, 0); sys_dup3(dn, 2, 0) }
61 if heal == 1 {
62 let sbr: *u8 = "_offc/nx_sov_build_run.elf" as *u8
63 argv[0] = sbr as i64; argv[1] = name as i64; argv[2] = 0
64 sys_execve(sbr, argv, envp)
65 }
66 argv[0] = path as i64; argv[1] = 0
67 sys_execve(path, argv, envp)
68 sys_exit(127)
69 }
70 let st: *i64 = sys_mmap(16) as *i64
71 sys_wait4(pid, st, 0)
72 if (st[0] % 128) != 0 { return 0 - 1 }
73 return (st[0] >> 8) & 0xff
74}
75// monotonic ms (same clock as auto_builder's ab_ms) -- the daemon SELF-MEASURES
76// its beat: each step's wall-time becomes visible in the log so the slowest steps
77// can be targeted. Measure before optimize.
78func tp_ms() -> i64 {
79 let ts: *i64 = sys_mmap(16) as *i64
80 sys_clock_gettime_mono(ts)
81 return ts[0] * 1000 + ts[1] / K_MAGIC_1000000
82}
83// run + report one step (TIMED: PULSE-STEP rows now carry ms= -> self-measuring beat)
84func tp_step(lfd: i64, name: *u8, acc: *i64) -> i64 {
85 let t0: i64 = tp_ms()
86 let rc: i64 = tp_run(name)
87 let dt: i64 = tp_ms() - t0
88 _p(" " as *u8); _p(name); _p(": " as *u8)
89 if rc == 0 { _p("OK\n" as *u8) } else { _p("NONZERO/CRASH rc=" as *u8); _pn(rc); _p("\n" as *u8) }
90 _fp(lfd, "PULSE-STEP name=" as *u8); _fp(lfd, name); _fp(lfd, " rc=" as *u8); _fn(lfd, rc); _fp(lfd, " ms=" as *u8); _fn(lfd, dt); _fp(lfd, "\n" as *u8)
91 acc[0] = acc[0] + 1
92 if rc == 0 { acc[1] = acc[1] + 1 }
93 return rc
94}
95// tail step group (split from main: 21+ tp_steps in ONE function trips an
96// nxasm encoding gap, rc=6 -- see R1-T1-004)
97// THE SELF-MANAGING LOOP, in causal order (each reads the prior's output):
98// grade -> generate -> migrate-marks -> reconcile-DONE -> count ->
99// sequence -> brief -> meter -> flag. Evidence-driven, hands-off, every
100// beat. Split into two groups: the rc=6 nxasm gap is FUNCTION-SIZE (hit at
101// ~10 tp_steps here, ~21 in the larger main -- R1-T1-004's quarry).
102func tp_tail_a(lfd: i64, acc: *i64) -> i64 {
103 tp_step(lfd, "nx_math_scorecard" as *u8, acc)
104 tp_step(lfd, "nx_rung_grade" as *u8, acc) // grade whole ladder from gate logs
105 tp_step(lfd, "nx_gap_to_queue" as *u8, acc) // RED/ABSENT rung -> autogenerated assignment
106 tp_step(lfd, "nx_mark_migrate" as *u8, acc) // map-listed rows gain literal MARK suffixes
107 tp_step(lfd, "nx_reconcile" as *u8, acc) // DONE flips on evidence (MARK rows), no session
108 tp_step(lfd, "nx_sponsor_review" as *u8, acc) // sponsor decisions applied; co-spec batch surfaced
109 tp_step(lfd, "nx_queue_load" as *u8, acc) // queue+sponsor surfaces -> sovereign store versions (IM-Q1)
110 tp_step(lfd, "nx_sponsor_page" as *u8, acc) // the sponsor cockpit page re-derived from the queue (X-I3 rung 1)
111 tp_step(lfd, "nx_ark_snapshot" as *u8, acc) // the ark: survival set CID-snapshot, skip-unchanged (X-REP-005)
112 return 0
113}
114
115// third step group (rc=6 landmine: tp_tail_steps reached 10 tp_step sites -- split again)
116func tp_tail_b(lfd: i64, acc: *i64) -> i64 {
117 tp_step(lfd, "nx_frontier" as *u8, acc) // X-PAR-004: ready-set = the parallel work surface; blocked name their domino
118 tp_step(lfd, "nx_role_parts" as *u8, acc) // X-ORC-006: the shared score, one extracted part per chair
119 tp_step(lfd, "nx_tempo" as *u8, acc) // X-HUM-001: growth/success/delivery -- the human lens, measured
120 tp_step(lfd, "nx_express_lane" as *u8, acc) // X-XL-002: consume tutor verbs exactly-once + SITREP (the dialogue wire)
121 tp_step(lfd, "nx_census_run" as *u8, acc) // X-AUT-003: every coverage claim proven, gaps NAMED (conf-driven)
122 tp_step(lfd, "nx_lang_maturity" as *u8, acc) // nishi-lang S-class-exceed climb, scored + ranked
123 tp_step(lfd, "nx_perf_panel" as *u8, acc) // speed/energy/efficiency: the #1 climb vs the energy study
124 tp_step(lfd, "nx_tutor_necessity" as *u8, acc) // the big-LLM-need set, measured + shrinking (role winddown visible)
125 tp_step(lfd, "nx_surface_census" as *u8, acc) // where are we emitting our own products (browser/game/kernel/dev) -- per beat
126 tp_step(lfd, "nx_conductor_notes" as *u8, acc) // X-REH-004: name the weakest section, self-call its drill
127 tp_step(lfd, "nx_ark_push" as *u8, acc) // deploys on BEATS only (B-bar): the ark ships itself, tutor hands off
128 return 0
129}
130
131// coherence-gate group (kept tiny on purpose: the rc=6 nxasm landmine is FUNCTION-SIZE).
132func tp_tail_c(lfd: i64, acc: *i64) -> i64 {
133 tp_step(lfd, "nx_capability_ladder" as *u8, acc) // NO-FLOATING law: every DONE capability must rest on a DONE foundation (CAPFLOAT names violations); the build-up map, hardware rung up
134 tp_step(lfd, "nx_root_trace" as *u8, acc) // NO-FLOATING GENEALOGY (twin of capability_ladder, over lineage.tsv): every organ must trace UP to the spore rv64im_min_sim; ROOTGAP names broken-links/floating-roots, all_traced=YES = the whole tree roots at genesis (re-measured every beat)
135 tp_step(lfd, "nx_dep_audit" as *u8, acc) // DEPS-COHERENCE (the Engineer's <10s dangling-dep probe): every deps token must name a real queue row; DEPAUDIT names each dangling dep + a best-match suggestion so the owner re-points it; deps_coherent=YES when none float on a ghost foundation
136 tp_step(lfd, "nx_kernel_census" as *u8, acc) // S-class-EXCEED benchmark: Nishi kernel/OS/drivers vs top incumbents (Linux/NT/XNU/CUDA/DirectX/Vulkan), measured per-feature from real gate evidence, refreshed every beat (exceed-progress visible as PRESENT rises)
137 tp_step(lfd, "nx_portability_census" as *u8, acc) // HAL reach: cross-hardware NATIVE-emit coverage (zero-cost portability layer, 14/16 ISAs), measured every beat
138 tp_step(lfd, "nx_cms_census" as *u8, acc) // CMS REACH vs WordPress: per-feature PRESENT/ABSENT computed from cms_gate.log, refreshed to cms_census.tsv every beat (666permil, 20/30 present)
139 tp_step(lfd, "nx_cms_exceed_census" as *u8, acc) // CMS EXCEED vs WordPress: per-feature measured-AHEAD head-to-head from cms_exceed.log (200permil, 6/30) -- reach!=wins, the two tracked separately so the gap stays honest
140 tp_step(lfd, "nx_ale_rsi_tick" as *u8, acc) // ALE RSI LOOP (the exam-driven self-improvement engine): measure the seed-task suite via the ALE-R1 harness -> ledger any GAPs -> auto-file NOVEL ALE-GAP-* rungs (lock-protected, idempotent); all-solved = safe no-op, a new unsolved task -> a rung the team builds -> re-attempt closes. The loop spins unattended every beat.
141 return 0
142}
143
144// MONITOR group (the owned RACI 'monitor' activity, added 2026-06-25): the team's CONTINUOUS BUILT-vs-LIVE +
145// responsibility surveillance, run every beat. supervisor=Accountable, engineer=Responsible (nishi_raci.tsv).
146// Runs LAST (after the coherence gate) so it judges THIS beat's settled state. Kept tiny on purpose (the rc=6
147// nxasm landmine is FUNCTION-SIZE). This is the activity whose ABSENCE let the kindle reader ship BUILT-not-LIVE.
148func tp_tail_d(lfd: i64, acc: *i64) -> i64 {
149 tp_step(lfd, "nx_lineage_raci" as *u8, acc) // RESPONSIBILITY LINEAGE: every god-rooted node has an accountable chair (un-owned=0) -- the ownership twin of nx_root_trace's orphans=0
150 tp_step(lfd, "nx_reader_liveness" as *u8, acc) // CAPABILITY LIVENESS: every format the library holds is BUILT + WIRED into the deployed serving binary (BUILT-not-LIVE gaps=0)
151 tp_step(lfd, "nx_team_exceed_census" as *u8, acc) // MEASURED s-class-exceed scorecard (manage/build/monitor, anti-wave guard) re-graded every beat -- a regressed EXCEEDS shows up next pulse
152 tp_step(lfd, "nx_practice_curriculum" as *u8, acc) // TRAIN (RACI train: teacher=A/coach=R/referee=C): the tools practice a GRADUATED curriculum graded on HELD-OUT (no cheating) -> the grow-beyond-linear signal + memorizer caught, re-proven every beat
153 tp_step(lfd, "nx_ecomat_beat" as *u8, acc) // ECOSYSTEM FLYWHEEL (R3): re-measure the whole maturity board (grades live-derived from each live source), re-rank build-targets into the queue (idempotent), re-publish the /wiki dashboard -- the maturity loop turns itself, every beat
154 tp_step(lfd, "nx_stackaudit_census" as *u8, acc) // FULL-STACK LADDER AUDIT (K_MAGIC_2026-07-02 operator audit made STANDING): re-derive every rung R0-silicon..R12-autonomy from real knowledge/status evidence (anti-rot liar-kill: expected-evidence-missing => RED) + re-emit web_assets/stack_audit.html -- the audit regenerates itself every beat, no session in the loop
155 tp_step(lfd, "nx_cert_autorenew" as *u8, acc) // CERT AUTO-RENEW (closes the silent-cert-lapse gap): TLS-probe the LIVE per-domain SNI certs; any inside the 21d warn window -> sovereign LE wildcard re-issue + push + reload + verify, unattended. Self-throttled (daily-check guard + one renew/domain/day) so the per-beat call is cheap, idempotent + LE-budget-safe.
156 tp_step(lfd, "nx_code_review" as *u8, acc) // AUTOMATED CODE REVIEW (en.wikipedia.org/wiki/Automated_code_review, made sovereign): the coordinator that maps every industry code-review axis (linting/static-analysis, coding-conventions/maintainability, defects, security+secret SAST, architecture-constraints/circular-deps, magic-numbers, evidence-not-assertion, license/provenance, CI pre-commit gate, on-cadence) to the real Nishi organ that implements it (opened on disk = prove-not-assert) AND live-runs the installed scanner on a dirty+clean control (dirty trips findings, clean scores 0 = the can-fail control). GREEN only if 11/11 axes present + the review discriminates. So every beat re-proves automated code review is present AND running -- this step IS the 'running' part for the review plane.
157 return 0
158}
159
160func tp_tail_steps(lfd: i64, acc: *i64) -> i64 {
161 tp_tail_a(lfd, acc)
162 tp_tail_b(lfd, acc)
163 tp_step(lfd, "nx_queue_health" as *u8, acc) // counts + dep-drift over the (grown) queue
164 tp_step(lfd, "nx_queue_cohesion" as *u8, acc) // anti-sprawl: dup rows RED, ledger-gap census (X-CONS-003)
165 tp_step(lfd, "nx_assign_next" as *u8, acc) // Conductor sequences the next pick (PM-owned w)
166 tp_step(lfd, "nx_attempt_loop" as *u8, acc) // Warden acts on the pick: EXEC attempt or raise (X-Q-003)
167 tp_step(lfd, "nx_tutor_brief" as *u8, acc) // briefs for raised hands (token lever)
168 tp_step(lfd, "nx_token_meter" as *u8, acc) // closed-per-visit trend
169 tp_step(lfd, "nx_team_digest" as *u8, acc) // the operator flag (text + nishifamily HTML)
170 tp_step(lfd, "nx_engineer_triage" as *u8, acc) // ENGINEER: red arc -> failing rows + Doctor row (PURE-NISHI triage)
171 tp_step(lfd, "nx_autonomy_meter" as *u8, acc) // X-AUT-002: the grade measured from ledgers every beat
172 tp_tail_c(lfd, acc) // coherence gate LAST: map reflects all of this beat's status changes
173 tp_tail_d(lfd, acc) // MONITOR (owned RACI activity): responsibility-lineage + capability-liveness, after coherence so it judges this beat's settled state
174 return 0
175}
176
177func main() -> i64 {
178 _p("=== TEAM PULSE (Conductor): re-prove + refresh every grader role, as one loop unit ===\n" as *u8)
179 let iid: i64 = tp_intent_start()
180 let lfd: i64 = sys_openat_append("knowledge/status/team_pulse.log" as *u8, 0x1a4)
181 if lfd < 0 { _p(" pulse log open failed\n" as *u8); tp_intent_done(iid, 1); sys_exit(1); return 1 }
182 _fp(lfd, "PULSE-RUN epoch=" as *u8); _fn(lfd, sys_now_realtime_sec()); _fp(lfd, "\n" as *u8)
183 let acc: *i64 = sys_mmap(16) as *i64
184 acc[0] = 0 // steps run
185 acc[1] = 0 // steps ok
186 // the assessment chain (each is sovereign-built; prove_all itself re-runs the 7 graders)
187 // triage FIRST: what is running / crashed / recoverable -- no grading on a dead substrate
188 tp_step(lfd, "nx_system_triage" as *u8, acc)
189 // BOOT REVIVE second (Doctor, CR5 continuous self-resurrection): every recoverable
190 // absence + every down daemon is healed EVERY BEAT, not only at boot -- a mid-day /tmp
191 // wipe or daemon death now lasts at most one beat interval. Idempotent (presence probes
192 // + pidfile dup-guard); near-instant when the substrate is healthy.
193 tp_step(lfd, "nx_boot_revive" as *u8, acc)
194 // registry health SECOND: check->heal->recheck the capability registry (live /tmp cache +
195 // NTFS journal) BEFORE any grader reads or writes it -- the 2026-06-10 crash+collision
196 // repair made self-running (nx_capreg_health_run; verdict also in capreg_health.log)
197 tp_step(lfd, "nx_capreg_health_run" as *u8, acc)
198 tp_step(lfd, "nx_prove_all" as *u8, acc)
199 tp_step(lfd, "nx_security_status" as *u8, acc)
200 tp_step(lfd, "nx_security_audit" as *u8, acc)
201 // SECRET-SCAN GATE (verb: VERIFY): 5 KATs on the plaintext-credential detector +
202 // production posture scan + idempotent SENTINEL-RESOLVE when clean (2026-06-10)
203 tp_step(lfd, "nx_secret_scan_gate" as *u8, acc)
204 // ENTROPY + VAULT-V3 gates (verb: VERIFY, 2026-06-10): kernel CSPRNG organ healthy +
205 // random-iv seal format round-trips + legacy v2 still opens + live nas get. (The heavier
206 // nx_pw_rotate_gate -- argon2id x4 -- is registered + on-demand, not per-beat.)
207 tp_step(lfd, "nx_entropy_gate" as *u8, acc)
208 tp_step(lfd, "nx_vault_v3_gate" as *u8, acc)
209 // SENTINEL (verb: WATCH): repeated security-relevant signals in the issues log
210 // escalate to pm_plan_durable.log until a SENTINEL-RESOLVE mark lands (2026-06-10)
211 tp_step(lfd, "nx_security_sentinel" as *u8, acc)
212 tp_step(lfd, "nx_debt_audit" as *u8, acc) // hardware-up: no silent debt, no untracked workaround (S-class discipline)
213 tp_step(lfd, "nx_examiner_report" as *u8, acc)
214 tp_step(lfd, "nx_role_scorecard" as *u8, acc)
215 // TRAIN-TRIAGE SWEEP (CONDUCTOR wiring of the Doctor's diagnosis organ, 2026-06-10):
216 // every training report in train_reports.conf diagnosed each beat; a verdict CHANGE
217 // auto-files a PM-ESCALATION row exactly once; BROKEN report = nonzero = ATTENTION
218 tp_step(lfd, "nx_train_triage_sweep" as *u8, acc)
219 // pattern-census drift gate (AUDITOR): emitters vs library/classifier coverage -- catches the
220 // concurrent-arc skew (proven 2026-06-10: emitters at shape 14, census stuck at 10)
221 tp_step(lfd, "nx_classifier_sync" as *u8, acc)
222 // the standing WORK LOOP (RESEARCHER's pick via Conductor): re-derive the next research target
223 // from the live backlog file every beat -> knowledge/status/work_next.log
224 tp_step(lfd, "nx_work_pulse_run" as *u8, acc)
225 // SEARCH REACH (SREACH R4, 2026-06-10): re-prove the facet gate + the reach/exceed
226 // leaderboard every beat; appends the SREACH-PULSE verdict row the Examiner grades
227 tp_step(lfd, "nx_search_reach_pulse" as *u8, acc)
228 // SREACH S-class scorecard (Auditor GRADE, gate-derived): rungs from gate logs +
229 // NAMED gaps to full-field exceed -- assessment auto-refreshes, never asserted
230 tp_step(lfd, "nx_sreach_scorecard" as *u8, acc)
231 // tail step group split into its own function: a 21st tp_step in main hits
232 // an nxasm encoding gap (NXASM-FAIL rc=6; function-size/displacement class;
233 // min-repro filed as queue row R1-T1-004 -- the diff-harness arc's quarry)
234 tp_tail_steps(lfd, acc)
235 // EXAMINER per-arc grading LAST (verb: EXAMINE): every arc's gate log must show a green LAST
236 // verdict -- runs after all graders so it judges THIS beat's fresh evidence (examiner_arcs.conf)
237 tp_step(lfd, "nx_examiner_arcs" as *u8, acc)
238 _p(" --- PULSE: " as *u8); _pn(acc[1]); _p("/" as *u8); _pn(acc[0]); _p(" steps green ---\n" as *u8)
239 _fp(lfd, "PULSE-VERDICT steps=" as *u8); _fn(lfd, acc[0]); _fp(lfd, " ok=" as *u8); _fn(lfd, acc[1])
240 if acc[1] == acc[0] { _fp(lfd, " verdict=ALL-GREEN\n" as *u8) } else { _fp(lfd, " verdict=ATTENTION\n" as *u8) }
241 sys_close(lfd)
242 _p(" Conductor pulse: knowledge/status/team_pulse.log (repeat this unit on a schedule = the loop)\n" as *u8)
243 if acc[1] == acc[0] { _p(" TEAM PULSE: ALL-GREEN\n" as *u8); tp_intent_done(iid, 0); sys_exit(0); return 0 }
244 _p(" TEAM PULSE: ATTENTION (a step was nonzero -- see steps above)\n" as *u8)
245 tp_intent_done(iid, 1)
246 sys_exit(1)
247 return 1
248}