mirror of
https://github.com/Dvorinka/Devour.git
synced 2026-06-03 20:13:03 +00:00
i dont like commits
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"assessments": {
|
||||
"error_consistency": 56.5
|
||||
},
|
||||
"dimension_notes": {
|
||||
"error_consistency": {
|
||||
"evidence": [
|
||||
"Error wrapping is inconsistent across neighboring call paths: `cmd/serve.go` wraps many failures with operation context (e.g. `run devour_query search`), while `runServe` and `handleServeMethod` still return raw errors directly from `loadAppConfig` (`cmd/serve.go:45`, `cmd/serve.go:75`).",
|
||||
"Several lower-level functions return bare underlying errors without context (`internal/scraper/local.go:49`, `internal/scraper/local.go:57`, `internal/config/config.go:207`, `internal/config/config.go:364`) while sibling code in the same files uses contextual wrapping.",
|
||||
"Error classification is string-based in `cmd/ask.go` (`strings.Contains(fetchErr.Error(), \"persistence warning:\")` at line 191), making behavior dependent on message text rather than typed/sentinel error contracts.",
|
||||
"At least one path suppresses error details entirely (`countLOC` returns `0` on read failure in `internal/quality/plugins/go/plugin.go:353-356`), while other analyzer code returns explicit detector errors."
|
||||
],
|
||||
"impact_scope": "subsystem",
|
||||
"fix_scope": "multi_file_refactor",
|
||||
"confidence": "high",
|
||||
"unreported_risk": ""
|
||||
}
|
||||
},
|
||||
"findings": [
|
||||
{
|
||||
"dimension": "error_consistency",
|
||||
"identifier": "mixed_wrapped_and_bare_error_propagation",
|
||||
"summary": "Adjacent layers mix contextual wrapping and bare error returns",
|
||||
"related_files": [
|
||||
"cmd/serve.go",
|
||||
"internal/config/config.go",
|
||||
"internal/scraper/local.go",
|
||||
"cmd/scrape.go"
|
||||
],
|
||||
"evidence": [
|
||||
"`cmd/serve.go:87-109` wraps errors with operation labels, but `cmd/serve.go:45` and `cmd/serve.go:75` return raw `loadAppConfig` errors.",
|
||||
"`internal/config/config.go:207` and `:364` return bare errors, while nearby code uses contextual `fmt.Errorf(...: %w)`.",
|
||||
"`internal/scraper/local.go:49`, `:57`, `:104`, `:154`, `:164` return raw errors despite other branches adding context and joins."
|
||||
],
|
||||
"suggestion": "Adopt a single propagation rule for non-boundary layers: always wrap external/I-O failures with operation context (e.g., `fmt.Errorf(\"load config path: %w\", err)`). Apply this consistently in `cmd/serve.go`, `internal/config/config.go`, and `internal/scraper/local.go`.",
|
||||
"confidence": "high",
|
||||
"impact_scope": "subsystem",
|
||||
"fix_scope": "multi_file_refactor"
|
||||
},
|
||||
{
|
||||
"dimension": "error_consistency",
|
||||
"identifier": "string_based_error_classification_in_ask_flow",
|
||||
"summary": "Ask flow branches on error message text instead of typed categories",
|
||||
"related_files": [
|
||||
"cmd/ask.go",
|
||||
"cmd/scrape.go",
|
||||
"internal/server/server.go"
|
||||
],
|
||||
"evidence": [
|
||||
"`cmd/ask.go:379` and `:384` encode category in message prefix (`\"persistence warning:\"`).",
|
||||
"`cmd/ask.go:191` uses `strings.Contains(fetchErr.Error(), \"persistence warning:\")` for control flow, coupling behavior to mutable message strings.",
|
||||
"Other modules treat errors opaquely and pass through generic text (`internal/server/server.go:256` returns `err.Error()` to RPC clients), amplifying inconsistency in downstream handling."
|
||||
],
|
||||
"suggestion": "Introduce typed/sentinel errors for recoverable warning classes (e.g., `var ErrPersistenceWarning`) and use `errors.Is`/`errors.As` in `cmd/ask.go` instead of string matching. Keep human-readable text separate from machine classification.",
|
||||
"confidence": "high",
|
||||
"impact_scope": "module",
|
||||
"fix_scope": "multi_file_refactor"
|
||||
},
|
||||
{
|
||||
"dimension": "error_consistency",
|
||||
"identifier": "analyzer_error_handling_policy_is_incoherent",
|
||||
"summary": "Analyzer/plugin paths alternate between explicit, wrapped, and silent failures",
|
||||
"related_files": [
|
||||
"internal/quality/plugins/go/analyzers/detectors.go",
|
||||
"internal/quality/plugins/go/analyzers/advanced.go",
|
||||
"internal/quality/plugins/go/plugin.go"
|
||||
],
|
||||
"evidence": [
|
||||
"`internal/quality/plugins/go/analyzers/detectors.go:46-60` converts read failures into synthetic findings (`detector_error`) rather than returning an error.",
|
||||
"`internal/quality/plugins/go/analyzers/advanced.go:242` returns raw parse errors from helper methods without context.",
|
||||
"`internal/quality/plugins/go/plugin.go:353-356` swallows file read failures in `countLOC` by returning `0`, losing failure provenance entirely."
|
||||
],
|
||||
"suggestion": "Define a consistent analyzer failure contract: either (a) report detector-execution issues as standardized `detector_error` findings with metadata, or (b) return wrapped errors; do not silently coerce errors to default values. Refactor `countLOC` to return `(int, error)` and propagate classification consistently.",
|
||||
"confidence": "medium",
|
||||
"impact_scope": "subsystem",
|
||||
"fix_scope": "architectural_change"
|
||||
}
|
||||
],
|
||||
"review_quality": {
|
||||
"batch_count": 1,
|
||||
"dimension_coverage": 1.0,
|
||||
"evidence_density": 1.333,
|
||||
"high_score_without_risk": 0,
|
||||
"finding_pressure": 7.244,
|
||||
"dimensions_with_findings": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
You are a focused subagent reviewer for a single holistic investigation batch.
|
||||
|
||||
Repository root: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour
|
||||
Immutable packet: /home/tdvorak/Desktop/PROG_projekty/GOLANG/Devour/.desloppify/review_packets/holistic_packet_20260224_105325.json
|
||||
Batch index: 1
|
||||
Batch name: Cross-cutting Sweep
|
||||
Batch dimensions: error_consistency
|
||||
Batch rationale: selected dimensions had no direct batch mapping; review representative cross-cutting files
|
||||
|
||||
Files assigned:
|
||||
- internal/quality/enhanced_types.go
|
||||
- internal/quality/scoring_test.go
|
||||
- internal/quality/types.go
|
||||
- pkg/rustdocs/parser_test.go
|
||||
- internal/config/config.go
|
||||
- cmd/scrape.go
|
||||
- internal/quality/plugins/go/analyzers/detectors.go
|
||||
- internal/quality/plugins/go/analyzers/advanced.go
|
||||
- internal/scraper/web.go
|
||||
- internal/quality/plugins/go/plugin.go
|
||||
- internal/scheduler/scheduler.go
|
||||
- cmd/push.go
|
||||
- internal/scraper/localsearch_test.go
|
||||
- cmd/ask.go
|
||||
- internal/ai/openai.go
|
||||
- internal/server/server.go
|
||||
- cmd/get.go
|
||||
- internal/quality/analyzers/controlflow.go
|
||||
- internal/vector/store.go
|
||||
- examples/demo_scrapers.go
|
||||
- internal/indexer/indexer.go
|
||||
- internal/scraper/openapi.go
|
||||
- pkg/pythondocs/parser.go
|
||||
- cmd/get_test.go
|
||||
- internal/quality/scanner_test.go
|
||||
- internal/scraper/localsearch.go
|
||||
- cmd/serve.go
|
||||
- internal/scraper/external/nuxtdocs.go
|
||||
- internal/quality/scanner.go
|
||||
- internal/quality/plugins/go/analyzers/test_coverage.go
|
||||
- internal/search/engine.go
|
||||
- internal/scraper/github.go
|
||||
- internal/scraper/external/astrodocs.go
|
||||
- internal/scraper/external/cloudflaredocs.go
|
||||
- internal/scraper/external/dockerdocs.go
|
||||
- internal/quality/plugins/go/fixers/advanced_fixers.go
|
||||
- cleanup_unused.go
|
||||
- main.go
|
||||
- cmd/ask_test.go
|
||||
- cmd/auto.go
|
||||
- internal/scraper/local.go
|
||||
- internal/scraper/local_test.go
|
||||
- README.md
|
||||
- .desloppify/config.json
|
||||
- .desloppify/query.json
|
||||
- .desloppify/subagents/runs/20260223_100953/prompts/batch-1.md
|
||||
- .desloppify/subagents/runs/20260223_100953/prompts/batch-2.md
|
||||
- .desloppify/subagents/runs/20260223_100953/prompts/batch-3.md
|
||||
- .desloppify/subagents/runs/20260223_100953/prompts/batch-4.md
|
||||
- .desloppify/subagents/runs/20260223_100953/prompts/batch-5.md
|
||||
- .desloppify/subagents/runs/20260223_100953/prompts/batch-6.md
|
||||
- .desloppify/subagents/runs/20260224_101201/prompts/batch-1.md
|
||||
- .desloppify/subagents/runs/20260224_101201/prompts/batch-2.md
|
||||
- .desloppify/subagents/runs/20260224_101201/prompts/batch-5.md
|
||||
- .desloppify/subagents/runs/20260224_101740/prompts/batch-1.md
|
||||
- .github/workflows/ci.yml
|
||||
- AGENTS.md
|
||||
- cmd/devour_enhanced.py
|
||||
- cmd/devour_enhanced_fixed.py
|
||||
- cmd/devour_enhanced_v2.py
|
||||
- desloppify/desloppify/desloppify/app/commands/_show_terminal.py
|
||||
- desloppify/desloppify/desloppify/app/commands/fix/apply_flow.py
|
||||
- desloppify/desloppify/desloppify/app/commands/issues_cmd.py
|
||||
- desloppify/desloppify/desloppify/app/commands/next.py
|
||||
- desloppify/desloppify/desloppify/app/commands/resolve/selection.py
|
||||
- desloppify/desloppify/desloppify/app/commands/scan/scan_reporting_llm.py
|
||||
- desloppify/desloppify/desloppify/app/commands/status_parts/render.py
|
||||
- desloppify/desloppify/desloppify/app/output/scorecard_parts/projection.py
|
||||
- desloppify/desloppify/desloppify/engine/detectors/security/rules.py
|
||||
- desloppify/desloppify/desloppify/engine/scoring_internal/subjective/core.py
|
||||
- desloppify/desloppify/desloppify/engine/state_internal/resolution.py
|
||||
- desloppify/desloppify/desloppify/intelligence/review/__init__.py
|
||||
- desloppify/desloppify/desloppify/intelligence/review/context_internal/structure.py
|
||||
- desloppify/desloppify/desloppify/intelligence/review/dimensions/data.py
|
||||
- desloppify/desloppify/desloppify/intelligence/review/importing/holistic.py
|
||||
- desloppify/desloppify/desloppify/languages/_shared/phases_common.py
|
||||
- desloppify/desloppify/desloppify/languages/_shared/review_data/dimensions.json
|
||||
- desloppify/desloppify/desloppify/languages/_shared/scaffold_detect_commands.py
|
||||
- desloppify/desloppify/desloppify/languages/csharp/_parse_helpers.py
|
||||
- desloppify/desloppify/desloppify/languages/csharp/commands.py
|
||||
|
||||
Task requirements:
|
||||
1. Read the immutable packet and follow `system_prompt` constraints exactly.
|
||||
2. Evaluate ONLY listed files and ONLY listed dimensions for this batch.
|
||||
3. Return 0-10 high-quality findings for this batch (empty array allowed).
|
||||
4. Score/finding consistency is required: broader or more severe findings MUST lower dimension scores.
|
||||
5. Every finding must include `related_files` with at least 2 files when possible.
|
||||
6. Every finding must include `impact_scope` and `fix_scope`.
|
||||
7. Every scored dimension MUST include dimension_notes with concrete evidence.
|
||||
8. If a dimension score is >85, include `unreported_risk` in dimension_notes.
|
||||
9. Use exactly one decimal place for every assessment and abstraction sub-axis score.
|
||||
10. Do not edit repository files.
|
||||
11. Return ONLY valid JSON, no markdown fences.
|
||||
|
||||
Scope enums:
|
||||
- impact_scope: "local" | "module" | "subsystem" | "codebase"
|
||||
- fix_scope: "single_edit" | "multi_file_refactor" | "architectural_change"
|
||||
|
||||
Output schema:
|
||||
{
|
||||
"batch": "Cross-cutting Sweep",
|
||||
"batch_index": 1,
|
||||
"assessments": {"<dimension>": <0-100 with one decimal place>},
|
||||
"dimension_notes": {
|
||||
"<dimension>": {
|
||||
"evidence": ["specific code observations"],
|
||||
"impact_scope": "local|module|subsystem|codebase",
|
||||
"fix_scope": "single_edit|multi_file_refactor|architectural_change",
|
||||
"confidence": "high|medium|low",
|
||||
"unreported_risk": "required when score >85",
|
||||
"sub_axes": {"abstraction_leverage": 0-100 with one decimal place, "indirection_cost": 0-100 with one decimal place, "interface_honesty": 0-100 with one decimal place} // required for abstraction_fitness when evidence supports it
|
||||
}
|
||||
},
|
||||
"findings": []
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"batch": "Cross-cutting Sweep",
|
||||
"batch_index": 1,
|
||||
"assessments": {
|
||||
"error_consistency": 74.0
|
||||
},
|
||||
"dimension_notes": {
|
||||
"error_consistency": {
|
||||
"evidence": [
|
||||
"Error wrapping is inconsistent across neighboring call paths: `cmd/serve.go` wraps many failures with operation context (e.g. `run devour_query search`), while `runServe` and `handleServeMethod` still return raw errors directly from `loadAppConfig` (`cmd/serve.go:45`, `cmd/serve.go:75`).",
|
||||
"Several lower-level functions return bare underlying errors without context (`internal/scraper/local.go:49`, `internal/scraper/local.go:57`, `internal/config/config.go:207`, `internal/config/config.go:364`) while sibling code in the same files uses contextual wrapping.",
|
||||
"Error classification is string-based in `cmd/ask.go` (`strings.Contains(fetchErr.Error(), \"persistence warning:\")` at line 191), making behavior dependent on message text rather than typed/sentinel error contracts.",
|
||||
"At least one path suppresses error details entirely (`countLOC` returns `0` on read failure in `internal/quality/plugins/go/plugin.go:353-356`), while other analyzer code returns explicit detector errors."
|
||||
],
|
||||
"impact_scope": "subsystem",
|
||||
"fix_scope": "multi_file_refactor",
|
||||
"confidence": "high"
|
||||
}
|
||||
},
|
||||
"findings": [
|
||||
{
|
||||
"dimension": "error_consistency",
|
||||
"identifier": "mixed_wrapped_and_bare_error_propagation",
|
||||
"summary": "Adjacent layers mix contextual wrapping and bare error returns",
|
||||
"related_files": [
|
||||
"cmd/serve.go",
|
||||
"internal/config/config.go",
|
||||
"internal/scraper/local.go",
|
||||
"cmd/scrape.go"
|
||||
],
|
||||
"evidence": [
|
||||
"`cmd/serve.go:87-109` wraps errors with operation labels, but `cmd/serve.go:45` and `cmd/serve.go:75` return raw `loadAppConfig` errors.",
|
||||
"`internal/config/config.go:207` and `:364` return bare errors, while nearby code uses contextual `fmt.Errorf(...: %w)`.",
|
||||
"`internal/scraper/local.go:49`, `:57`, `:104`, `:154`, `:164` return raw errors despite other branches adding context and joins."
|
||||
],
|
||||
"suggestion": "Adopt a single propagation rule for non-boundary layers: always wrap external/I-O failures with operation context (e.g., `fmt.Errorf(\"load config path: %w\", err)`). Apply this consistently in `cmd/serve.go`, `internal/config/config.go`, and `internal/scraper/local.go`.",
|
||||
"confidence": "high",
|
||||
"impact_scope": "subsystem",
|
||||
"fix_scope": "multi_file_refactor"
|
||||
},
|
||||
{
|
||||
"dimension": "error_consistency",
|
||||
"identifier": "string_based_error_classification_in_ask_flow",
|
||||
"summary": "Ask flow branches on error message text instead of typed categories",
|
||||
"related_files": [
|
||||
"cmd/ask.go",
|
||||
"cmd/scrape.go",
|
||||
"internal/server/server.go"
|
||||
],
|
||||
"evidence": [
|
||||
"`cmd/ask.go:379` and `:384` encode category in message prefix (`\"persistence warning:\"`).",
|
||||
"`cmd/ask.go:191` uses `strings.Contains(fetchErr.Error(), \"persistence warning:\")` for control flow, coupling behavior to mutable message strings.",
|
||||
"Other modules treat errors opaquely and pass through generic text (`internal/server/server.go:256` returns `err.Error()` to RPC clients), amplifying inconsistency in downstream handling."
|
||||
],
|
||||
"suggestion": "Introduce typed/sentinel errors for recoverable warning classes (e.g., `var ErrPersistenceWarning`) and use `errors.Is`/`errors.As` in `cmd/ask.go` instead of string matching. Keep human-readable text separate from machine classification.",
|
||||
"confidence": "high",
|
||||
"impact_scope": "module",
|
||||
"fix_scope": "multi_file_refactor"
|
||||
},
|
||||
{
|
||||
"dimension": "error_consistency",
|
||||
"identifier": "analyzer_error_handling_policy_is_incoherent",
|
||||
"summary": "Analyzer/plugin paths alternate between explicit, wrapped, and silent failures",
|
||||
"related_files": [
|
||||
"internal/quality/plugins/go/analyzers/detectors.go",
|
||||
"internal/quality/plugins/go/analyzers/advanced.go",
|
||||
"internal/quality/plugins/go/plugin.go"
|
||||
],
|
||||
"evidence": [
|
||||
"`internal/quality/plugins/go/analyzers/detectors.go:46-60` converts read failures into synthetic findings (`detector_error`) rather than returning an error.",
|
||||
"`internal/quality/plugins/go/analyzers/advanced.go:242` returns raw parse errors from helper methods without context.",
|
||||
"`internal/quality/plugins/go/plugin.go:353-356` swallows file read failures in `countLOC` by returning `0`, losing failure provenance entirely."
|
||||
],
|
||||
"suggestion": "Define a consistent analyzer failure contract: either (a) report detector-execution issues as standardized `detector_error` findings with metadata, or (b) return wrapped errors; do not silently coerce errors to default values. Refactor `countLOC` to return `(int, error)` and propagate classification consistently.",
|
||||
"confidence": "medium",
|
||||
"impact_scope": "subsystem",
|
||||
"fix_scope": "architectural_change"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user