{ "graph": { "nodes": [ { "kind": "Constructor", "ast_kind": "method_definition", "name": "AuthService.constructor", "qualified_name": "src/auth.ts::AuthService.AuthService.constructor", "file_path": "src/auth.ts", "line_start": 8, "line_end": 8, "language": "typescript", "parent_name": "AuthService", "params": "(private readonly config: AuthConfig)", "is_test": false, "file_hash": "eeb3e626616885f9278dda74860345065a31937d19ce76199bd422cf286a5d9e", "content_hash": "7c4569d532c69328ec6f1354f2139fbda05369536465e12b89523c55c5234549", "is_exported": true }, { "kind": "Method", "ast_kind": "method_definition", "name": "authenticate", "qualified_name": "src/auth.ts::AuthService.authenticate", "file_path": "src/auth.ts", "line_start": 10, "line_end": 14, "language": "typescript", "parent_name": "AuthService", "params": "(ctx: Context)", "return_type": "Promise", "is_test": false, "file_hash": "eeb3e626616885f9278dda74860345065a31937d19ce76199bd422cf286a5d9e", "content_hash": "6b0fbc161c5b356dee65c673faf5fffb48c2372583074f84a2af9a1ffa1e87cf", "is_exported": true, "is_async": true }, { "kind": "Method", "ast_kind": "method_definition", "name": "verifyToken", "qualified_name": "src/auth.ts::AuthService.verifyToken", "file_path": "src/auth.ts", "line_start": 16, "line_end": 18, "language": "typescript", "parent_name": "AuthService", "params": "(token: string)", "return_type": "boolean", "is_test": false, "file_hash": "eeb3e626616885f9278dda74860345065a31937d19ce76199bd422cf286a5d9e", "content_hash": "805832f70ee62e8958a486b6af63dc7cbbfb5a6352051937f9fc7a65e607f92f", "is_exported": true }, { "kind": "Function", "ast_kind": "function_declaration", "name": "hashPassword", "qualified_name": "src/auth.ts::hashPassword", "file_path": "src/auth.ts", "line_start": 21, "line_end": 23, "language": "typescript", "params": "(password: string)", "return_type": "string", "is_test": false, "file_hash": "eeb3e626616885f9278dda74860345065a31937d19ce76199bd422cf286a5d9e", "content_hash": "35dfdf6bf22a2d7b67129eaea4625f17bbfc922c88548ebb26bdd36ffaaec8b3", "is_exported": true }, { "kind": "Function", "ast_kind": "arrow_function", "name": "validateEmail", "qualified_name": "src/auth.ts::validateEmail", "file_path": "src/auth.ts", "line_start": 25, "line_end": 27, "language": "typescript", "params": "(email: string)", "return_type": "boolean", "is_test": false, "file_hash": "eeb3e626616885f9278dda74860345065a31937d19ce76199bd422cf286a5d9e", "content_hash": "cf5e26647fb5296b40576c2563e934f9c8450a97bdc48639ce0263c254102e3c" }, { "kind": "Class", "ast_kind": "class_declaration", "name": "AuthService", "qualified_name": "src/auth.ts::AuthService", "file_path": "src/auth.ts", "line_start": 7, "line_end": 19, "language": "typescript", "is_test": false, "file_hash": "eeb3e626616885f9278dda74860345065a31937d19ce76199bd422cf286a5d9e", "content_hash": "72d835e026126f79a2b2c538e6388c4aed73c4903c0a3f5498209cd25db0ead8", "is_exported": true }, { "kind": "Interface", "ast_kind": "interface_declaration", "name": "AuthConfig", "qualified_name": "src/auth.ts::AuthConfig", "file_path": "src/auth.ts", "line_start": 2, "line_end": 5, "language": "typescript", "is_test": false, "file_hash": "eeb3e626616885f9278dda74860345065a31937d19ce76199bd422cf286a5d9e", "content_hash": "23cf2fcb9b456e6fc979dce6cc18f4d302607f5fc29a00643d3ad8ab1768ca9f", "is_exported": true } ], "edges": [ { "kind": "IMPORTS", "source_qualified": "src/auth.ts", "target_qualified": "src/db.ts", "file_path": "src/auth.ts", "line": 0 }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService.AuthService.constructor", "file_path": "src/auth.ts", "line": 0 }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService.authenticate", "file_path": "src/auth.ts", "line": 0 }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService.verifyToken", "file_path": "src/auth.ts", "line": 0 }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::hashPassword", "file_path": "src/auth.ts", "line": 0 }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::validateEmail", "file_path": "src/auth.ts", "line": 0 }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService", "file_path": "src/auth.ts", "line": 0 } ], "metadata": { "repo_dir": "", "files_parsed": 1, "total_nodes": 7, "total_edges": 7, "duration_ms": 0, "parse_errors": 0, "extract_errors": 0 } }, "analysis": { "changed_functions": [ { "qualified_name": "src/auth.ts::AuthService.authenticate", "name": "authenticate", "kind": "Method", "signature": "authenticate(ctx: Context) -> Promise", "file_path": "src/auth.ts", "line_start": 10, "line_end": 14, "callers": [], "callees": [], "has_test_coverage": false, "diff_changes": [], "contract_diffs": [], "is_new": true, "in_flows": [] }, { "qualified_name": "src/auth.ts::AuthService.verifyToken", "name": "verifyToken", "kind": "Method", "signature": "verifyToken(token: string) -> boolean", "file_path": "src/auth.ts", "line_start": 16, "line_end": 18, "callers": [], "callees": [], "has_test_coverage": false, "diff_changes": [], "contract_diffs": [], "is_new": true, "in_flows": [] }, { "qualified_name": "src/auth.ts::hashPassword", "name": "hashPassword", "kind": "Function", "signature": "hashPassword(password: string) -> string", "file_path": "src/auth.ts", "line_start": 21, "line_end": 23, "callers": [], "callees": [], "has_test_coverage": false, "diff_changes": [], "contract_diffs": [], "is_new": true, "in_flows": [] }, { "qualified_name": "src/auth.ts::validateEmail", "name": "validateEmail", "kind": "Function", "signature": "validateEmail(email: string) -> boolean", "file_path": "src/auth.ts", "line_start": 25, "line_end": 27, "callers": [], "callees": [], "has_test_coverage": false, "diff_changes": [], "contract_diffs": [], "is_new": true, "in_flows": [] } ], "structural_diff": { "changed_files": [ "src/auth.ts" ], "summary": { "added": 7, "removed": 0, "modified": 0 }, "nodes": { "added": [ { "qualified_name": "src/auth.ts::AuthService.AuthService.constructor", "kind": "Constructor", "file_path": "src/auth.ts", "line_start": 8, "line_end": 8 }, { "qualified_name": "src/auth.ts::AuthService.authenticate", "kind": "Method", "file_path": "src/auth.ts", "line_start": 10, "line_end": 14 }, { "qualified_name": "src/auth.ts::AuthService.verifyToken", "kind": "Method", "file_path": "src/auth.ts", "line_start": 16, "line_end": 18 }, { "qualified_name": "src/auth.ts::hashPassword", "kind": "Function", "file_path": "src/auth.ts", "line_start": 21, "line_end": 23 }, { "qualified_name": "src/auth.ts::validateEmail", "kind": "Function", "file_path": "src/auth.ts", "line_start": 25, "line_end": 27 }, { "qualified_name": "src/auth.ts::AuthService", "kind": "Class", "file_path": "src/auth.ts", "line_start": 7, "line_end": 19 }, { "qualified_name": "src/auth.ts::AuthConfig", "kind": "Interface", "file_path": "src/auth.ts", "line_start": 2, "line_end": 5 } ], "removed": [], "modified": [] }, "edges": { "added": [ { "kind": "IMPORTS", "source_qualified": "src/auth.ts", "target_qualified": "src/db.ts" }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService.AuthService.constructor" }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService.authenticate" }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService.verifyToken" }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::hashPassword" }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::validateEmail" }, { "kind": "CONTAINS", "source_qualified": "src/auth.ts", "target_qualified": "src/auth.ts::AuthService" } ], "removed": [] }, "risk_by_file": { "src/auth.ts": { "dependents": 0, "risk": "LOW" } } }, "blast_radius": { "total_functions": 7, "total_files": 1, "by_depth": {} }, "affected_flows": [], "inheritance": [ { "qualified_name": "src/auth.ts::AuthService", "file_path": "src/auth.ts", "implements": [], "children": [] } ], "test_gaps": [ { "function": "src/auth.ts::AuthService.authenticate", "file_path": "src/auth.ts", "line_start": 10 }, { "function": "src/auth.ts::AuthService.verifyToken", "file_path": "src/auth.ts", "line_start": 16 }, { "function": "src/auth.ts::hashPassword", "file_path": "src/auth.ts", "line_start": 21 }, { "function": "src/auth.ts::validateEmail", "file_path": "src/auth.ts", "line_start": 25 } ], "risk": { "level": "MEDIUM", "score": 0.44, "factors": { "blast_radius": { "weight": 0.35, "value": 0.35, "detail": "7 functions, 1 files" }, "test_gaps": { "weight": 0.3, "value": 1, "detail": "4/4 untested" }, "complexity": { "weight": 0.2, "value": 0.07, "detail": "avg 4 lines" }, "inheritance": { "weight": 0.15, "value": 0, "detail": "no inheritance" } } }, "metadata": { "changed_functions_count": 4, "total_callers": 0, "total_callees": 0, "untested_count": 4, "affected_flows_count": 0, "duration_ms": 3, "min_confidence": 0.5 } } }