9.2 KiB
Original NATIVE public active NetFlow / UDP facts package — review map
Read-only design, 2026-11-01. No process, PG, Worker, build, source edit or remote action executed. Root has closed the separate Worker fault package. This is original audit item6, not another parent or repetition of accepted service9.
Exact remaining criterion
mcp-native-remaining-audit-20261101.md, item6, and mcp-remaining-work-20261026.md require real public REST/MCP settings/purge/rebuild with an active production Worker, existing authentication/policy, and genuine UDP→raw→classified hour/day facts with conservation. Accepted mcp-flow-active-services-acceptance-20261029.json explicitly leaves publicRestMcpAuthorizationAccepted:false, udpClassifiedFactsAccepted:false, deterministic pending IPC publication false. Its rebuild source is SQL-seeded; its private UDP proves persistence, not classified facts. Preserve those9 accepted service groups and do not rerun them wholesale.
Close this ONE local composition parent when all three public mutation families pass via REST AND genuine MCP/approval, actual packet-derived raw and classified facts conserve counters, the requested drain has an observed nonempty durable IPC receipt, source/authority refusal preserves owned data, no failed request is replayed, and one tracked collector remains/restarts correctly. Real RouterOS exporter/forwarding, exporter session interoperability, load and whole2GB remain separate.
Real identities and source contracts
- Own synthetic server ID comes from actual INSERT RETURNING; host127.0.0.1/owned RouterOS-shaped HTTP port, explicit jump-host type and WAN interface metadata. No RouterOS mutation.
- Real owned local HTTP
/rest/interfacereturns explicitifindexand interface names.refreshServerIfacesexecutes the unchanged MikrotikClient HTTP path, thenrememberServerIfaces;traffic-flow-ifindex.tsmaps explicit ifindex to canonical name. Do not invent a numeric join between user/interface IDs or infer a router's native identity from a guessed number. This is authoritative fixture input, not actual CHR evidence. - Create an actual user and interface binding through existing users service/public route (
createUser,addBinding) after real JWT auth and actual latest snapshot inventory from that same owned interface response. Owned snapshot metadata is setup, never raw traffic source.loadFlowTopology/getServerCatalogderive client/WAN/plane mappings from current rows. NoseedFlowTopology, cache fake or injected topology object. - The actual collector uses unchanged
buildExporterMapPayloadfrom current settings/server/peer rows; real UDP sender127.0.0.1 resolves to the owned server. No manually assembled exporter map. - NetFlow v5 records explicitly use the declared input/output ifindex values. Send one bound client→public-destination payload and a GRE/overlay exclusion control; private→private warmup remains explicitly unclassified. No SQL INSERT/UPDATE to flow_buckets/minute/fact tables. Raw counters, classified counters and excluded bytes must all derive from actual datagrams.
- Live classification is
queueParsedFlows → resolveInternetDest → shouldWriteFlowFact → canonicalFactIface → bumpFlowFact. Rebuild freezes the same catalog/topology/ifindex/geo/RIPE inputs throughcaptureFlowFactRebuildClassifier. Bindings attach by server+canonical interface name, not an undocumented numeric relation. Assert named service from the actual built-in catalog and truthful unknown geography when enrichment is unavailable; no fabricated GeoIP/RIPE authority.
Explicit fixture boundaries requiring review
Public Internet destination data is necessary: private→private is deliberately excluded by shouldWriteFlowFact. UDP still goes only to loopback, but normal live enrichment would enqueue external RIPE. Proposed per-Node/Worker --import fixture preloader first installs owned-only egress guards, then calls actual pauseRipeBackgroundWork and preloads current topology/catalog plus refreshServerIfaces through the owned HTTP server. It runs before the unchanged collector module, also on replacement Workers; no cache seeding, monkeypatched classifier/fetch/auth, altered worker commands, constructor replacement or product timeout. Main and Worker use real production loaders. This proves classification with enrichment paused; it does not claim RIPE/GeoIP availability. If root prefers another existing supported isolation boundary, decide before fixture coding. Owned HTTP/server rows must exist before any Worker is started.
For IPC proof use transparent actual Worker.postMessage/message observation (forward exact messages; no delay, rewrite or fabricated ACK/result). Correlate strict-drain request ID to actual drain-result receipt and its durable SQL row. Require nonempty receipt unconditionally: no if(receipt) acceptance. Schedule the input after observed timer/heartbeat boundary and immediately issue the public operation; if timer wins and requested receipt is empty, retain an honest fixture failure, not a substitute timer receipt or automatic operation retry. If deterministic queue fencing is needed, review that small timing mechanism separately; no production flush timer change is proposed.
Four composed groups, six public positive paths
- Public settings. Actual authenticated REST PUT disables an active collector with pending UDP; validate drained data/facts and confirmed retired thread/port. Genuine SDK MCP
mm_netflow_settings_update_plan, real human decision route, then actual public runtime apply re-enables using the current settings/collector builders. Subsequent UDP is accepted once. Public receipt acknowledges request, never promises UDP readiness; observe actual bind separately. Complete keys/peers/opaque configuration is conserved except the requested patch. - Public rebuild. Real REST POST rebuild while collector accepts genuine client/overlay UDP, then new approved SDK MCP
mm_netflow_facts_rebuild_plan/runtime apply after additional UDP. Raw rows remain unchanged; hour/day cubes replace rather than double-count, excluded overlay bytes remain excluded, events/receipts match the one operation. Correlate at least one mandatory nonempty requested IPC receipt to actual SQL. Same MCP idempotency key/plan returns the same operation without second drain/publication; actual read-only reconciliation verifies its durable result. - Public purge. REST POST purge on owned nonempty actual UDP-derived rows clears all six flow tables only after tracked Worker drain/exit. Accept new actual UDP/facts on the restarted collector, then approved public MCP
mm_netflow_purge_plan/apply clears this second dataset. Send a final actual packet to verify exactly one working collector. Preserve settings/keys/peers/users/bindings/snapshots/metadata and unrelated notifier/scheduler state; maintenance changes must equal the shown current scenario, never hidden arbitrary retention. - Current-authority refusal. While that collector is genuinely active, an unapproved MCP apply and an approved plan whose actual connection is then paused must refuse before mutation/drain publication; old raw/facts/config remain exact and the active collector still accepts a new packet. Actual REST missing/insufficient JWT refuses. Do not replace JWT verification, assertPortalClaimsCurrent, effectiveMcpConnection, protection/source guards or runtime execution with a fixture boolean.
Authentication path: current buildApp({startScheduler:false}), AUTH_REQUIRED=true and fresh synthetic JWT secret. Real signed JWT contains explicit mm permissions and current issuance/expiry; actual portal revocation source remains enabled. Actual MCP credential/policy/SDK HTTP transport exposes only settings/purge/rebuild plus runtime apply/reconcile as needed. Human decisions use /api/mcp/plans/:id/decision; MCP SDK apply uses existing mm_change_apply (changes.apply) with planId/idempotencyKey. No direct adapter.prepare/apply replaces public execution. User setup uses real POST /api/users and /api/users/:id/bindings.
Entry / runner plan, no launch authorization inferred
Proposed area tmp/mcp-flow-public-active-20261101/, standalone pg-public-active-fixture.mjs imports current compiled backend/dist graph from a pinned copied runtime; worker-preload.mjs is fixture-only. No backend/package edits or build. Reuse the accepted native-lifecycle.mjs and owned runner lifecycle: loopback probe before product import, allowlist environment, private empty cwd/no real.env, retained init/PG/fixture/taskkill handles, bounded startup/stop and120s fixture/log1MiB, no late native starts, canonical no-symlink paths, no PG removal until all native exits. Actual Worker thread handles and each own UDP/HTTP/PG socket must be joined; forced terminate cannot count as protocol success. If six public paths exceed120s, split scenarios on the same owned runner contract rather than raise deadline silently.
Root review sequence: approve the identity/preloader/IPC-observation map first; then inspect exact fixture/runner delta and no-launch static checks; only then authorize owned local execution. Any reproduced bug gets a minimal staged patch and preserved first failure; source application remains root-only. No new child parent, broad source refactor, migrations or extra security requirements are proposed.