code wiki / (root) / nx_pushback_publish_gate.nx

nx_pushback_publish_gate.nx

buildroot/runtime/nx_pushback_publish_gate.nx

22754 B296 linesdepth 9pulls 29 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_pushback_publish_gate.nx -- THE COMMUNITY PUSH-BACK GATE (/compare/modding MD23, 2026-09-06). A three-member house package (an OBJ, a PNG under a subdirectory, a VMD) is written under /tmp/nx_pushback_publish_gate/pkg/ at runtime with one cc0 row on a SCRATCH journal, a scratch community table (two dist targets, one api-desc target, one target demanding YES) and a referee grade file. The rung's done-rule is the spine: one house character publishes to two communities with IDENTICAL manifests (the written copies hash equal to each other and to the source), the archive is a real 7z the estate's own reader counts, the content id is the sha256 of the written archive, the index row and the publish row carry the licence and the grade; and every refusal the rung names is REFUSED BY NAME: a rip whose journal row carries a licence class the rights table lacks (PROVENANCE UNKNOWN-LICENCE, cleared by a superseding journal row without re-emitting), a non-redistributable package licence below the community floor, a tampered member and a forged head (MANIFEST-REFUSED), a missing or out-of-range grade (UNGRADED), an unknown community, an unreadable table or manifest. The command is the second witness through the ladder on the PRODUCTION community table (usage, the default grade path, the communities verb). usage: nx_pushback_publish_gate (no args) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gatekit_lib.nx nx_pushback_lib.nx nx_pushback_publish_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gatekit_lib.nxnx_pushback_lib.nx

imported by: nobody (leaf or entry point)

structs

none

consts

