code wiki / _hdl_build / nx_issue_intake_gate_t181.nx

nx_issue_intake_gate_t181.nx source

↩ module page · 46 lines · 15891 B

1import "nx_issue_intake_candidate_t181.nx" 2import "nx_gate_verdict.nx" 3func main()->i64{ 4 let c:*i64=gv_ctr();gv_head("issue intake typed observation and real store gate") 5 let fs:*i64=sys_mmap(IIV_FIELDS*8) as *i64;let ns:*i64=sys_mmap(IIV_FIELDS*8) as *i64 6 let q0:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 7 gv_check("real incident accepted",(iiv_parse(q0,ss_len(q0),fs,ns)==0)==1,c) 8 let q1:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"external\",\"kind\":\"opportunity\",\"observed_at\":1789270523,\"source_ref\":\"https://docs.nvidia.com/nsight-graphics/UserGuide/gpu-trace-overview.html\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 9 gv_check("external opportunity accepted",(iiv_parse(q1,ss_len(q1),fs,ns)==0)==1,c) 10 let q2:*u8="{\"schema\":\"bad\",\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 11 gv_check("duplicate field rejected",(iiv_parse(q2,ss_len(q2),fs,ns)==0)==0,c) 12 let q3:*u8="{\"sch\\u0065ma\":\"bad\",\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 13 gv_check("escaped duplicate rejected",(iiv_parse(q3,ss_len(q3),fs,ns)==0)==0,c) 14 let q4:*u8="{\"schema\\u0000suffix\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 15 gv_check("embedded NUL key rejected",(iiv_parse(q4,ss_len(q4),fs,ns)==0)==0,c) 16 let q5:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null,\"extra\":true}" 17 gv_check("unknown field rejected",(iiv_parse(q5,ss_len(q5),fs,ns)==0)==0,c) 18 let q6:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 19 gv_check("missing field rejected",(iiv_parse(q6,ss_len(q6),fs,ns)==0)==0,c) 20 let q7:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"a\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 21 gv_check("bad event id rejected",(iiv_parse(q7,ss_len(q7),fs,ns)==0)==0,c) 22 let q8:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":2,\"cached_input_tokens\":3,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 23 gv_check("cached greater than input rejected",(iiv_parse(q8,ss_len(q8),fs,ns)==0)==0,c) 24 let q9:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 25 gv_check("unknown counters preserved",(iiv_parse(q9,ss_len(q9),fs,ns)==0)==1,c) 26 let q10:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"deployed\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 27 gv_check("deployed without evidence rejected",(iiv_parse(q10,ss_len(q10),fs,ns)==0)==0,c) 28 let q11:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"deployed\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":\"candidate\",\"review_ref\":\"review\",\"verification_ref\":\"original-api\",\"release_ref\":\"release\",\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 29 gv_check("asserted deployment with refs accepted as observation",(iiv_parse(q11,ss_len(q11),fs,ns)==0)==1,c) 30 let q12:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}{}" 31 gv_check("trailing content rejected",(iiv_parse(q12,ss_len(q12),fs,ns)==0)==0,c) 32 let q13:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":1.2,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 33 gv_check("fractional tokens rejected",(iiv_parse(q13,ss_len(q13),fs,ns)==0)==0,c) 34 let q14:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"nx_mgmt_api\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":9223372036854775808,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 35 gv_check("overflow tokens rejected",(iiv_parse(q14,ss_len(q14),fs,ns)==0)==0,c) 36 let q15:*u8="{\"schema\":\"nishi.issue-observation.v1\",\"event_id\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"issue_id\":\"organ-argument-capacity\",\"origin\":\"internal\",\"kind\":\"failure\",\"observed_at\":1789270523,\"source_ref\":\"buildroot/knowledge/gates/organ-capacity-live-deployment-t181.json\",\"source_sha256\":null,\"source_offset\":null,\"owner\":\"\\ud800\",\"operation\":\"POST /api/organ_run\",\"asserted_stage\":\"detected\",\"reason\":\"Thirteen admitted arguments rejected by fixed twelve-argument capacity.\",\"reproduction_ref\":null,\"repair_ref\":null,\"review_ref\":null,\"verification_ref\":null,\"release_ref\":null,\"elapsed_ms\":null,\"input_tokens\":null,\"cached_input_tokens\":null,\"output_tokens\":null,\"quality_verdict\":null,\"resource_ref\":null,\"previous_event_id\":null}" 37 gv_check("invalid Unicode rejected",(iiv_parse(q15,ss_len(q15),fs,ns)==0)==0,c) 38 let prefix:*u8=sys_mmap(160);let pe:i64=ss_catn(prefix,ss_cat(prefix,0,"/tmp/nishi-issue-intake-t181-"),sys_now_ms());prefix[pe]=0 39 gv_check("first real store commit",iiv_record(prefix,q0,ss_len(q0))==0,c) 40 let first:i64=ss_max_segid(prefix) 41 gv_check("repeat exact observation is idempotent",iiv_record(prefix,q0,ss_len(q0))==1,c) 42 gv_check("repeat does not add segment",ss_max_segid(prefix)==first,c) 43 gv_check("same id different bytes refuses",iiv_record(prefix,q1,ss_len(q1))==-3,c) 44 gv_check("conflict does not add segment",ss_max_segid(prefix)==first,c) 45 return gv_verdict("issue-intake-t181",c,"Typed observations and persistence; not autonomous repair qualification") 46}