Skip to content

Fix prompt extraction for current compiled lockfiles#1207

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
fix-1206-lockfile-prompt-extractor-37cabbc1583941b4
Draft

Fix prompt extraction for current compiled lockfiles#1207
github-actions[bot] wants to merge 1 commit into
mainfrom
fix-1206-lockfile-prompt-extractor-37cabbc1583941b4

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This replaces the lockfile prompt extractor's brittle text parsing with a YAML-based parser that reads the Create prompt with built-in context step directly from compiled .lock.yml workflow files.

What changed

  1. Replaced the awk state machine with scripts/extract_lockfile_prompts.py using yaml.safe_load.
  2. Added support for current compiled prompt blocks:
    • runtime includes from \$\{RUNNER_TEMP}/gh-aw/prompts/...
    • hashed heredoc markers like GH_AW_PROMPT_<hash>_EOF
  3. Kept scripts/extract-lockfile-prompts.sh as the workflow entrypoint and turned it into a thin wrapper around the new Python extractor.
  4. Added regression tests in tests/test_extract_lockfile_prompts.py, including a fixture test against the current gh-aw-framework-best-practices.lock.yml format.

Validation

  • python -m pytest tests/test_extract_lockfile_prompts.py -q
  • python -m pytest tests -q

Closes #1206.


What is this? | From workflow: Trigger Framework Best Practices

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Replace brittle awk parsing with YAML-based extraction that supports RUNNER_TEMP prompt includes and hashed GH_AW_PROMPT_*_EOF heredoc markers. Adds regression tests for current lockfile format and legacy markers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the bug Something isn't working label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[framework-best-practices] Fix prompt extractor to parse current lockfile prompt blocks

0 participants