Skip to content

Compiler silently drops jobs.agent.continue-on-error #60313

Description

@HardMax71

jobs.agent.continue-on-error: true passes compilation without warnings but is absent from the generated agent job. This is silent configuration loss, independently of whether error tolerance should be supported for that built-in job.

Reproduction

Reproduced with gh aw version v0.86.2. Save .github/workflows/ignored-error-policy.md:

---
on: workflow_dispatch
permissions:
  contents: read
engine: copilot
network:
  allowed: [defaults]
jobs:
  agent:
    continue-on-error: true
---

Report the repository name. Do not change files or post to GitHub.

Run gh aw compile ignored-error-policy --no-check-update. It reports one successful compilation and zero warnings. Inspect the job-level fields under jobs.agent in the generated lock file: continue-on-error is missing. Existing step-level occurrences do not satisfy the requested job-level setting. No agent execution or provider credential is needed to reproduce this.

Source analysis

Cross-checked source at main commit ebfaf2ac2b0c637e1ff858168544f08b983c05ee (source inspection, not a build of that revision):

  • The frontmatter schema accepts boolean jobs.*.continue-on-error.
  • Built-in job augmentation tracks needs, conditions, permissions, and timeout presence, but not this field. Its empty-augmentation check therefore ignores a configuration containing only continue-on-error.
  • Custom-job handling already has extractCustomJobContinueOnError and stores the value in Job.ContinueOnError.

Proposed agentic plan

  1. In pkg/workflow/compiler_builtin_job_augmentation.go, explicitly handle the presence of continue-on-error. For supported built-in jobs, reuse Job.ContinueOnError and its renderer. Include field presence in the empty-augmentation guard so explicit false is handled too.
  2. For intentionally unsupported built-in jobs, reject the field with an actionable compile error. Preserve activation/security prerequisites and current failure defaults; do not broadly enable error tolerance on generated jobs.
  3. Add compiler regressions for agent true, explicit false, omitted and imported configuration, and unaffected custom-job handling. Assert parsed job-level YAML, not a global text match that could match step settings.
  4. Document supported built-in jobs in docs/src/content/docs/reference/steps-jobs.md. Follow the developer validation flow: make build, make fmt, and final make agent-report-progress with compiler/workflow drift checks.

Acceptance: the reproducer either emits the requested native job-level property or fails clearly because it is unsupported; it must not succeed silently while dropping the setting.

Related behavior and scope

The motivating downstream run retried 402 Insufficient Balance four times and failed its optional reviewer. A native, provider-independent policy would be preferable to balance preflight calls or local error-parsing scripts.

#39581 addresses Copilot-specific quota retries; #49415 addresses detection error tolerance. Neither covers this compiler omission. #59316 deliberately fails incomplete runs, so this report does not ask to make report_incomplete silently successful. Native job-level continue-on-error is not equivalent to a neutral/skipped review, nor does it selectively recognize billing errors; that broader policy is separate.

Searched existing issues and PRs again before filing and found no exact duplicate. Suggested maintainer labels: bug, workflow.

Analysis and reproduction prepared with a coding agent, following the community issue-plan contribution process. No PR submitted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions