@teevee98/synapse-hub 4.1.3 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/01-web-automation/clean-pom-crafter/examples/standard_test_case.groovy +3 -0
- package/.agents/skills/01-web-automation/clean-pom-crafter/references/pom_patterns.groovy +3 -0
- package/.agents/skills/01-web-automation/e2e-testing-patterns/examples/playwright_sharded_config.ts +3 -0
- package/.agents/skills/01-web-automation/playwright-webapp-testing/examples/server_lifecycle_playwright.py +3 -0
- package/.agents/skills/04-performance-and-load/web-vitals-and-performance-profiler/examples/playwright_cwv_profiler_fixture.ts +3 -0
- package/.agents/skills/05-security-and-compliance/security-dast-sentinel/references/dast_recipes.ts +3 -0
- package/.agents/skills/08-code-quality/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +3 -0
- package/.agents/skills/08-code-quality/code-refactoring-refactor-clean/examples/refactored_playwright_pom.ts +3 -0
- package/.agents/skills/11-ai-and-prompting/qa-aci-interface/examples/surgical_code_window_walkthrough.md +1 -1
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/agentskills.json +1 -1
- package/docs/ARCHITECTURE.en.md +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/PERFORMANCE_AUDIT_REPORT.md +2 -2
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/generate_skill_examples.py +3 -0
- package/scripts/package_dist.py +3 -0
- package/skills_manifest.json +1 -1
- package/synapse.config.json +1 -1
- package/tools/.infer_baseline.json +3 -796
- package/tools/__init__.py +4 -1
- package/tools/agent_canary.py +3 -0
- package/tools/analyze_project.py +3 -0
- package/tools/api_drift_sentinel.py +3 -0
- package/tools/api_fuzzer.py +3 -0
- package/tools/ast_cache.py +4 -2
- package/tools/author_integrity.py +53 -1
- package/tools/auto_heal.py +7 -2
- package/tools/autogen_qa_broker.py +14 -15
- package/tools/browser_helpers.js +2 -2
- package/tools/bug_reporter.py +3 -0
- package/tools/build_consolidated_report.py +3 -0
- package/tools/bump_version.py +4 -1
- package/tools/cache_resolver.py +7 -3
- package/tools/check_env.py +3 -0
- package/tools/check_version_sync.py +3 -0
- package/tools/ci_healing_hook.py +3 -0
- package/tools/cli.py +10 -7
- package/tools/config_decoupler.py +3 -0
- package/tools/core/__init__.py +3 -0
- package/tools/core/file_lock.py +23 -14
- package/tools/core/i18n.py +9 -7
- package/tools/core/memory_bus.py +6 -3
- package/tools/core/process_supervisor.py +28 -18
- package/tools/core/token_estimator.py +55 -18
- package/tools/count_tokens.py +11 -7
- package/tools/create_mock_docx.py +3 -0
- package/tools/dashboard_generator.py +17 -15
- package/tools/db_sandbox.py +4 -1
- package/tools/debt_harvester.py +2 -2
- package/tools/diagram_architect.py +3 -0
- package/tools/distill_log.py +22 -2
- package/tools/e2e_flow_prober.py +3 -0
- package/tools/export_postman_collection.py +3 -0
- package/tools/flaky_detector.py +3 -0
- package/tools/fsm_enforcer.py +2 -2
- package/tools/fuzz_payloads.py +3 -0
- package/tools/generate_allure_report.py +3 -0
- package/tools/generate_api_matrix.py +3 -0
- package/tools/generate_jmx_plan.py +3 -0
- package/tools/generate_tc_from_story.py +3 -0
- package/tools/generate_test_reports.py +3 -0
- package/tools/git_pre_commit_guard.py +13 -3
- package/tools/git_worktree_manager.py +3 -0
- package/tools/heal/__init__.py +3 -0
- package/tools/heal_pr_automator.py +3 -0
- package/tools/heuristic_locator_matcher.py +3 -0
- package/tools/hub_publisher.py +3 -3
- package/tools/infer_linter.py +19 -9
- package/tools/init_config.py +6 -9
- package/tools/jtl_analyzer.py +3 -0
- package/tools/lint/__init__.py +3 -0
- package/tools/lint_ai_docs.py +3 -0
- package/tools/lookup_tc.py +3 -0
- package/tools/lookup_xpath.py +3 -0
- package/tools/matrix_sharder.py +3 -0
- package/tools/mcp/__init__.py +3 -0
- package/tools/mcp_docx_server.py +1 -1
- package/tools/mcp_excel_server.py +4 -1
- package/tools/mcp_server.py +4 -1
- package/tools/md_to_xlsx.py +3 -0
- package/tools/mechanical_ui_gate.py +3 -0
- package/tools/micro_mutator.py +9 -5
- package/tools/network_mock_shield.py +3 -0
- package/tools/newman_analyzer.py +3 -0
- package/tools/omni_emitter.py +3 -0
- package/tools/omni_parser.py +3 -0
- package/tools/omni_transpiler.py +3 -0
- package/tools/output_formatter.py +3 -0
- package/tools/package_release.py +6 -6
- package/tools/pairwise_generator.py +3 -0
- package/tools/pentest_scope_guard.py +2 -2
- package/tools/perf/__init__.py +3 -0
- package/tools/pinpoint_failure.py +3 -0
- package/tools/project_state.py +3 -0
- package/tools/repo_map.py +3 -0
- package/tools/report/__init__.py +3 -0
- package/tools/rules_router.py +42 -10
- package/tools/runaway_stopper.py +3 -0
- package/tools/safety_firewall.py +3 -0
- package/tools/setup_project.py +9 -4
- package/tools/skill_collision_guard.py +2 -2
- package/tools/skillspector.py +2 -1
- package/tools/smart_visual_masker.py +3 -0
- package/tools/telemetry_correlator.py +3 -0
- package/tools/template_excel_exporter.py +2 -2
- package/tools/test_impact.py +3 -0
- package/tools/trace_data_flow.py +3 -0
- package/tools/traffic_session_converter.py +3 -0
- package/tools/ui_server.py +2 -2
- package/tools/universal_ir.py +3 -0
- package/tools/update_sentinel.py +15 -9
- package/tools/validate_groovy_scripts.py +3 -0
- package/tools/verify_all.py +27 -20
- package/tools/visual_diff_canvas.py +3 -0
- package/tools/visual_som_helper.py +3 -0
- package/tools/watch_mode.py +4 -4
- package/tools/wcag_audit.py +3 -0
- package/tools/welcome_page.py +1 -1
package/tools/setup_project.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Enterprise QA Autonomous Project Setup & Bootstrap Engine
|
|
4
7
|
----------------------------------------------------------
|
|
@@ -427,16 +430,18 @@ def inject_antigravity_global_plugin():
|
|
|
427
430
|
if os.path.islink(dst):
|
|
428
431
|
try:
|
|
429
432
|
os.unlink(dst)
|
|
430
|
-
except OSError:
|
|
431
|
-
|
|
433
|
+
except OSError as err:
|
|
434
|
+
import logging
|
|
435
|
+
logging.getLogger("setup_project").debug("Unlink failed: %s", err)
|
|
432
436
|
if sys.platform == "win32":
|
|
433
437
|
try:
|
|
434
438
|
import _winapi
|
|
435
439
|
if not os.path.exists(dst):
|
|
436
440
|
_winapi.CreateJunction(src, dst)
|
|
437
441
|
return
|
|
438
|
-
except (OSError, ImportError, AttributeError):
|
|
439
|
-
|
|
442
|
+
except (OSError, ImportError, AttributeError) as err:
|
|
443
|
+
import logging
|
|
444
|
+
logging.getLogger("setup_project").debug("Windows junction failed, falling back to copytree: %s", err)
|
|
440
445
|
shutil.copytree(src, dst, dirs_exist_ok=True, ignore=shutil.ignore_patterns("__pycache__", "*.pyc", "*.tmp"))
|
|
441
446
|
|
|
442
447
|
sync_dir(os.path.join(HUB_ROOT, ".agents", "skills"), os.path.join(target_plugin_dir, "skills"))
|
|
@@ -129,8 +129,8 @@ class SkillCollisionGuard:
|
|
|
129
129
|
with open(full_path, "r", encoding="utf-8", errors="ignore") as fp:
|
|
130
130
|
content = fp.read()
|
|
131
131
|
rules[f] = content
|
|
132
|
-
except OSError
|
|
133
|
-
|
|
132
|
+
except OSError:
|
|
133
|
+
continue
|
|
134
134
|
return rules
|
|
135
135
|
|
|
136
136
|
def audit_rules(self, rules_dir: str = ".agents/rules") -> Tuple[bool, List[Dict[str, Any]]]:
|
package/tools/skillspector.py
CHANGED
|
@@ -995,7 +995,8 @@ def is_path_ignored(file_or_dir_path: str, repo_anchor: Path, patterns: List[str
|
|
|
995
995
|
if spec.match_file(rel_posix):
|
|
996
996
|
return True
|
|
997
997
|
except (ImportError, Exception) as err:
|
|
998
|
-
|
|
998
|
+
import logging
|
|
999
|
+
logging.getLogger("skillspector").debug("Pathspec match failed, falling back to fnmatch: %s", err)
|
|
999
1000
|
|
|
1000
1001
|
# fnmatch fallback
|
|
1001
1002
|
for pat in patterns:
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
# -*- coding: utf-8 -*-
|
|
3
6
|
"""
|
|
4
7
|
tools/telemetry_correlator.py — Full-Stack APM & Server Telemetry Performance Correlator
|
package/tools/test_impact.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Universal Test Impact Analyzer (Graphify AST-Powered)
|
|
4
7
|
---------------------------------------------------
|
package/tools/trace_data_flow.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Universal Data Flow & Teardown Tracer (Taint Analysis)
|
|
4
7
|
----------------------------------------------------
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Enterprise Shift-Right Traffic & User Session Replay Engine (HAR / RUM to Test)
|
|
4
7
|
--------------------------------------------------------------------------------
|
package/tools/ui_server.py
CHANGED
|
@@ -236,7 +236,7 @@ class SynapseUiHandler(BaseHTTPRequestHandler):
|
|
|
236
236
|
if path == "/api/status":
|
|
237
237
|
active_target = JOB_MANAGER.target_dir or REPO_ROOT
|
|
238
238
|
self.send_json(200, {
|
|
239
|
-
"version": "4.1.
|
|
239
|
+
"version": "4.1.4",
|
|
240
240
|
"status": "ONLINE",
|
|
241
241
|
"os": sys.platform,
|
|
242
242
|
"workspace": active_target,
|
|
@@ -371,7 +371,7 @@ def run_server(host: str = "127.0.0.1", port: int = 8080, open_browser: bool = T
|
|
|
371
371
|
|
|
372
372
|
if open_browser:
|
|
373
373
|
def opener():
|
|
374
|
-
time.sleep(0.5)
|
|
374
|
+
time.sleep(0.5) # synapse-ignore: HARD_DELAY_ANTI_PATTERN
|
|
375
375
|
webbrowser.open(url)
|
|
376
376
|
threading.Thread(target=opener, daemon=True).start()
|
|
377
377
|
|
package/tools/universal_ir.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Universal Testing Intermediate Representation (IR) Schema
|
|
4
7
|
---------------------------------------------------------
|
package/tools/update_sentinel.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Enterprise Synapse-Hub Auto-Update & Version Drift Sentinel
|
|
4
7
|
------------------------------------------------------------
|
|
@@ -65,7 +68,7 @@ def get_local_version():
|
|
|
65
68
|
try:
|
|
66
69
|
with open(pkg_file, "r", encoding="utf-8") as f:
|
|
67
70
|
data = json.load(f)
|
|
68
|
-
return data.get("version", "4.1.
|
|
71
|
+
return data.get("version", "4.1.4")
|
|
69
72
|
except (OSError, json.JSONDecodeError):
|
|
70
73
|
data = {}
|
|
71
74
|
|
|
@@ -74,11 +77,11 @@ def get_local_version():
|
|
|
74
77
|
try:
|
|
75
78
|
with open(manifest_file, "r", encoding="utf-8") as f:
|
|
76
79
|
data = json.load(f)
|
|
77
|
-
return data.get("version", "4.1.
|
|
80
|
+
return data.get("version", "4.1.4")
|
|
78
81
|
except (OSError, json.JSONDecodeError):
|
|
79
82
|
data = {}
|
|
80
83
|
|
|
81
|
-
return "4.1.
|
|
84
|
+
return "4.1.4"
|
|
82
85
|
|
|
83
86
|
|
|
84
87
|
def fetch_remote_version():
|
|
@@ -304,8 +307,9 @@ def perform_update():
|
|
|
304
307
|
)
|
|
305
308
|
if res.returncode == 0:
|
|
306
309
|
print(f" {GREEN}[OK] Global NPM package updated to latest!{RESET}")
|
|
307
|
-
except (subprocess.SubprocessError, OSError):
|
|
308
|
-
|
|
310
|
+
except (subprocess.SubprocessError, OSError) as err:
|
|
311
|
+
import logging
|
|
312
|
+
logging.getLogger("update_sentinel").debug("NPM update skipped: %s", err)
|
|
309
313
|
|
|
310
314
|
# 2. Check Global Plugin
|
|
311
315
|
if os.path.exists(GLOBAL_PLUGIN_DIR) and GLOBAL_PLUGIN_DIR.lower() != HUB_ROOT.lower():
|
|
@@ -315,8 +319,9 @@ def perform_update():
|
|
|
315
319
|
try:
|
|
316
320
|
subprocess.run(["git", "pull", "--ff-only"], cwd=GLOBAL_PLUGIN_DIR, stdout=subprocess.DEVNULL, timeout=30.0)
|
|
317
321
|
print(f" {GREEN}[OK] Updated Global Plugin repository: {GLOBAL_PLUGIN_DIR}{RESET}")
|
|
318
|
-
except (subprocess.SubprocessError, OSError):
|
|
319
|
-
|
|
322
|
+
except (subprocess.SubprocessError, OSError) as err:
|
|
323
|
+
import logging
|
|
324
|
+
logging.getLogger("update_sentinel").debug("Git pull skipped: %s", err)
|
|
320
325
|
else:
|
|
321
326
|
# Refresh metadata files in global plugin
|
|
322
327
|
try:
|
|
@@ -327,8 +332,9 @@ def perform_update():
|
|
|
327
332
|
if os.path.exists(src_f):
|
|
328
333
|
shutil.copy2(src_f, dst_f)
|
|
329
334
|
print(f" {GREEN}[OK] Refreshed metadata & LICENSE in: {GLOBAL_PLUGIN_DIR}{RESET}")
|
|
330
|
-
except OSError:
|
|
331
|
-
|
|
335
|
+
except OSError as err:
|
|
336
|
+
import logging
|
|
337
|
+
logging.getLogger("update_sentinel").debug("Failed to refresh metadata: %s", err)
|
|
332
338
|
|
|
333
339
|
# 3. Re-initialize SQLite Memory Cache
|
|
334
340
|
print(f"\n{BOLD}[3/3] Synchronizing Central Agent Memory Cache...{RESET}")
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Pre-check validator for Groovy scripts and POM keywords in enterprise test suites.
|
|
4
7
|
Catches syntax errors, broken GString escape sequences, and structural balance issues
|
package/tools/verify_all.py
CHANGED
|
@@ -55,27 +55,28 @@ for stream in (sys.stdout, sys.stderr):
|
|
|
55
55
|
pass
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
def safe_print(text="", stream=
|
|
58
|
+
def safe_print(text="", stream=None):
|
|
59
59
|
"""Safely prints text to the given stream, handling BlockingIOError or encoding issues."""
|
|
60
|
+
target_stream = stream if stream is not None else sys.stdout
|
|
60
61
|
try:
|
|
61
62
|
if text:
|
|
62
|
-
|
|
63
|
+
target_stream.write(f"{text}\n")
|
|
63
64
|
else:
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
target_stream.write("\n")
|
|
66
|
+
target_stream.flush()
|
|
66
67
|
except BlockingIOError:
|
|
67
68
|
try:
|
|
68
|
-
if hasattr(
|
|
69
|
-
os.set_blocking(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
except OSError
|
|
73
|
-
|
|
69
|
+
if hasattr(target_stream, 'fileno'):
|
|
70
|
+
os.set_blocking(target_stream.fileno(), True)
|
|
71
|
+
target_stream.write(f"{text}\n")
|
|
72
|
+
target_stream.flush()
|
|
73
|
+
except OSError: # synapse-ignore: SWALLOWED_EXCEPTION
|
|
74
|
+
pass
|
|
74
75
|
except Exception:
|
|
75
76
|
try:
|
|
76
|
-
|
|
77
|
-
except Exception
|
|
78
|
-
|
|
77
|
+
sys.stderr.write(f"{text}\n")
|
|
78
|
+
except Exception: # synapse-ignore: SWALLOWED_EXCEPTION
|
|
79
|
+
pass
|
|
79
80
|
|
|
80
81
|
BOM_EXTENSIONS = (
|
|
81
82
|
".groovy", ".tc", ".ts", ".glbl", ".md", ".py", ".json", ".ps1",
|
|
@@ -90,8 +91,7 @@ REPO_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, ".."))
|
|
|
90
91
|
FORBIDDEN_PATH_PATTERNS = [
|
|
91
92
|
(re.compile(r'file:///[a-zA-Z]:', re.IGNORECASE), "Machine file URI (file:///...)"),
|
|
92
93
|
(re.compile(r'\b[a-zA-Z]:\\Users\\[a-zA-Z0-9_\-]+\\', re.IGNORECASE), "Windows User directory path"),
|
|
93
|
-
(re.compile(r'\
|
|
94
|
-
(re.compile(r'\b/home/[a-zA-Z0-9_\-]+/', re.IGNORECASE), "Linux User home directory path"),
|
|
94
|
+
(re.compile(r'(?:^|[\s"\'`\(\[\{</])/(?:Users|home)/[a-zA-Z0-9_\-]+/', re.IGNORECASE), "User home directory path (/Users/ or /home/)"),
|
|
95
95
|
(re.compile(r'\b[a-zA-Z]:[/\\](?:agent-skills|workspace|jenkins|builds)\b', re.IGNORECASE), "Machine-specific repository path"),
|
|
96
96
|
(re.compile(r'[/\\\\]legacy_abs_path[/\\\\]', re.IGNORECASE), "Legacy absolute path reference"),
|
|
97
97
|
]
|
|
@@ -236,7 +236,7 @@ MOJIBAKE_INDICATORS = (
|
|
|
236
236
|
def gate_1_bom_check(repo_root, mode="AUTO"):
|
|
237
237
|
"""Gate 1: Verifies 100% UTF-8 encoding with zero Byte Order Mark (BOM) bytes and zero corrupted control characters."""
|
|
238
238
|
print("\n[GATE 1] Scanning UTF-8 No BOM and Encoding Integrity across repository...")
|
|
239
|
-
ignored_dirs = {".git", ".gradle", "node_modules", "allure-results", "graphify-out", "__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "build", "dist", "claude-ecosystem-repos", "external_repos", "teamwork"}
|
|
239
|
+
ignored_dirs = {".git", ".gradle", "node_modules", "allure-results", "graphify-out", "__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "build", "dist", "claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"}
|
|
240
240
|
ignored_files = {"verify_all.py", "test_tools.py"}
|
|
241
241
|
bom_violations = []
|
|
242
242
|
mojibake_violations = []
|
|
@@ -291,12 +291,12 @@ def gate_2_path_portability(repo_root, mode="AUTO"):
|
|
|
291
291
|
ignored_dirs = {
|
|
292
292
|
".git", ".gradle", "node_modules", "allure-results", "Screenshots",
|
|
293
293
|
"Reports", "reports", "TestReports", "testreports", "Libs", ".settings", "graphify-out",
|
|
294
|
-
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork"
|
|
294
|
+
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"
|
|
295
295
|
}
|
|
296
296
|
ignored_files = {
|
|
297
297
|
".project", ".classpath", ".DS_Store", "memory_cache.db",
|
|
298
298
|
"verify_all.py", "git_pre_commit_guard.py", "agent_canary.py", "repo_map.txt", "repo_map.json",
|
|
299
|
-
"PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md"
|
|
299
|
+
"PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md", "AUDIT_REPORT.md"
|
|
300
300
|
}
|
|
301
301
|
violations = []
|
|
302
302
|
for root, dirs, files in os.walk(repo_root):
|
|
@@ -374,6 +374,9 @@ def gate_3_clean_pom(repo_root, mode="AUTO"):
|
|
|
374
374
|
r'(?:\.(?:click|dblclick|fill|type|press|check|locator|waitForSelector|hover|selectOption)|cy\.(?:get|find)|driver\.find[A-Za-z]*|WebUI\.[a-zA-Z]+)\s*\(\s*[\x22\x27`](?P<sel>[^\x22\x27`]+)[\x22\x27`]'
|
|
375
375
|
)
|
|
376
376
|
RAW_XPATH_PATTERN = re.compile(r'[\x22\x27`](?:xpath=|\/{2}[a-zA-Z*@\[])[^\x22\x27`]*[\x22\x27`]')
|
|
377
|
+
SEMANTIC_LOCATOR_PATTERN = re.compile(
|
|
378
|
+
r'(?:page|frame)\.(?:getByRole|getByLabel|getByPlaceholder|getByText|getByTestId|getByAltText|getByTitle)\s*\('
|
|
379
|
+
)
|
|
377
380
|
|
|
378
381
|
violations = []
|
|
379
382
|
for full_path in sorted(set(test_files)):
|
|
@@ -392,6 +395,10 @@ def gate_3_clean_pom(repo_root, mode="AUTO"):
|
|
|
392
395
|
if "findTestObject" in line:
|
|
393
396
|
violations.append((rel_path, line_no, "Raw findTestObject"))
|
|
394
397
|
continue
|
|
398
|
+
# Check Playwright semantic locators in test script
|
|
399
|
+
if SEMANTIC_LOCATOR_PATTERN.search(stripped):
|
|
400
|
+
violations.append((rel_path, line_no, f"Raw Playwright semantic locator in Test Script: '{stripped}'"))
|
|
401
|
+
continue
|
|
395
402
|
# Check locator calls taking raw CSS/XPath selectors
|
|
396
403
|
m = LOCATOR_CALL_PATTERN.search(stripped)
|
|
397
404
|
if m:
|
|
@@ -530,7 +537,7 @@ def gate_6_credential_security(repo_root, mode="AUTO"):
|
|
|
530
537
|
ignored_dirs = {
|
|
531
538
|
".git", ".gradle", "node_modules", "allure-results", "Screenshots",
|
|
532
539
|
"Reports", "reports", "TestReports", "testreports", "Libs", ".settings", "graphify-out",
|
|
533
|
-
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork"
|
|
540
|
+
"__pycache__", ".pytest_cache", ".ruff_cache", ".mypy_cache", "agent_qa.egg-info", "dist", "build", "claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"
|
|
534
541
|
}
|
|
535
542
|
|
|
536
543
|
for root, dirs, files in os.walk(repo_root):
|
|
@@ -890,7 +897,7 @@ def gate_7_infer_linter(repo_root, mode="AUTO"):
|
|
|
890
897
|
else:
|
|
891
898
|
safe_print("[PASS] Hub Mode Regression Test Suite: Verified via active parent test runner.")
|
|
892
899
|
|
|
893
|
-
test_dirs = ["
|
|
900
|
+
test_dirs = ["examples"] if effective_mode == "HUB" else ["Scripts", "tests", "test", "e2e", "specs", "cypress"]
|
|
894
901
|
has_tests = False
|
|
895
902
|
target_scan_dir = None
|
|
896
903
|
for td in test_dirs:
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
Enterprise Vision-Grounded Fallback & Set-of-Marks (SoM) Engine
|
|
4
7
|
--------------------------------------------------------------
|
package/tools/watch_mode.py
CHANGED
|
@@ -46,19 +46,19 @@ IGNORED_DIRS = {
|
|
|
46
46
|
".git", ".gradle", "node_modules", "allure-results", "Screenshots",
|
|
47
47
|
"Reports", "reports", "TestReports", "testreports", "bin", "Libs", ".settings",
|
|
48
48
|
"graphify-out", "__pycache__", "agent_qa.egg-info", "dist", "build", ".pytest_cache",
|
|
49
|
-
"claude-ecosystem-repos", "external_repos", "teamwork"
|
|
49
|
+
"claude-ecosystem-repos", "external_repos", "teamwork", ".synapse", ".sandbox_snapshots"
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
IGNORED_FILES = {
|
|
53
53
|
".project", ".classpath", ".DS_Store", "memory_cache.db",
|
|
54
54
|
"verify_all.py", "git_pre_commit_guard.py", "agent_canary.py", "watch_mode.py",
|
|
55
|
-
"repo_map.txt", "repo_map.json", "PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md"
|
|
55
|
+
"repo_map.txt", "repo_map.json", "PROJECT_HEALTH_REPORT.md", "PROJECT_STATE.md", "AUDIT_REPORT.md"
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
FORBIDDEN_PATH_PATTERNS = [
|
|
59
59
|
(re.compile(r'file:///[a-zA-Z]:', re.IGNORECASE), "Machine file URI (file:///...)"),
|
|
60
60
|
(re.compile(r'\b[a-zA-Z]:\\Users\\[a-zA-Z0-9_\-]+\\', re.IGNORECASE), "Windows User directory path"),
|
|
61
|
-
(re.compile(r'\
|
|
61
|
+
(re.compile(r'(?:^|[\s"\'`\(\[\{</])/(?:Users|home)/[a-zA-Z0-9_\-]+/', re.IGNORECASE), "User home directory path (/Users/ or /home/)"),
|
|
62
62
|
]
|
|
63
63
|
|
|
64
64
|
# ANSI colors
|
|
@@ -263,7 +263,7 @@ def watch_directory(target_dir: str, debounce: float = 0.8, run_once: bool = Fal
|
|
|
263
263
|
|
|
264
264
|
try:
|
|
265
265
|
while True:
|
|
266
|
-
time.sleep(debounce)
|
|
266
|
+
time.sleep(debounce) # synapse-ignore: HARD_DELAY_ANTI_PATTERN
|
|
267
267
|
current_states = scan_file_states(target_dir)
|
|
268
268
|
changed_files = []
|
|
269
269
|
|
package/tools/wcag_audit.py
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
+
# SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
|
|
2
5
|
"""
|
|
3
6
|
tools/wcag_audit.py - Automated Accessibility (WCAG 2.2) Linter & Auditor
|
|
4
7
|
Operationalizes the .agents/skills/05-security-and-compliance/wcag-audit-patterns skill for Web & Enterprise Applications.
|
package/tools/welcome_page.py
CHANGED
|
@@ -47,7 +47,7 @@ def get_hub_metadata() -> Dict[str, Any]:
|
|
|
47
47
|
"""Retrieves version and catalog count from skills_manifest.json."""
|
|
48
48
|
manifest_path = os.path.join(HUB_ROOT, "skills_manifest.json")
|
|
49
49
|
meta = {
|
|
50
|
-
"version": "4.1.
|
|
50
|
+
"version": "4.1.4",
|
|
51
51
|
"totalSkills": 42,
|
|
52
52
|
"author": "Thế Vị (@TeeVee98)",
|
|
53
53
|
"repo": "https://github.com/TeeVee98/Synapse-Hub"
|