feat(service-report): roam service-report — 4 one-command client deliverables#62
Open
Cranot wants to merge 1 commit into
Open
feat(service-report): roam service-report — 4 one-command client deliverables#62Cranot wants to merge 1 commit into
Cranot wants to merge 1 commit into
Conversation
…t deliverables (revalidated on v13.6.1)
roam-code AnalysisMode: incremental ( Health Score: 80/100 health: Healthy codebase (80/100) — 46 critical issues, focus: god_components Health Metrics
PR Risk
Quality Gate: PASSEDGate expression: SARIF Upload
Full analysis outputhealth{
"_meta": {
"cache_ttl_s": 300,
"cacheable": true,
"index_age_s": 3,
"latency_ms": null,
"response_tokens": 3895,
"roam_version": "13.6.1",
"timestamp": "2026-07-08T03:24:21Z"
},
"actionable_count": 11,
"actionable_cycles": 1,
"agent_contract": {
"confidence": null,
"facts": [
"Healthy codebase (80/100) — 46 critical issues, focus: god_components",
"health score 80",
"tangle ratio 0.0",
"0.0011 propagation cost findings",
"issue count 66"
],
"next_commands": [
"roam debt",
"roam trends --days 30"
],
"risks": []
},
"algebraic_connectivity": null,
"algebraic_connectivity_available": false,
"bottleneck_thresholds": {
"p70": 1074,
"p90": 8472.4,
"population": 1189,
"utility_multiplier": 1.5
},
"category_severity": {
"bottlenecks": {
"critical": 15,
"info": 0,
"warning": 0
},
"cycles": {
"critical": 0,
"info": 0,
"warning": 1
},
"god_components": {
"critical": 31,
"info": 9,
"warning": 10
},
"layer_violations": {
"critical": 0,
"info": 0,
"warning": 0
}
},
"command": "health",
"cycles_actionable": 1,
"cycles_total": 14,
"framework_filtered": 0,
"health_score": 80,
"ignored_cycles": 13,
"imported_coverable_lines": 0,
"imported_coverage_files": 0,
"imported_coverage_pct": null,
"imported_covered_lines": 0,
"index_status": {
"dirty_files": 0,
"fresh": false,
"head_commit": "f8493b05a86f",
"hint": "index latest commit 6e85c57690ba != HEAD f8493b05a86f — git-derived metrics (commits, churn, co-change, weather) may be stale. Run `roam index --force`.",
"indexed_commit": "6e85c57690ba"
},
"issue_count": 66,
"list_counts": {
"bottlenecks": 15,
"cycle_break_suggestions": 0,
"cycles": 14,
"god_components": 50,
"layer_violations": 0,
"next_steps": 2,
"score_breakdown": 5
},
"project": "roam-code",
"propagation_cost": 0.0011,
"schema": "roam-envelope-v1",
"schema_version": "1.1.0",
"severity": {
"critical": 46,
"info": 22,
"warning": 11
},
"summary": {
"actionable_cycles": 1,
"algebraic_connectivity": null,
"algebraic_connectivity_available": false,
"category_severity": {
"bottlenecks": {
"critical": 15,
"info": 0,
"warning": 0
},
"cycles": {
"critical": 0,
"info": 0,
"warning": 1
},
"god_components": {
"critical": 31,
"info": 9,
"warning": 10
},
"layer_violations": {
"critical": 0,
"info": 0,
"warning": 0
}
},
"cycles_actionable": 1,
"cycles_definition": "Cycle counts derived from `roam.graph.cycles.find_cycles(G, min_size=2)` on the symbol graph. `cycles_total` = all SCCs of size >= 2; `cycles_actionable` = SCCs spanning >=2 files AND no test files (same-file and test-only cycles are informational). Run `roam health` for the per-cycle breakdown.",
"cycles_total": 14,
"detail_available": true,
"god_components": 50,
"god_components_definition": "God components: symbols where `(in_degree + out_degree) > 20` from the `graph_metrics` table, with utility-aware severity bands (standard >50=CRITICAL >30=WARNING; utility >150=CRITICAL >90=WARNING). Run `roam health` for the per-symbol breakdown. Legacy aliases: `god_objects` (fingerprint), `god_classes` (rules).",
"health_score": 80,
"health_score_definition": "weighted geometric mean (0-100) of 5 sigmoid health factors: tangle_ratio, god_components, bottlenecks, layer_violations, file_health (+coverage if available).",
"ignored_cycles": 13,
"imported_coverage_files": 0,
"imported_coverage_pct": null,
"issue_count": 66,
"partial_success": true,
"preserved_list_truncations": {},
"propagation_cost": 0.0011,
"severity": {
"critical": 46,
"info": 22,
"warning": 11
},
"tangle_ratio": 0,
"tangle_ratio_definition": "fraction of symbols inside non-trivial SCCs; higher = more cyclic coupling.",
"total_cycles": 14,
"truncated": true,
"verdict": "Healthy codebase (80/100) — 46 critical issues, focus: god_components",
"warnings_out": [
"health_algebraic_connectivity_warning:RuntimeWarning:algebraic_connectivity compute failed (ModuleNotFoundError): No module named 'numpy'; returning 0.0 sentinel — value is NOT a legitimate disconnected-graph reading"
]
},
"tangle_ratio": 0,
"total_cycles": 14,
"utility_count": 39,
"version": "13.6.1",
"warnings_out": [
"health_algebraic_connectivity_warning:RuntimeWarning:algebraic_connectivity compute failed (ModuleNotFoundError): No module named 'numpy'; returning 0.0 sentinel — value is NOT a legitimate disconnected-graph reading"
]
}pr-risk{
"_meta": {
"cache_ttl_s": 60,
"cacheable": true,
"index_age_s": 5,
"latency_ms": null,
"response_tokens": 1983,
"roam_version": "13.6.1",
"timestamp": "2026-07-08T03:24:23Z"
},
"actor": null,
"agent_contract": {
"confidence": null,
"facts": [
"High risk (58/100) — careful review needed (risk_level high) (driver: hotspot_score)",
"risk score 58",
"3 risk rank findings",
"14 changed files",
"1738 lines added"
],
"next_commands": [],
"risks": [
"pr-risk: high (58/100) on b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD — driver: hotspot_score",
"High blast radius: 9370 of 39539 symbols affected (23.7%) on b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD"
]
},
"author": null,
"blast_radius_pct": 23.7,
"bus_factor_risk": 0.57,
"change_shape": "mixed",
"changed_files": 14,
"closest_historical_pattern": [
"AGENTS.md",
"README.md",
"docs/ci-integration.md",
"llms-install.md",
"skills/roam/SKILL.md",
"src/roam/cli.py",
"src/roam/commands/cmd_service_report.py",
"src/roam/competitor_site_data.py",
"templates/distribution/landing-page/docs/agent-contract.html",
"templates/distribution/landing-page/docs/integration-tutorials.html",
"templates/distribution/landing-page/llms.txt",
"templates/distribution/landing-page/pricing.html",
"templates/distribution/landing-page/setup.html",
"tests/test_service_report.py"
],
"closest_similarity": 1,
"cluster_spread": 0,
"clusters_touched": 40,
"command": "pr-risk",
"coupling_score": 0.02,
"dead_code": [
{
"file": "src/roam/cli.py",
"kind": "class",
"name": "LazyGroup"
},
{
"file": "src/roam/cli.py",
"kind": "method",
"name": "parse_args"
},
{
"file": "src/roam/cli.py",
"kind": "method",
"name": "list_commands"
},
{
"file": "src/roam/cli.py",
"kind": "method",
"name": "get_command"
},
{
"file": "src/roam/cli.py",
"kind": "method",
"name": "resolve_command"
},
{
"file": "src/roam/cli.py",
"kind": "method",
"name": "invoke"
},
{
"file": "src/roam/cli.py",
"kind": "method",
"name": "format_help"
}
],
"dead_exports": 7,
"familiarity": {
"avg_familiarity": 1,
"files": [],
"files_assessed": 0
},
"findings": [
{
"claim": "pr-risk: high (58/100) on b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD — driver: hotspot_score",
"confidence": "heuristic",
"evidence": {
"actor": null,
"author": null,
"blast_radius_pct": 23.7,
"bus_factor_risk": 0.567,
"changed_files_count": 14,
"commit_range": "b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD",
"coupling_score": 0.016,
"created_at_epoch": 1783481063,
"diff_id": "9107ea6e7568",
"familiarity_risk": 0,
"file_list": [
"AGENTS.md",
"README.md",
"docs/ci-integration.md",
"llms-install.md",
"skills/roam/SKILL.md",
"src/roam/cli.py",
"src/roam/commands/cmd_service_report.py",
"src/roam/competitor_site_data.py",
"templates/distribution/landing-page/docs/agent-contract.html",
"templates/distribution/landing-page/docs/integration-tutorials.html",
"templates/distribution/landing-page/llms.txt",
"templates/distribution/landing-page/pricing.html",
"templates/distribution/landing-page/setup.html",
"tests/test_service_report.py"
],
"hotspot_score": 1,
"label": "b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD",
"lines_added": 1738,
"lines_removed": 18,
"minor_risk": 0,
"novelty_score": 0,
"reductive_change": false,
"risk_level": "high",
"risk_score": 58,
"staged": false,
"test_coverage_pct": 60,
"top_driver": "hotspot_score"
},
"finding_id_str": "pr-risk:composite-risk-score:9107ea6e7568",
"kind": "pr-risk:composite-risk-score",
"severity": "high",
"source_detector": "pr-risk",
"source_version": "1.0.0",
"subject_id": null,
"subject_kind": "commit"
},
{
"claim": "High blast radius: 9370 of 39539 symbols affected (23.7%) on b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD",
"confidence": "structural",
"evidence": {
"affected_symbols": 9370,
"blast_radius_pct": 23.7,
"changed_files_count": 14,
"changed_symbol_ids_count": 151,
"commit_range": "b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD",
"created_at_epoch": 1783481063,
"diff_id": "9107ea6e7568",
"file_list": [
"AGENTS.md",
"README.md",
"docs/ci-integration.md",
"llms-install.md",
"skills/roam/SKILL.md",
"src/roam/cli.py",
"src/roam/commands/cmd_service_report.py",
"src/roam/competitor_site_data.py",
"templates/distribution/landing-page/docs/agent-contract.html",
"templates/distribution/landing-page/docs/integration-tutorials.html",
"templates/distribution/landing-page/llms.txt",
"templates/distribution/landing-page/pricing.html",
"templates/distribution/landing-page/setup.html",
"tests/test_service_report.py"
],
"label": "b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD",
"staged": false,
"total_symbols": 39539
},
"finding_id_str": "pr-risk:high-blast-radius-symbol-touched:9107ea6e7568",
"kind": "pr-risk:high-blast-radius-symbol-touched",
"severity": "high",
"source_detector": "pr-risk",
"source_version": "1.0.0",
"subject_id": null,
"subject_kind": "commit"
}
],
"hotspot_score": 1,
"label": "b9030bdfc2f4bf95d10fe95bfa30bd003de9143c..HEAD",
"layer_spread": 0.44,
"layers_touched": 14,
"lines_added": 1738,
"lines_removed": 18,
"minor_risk": {
"files": [],
"files_assessed": 0,
"minor_files": 0
},
"novelty_score": 0,
"per_file": [
{
"blast": 9339,
"churn": 3245,
"is_test": false,
"lines_added": 2,
"lines_removed": 0,
"path": "src/roam/cli.py",
"symbols": 81
},
{
"blast": 56,
"churn": 1165,
"is_test": false,
"lines_added": 1165,
"lines_removed": 0,
"path": "src/roam/commands/cmd_service_report.py",
"symbols": 24
},
{
"blast": 23,
"churn": 3531,
"is_test": false,
"lines_added": 1,
"lines_removed": 1,
"path": "src/roam/competitor_site_data.py",
"symbols": 24
},
{
"blast": 12,
"churn": 553,
"is_test": true,
"lines_added": 553,
"lines_removed": 0,
"path": "tests/test_service_report.py",
"symbols": 22
},
{
"blast": 0,
"churn": 977,
"is_test": false,
"lines_added": 4,
"lines_removed": 4,
"path": "AGENTS.md",
"symbols": 0
},
{
"blast": 0,
"churn": 8774,
"is_test": false,
"lines_added": 3,
"lines_removed": 3,
"path": "README.md",
"symbols": 0
},
{
"blast": 0,
"churn": 508,
"is_test": false,
"lines_added": 1,
"lines_removed": 1,
"path": "docs/ci-integration.md",
"symbols": 0
},
{
"blast": 0,
"churn": 608,
"is_test": false,
"lines_added": 2,
"lines_removed": 2,
"path": "llms-install.md",
"symbols": 0
},
{
"blast": 0,
"churn": 309,
"is_test": false,
"lines_added": 1,
"lines_removed": 1,
"path": "skills/roam/SKILL.md",
"symbols": 0
},
{
"blast": 0,
"churn": 636,
"is_test": false,
"lines_added": 1,
"lines_removed": 1,
"path": "templates/distribution/landing-page/docs/agent-contract.html",
"symbols": 0
},
{
"blast": 0,
"churn": 431,
"is_test": false,
"lines_added": 1,
"lines_removed": 1,
"path": "templates/distribution/landing-page/docs/integration-tutorials.html",
"symbols": 0
},
{
"blast": 0,
"churn": 199,
"is_test": false,
"lines_added": 1,
"lines_removed": 1,
"path": "templates/distribution/landing-page/llms.txt",
"symbols": 0
},
{
"blast": 0,
"churn": 997,
"is_test": false,
"lines_added": 1,
"lines_removed": 1,
"path": "templates/distribution/landing-page/pricing.html",
"symbols": 0
},
{
"blast": 0,
"churn": 257,
"is_test": false,
"lines_added": 2,
"lines_removed": 2,
"path": "templates/distribution/landing-page/setup.html",
"symbols": 0
}
],
"project": "roam-code",
"reductive_change": false,
"reductive_discount_applied": false,
"risk_level": "high",
"risk_level_canonical": "high",
"risk_rank": 3,
"risk_score": 58,
"schema": "roam-envelope-v1",
"schema_version": "1.1.0",
"suggested_reviewers": [
{
"actor": "Cranot",
"author": "Cranot",
"lines": 14349
},
{
"actor": "Test",
"author": "Test",
"lines": 1185
},
{
"actor": "holive",
"author": "holive",
"lines": 92
}
],
"summary": {
"change_shape": "mixed",
"changed_files": 14,
"findings_count": 2,
"lines_added": 1738,
"lines_removed": 18,
"partial_success": false,
"risk_level": "high",
"risk_level_canonical": "high",
"risk_rank": 3,
"risk_score": 58,
"score_classification": "classified",
"verdict": "High risk (58/100) — careful review needed (risk_level high) (driver: hotspot_score)"
},
"test_coverage_pct": 60,
"total_clusters": 12393,
"total_layers": 32,
"version": "13.6.1",
"warnings_out": []
}roam-code analysis | Commands: |
Roam Agent ReviewVerdict: SAFE (risk_level low) blast-radius 0/100 · ai-likelihood 30/100 · rule violations 0 · critique high-severity 0 Verdict: SAFE. All structural signals clean at the configured thresholds. Next steps
Powered by roam-code — Apache 2.0, 100% local. Customize thresholds in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
roam service-report --type {due-diligence|ai-readiness|reachability-triage|post-incident}, a sibling of pr-replay. Re-validated against origin's current code: all 10 imports resolve, 22 tests pass, count-synced 267→268, ruff-clean. Parity-gated: +2 files, 0 deletions. No internal docs; no detector-code touched. (Stacks cleanly on the CI fix in #61.)