返回资讯中心
外部精选
软件工程
#开发者实时流

Recon 发布:离线预检数据闸门与 Python AST 适配器编译器

来源标题:Show HN: Recon – Air-gapped preflight data gate and Python AST adapter compiler

Recon 是一个离线运行的数据集成就绪平台,可在数据管道部署前检测第三方合作方数据集中的 schema 漂移、类型不匹配和数据质量缺陷。它支持 CSV、XLSX、TSV、JSONL 输入,并对接 JSON Schema 和 OpenAPI 3.x 目标契约,用确定性的预检流程替代脆弱的自定义脚本和入库后的管道故障。

Hacker News 最新swamigawai2026/11/27 · 今天20 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Recon is an air-gapped data integration readiness platform that detects schema drift, type mismatches, and data quality defects in third-party partner datasets before pipeline deployment.

Quick Start • Architecture • Visual Studio Tour • Why Recon • Demo Test Suites (5 Domains) • CI/CD Gate • FDE Playbook

Recon is engineered with modern, production-grade technologies optimized for execution speed, auditability, and zero vendor lock-in:

Recon replaces brittle custom scripts and post-ingestion pipeline failures with a deterministic preflight pipeline:

flowchart LR classDef default fill:#0f172a,stroke:#334155,stroke-width:1.5px,color:#f1f5f9,rx:4,ry:4; classDef gate fill:#1e1b4b,stroke:#6366f1,stroke-width:1.5px,color:#f1f5f9,rx:4,ry:4; classDef valid fill:#064e3b,stroke:#059669,stroke-width:1.5px,color:#f1f5f9,rx:4,ry:4; classDef quar fill:#450a0a,stroke:#dc2626,stroke-width:1.5px,color:#f1f5f9,rx:4,ry:4;

subgraph Intake["1. Ingestion & Contract"] direction TB Raw["Source Data Feed\nCSV · XLSX · TSV · JSONL"] Contract["Target Contract\nJSON Schema · OpenAPI 3.x"] end

subgraph Profiling["2. Profiling & Alignment"] direction TB Profiler["Columnar Profiler\n100% records · zero sampling"] Matcher["Mapping Engine\nJaro-Winkler · PK/FK detection"] end

subgraph Audit["3. Preflight Safety Gate"] direction TB Rules["Risk Engine\nRules R001–R009"] Approval{"Approval Gate\nHuman Sign-Off"}:::gate end

subgraph Runtime["4. AST Synthesis & Sandbox"] direction TB Compiler["AST Compiler\nStandalone adapter.py"] Sandbox["Air-Gapped Sandbox\nIsolated process execution"] end

subgraph Egress["5. Dual-Stream Delivery"] direction TB ValidOutput["Clean Valid Records\nCSV / JSONL"]:::valid QuarOutput["Quarantine Ledger\nCSV / JSONL with diagnostics"]:::quar DeployPack["CI/CD Deploy Pack\nadapter.py · Dockerfile · CI workflow"] end

Raw & Contract --> Profiler Profiler --> Matcher Matcher --> Rules Rules --> Approval Approval -->|Approved| Compiler Compiler --> Sandbox Sandbox --> ValidOutput & QuarOutput & DeployPack

Loading

🎯 Why Recon: The Paradigm Shift

Traditional ETL pipelines fail silently because they treat integration as an ad-hoc scripting exercise after data is already ingested. Recon shifts validation upstream to preflight.

Recon provides an engineering-grade, high-contrast dark studio interface designed for rapid keyboard navigation, clear visual hierarchies, and zero latency.

Dual-port ingestion supporting raw CSV, Excel (XLSX), TSV, and JSONL data alongside JSON Schema / OpenAPI 3.x contracts with cryptographic SHA-256 fingerprinting, automatic encoding detection, and UTF-8 BOM auto-stripping.

Calculates null percentages, distinct value cardinalities, whitespace anomalies, and dynamic type distributions across 100% of records without lossy sampling or arbitrary truncation.

High-confidence matches are auto-proposed with transparent match evidence and SVG flow graphs. Features vectorized Primary Key & Foreign Key discovery across multiple tables with cardinality evaluation (1:1, 1:N) and identical duplicate table detection.

Evaluates 9 deterministic risk rules (R001–R009). Strictly blocks adapter generation if required contract fields are unmapped; logs warnings for domain enum deviations with explicit engineering handle sign-off.

Inspects the generated, reviewable Python adapter synthesized by the AST compiler. Standalone PEP-8 code featuring typed casting, datetime normalization, and zero proprietary framework lock-in.

Executes the synthesized adapter inside an isolated, air-gapped sandbox. Conforming records stream to valid output; faulty records route to the quarantine ledger with line numbers and diagnostic justifications. Verified by mathematical invariant: N_total ≡ N_valid + N_quarantined.

Delivers for both business analysts and data platform engineers: direct 1-click clean CSV and JSONL downloads for immediate data operations, quarantined CSVs with attached error justifications, the target schema contract (.json), and a complete Enterprise CI/CD Deploy Pack (.zip) containing adapter.py, Docker container definitions, GitHub Actions workflow, and a verified Markdown audit dossier.

  1. One-Click Zero-Friction Launch (Recommended)

Recon includes smart self-healing launchers for every operating system that automatically check your Python runtime, establish an isolated virtual environment, install dependencies, resolve port conflicts, and launch the Web Studio:

On Windows (Command Prompt / PowerShell or double-click in Explorer):

start.bat

On macOS / Linux:

chmod +x start.sh && ./start.sh

  1. Manual Developer Installation

Clone the repository

git clone https://github.com/swamigawai/recon.git cd recon

Create and activate virtual environment

python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate

Install with development dependencies

pip install --upgrade pip pip install -e ".[dev]" # Or fallback: pip install -r requirements.txt

  1. Verify Environment Health (recon doctor)

Run the self-diagnostic suite to ensure your runtime, dependencies, disk permissions, UTF-8 BOM engines, and pipeline invariants are 100% operational:

recon doctor

Machine-readable JSON output for automated CI preflights:

recon doctor --json

  1. Launch the Web Studio Manually

One-command FDE launcher (checks runtime, auto-installs missing packages, resolves port & opens browser)

python scripts/fde_launcher.py

Or start the local server directly

recon serve --host 0.0.0.0 --port 8000

Open your browser at http://127.0.0.1:8000 to launch the Recon Studio.

Recon provides a headless CLI command to audit data batches in continuous integration pipelines:

recon gate
--source tests/fixtures/synthetic_nyc_311.csv
--contract tests/fixtures/target_contract_service_request.json
--max-quarantine-pct 5.0
--json > gate_result.json

CLI Exit Code Contract

Exit Code Status Meaning

0 PASS Batch conforms strictly to target contract; quarantine rate within threshold.

1 FAIL Hard risk blocker detected, required fields unmapped, or quarantine threshold breached.

2 ERROR Invalid arguments, malformed input syntax, or unreadable source file.

🐳 Docker Deployment

Run Recon inside a lightweight, containerized Alpine environment:

Run with Docker Compose

docker-compose up --build -d

Verify server health

curl http://localhost:8000/api/health

🔒 Security & Privacy Posture

Local-First Execution: Your data never leaves your infrastructure. Recon makes zero outbound calls, uses no external telemetry, and requires no API keys.

In-Process AST Sandbox: Synthesized adapters execute in a Python namespace with dangerous builtins stripped (import, open, eval, exec, os, sys, subprocess, socket).

Network Isolation: Remote $ref dereferencing in schema contracts is disabled by default to eliminate Server-Side Request Forgery (SSRF).

Detailed security architecture and threat models are documented in docs/SECURITY.md.

docs/FDE_PDR_BRIEF.md — Product Design & Delivery Review (PDR) executive mission brief for pilot stakeholders.

docs/FDE_PLAYBOOK.md — Forward Deployed Engineer standard operating procedures, edge-case resolution, and production deployment patterns.

docs/ARCHITECTURE.md — Core engine internals, schemas, and data pipelines.

docs/DEVELOPMENT.md — Contributor instructions, testing setup, and coding conventions.

docs/SECURITY.md — Detailed threat modeling, isolation boundaries, and audit policies.

docs/PILOT_DEVELOPER_GUIDE.md — Guide for conducting real-world integration pilot evaluations.

docs/WEBSITE_INTEGRATION.md — Drop-in web embedding and iframe specifications.

docs/FAQ.md — Frequently asked technical and architectural questions.

📄 License

Recon is open-source software licensed under the MIT License.

Copyright (c) 2026 Swami Gawai.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →