nx_grab_ext_emit_gate.nx
buildroot/runtime/nx_grab_ext_emit_gate.nx
about
nx_grab_ext_emit_gate.nx -- REFEREE for nx_grab_ext_emit (/compare/mediaingest R10 ge_emit).
IN-PROCESS AND NETWORK-FREE. It imports the emitter and calls its pure functions against a PLANTED
conf image held in memory, so nothing is written to disk, no browser is involved, and the production
knowledge/grab_ext.conf is never read or touched by this gate.
THE LOAD-BEARING TOOTH IS THE MV2/MV3 STRUCTURAL SPLIT. The whole reason both twins are emitted from
one conf is that they must differ in STRUCTURE and never in POLICY:
MV2: background.scripts, browser_action, and <all_urls> INSIDE permissions
MV3: background.service_worker, action, and <all_urls> moved OUT to host_permissions
A wrong split is the defect that ships a Chrome extension the store rejects, or a Firefox one whose
host access silently does nothing. Testing that both manifests merely "contain the name" would pass
on a broken split, so the teeth below check the permissions array CONTENTS on each side, in both
directions -- present where it belongs and ABSENT where it does not.
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_grab_ext_emit.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 20 | const T_CAP: i64 = 262144 |
| 21 | const T_SMALL: i64 = 4096 |
| 25 | const T_CONF: *u8 = "# comment|not_a_row\nname|Test Grab\nversion|9.9\ndescription|planted\ngecko_id|t@nishi.local\nedge|https://edge.invalid\ncapture_path|/api/vault/capture\nmagnet_path|/t/m\nvideo_path|/t/v\nsession_header|X-Nishi-Session\nsession_key|nsess\nmedia_ext|m3u8\nmedia_ext|mp4\nmedia_ext|webm\nperm|webRequest\nperm|storage\nhost_perm|<all_urls>\n# trailing comment\n" |
| 28 | const T_CONF_HTTP: *u8 = "name|X\nversion|1\ndescription|d\ngecko_id|g\nedge|http://edge.invalid\ncapture_path|/c\nsession_header|H\nsession_key|k\nmedia_ext|mp4\nperm|storage\nhost_perm|<all_urls>\n" |
| 34 | const T_CONF_NOPERM: *u8 = "name|Y\nversion|1\ndescription|d\ngecko_id|g\nedge|https://e.invalid\ncapture_path|/c\nsession_header|H\nsession_key|k\nmedia_ext|mp4\nhost_perm|<all_urls>\n" |
functions
| 36 | func t_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 38 | func t_find(buf: *u8, n: i64, lit: *u8, from: i64) -> i64 |
| 52 | func t_has(buf: *u8, n: i64, lit: *u8) -> i64 { if t_find(buf, n, lit, 0) >= 0 { return 1 } return 0 } |
| 56 | func t_array_of(buf: *u8, n: i64, key: *u8, off_out: *i64) -> i64 |
| 86 | func main() -> i64 |