code wiki / _hdl_build / nx_capgraph_edges.nx

nx_capgraph_edges.nx

buildroot/runtime/_hdl_build/nx_capgraph_edges.nx

20222 B458 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic capgraph
docsdependenciesstructsconstsfunctions

about

nx_capgraph_edges.nx -- DERIVES the capability graph's prerequisite edges FROM THE IMPORT CLOSURE. WHY (debt 1785518444, filed by me 2026-07-31): nx_capgraph_derive shipped reading a HAND-DECLARED edge file. Declared edges are a seed, not a measurement, and a MISSING edge is the dangerous case -- it lets a dependent read healthier than the layer it stands on. This organ replaces the declaration with a measurement. THE MEASUREMENT, end to end, no taste anywhere in it: 1. OWNERSHIP comes from knowledge/compare/<domain>.matrix, which already maps every domain to the real organ SOURCE PATHS backing each of its capabilities (field2), with field3 = the symbol. Rows whose symbol is _ABSENT_ are declared GAPS -- skipped, they own nothing. 2. DEPENDENCY comes from the source itself: every `import "<module>.nx"` in an owned source. 3. EDGE: if a source owned by domain A imports a module owned by domain B (B != A), then B is a PREREQUISITE of A. That is a fact about the build, not an opinion about the architecture. ⚠THE MEASURED GRAPH IS NOT ACYCLIC. Probed 2026-07-31: search>webscraping, browser>webscraping AND webscraping>browser, search>deepresearch AND deepresearch>search, comms>videoops AND videoops>comms. Mutually-importing domains are REAL. This is not a defect in the measurement and must not be "cleaned up" by dropping edges: a cycle is a genuine finding -- it names a CO-DEPENDENT CLUSTER that can only be raised together. The consumer's min-relaxation is a fixpoint iteration bounded by node count, so it converges on a general digraph; the cycle members simply share a floor. HONEST ENVELOPE, emitted into the file itself so no reader has to trust this comment: - coverage is bounded by the matrices, not by this organ: a domain with few matrix rows yields few edges. That is a matrix-completeness gap, and it is REPORTED, never silently treated as "no deps". - matrix rows pointing at sources that do not exist on disk are COUNTED and reported (missing=N). - first-wins ownership when two domains claim the same module; ambiguity is COUNTED and reported. nx_capgraph_edges [outfile] exit 0 ok | 4 capture-fail | 5 write-fail license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 1 imports · 0 importers

nx_capgraph_edges_lib.nx nx_capgraph_edges.nx

imports: nx_capgraph_edges_lib.nx

imported by: nobody (leaf or entry point)

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

main ce_init ce_load_depth sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close tr_run1 sys_mmap ↻ tr_run_capture sys_mmap ↻ sys_pipe2 sys_fork sys_close ↻ sys_dup3 sys_execve_clean sys_close ↻ sys_execve sys_exit sys_read ↻ sys_wait4 wait_exit_code ce_dom_add ce_cpy ce_cpy ↻ ce_dom_name ce_read_into_buf sys_read ↻ ce_field ce_basename ce_cpy ↻ ce_own_add ce_own_idx cg_streq ce_cpy ↻ ce_src_add ce_cpy ↻ cax_puts

structs

none

consts

none

functions

33func main(argc: i64, argv: *i64) -> i64