Description
The graderManifestEntry JSON contract is declared twice with drifted shapes: the writer at pkg/workflow/compiler_yaml_graders.go:86 has the full 14-field struct (ID, Name, Description, Source, Enabled, Unit, Direction, Threshold, Max, Min, Digest, Run, Inline, Config) serialized into the compiled workflow manifest, while the reader at pkg/cli/audit_report_graders.go:67 independently declares a separate 5-field subset (ID, Name, Unit, Direction, Threshold). There is no shared type — a future field rename or addition on the writer side would not raise a compile error on the reader side; it would just silently stop showing up in the audit report.
Fix
Move the manifest schema into a shared package (e.g. pkg/types), imported by both the pkg/workflow writer and the pkg/cli reader, so the on-disk JSON contract has one authoritative Go definition.
Expected Impact
Prevents a future writer/reader schema drift from silently dropping fields out of the audit report.
Suggested Agent
General coding agent — move/alias the struct, update both import sites, run existing audit-report tests.
Estimated Effort
Medium (2-3 hours)
Data Source
DeepReport Intelligence Briefing (2026-10-06, incremental cycle) — sourced from Typist: Go Type Consistency Analysis discussion #66107, live-verified against current pkg/workflow/compiler_yaml_graders.go:86 and pkg/cli/audit_report_graders.go:67.
Generated by 🔬 Deep Report · claude · agent · 207.7 AIC · ⌖ 7.97 AIC · ⊞ 7.1K · ◷
Description
The
graderManifestEntryJSON contract is declared twice with drifted shapes: the writer atpkg/workflow/compiler_yaml_graders.go:86has the full 14-field struct (ID, Name, Description, Source, Enabled, Unit, Direction, Threshold, Max, Min, Digest, Run, Inline, Config) serialized into the compiled workflow manifest, while the reader atpkg/cli/audit_report_graders.go:67independently declares a separate 5-field subset (ID, Name, Unit, Direction, Threshold). There is no shared type — a future field rename or addition on the writer side would not raise a compile error on the reader side; it would just silently stop showing up in the audit report.Fix
Move the manifest schema into a shared package (e.g.
pkg/types), imported by both thepkg/workflowwriter and thepkg/clireader, so the on-disk JSON contract has one authoritative Go definition.Expected Impact
Prevents a future writer/reader schema drift from silently dropping fields out of the audit report.
Suggested Agent
General coding agent — move/alias the struct, update both import sites, run existing audit-report tests.
Estimated Effort
Medium (2-3 hours)
Data Source
DeepReport Intelligence Briefing (2026-10-06, incremental cycle) — sourced from Typist: Go Type Consistency Analysis discussion #66107, live-verified against current
pkg/workflow/compiler_yaml_graders.go:86andpkg/cli/audit_report_graders.go:67.