code wiki / (root) / nx_mediaflow_gate.nx

nx_mediaflow_gate.nx

buildroot/runtime/nx_mediaflow_gate.nx

10428 B146 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_mediaflow_gate.nx -- the referee for nx_mediaflow_lib (aesthetictwin AT36, 2026-09-17). The library turns caller input into a directory name, a store prefix and plan COLUMNS, so its first job is the boundary: a slug or a path that carries a tab, a newline, a space, a dot-dot or a root outside the three media roots is refused. Then the pieces the one-call workflow stands on: the file name and extension readers (a dot in a DIRECTORY is not an extension), the directory maker, the oracle-row picker (exact file-column match, CRLF tolerated, the path rewritten, one row out) and the plan compiler, held to a byte-exact known answer and to five rows whose tools are the five workflow steps in order. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_mediaflow_lib.nx nx_mediaflow_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_mediaflow_lib.nx

imported by: nobody (leaf or entry point)

structs

none

consts

12const FG_DIR: *u8 = "/tmp/mediaflow_gate"
13const FG_DEEP: *u8 = "/tmp/mediaflow_gate/a/b/c"
14const FG_DEEP_FILE: *u8 = "/tmp/mediaflow_gate/a/b/c/probe.txt"
15const FG_ORACLE: *u8 = "/tmp/mediaflow_gate/many.oracle"
16const FG_PICKED: *u8 = "/tmp/mediaflow_gate/one.oracle"
17const FG_NOPICK: *u8 = "/tmp/mediaflow_gate/none.oracle"
18const FG_ABSENT: *u8 = "/tmp/mediaflow_gate/absent/none.oracle"
20const FG_ORACLE_TEXT: *u8 = "# oracle rows\noracle|a.jpg|sha-a|768|1014|1|11,12|13,14\noracle|xb.jpg|sha-x|640|480|1|91,92|93,94\noracle|b.jpg|sha-b|512|384|1|21,22|23,24\r\n"
21const FG_MEDIA_B: *u8 = "knowledge/fetched/b.jpg"
22const FG_MEDIA_NONE: *u8 = "knowledge/fetched/zzz.jpg"
23const FG_PICKED_EXPECT: *u8 = "oracle|knowledge/fetched/b.jpg|sha-b|512|384|1|21,22|23,24\n"
24const FG_KAT_SLUG: *u8 = "s1"
25const FG_KAT_MEDIA: *u8 = "knowledge/fetched/m.jpg"
26const FG_KAT_OUTDIR: *u8 = "sites/nishifamily/compare/aesthetictwin/media/s1"
27const FG_KAT_ROWS: *u8 = "1\tnx_mvault\tclassify\tknowledge/fetched/m.jpg\treal\tmediaflow-s1\tjpg\n2\tnx_mediajudge\tjudge\ts1\tknowledge/fetched/m.jpg\tsites/nishifamily/compare/aesthetictwin/media/s1\t-\t/compare/aesthetictwin/media/s1/\n3\tnx_store_seed\tknowledge/store/asset-s1-\tsites/nishifamily/compare/aesthetictwin/media/s1/s1.plane.tsv\n4\tnx_asset_page\temit\tknowledge/store/asset-s1-\ts1\tsites/nishifamily/compare/aesthetictwin/media/s1/index.html\n5\tnx_page_verify\thttps://nishifamily.com/compare/aesthetictwin/media/s1/\n"
28const FG_SLUG_65: *u8 = "a1234567890123456789012345678901234567890123456789012345678901234"
29const FG_MODE755: i64 = 493
30const FG_MODE644: i64 = 420
31const FG_COL_TOOL: i64 = 1
32const FG_I64: i64 = 8

functions

34func fg_write(path: *u8, text: *u8) -> i64
42func fg_file_is(path: *u8, text: *u8) -> i64
49func fg_exists(path: *u8) -> i64
57func fg_row_tool(rows: *u8, n: i64, k: i64, tool: *u8) -> i64
72func fg_count_nl(buf: *u8, n: i64) -> i64
79func main(argc: i64, argv: *i64) -> i64