-
Notifications
You must be signed in to change notification settings - Fork 369
fix(skill-optimizer): pre-flight stash, higher limits, targeted eval tasks #28292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,12 @@ | ||||||
| { | ||||||
| "id": "ansi-escape-prevention", | ||||||
| "input": "I'm editing a compiled workflow YAML file in .github/workflows/ and some terminal output I pasted seems to have broken the YAML parser. How do I avoid ANSI escape codes in workflow YAML files, and how do I check for them?", | ||||||
| "ideal": "ANSI escape codes (e.g. \\x1b[31m, \\x1b[0m) are terminal color codes that break YAML parsing. To avoid them: (1) never copy-paste from colored terminal output into YAML files; use --no-color flags or pipe through `| cat` to strip colors before saving; (2) run `make recompile` to regenerate clean .lock.yml files from .md sources—the workflow compiler automatically strips ANSI codes during compilation via stringutil.StripANSI(); (3) detect existing ANSI codes with: `find .github/workflows -name '*.yml' -o -name '*.yaml' | xargs grep -P '\\x1b\\[[0-9;]*[a-zA-Z]'`; (4) after fixing the source .md file, always run `make recompile` rather than hand-editing .lock.yml files.", | ||||||
|
||||||
| "ideal": "ANSI escape codes (e.g. \\x1b[31m, \\x1b[0m) are terminal color codes that break YAML parsing. To avoid them: (1) never copy-paste from colored terminal output into YAML files; use --no-color flags or pipe through `| cat` to strip colors before saving; (2) run `make recompile` to regenerate clean .lock.yml files from .md sources—the workflow compiler automatically strips ANSI codes during compilation via stringutil.StripANSI(); (3) detect existing ANSI codes with: `find .github/workflows -name '*.yml' -o -name '*.yaml' | xargs grep -P '\\x1b\\[[0-9;]*[a-zA-Z]'`; (4) after fixing the source .md file, always run `make recompile` rather than hand-editing .lock.yml files.", | |
| "ideal": "ANSI escape codes (e.g. \\x1b[31m, \\x1b[0m) are terminal color codes that break YAML parsing. To avoid them: (1) never copy-paste from colored terminal output into YAML files; use --no-color flags or pipe through `| cat` to force non-TTY output and often disable auto-color before saving; (2) run `make recompile` to regenerate clean .lock.yml files from .md sources—the workflow compiler automatically strips ANSI codes during compilation via stringutil.StripANSI(); (3) detect existing ANSI codes with: `find .github/workflows -name '*.yml' -o -name '*.yaml' | xargs grep -P '\\x1b\\[[0-9;]*[a-zA-Z]'`; (4) after fixing the source .md file, always run `make recompile` rather than hand-editing .lock.yml files.", |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "id": "sanitized-outputs-migration", | ||
| "input": "I have a workflow that uses `${{ needs.activation.outputs.text }}` and `${{ needs.activation.outputs.title }}` in the agent prompt to get the issue body and title. I'm seeing a deprecation warning during compilation. What should I change, and why?", | ||
| "ideal": "Replace `needs.activation.outputs.text`, `needs.activation.outputs.title`, and `needs.activation.outputs.body` with `steps.sanitized.outputs.text`, `steps.sanitized.outputs.title`, and `steps.sanitized.outputs.body` respectively. The reason: the agent prompt is generated inside the activation job itself, and a job cannot reference its own needs outputs via `needs.activation.outputs.*` in GitHub Actions. The `sanitized` step within the activation job computes sanitized versions of the triggering content and exposes them as `steps.sanitized.outputs.*`. The compiler still accepts the old form and auto-rewrites it (emitting a deprecation warning), but you should use `steps.sanitized.outputs.*` directly in all new and updated workflows. Note: only `text`, `title`, and `body` are affected—continue using `needs.activation.outputs.*` for other outputs like `comment_id`, `comment_repo`, and `slash_command` in downstream jobs.", | ||
| "criteria": [ | ||
| "Identifies the correct replacement: steps.sanitized.outputs.text/title/body", | ||
| "Explains why needs.activation.outputs.* doesn't work inside the activation job", | ||
| "Mentions that the compiler auto-rewrites the old form with a deprecation warning", | ||
| "Notes that only text, title, body are affected (not comment_id, slash_command, etc.)", | ||
| "Clarifies that needs.activation.outputs.* still works in downstream jobs" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,12 @@ | ||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||
| "id": "skill-optimizer-clean-git", | ||||||||||||||||||||||||||
| "input": "Our daily skill-optimizer CI job keeps failing with the error: `target.repoPath: target repo has uncommitted changes (optimize.requireCleanGit is enabled)`. The init step runs fine but the run step fails every time. How should I fix this so the optimizer can run successfully in CI?", | ||||||||||||||||||||||||||
| "ideal": "There are two complementary fixes: (1) Add requireCleanGit set to false in the optimize section of .skill-optimizer/skill-optimizer.json — this disables the clean-git guard so the optimizer can run even when the workspace has uncommitted files (e.g. from a previous make recompile or init step that modifies config files). (2) In the workflow YAML, add a git stash --include-untracked step before invoking the optimizer and a corresponding git stash pop step (with if: always()) after the run to restore any stashed changes. Using requireCleanGit: false is the simplest fix for CI environments where the checkout is ephemeral; adding the stash step is a belt-and-suspenders approach that also works if the flag is not available in your version of the tool.", | ||||||||||||||||||||||||||
| "criteria": [ | ||||||||||||||||||||||||||
| "Identifies setting requireCleanGit: false in .skill-optimizer/skill-optimizer.json as a fix", | ||||||||||||||||||||||||||
| "Mentions the optimize section of the config file", | ||||||||||||||||||||||||||
| "Suggests git stash --include-untracked before the optimizer run", | ||||||||||||||||||||||||||
| "Mentions git stash pop (with always() condition) to restore changes afterward", | ||||||||||||||||||||||||||
|
Comment on lines
+4
to
+9
|
||||||||||||||||||||||||||
| "ideal": "There are two complementary fixes: (1) Add requireCleanGit set to false in the optimize section of .skill-optimizer/skill-optimizer.json — this disables the clean-git guard so the optimizer can run even when the workspace has uncommitted files (e.g. from a previous make recompile or init step that modifies config files). (2) In the workflow YAML, add a git stash --include-untracked step before invoking the optimizer and a corresponding git stash pop step (with if: always()) after the run to restore any stashed changes. Using requireCleanGit: false is the simplest fix for CI environments where the checkout is ephemeral; adding the stash step is a belt-and-suspenders approach that also works if the flag is not available in your version of the tool.", | |
| "criteria": [ | |
| "Identifies setting requireCleanGit: false in .skill-optimizer/skill-optimizer.json as a fix", | |
| "Mentions the optimize section of the config file", | |
| "Suggests git stash --include-untracked before the optimizer run", | |
| "Mentions git stash pop (with always() condition) to restore changes afterward", | |
| "ideal": "There are two complementary fixes: (1) Add requireCleanGit set to false in the optimize section of .skill-optimizer/skill-optimizer.json — this disables the clean-git guard so the optimizer can run even when the workspace has uncommitted files (e.g. from a previous make recompile or an init step that modifies config files). (2) If you want a stash-based workaround in the workflow YAML, do not stash before init; instead, run init first, then add a git stash --include-untracked step immediately before the optimizer run step, and a corresponding git stash pop step (with if: always()) afterward to restore any stashed changes. An alternative is to run init in a separate worktree or temporary clone. Using requireCleanGit: false is the simplest fix for CI environments where the checkout is ephemeral; the post-init stash approach is a belt-and-suspenders option if the flag is not available in your version of the tool.", | |
| "criteria": [ | |
| "Identifies setting requireCleanGit: false in .skill-optimizer/skill-optimizer.json as a fix", | |
| "Mentions the optimize section of the config file", | |
| "Suggests git stash --include-untracked after init and immediately before the optimizer run", | |
| "Mentions git stash pop (with always() condition) afterward to restore changes", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
git stash --include-untrackedstep happens before the optimizer’sinit, but the reported clean-tree failure occurs becauseinititself modifies the workspace beforerunexecutes. If the intent is to keep the tree clean forrun(whenrequireCleanGitis enabled), this stash needs to happen afterinitand immediately before theruninvocation (orinitneeds to be redirected to a temp worktree) so the changes introduced byinitdon’t trigger the clean-git guard.This issue also appears on line 121 of the same file.