You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Analysis Date: 2026-08-06 Files Analyzed: compiler.go, compiler_jobs.go, compiler_safe_outputs_job.go Overall Status: ⚠️ Some files need attention
Note: The files listed in the original scope (compiler_activation_jobs.go, compiler_orchestrator.go as an 859-line file, compiler_safe_outputs_config.go) no longer exist — the package has since been split into ~50 smaller compiler_*.go files. This run substituted the three largest existing files (compiler.go 584 lines, compiler_jobs.go 703 lines, compiler_safe_outputs_job.go 1091 lines) as a reasonable stand-in, and re-seeded cache memory (no prior history existed).
Executive Summary
The codebase shows healthy signs of ongoing refactoring: the original 859-line compiler_orchestrator.go has already been split down to 22 lines, with logic distributed into compiler_orchestrator_engine.go, _frontmatter.go, _tools.go, _workflow.go. Error handling in compiler.go favors the project's formatCompilerError wrapper (good context) but has zero raw fmt.Errorf, meaning wrapping style is inconsistent across files. compiler_safe_outputs_job.go at 1091 lines is now the largest file in the package and the biggest maintainability concern.
Errors consistently routed through formatCompilerError(...) giving markdown-path + line context — good pattern, though 0 uses of fmt.Errorf("...: %w", err) for lower-level wrapping
196 comment lines across 584 (~34%), 7/8 exported-ish methods documented
Issue: CompileWorkflowData and generateAndValidateYAML are large orchestration functions doing many sequential validation steps inline — good candidates to extract into named validation steps
2. compiler_jobs.go — 703 lines, 24 functions
Function lengths are reasonable (13–38 lines observed in top 10), no outliers found
20 fmt.Errorf calls — best error-wrapping density of the three files
147 comment lines (~21%)
Issue: several small boolean helper functions (jobDependsOnAgent, jobDependsOnActivation, etc.) lack doc comments explaining exact semantics/edge cases
Largest file analyzed; functions themselves stay short (max ~43 lines seen), so size comes from breadth of responsibility, not single-function bloat
Only 5 fmt.Errorf calls relative to 22 functions — many functions are pure data/string transforms so low count may be acceptable, but worth auditing for silently swallowed errors
247 comment lines (~23%)
Issue: file mixes many concerns (env resolution, SARIF upload steps, script name mapping, job condition building) — a strong candidate for splitting along the lines already used elsewhere in the package (e.g., compiler_safe_outputs_builder.go, compiler_safe_outputs_steps.go already exist as siblings, suggesting further extraction is idiomatic here)
Top 3 Issues
compiler_safe_outputs_job.go is 1091 lines — largest in the package; split by concern (env/head resolution, script generation, job conditions) similar to existing sibling files.
compiler.go's CompileWorkflowData (172 lines) and generateAndValidateYAML (123 lines) bundle many sequential steps inline — extract into named validation helpers.
Small unexported helpers in compiler_jobs.go (e.g. jobDependsOnAgent, jobDependsOnActivation) lack doc comments clarifying their exact matching semantics.
Recommended Action
Priority: split compiler_safe_outputs_job.go into 2–3 focused files (e.g. compiler_safe_outputs_env.go, compiler_safe_outputs_scripts.go) — estimated 1 day, highest maintainability payoff given it's now the largest file in pkg/workflow.
Cache was empty prior to this run; initialized file-hashes.json and rotation.json with today's three files and their current git commit hash (bdf484685eb2a3e13eb223cbf52adf957a98ffb6).
Original scope's pkg/workflow/ compiler file list is stale — recommend updating the workflow prompt's file list to reflect the current ~50-file split (e.g. rotate through compiler_orchestrator_*.go, compiler_yaml_*.go, compiler_activation_*.go families going forward).
Next run should prioritize: compiler_safe_outputs_builder.go, compiler_activation_job.go, compiler_yaml_step_generation.go (not yet analyzed).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Warning
Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.
What happened
The threat detection engine failed to produce results.
Review the workflow run logs for details.
🔍 Compiler Code Quality Analysis Report
Analysis Date: 2026-08-06⚠️ Some files need attention
Files Analyzed:
compiler.go,compiler_jobs.go,compiler_safe_outputs_job.goOverall Status:
Executive Summary
The codebase shows healthy signs of ongoing refactoring: the original 859-line
compiler_orchestrator.gohas already been split down to 22 lines, with logic distributed intocompiler_orchestrator_engine.go,_frontmatter.go,_tools.go,_workflow.go. Error handling incompiler.gofavors the project'sformatCompilerErrorwrapper (good context) but has zero rawfmt.Errorf, meaning wrapping style is inconsistent across files.compiler_safe_outputs_job.goat 1091 lines is now the largest file in the package and the biggest maintainability concern.Summary Table
CompileWorkflowDatais 172 linesAvg score: 74/100 · Files meeting threshold (≥75): 2/3
📁 Detailed File Analysis
1.
compiler.go— 584 lines, 8 functionsCompileWorkflowData(172 lines),generateAndValidateYAML(123 lines)formatCompilerError(...)giving markdown-path + line context — good pattern, though 0 uses offmt.Errorf("...: %w", err)for lower-level wrappingCompileWorkflowDataandgenerateAndValidateYAMLare large orchestration functions doing many sequential validation steps inline — good candidates to extract into named validation steps2.
compiler_jobs.go— 703 lines, 24 functionsfmt.Errorfcalls — best error-wrapping density of the three filesjobDependsOnAgent,jobDependsOnActivation, etc.) lack doc comments explaining exact semantics/edge cases3.
compiler_safe_outputs_job.go— 1091 lines, 22 functionsfmt.Errorfcalls relative to 22 functions — many functions are pure data/string transforms so low count may be acceptable, but worth auditing for silently swallowed errorscompiler_safe_outputs_builder.go,compiler_safe_outputs_steps.goalready exist as siblings, suggesting further extraction is idiomatic here)Top 3 Issues
compiler_safe_outputs_job.gois 1091 lines — largest in the package; split by concern (env/head resolution, script generation, job conditions) similar to existing sibling files.compiler.go'sCompileWorkflowData(172 lines) andgenerateAndValidateYAML(123 lines) bundle many sequential steps inline — extract into named validation helpers.compiler_jobs.go(e.g.jobDependsOnAgent,jobDependsOnActivation) lack doc comments clarifying their exact matching semantics.Recommended Action
Priority: split
compiler_safe_outputs_job.gointo 2–3 focused files (e.g.compiler_safe_outputs_env.go,compiler_safe_outputs_scripts.go) — estimated 1 day, highest maintainability payoff given it's now the largest file inpkg/workflow.💾 Cache Memory Summary
Cache Location:
/tmp/gh-aw/cache-memory/compiler-quality/file-hashes.jsonandrotation.jsonwith today's three files and their current git commit hash (bdf484685eb2a3e13eb223cbf52adf957a98ffb6).pkg/workflow/compiler file list is stale — recommend updating the workflow prompt's file list to reflect the current ~50-file split (e.g. rotate throughcompiler_orchestrator_*.go,compiler_yaml_*.go,compiler_activation_*.gofamilies going forward).compiler_safe_outputs_builder.go,compiler_activation_job.go,compiler_yaml_step_generation.go(not yet analyzed).Report generated by Daily Compiler Quality Check workflow
Cache memory:
/tmp/gh-aw/cache-memory/compiler-quality/All reactions