Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

The smoke-opencode workflow failed with a JavaScript syntax error (process.env. || "") and a missing module error (parse_custom_log.cjs). Both issues stemmed from incomplete custom engine support in the compilation pipeline.

Changes

Added custom engine model environment variable handling

  • Added EnvVarModelAgentCustom constant (GH_AW_MODEL_AGENT_CUSTOM)
  • Extended switch statement in compiler_yaml.go to handle "custom" engine and added default fallback
  • Generates valid JavaScript: model: process.env.GH_AW_MODEL_AGENT_CUSTOM || ""

Created custom engine log parser

  • Implemented parse_custom_log.cjs with cascading parser strategy: Claude → Codex → basic fallback
  • Mirrors the Go implementation in custom_engine.go::ParseLogMetrics

Test coverage

  • Go: custom_engine_awinfo_test.go validates model environment variable handling across all engines
  • JavaScript: parse_custom_log.test.cjs validates log parsing with multiple format scenarios

Example

Before (invalid JavaScript):

model: process.env. || "",  // SyntaxError: Unexpected token '||'

After (valid JavaScript):

model: process.env.GH_AW_MODEL_AGENT_CUSTOM || "",
Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21112490739/job/60713172935#step:13:1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Add GH_AW_MODEL_AGENT_CUSTOM constant for custom engine model env var
- Update compiler_yaml.go to handle custom engine model environment variables
- Add default case to prevent incomplete process.env. syntax
- Create parse_custom_log.cjs with fallback parsing strategy (tries Claude, then Codex, then basic)
- Add comprehensive tests for both Go and JavaScript changes
- Recompile smoke-opencode workflow with fixes

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow configuration for GitHub Actions Fix custom engine syntax error and missing log parser Jan 18, 2026
Copilot AI requested a review from pelikhan January 18, 2026 13:53
@pelikhan pelikhan marked this pull request as ready for review January 18, 2026 13:57
@pelikhan pelikhan merged commit b62f509 into copilot/integrate-opencode-custom-engine Jan 18, 2026
@pelikhan pelikhan deleted the copilot/update-workflow-for-gh-aw branch January 18, 2026 13:57
pelikhan added a commit that referenced this pull request Jan 20, 2026
…10562)

* Initial plan

* Add smoke-opencode workflow with custom engine integration

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Change smoke-opencode schedule from every 12h to daily

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Fix custom engine syntax error and missing log parser (#10572)

* Merge main and standardize serena tool configuration syntax

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Recompile all workflows after merge to apply fixes

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Fix OpenCode model name format in shared configuration (#10741)

* Merge main, recompile workflows, format and lint

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Configure OpenCode to use GitHub Copilot CLI with gpt-5-mini model

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Revert "Configure OpenCode to use GitHub Copilot CLI with gpt-5-mini model"

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Merge main and fix unused function lint error

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants