Repository navigation
Releases
FlowGuard v0.2.0
[0.2.0] - 2026-11-11
End-to-end architectural upgrade uniting Shared Task Wiring Contracts (flow_blueprint ⇄ flow_verify), 3-Tier Evidence Separation (L1_STRUCTURAL / L2_DATA_FLOW / L3_BEHAVIORAL), Typed & Evidenced Graph Edges (8 Polyglot Bridge Channels), Graph-Diff Incremental Verification (G_base ➔ G_curr), and Tri-State Verdicts (SATISFIED / VIOLATED / INCONCLUSIVE) — verified across 142 automated assertions (69 adversarial torture + 73 real-task incomplete-wiring & legal counterexample assertions, achieving 100% defect recall (8/8) and 0% false violations (0/6)).
Added
- Shared Task Wiring Plan (
flow_blueprint⇄flow_verify,src/wiring-contract.mjs,src/flow-tools.mjs,src/flow-verifier.mjs):flow_blueprintbuilds and persists a structuredwiringPlan(obligationswith target location, reason, expected relation, reference basis, verification method, andambiguitiesToConfirm), acceptingtargetSymbol,targetField,consumerTarget, andrequirePersistence.flow_verifyevaluates both persisted blueprint obligations and auto-inferred delta obligations (A1–A9), closing the loop between planning and verification.
- 3-Tier Evidence Separation (
L1_STRUCTURAL➔L2_DATA_FLOW➔L3_BEHAVIORAL) & Context-AwareexportSemantics (src/graph-builder.mjs,src/file-parser.mjs,src/wiring-contract.mjs):inferWorkspaceProfiledistinguishesapplication,library, andhybridworkspaces with two-tier reachability (reachableFromRuntimeSourcevsreachableFromSource): library exports remain valid external entry points, whereas newly exported symbols in anapplicationwithout runtime entry evidence are flagged as unwired (unwiredExports).- Field-level
L2_DATA_FLOWverification checks that newly added config/protocol fields reach their downstreamconsumerTarget(detecting cases where a setting is saved to config while calculation logic still reads a hardcodedUPPER_CASEconstant, or where frontend/backend IPC/HTTP payload keys drift) and verifies field-levelSave ⇄ Loadpersistence symmetry (fieldLifecycleAsymmetries). - Optional
runTestsCommandparameter executes behavioral test/probe commands forL3_BEHAVIORALevidence while marking static-only behavioral checksINCONCLUSIVE.
- Typed & Evidenced Graph Relations + 8-Channel Polyglot Bridges (
src/file-parser.mjs,src/bridge-linker.mjs,src/graph-builder.mjs,src/flow-tools.mjs):- Classifies graph relations into
CONTAINS,SEQ_CALL,BRANCH_DISPATCH,REGISTRATION,STATE_RW,IMPLEMENTS, andPROTOCOL_BRIDGE, recordingfile:line,passedArgs,returnFlow,resolution.mode, andconfidence(HIGH | MEDIUM | AMBIGUOUSwith fullcandidatespreserved on ambiguous matches). - Separates
siblingBranchesToCheck(conditional dispatch peers) fromsequentialStepsInCaller(authenticate -> validate -> save) inflow_trace. - Adds
WEBVIEW2_IPC(window.chrome.webview⇄ C++/C#WebMessageReceived/PostWebMessageAsJson) andSHARED_MEMORY_IPC(Win32CreateFileMapping/ POSIXshm_open⇄ Pythonmmap/shared_memory), RPC client-prefix disambiguation, and IPC/HTTP payload field extraction.
- Classifies graph relations into
- Graph-Diff Incremental Verification (
G_base ➔ G_curr,src/graph-diff.mjs,src/hook-runner.mjs,src/server.mjs):- Supports both
SessionStartbaseline snapshots and arbitrary Git references (baseRef/--base <git-ref>, reconstructed in-memory viagit diff --name-status+git showwithout touching the working tree). - Expands verification scope along dependency edges (
impactedUntouchedFiles) to catch untouched-file regressions (newlyWriteOnlyStates,newlyWriterlessStateReads,newlyOrphanedSymbols,newlyBrokenPaths) while isolatingpreExistingBrokenBridgesfromnewlyBrokenBridges.
- Supports both
- Tri-State Verdicts (
SATISFIED/VIOLATED/INCONCLUSIVE), Dead-Code Evidence Grading & SmartStopHook (src/flow-verifier.mjs,src/hook-runner.mjs):- Reports explicit obligation breakdowns (
headlineSummary) and separatesCONFIRMED_SAFE_TO_DELETEprivate dead pipes fromNO_STATIC_CALLER_EVIDENCEunwired exports, plus write-only telemetry/audit sink exemptions. Stophook blocks strictly on newly introducedVIOLATEDcontracts/breaks (never blocking onINCONCLUSIVEor historical broken bridges) and supportsFLOWGUARD_MODE=advisory.
- Reports explicit obligation breakdowns (
- 14-Scenario Real-Task Incomplete-Wiring Benchmark Suite (
test/task-benchmark-suite.mjs):- Adds 73 end-to-end assertions across 8 realistic incomplete-wiring tasks (
100%recall) and 6 legal counterexamples (0%false violations), bringing total automated assertions to142(69torture +73task benchmark).
- Adds 73 end-to-end assertions across 8 realistic incomplete-wiring tasks (
Changed & Fixed
- Honest Similarity & Capability Labeling (
src/flow-tools.mjs,src/fingerprint.mjs,README.md): Replaced overstated "AST fingerprint" wording with explicitLEXICAL_SHINGLE_JACCARDlabeling and documented static vs. runtime verification boundaries. - Case-Aware Symmetric Lifecycle Pairs (
src/fingerprint.mjs): ExtendedSYMMETRIC_PAIRSto recognize camelCase and snake_case (saveConfig/loadConfig,toJSON/fromJSON,persist/restore,save_preferences/load_preferences) in addition to PascalCase. - Parser Edge-Case Fixes (
src/file-parser.mjs,src/lang-presets.mjs): Fixed C++ file-localstaticfunctionisPublicApiclassification, bottom-of-fileexport { fn }false self-reference, shorthand object payload extraction ({ a, b }), ternary? "str"false EventBus emitter matching, and Windows backslash normalization inSHARED_MEMORY_IPC.
Full Changelog: v0.1.1...v0.2.0
FlowGuard v0.1.1
[0.1.1] - 2026-11-11
Hardened across 33 flagship open-source repositories (18,795 source files · 130,981 symbols · 566 cross-language bridges · 29/33 zero-false-positive PASS) and 69 adversarial torture, mutation fuzzing & contract assertions.
Fixed & Hardened (33-Repository Real-World Stress-Test Sweep)
- Ruby
@@class_varInfinite Loop Fix (src/lang-presets.mjs): Fixed a P0 non-terminating loop instripLeadingAttributesAndAnnotationswhen encountering Ruby@@configclass variables (sidekiq), adding strictlang !== "ruby"and non-progress loop guards. - Svelte 5 Runes & Composite Container State Tracking (
src/file-parser.mjs,src/graph-builder.mjs,src/fingerprint.mjs):- Recognizes
$effect/$derivedreactive dependency trackers (track*),.sveltetemplate member reads ({#if state.prop}) and native Svelte 5onclick={...}event attributes,#privatenested chain reads (this.#field.sub), and composite sibling container delegation (this.root.field = ...) while preserving strict SSOT isolation (bits-ui). - Classifies
.storybook/storiesdirectories and.stories.*files assandboxzone.
- Recognizes
- Unity / Harmony IL Weaving & Advanced C# Semantics (
src/lexer.mjs,src/lang-presets.mjs,src/file-parser.mjs,src/flow-verifier.mjs):- Quote-aware balanced
{...}expression scanning (scanBalancedBraceExpr) for C#$"{string.Join(", ", items)}"and Pythonf"{fn('a')}"interpolations, plus{{literal escape handling (BepInEx). - Supports
unsafeC# class/struct/constructor modifiers, event/delegate callback signatures (+= Handler,(object sender, EventArgs e)), and[HarmonyFinalizer]/[HarmonyReversePatch]/OnEnable/OnDisableentry hooks.
- Quote-aware balanced
- C++ / CUDA Systems Scale &
ctx_http⇄ Svelte REST Bridges (src/lexer.mjs,src/lang-presets.mjs,src/file-parser.mjs):- Added
.cu/.cuhCUDA support (27 source extensions across 11+ language families) and parenthesized brace enclosure guard (: pimpl(new impl{}) {) preventing C++ constructor body truncation (llama.cpp). - Tracks C++ non-
constlvalue reference out-parameters (T & out), C#ref/out, PHP&$param, Win32/POSIX/C11 atomic intrinsics (Interlocked*,__atomic_*,atomic_fetch_*), and CUDA runtime side-effects (cudaMemcpy*,cudaStreamSynchronize). - Connects C++
cpp-httplib/ctx_httproutes (svr.Get,ctx_http.post) to frontend dynamic base-URL fetches (fetch(`${base}/props`)), and recognizes Python@*.register*dynamic plugin decorators.
- Added
- Dedicated Dart Language Support & Polyglot Lexer Precision (
src/lang-presets.mjs,src/lexer.mjs,src/file-parser.mjs,src/graph-builder.mjs):- Dedicated
dartfamily ({required T x}/[T? y]parameter groups,this.field/super.fieldpromoted constructors,package:import resolution, and"""triple-quoted strings). - Full expression token preservation inside
${...},#{...}, and Swift\(... )string interpolations; C++ multi-brace member initializer chains (: types_{...}, named_args_{}); Swift bodylessprotocolbounds, implicit returns, andT.Type = T.selfmetatype parameters; Ruby paren-lessdef,attr_reader/attr_accessor, block-mutating.delete_if { ... }, and implicit returns beforeend/rescue/else.
- Dedicated
- Zero-Noise Control/Data-Flow & Side-Effect Precision (
src/file-parser.mjs,src/flow-verifier.mjs):$-aware identifier boundaries (makeIdentRegex) supporting JS/TS$id/$/$tooltipalongside PHP$varand Kotlin/Dart"$tag".- Nested closure body stripping (
stripNestedClosureBodies) so inner.map(() => { return x; })returns never leakhasReturnValue = trueto outer throwing/void functions (uptime-kuma). - Optional-chaining (
?.) member calls, non-localObject.assign/ property / reactive.valuealias mutations, callback parameter invocations,[subscript continuations, and call-graph-scoped (outEdges+sameLangFamily)IGNORED_PURE_CALLverification.
- Inline
#[cfg(test)]& Multiplatform Zone Isolation (src/fingerprint.mjs,src/graph-builder.mjs,src/bridge-linker.mjs):- Prevents
prodRust modules and cross-boundary bridges from linking to inline#[cfg(test)] mod testssymbols (axum,SwitchHosts) while preservingprod -> sandbox/testfile leak detection. - Classifies KMP
*Testsource sets,test-dts/.test-d.ts,mockwebserver*,*-testing-support,docs_src/, andexample_*accurately.
- Prevents
- Expanded Full-Stack Bridges & Dispatch Contract Reconciliation (
src/file-parser.mjs,src/bridge-linker.mjs,src/graph-builder.mjs):- Parameterized
#[tauri::command(async)], Socket.iosocket.emit⇄socket.on(ws:*), Vue Options APImethods: {}, Laravelroutes/api.php, FastAPIAPIRouter(prefix=...)+ OpenAPI SDK{ url: "/api/v1/..." }sub-router mount matching, plusCALLBACK_DISPATCH_SIGNATURE,DELEGATE_OR_CALLBACK_SIGNATURE, andINTERFACE_CONTRACT_SIGNATUREprotection.
- Parameterized
Added & Improved
- Transitive Barrel Re-Export & Import Alias Resolution (
src/file-parser.mjs,src/graph-builder.mjs): Multi-hop resolution across JS/TS/Vueexport * from/export { a } from, Rustpub mod/pub use, Python__init__.py, andimport { orig as alias }bindings. - Container-Scoped & ES2022
#privateState Ownership SSOT (src/file-parser.mjs,src/graph-builder.mjs,src/flow-tools.mjs): IsolatesContainer.fieldand#privatefields per class/hierarchy while reconciling cross-file public.propreads; recognizes ES2022#privatearrow methods and TypeScript multi-property object return types (: Promise<{ a: T; b: U }> {). - Vue / Svelte SFC
<script>Isolation (src/file-parser.mjs): Whitespace-masks<template>and<style>blocks with 1:1 line/byte offset preservation while wiring@click/v-on:/on:/onclick={...}handlers as UISources. - HTTP Method-Aware Multi-Handler REST Bridges (
src/file-parser.mjs,src/bridge-linker.mjs): DistinguishesGET/POST/PUT/DELETE/PATCHon identical dynamic routes and binds decorator/attribute routes (@app.delete,#[get],[HttpGet],@GetMapping,#[Route]) directly to their target handlers. - Non-Source Git Diff Guard & Explicit
fullScan(src/flow-verifier.mjs,src/server.mjs): IntroducesscanMode(INCREMENTAL_GIT_DIFF/NON_SOURCE_DIFF_ONLY/FULL_WORKSPACE) andfullScan/--fullCLI flag so doc-only diffs never trigger accidental full-repo scans. - Per-File AST Snapshot Cache (
src/graph-builder.mjs): Stat-keyed(size, mtimeMs)per-file snapshot cache (16xfaster warmforceRebuildverification on 1,200-symbol repositories). - 69-Assertion Adversarial Torture, Fuzzing & Contract Suite (
test/torture-suite.mjs): Expanded from 50 to 69 zero-dependency assertions across 11+ language families, Svelte 5 Runes, Unity/Harmony C#, C++/CUDA, and MCP/Hook contracts.
Full Changelog: v0.1.0...v0.1.1
FlowGuard v0.1.0
Changelog
All notable changes to FlowGuard will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.1.0] - 2026-11-11
Added
- End-to-End Causality Graph & Architecture Vision Engine (
src/graph-builder.mjs,src/arch-vision.mjs,src/flow-tools.mjs):- 3-tier architecture domain classification (
ENTRY_SURFACE,ORCHESTRATION_ROUTING,INFRA_SINK), Top-8backbonePipelinesspine extraction, centrality-rankedarchitecturalHubs, transitiveblastRadiusanalyzer, per-parameterparameterFlowMatrix, and 4-stationflow_blueprintchecklist. - Stat-validated
(size, mtimeMs)workspace graph cache for sub-second read-only queries with forced rebuild freshness on verification.
- 3-tier architecture domain classification (
- Fault-Tolerant 10+ Language Lexer & Parser (
src/lexer.mjs,src/file-parser.mjs,src/lang-presets.mjs):- Support for 25 file extensions across TypeScript/JS/Vue/Svelte, Rust, Go, Python, C#, Java/Kotlin/Dart, Swift, PHP, Ruby, and C/C++.
- Lexer-state
commentlessCodestream (immune to"src/*"..."*/dist"glob strings) and universal string interpolation preservation across JS templates, Python multilinef"""...""", Rustr#"..."#, C#$@"...", Swift\(ident), PHP{$this->field}, and Ruby#{@ivar}. - Local variable & receiver provenance tracking (
localVars/qc.isLocal) eliminating false-positive mutations on local loop counters (i++) and local collection accumulators (set.add,arr.push).
- 6-Channel Cross-Language Bridge Linker (
src/bridge-linker.mjs):- Line-accurate (
offsetToLine) symbol attribution acrossTAURI_IPC,RPC_SERVICE(ConnectRPC/gRPC),EVENT_BUS_BRIDGE,ELECTRON_IPC,HTTP_REST_API(including dynamic route normalization/api/memos/${id}⇄/api/memos/{memo_id}), andSHARED_CONFIG_BRIDGE/ENV_VAR_BRIDGE.
- Line-accurate (
- 9-Dimension Incremental Flow Verifier & Lifecycle Hooks (
src/flow-verifier.mjs,src/hook-runner.mjs,src/server.mjs):- Strict separation between protected
reservedContracts(polymorphic interface alignment, lifecycle hooks,#[cfg]conditional targets) and genuinedataFlowBreaks/unwiredOrDeadPipes. - Portable MCP Server (
stdioJSON-RPC 2.0 +rootUrihandshake + CLI mode) and alignedSessionStart/Stophooks withPLUGIN_DATApersistence and SHA-1 state deduplication.
- Strict separation between protected
- CI Matrix & 36-Assertion Adversarial Torture, Fuzzing & Contract Suite (
.github/workflows/ci.yml,test/torture-suite.mjs):- Multi-OS GitHub Actions CI (
ubuntu,windows,macos× Node18, 20, 22) and 36 zero-dependency assertions covering 10 languages, 8 fault-injection mutations, and Hook/MCP protocol contracts.
- Multi-OS GitHub Actions CI (