code wiki / _hdl_build / nx_trusted_flag.nx

nx_trusted_flag.nx

buildroot/runtime/_hdl_build/nx_trusted_flag.nx

7518 B155 linesdepth 21pulls 154 transitivereach 1 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_trusted_flag.nx -- the TRUSTED scope's write side (operator's 3-scope model 2026-07-04): a client FLAGS an external web resource as a GOOD reference. Fetches the exact page (sovereign TLS, NO crawl -- trusted = curated, not discovered), extracts text, and ingests it into the shared "trusted" seg_store shard (dp-trusted-pub-): doc:<cid> = text, url:<cid> = the real url, trust:<cid> = the flagging client(s) (append-only provenance; a second flagger's name is appended, never clobbered). Idempotent by content cid. usage: nx_trusted_flag <url> <flagger> The READ side is scope=trusted in dss_serve/dss_api_search (a plain shard swap -- same engine). license_tier: ORIGINAL

dependencies 4 imports · 1 importers

nx_corpus_ingest.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_https_fetch_follow.nx nx_trusted_flag.nx nx_trusted_flag_gate.nx

imports: nx_corpus_ingest.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_https_fetch_follow.nx

imported by: nx_trusted_flag_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main tf_puts tf_len nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id

structs

none

consts

13const K_MAGIC_4194304: i64 = 4194304
14const K_MAGIC_4096: i64 = 4096
15const K_MAGIC_8388608: i64 = 8388608
16const K_MAGIC_1048576: i64 = 1048576
17const K_MAGIC_4090: i64 = 4090

functions

19func tf_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
20func tf_num(v: i64) -> i64
called by 1: main
29func tf_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main
31func tf_mktrustkey(cid: i64, out: *u8) -> i64
called by 2: mainmain
45func tf_has_flagger(val: *u8, vl: i64, flagger: *u8, fl: i64) -> i64
called by 2: mainmain
64func main(argc: i64, argv: *i64) -> i64