19const PG_DIR: *u8 = "/tmp/nx_pushback_publish_gate"
20const PG_PKG: *u8 = "/tmp/nx_pushback_publish_gate/pkg"
21const PG_TEX: *u8 = "/tmp/nx_pushback_publish_gate/pkg/textures"
22const PG_A_REL: *u8 = "a.obj"
23const PG_B_REL: *u8 = "textures/b.png"
24const PG_C_REL: *u8 = "c.vmd"
25const PG_A: *u8 = "/tmp/nx_pushback_publish_gate/pkg/a.obj"
26const PG_B: *u8 = "/tmp/nx_pushback_publish_gate/pkg/textures/b.png"
27const PG_C: *u8 = "/tmp/nx_pushback_publish_gate/pkg/c.vmd"
28const PG_JRNL: *u8 = "/tmp/nx_pushback_publish_gate/assets.jrnl"
29const PG_CONF: *u8 = "/tmp/nx_pushback_publish_gate/communities.conf"
30const PG_CONF_ABSENT: *u8 = "/tmp/nx_pushback_publish_gate/absent.conf"
31const PG_GRADE: *u8 = "/tmp/nx_pushback_publish_gate/referee.grade"
32const PG_GRADE_BAD: *u8 = "/tmp/nx_pushback_publish_gate/bad.grade"
33const PG_GRADE_ABSENT: *u8 = "/tmp/nx_pushback_publish_gate/absent.grade"
34const PG_GRADE_IN_PKG: *u8 = "/tmp/nx_pushback_publish_gate/pkg/referee.grade"
35const PG_OUT1: *u8 = "/tmp/nx_pushback_publish_gate/out1"
36const PG_OUT2: *u8 = "/tmp/nx_pushback_publish_gate/out2"
37const PG_OUT3: *u8 = "/tmp/nx_pushback_publish_gate/out3"
38const PG_CLI_ARCHIVE: *u8 = "/tmp/nx_pushback_publish_gate/pkg/pushback/nishi-dist/house-cape-1.2.0.7z"
39const PG_M1: *u8 = "/tmp/nx_pushback_publish_gate/one.nxmod"
40const PG_M_NC: *u8 = "/tmp/nx_pushback_publish_gate/nc.nxmod"
41const PG_M_RIP: *u8 = "/tmp/nx_pushback_publish_gate/rip.nxmod"
42const PG_M_FORGED: *u8 = "/tmp/nx_pushback_publish_gate/forged.nxmod"
43const PG_M_ABSENT: *u8 = "/tmp/nx_pushback_publish_gate/absent.nxmod"
44const PG_ELF_LIVE: *u8 = "./nx_pushback_publish.elf"
45const PG_ELF_STAGE: *u8 = "./nx_pushback_publish.sov.elf.new"
46const PG_ELF_BUILD: *u8 = "buildroot/_build/nx_pushback_publish.sov.elf"
47const PG_NAME: *u8 = "house-cape"
48const PG_VER: *u8 = "1.2.0"
49const PG_GAMES: *u8 = "skyrimse,palworld"
50const PG_DEPS: *u8 = "nx_base@1.0"
51const PG_LIC: *u8 = "cc0-1.0"
52const PG_LIC_NC: *u8 = "cc-by-nc-4.0"
53const PG_LIC_RIP: *u8 = "rip-licence-unknown-zz"
54const PG_SRC_URL: *u8 = "https://example.invalid/house-cape"
55const PG_RIP_URL: *u8 = "https://ripsite.invalid/dark-elf-blader"
56const PG_ORIGIN: *u8 = "nx_pushback_publish_gate"
57const PG_EPOCH: i64 = 1788713000
58const PG_EPOCH2: i64 = 1788713001
59const PG_PERMIL: i64 = 812
60const PG_CAP: i64 = 65536
61const PG_DIR_MODE: i64 = 493
62const PG_FILE_MODE: i64 = 420
63const PG_A_LEN: i64 = 40
64const PG_B_LEN: i64 = 40
65const PG_C_LEN: i64 = 30
66const PG_VMD_MAGIC_LEN: i64 = 25
67const PG_MEMBERS: i64 = 3
68const PG_ARCHIVE_MEMBERS: i64 = 4
69const PG_CONF_ROWS: i64 = 4
70const PG_ARCH_NAME: *u8 = "house-cape-1.2.0.7z"
71const PG_MAN_NAME: *u8 = "house-cape-1.2.0.nxmod"
72const PG_COMM_2: *u8 = "nishi-dist,nishi-swarm"
73const PG_COMM_3: *u8 = "nishi-dist,nishi-swarm,nexus-desc"
74const PG_COMM_DIST: *u8 = "nishi-dist"
75const PG_COMM_STRICT: *u8 = "strict-only"
76const PG_COMM_NOBODY: *u8 = "nobody"
77const PG_CONF_TEXT: *u8 = "community|nishi-dist|dist|https://nishifamily.com/dist|1|scratch dist target\ncommunity|nishi-swarm|dist|magnet|1|scratch swarm target\ncommunity|nexus-desc|api-desc|https://api.nexusmods.com/v1|2|scratch descriptor target\ncommunity|strict-only|dist|magnet|2|demands an outright YES\n"
78const PG_GRADE_TEXT: *u8 = "grade|812|cjc_panel|2026-09-06\n"
79const PG_GRADE_BAD_TEXT: *u8 = "grade|1500|cjc_panel|2026-09-06\n"

functions

81func pg_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
82func pg_write_file(path: *u8, b: *u8, n: i64) -> i64
90func pg_write_text(path: *u8, s: *u8) -> i64 { return pg_write_file(path, s, mm_len(s)) }
91func pg_same_file(a: *u8, b: *u8) -> i64
103func pg_join(dir: *u8, name: *u8) -> *u8 { let o: *u8 = sys_mmap(PB_PATH_CAP); mm_join_path(dir, name, o); return o }
104func pg_join3(dir: *u8, sub: *u8, name: *u8) -> *u8 { return pg_join(pg_join(dir, sub), name) }
105func pg_write_a() -> i64 { return pg_write_file(PG_A, "v 0 0 0\nv 1 0 0\nv 0 1 0\nf 1 2 3\n# cape\n" as *u8, PG_A_LEN) }
106func pg_write_b(flip: i64) -> i64
114func pg_write_c() -> i64
121func pg_emit(out: *u8, lic: *u8, head65: *u8, info: *i64) -> i64
126func pg_contains(path: *u8, needle: *u8) -> i64
133func main(argc: i64, argv: *i64) -> i64