chore(track): archive throw-away scripts for result_migration_review_pass_20260617 (4 helper scripts + sites_to_classify.json)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
"""Aggregate UNCLEAR + INTERNAL_RETHROW sites from the audit JSON output."""
|
||||
import json
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main() -> int:
|
||||
audit_path = Path("C:/Users/Ed/AppData/Local/Temp/audit_initial.json")
|
||||
if not audit_path.exists():
|
||||
print(f"Missing: {audit_path}", file=sys.stderr)
|
||||
return 1
|
||||
with audit_path.open("r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
|
||||
target_categories = {"UNCLEAR", "INTERNAL_RETHROW"}
|
||||
by_file: dict[str, list[dict]] = defaultdict(list)
|
||||
total = 0
|
||||
for file_info in data.get("files", []):
|
||||
for finding in file_info.get("findings", []):
|
||||
if finding.get("category") in target_categories:
|
||||
record = {
|
||||
"line": finding.get("line"),
|
||||
"kind": finding.get("kind"),
|
||||
"context": finding.get("context"),
|
||||
"category": finding.get("category"),
|
||||
}
|
||||
by_file[file_info["filename"]].append(record)
|
||||
total += 1
|
||||
|
||||
print(f"Total sites in {sorted(target_categories)}: {total}")
|
||||
print(f"Files affected: {len(by_file)}")
|
||||
print()
|
||||
for filename in sorted(by_file):
|
||||
sites = by_file[filename]
|
||||
print(f"{filename}: {len(sites)} sites")
|
||||
for s in sites:
|
||||
print(f" L{s['line']:>5} {s['category']:<18} {s['kind']:<7} in {s['context']}")
|
||||
print()
|
||||
|
||||
out_path = Path("scripts/tier2/artifacts/result_migration_review_pass_20260617/sites_to_classify.json")
|
||||
out_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
with out_path.open("w", encoding="utf-8") as f:
|
||||
json.dump(
|
||||
{"total": total, "files": dict(by_file)},
|
||||
f,
|
||||
indent=2,
|
||||
)
|
||||
print(f"Wrote {out_path}")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
@@ -0,0 +1,12 @@
|
||||
"""Initialize the failcount state for the result_migration_review_pass_20260617 track."""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[3]))
|
||||
from scripts.tier2.failcount import FailcountState, save_state # noqa: E402
|
||||
|
||||
track = "result_migration_review_pass_20260617"
|
||||
state = FailcountState()
|
||||
save_state(track, state)
|
||||
print(f"Initialized failcount state for {track}")
|
||||
print(f"State: red={state.red_phase_failures}, green={state.green_phase_failures}, no_progress={state.no_progress_started_at}")
|
||||
@@ -0,0 +1,8 @@
|
||||
import json
|
||||
d = json.load(open(r'C:/Users/Ed/AppData/Local/Temp/audit_top100.json', encoding='utf-8'))
|
||||
print('UNCLEAR sites (top 100):')
|
||||
for f in d['files']:
|
||||
for finding in f.get('findings', []):
|
||||
if finding.get('category') == 'UNCLEAR':
|
||||
print(f" {f['filename']}:{finding['line']} in {finding['context']}")
|
||||
print(f"Total: {d['unclear_sites']}")
|
||||
@@ -0,0 +1,281 @@
|
||||
{
|
||||
"total": 43,
|
||||
"files": {
|
||||
"src\\mcp_client.py": [
|
||||
{
|
||||
"line": 126,
|
||||
"kind": "EXCEPT",
|
||||
"context": "configure",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 152,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_is_allowed",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 177,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_is_allowed",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 987,
|
||||
"kind": "EXCEPT",
|
||||
"context": "py_check_syntax",
|
||||
"category": "UNCLEAR"
|
||||
}
|
||||
],
|
||||
"src\\gui_2.py": [
|
||||
{
|
||||
"line": 65,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_resolve",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 69,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_resolve",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 684,
|
||||
"kind": "EXCEPT",
|
||||
"context": "run",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 757,
|
||||
"kind": "RAISE",
|
||||
"context": "__getattr__",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 760,
|
||||
"kind": "RAISE",
|
||||
"context": "__getattr__",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 806,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_get_active_capabilities",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 1349,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_populate_auto_slices",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 2401,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_rag_panel",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 2411,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_rag_panel",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 2533,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_agent_tools_panel",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 2561,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_agent_tools_panel",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 2759,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_persona_selector_panel",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 4106,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_context_files_table",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 4159,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_context_presets",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 6830,
|
||||
"kind": "EXCEPT",
|
||||
"context": "render_tier_stream_panel",
|
||||
"category": "UNCLEAR"
|
||||
}
|
||||
],
|
||||
"src\\app_controller.py": [
|
||||
{
|
||||
"line": 1224,
|
||||
"kind": "RAISE",
|
||||
"context": "__getattr__",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 1250,
|
||||
"kind": "RAISE",
|
||||
"context": "__getattr__",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 1842,
|
||||
"kind": "EXCEPT",
|
||||
"context": "init_state",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 2982,
|
||||
"kind": "RAISE",
|
||||
"context": "load_context_preset",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 3740,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_on_ai_stream",
|
||||
"category": "UNCLEAR"
|
||||
}
|
||||
],
|
||||
"src\\ai_client.py": [
|
||||
{
|
||||
"line": 277,
|
||||
"kind": "RAISE",
|
||||
"context": "_load_credentials",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 801,
|
||||
"kind": "RAISE",
|
||||
"context": "_default_send",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 802,
|
||||
"kind": "RAISE",
|
||||
"context": "_default_send",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 828,
|
||||
"kind": "EXCEPT",
|
||||
"context": "run_with_tool_loop",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 1234,
|
||||
"kind": "RAISE",
|
||||
"context": "_list_anthropic_models",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 1529,
|
||||
"kind": "RAISE",
|
||||
"context": "_list_gemini_models",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 2520,
|
||||
"kind": "RAISE",
|
||||
"context": "_dashscope_call",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 2813,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_get_llama_cost_tracking",
|
||||
"category": "UNCLEAR"
|
||||
}
|
||||
],
|
||||
"src\\rag_engine.py": [
|
||||
{
|
||||
"line": 29,
|
||||
"kind": "EXCEPT",
|
||||
"context": "_get_sentence_transformers",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 36,
|
||||
"kind": "RAISE",
|
||||
"context": "_get_sentence_transformers",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 57,
|
||||
"kind": "RAISE",
|
||||
"context": "embed",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 75,
|
||||
"kind": "RAISE",
|
||||
"context": "embed",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
}
|
||||
],
|
||||
"src\\warmup.py": [
|
||||
{
|
||||
"line": 85,
|
||||
"kind": "RAISE",
|
||||
"context": "submit",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
}
|
||||
],
|
||||
"src\\multi_agent_conductor.py": [
|
||||
{
|
||||
"line": 236,
|
||||
"kind": "EXCEPT",
|
||||
"context": "parse_json_tickets",
|
||||
"category": "UNCLEAR"
|
||||
}
|
||||
],
|
||||
"src\\api_hooks.py": [
|
||||
{
|
||||
"line": 938,
|
||||
"kind": "EXCEPT",
|
||||
"context": "main",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 941,
|
||||
"kind": "RAISE",
|
||||
"context": "main",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
}
|
||||
],
|
||||
"src\\models.py": [
|
||||
{
|
||||
"line": 268,
|
||||
"kind": "RAISE",
|
||||
"context": "__getattr__",
|
||||
"category": "INTERNAL_RETHROW"
|
||||
},
|
||||
{
|
||||
"line": 452,
|
||||
"kind": "EXCEPT",
|
||||
"context": "from_dict",
|
||||
"category": "UNCLEAR"
|
||||
},
|
||||
{
|
||||
"line": 457,
|
||||
"kind": "EXCEPT",
|
||||
"context": "from_dict",
|
||||
"category": "UNCLEAR"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user