Skip to content

[Safe Outputs Conformance] IMP-003: Schema generation function in wrong file — move to safe_outputs_config_generation.go #19971

@github-actions

Description

@github-actions

Conformance Check Failure

Check ID: IMP-003
Severity: MEDIUM
Category: Implementation

Problem Description

The conformance checker expects generateCustomJobToolDefinition to reside in pkg/workflow/safe_outputs_config_generation.go. This file does not exist — the function is currently defined in pkg/workflow/safe_outputs_generation.go:23.

The safe_outputs_config.go documentation block also explicitly documents the expected architecture (lines ~30–38):

// ### Dynamic Schema Generation (custom safe-jobs)
// Implemented in: pkg/workflow/safe_outputs_config_generation.go
// - generateCustomJobToolDefinition() builds MCP tool schemas from SafeJobConfig

Without the dedicated file, the conformance checker (IMP-003) fails for the safe_outputs_config_generation.go component, even though the JSON schema file (pkg/workflow/js/safe_outputs_tools.json) correctly passes.

Affected Components

  • Current location: pkg/workflow/safe_outputs_generation.go (function at line ~23)
  • Required location: pkg/workflow/safe_outputs_config_generation.go (does not exist)
  • Test files: pkg/workflow/safe_outputs_config_generation_test.go, pkg/workflow/safe_outputs_tools_generation_test.go
  • Conformance script: scripts/check-safe-outputs-conformance.sh

Current Behavior

generateCustomJobToolDefinition and related schema-building helpers live inside safe_outputs_generation.go, a large multi-purpose generation file. The conformance checker and spec architecture both require it to be in a clearly named dedicated file.

Expected Behavior

pkg/workflow/safe_outputs_config_generation.go must exist and contain generateCustomJobToolDefinition (and related schema generation helpers such as generateFilteredToolsJSON, if present).

Remediation Steps

This task is suitable for a Copilot coding agent:

  1. Create pkg/workflow/safe_outputs_config_generation.go with package workflow header.
  2. Move generateCustomJobToolDefinition and any schema-generation helpers (e.g. generateFilteredToolsJSON) from safe_outputs_generation.go into the new file.
  3. Remove the moved declarations from safe_outputs_generation.go.
  4. Ensure the package builds: go build ./pkg/workflow/...
  5. Run tests: go test ./pkg/workflow/...

Verification

After remediation, run:

bash scripts/check-safe-outputs-conformance.sh

Check IMP-003 should now report [PASS] IMP-003: Schema generation is implemented.

References

  • Safe Outputs Specification: docs/src/content/docs/reference/safe-outputs-specification.md
  • Conformance Checker: scripts/check-safe-outputs-conformance.sh
  • Run ID: §22803073745
  • Date: 2026-03-07

Generated by Daily Safe Outputs Conformance Checker ·

  • expires on Mar 8, 2026, 4:54 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions