Skip to content

ci(dispatch): keep run artifacts out of the commit - #45

Merged
mike-diff merged 1 commit into
mainfrom
ci/dispatch-strip-task
Aug 20, 2026
Merged

ci(dispatch): keep run artifacts out of the commit#45
mike-diff merged 1 commit into
mainfrom
ci/dispatch-strip-task

Conversation

@mike-diff

Copy link
Copy Markdown
Owner

Every dispatch PR commits a TASK.md to the repo root. #41 is the current
example: a 46-line TASK.md sits alongside the actual fix.

Cause

The commit step strips one artifact but not the other:

rm -f PR_BODY.md      # stripped, with a comment explaining why
git add -A            # ...but TASK.md, written earlier in the same run, is swept in

TASK.md is written by the "Build the task file" step and never removed, so
git add -A picks it up. The reasoning already in the workflow for stripping
PR_BODY.md applies word for word: it describes the change but is not a source
change. TASK.md is even further from source: it is the prompt the run was
given.

Change

Two layers, deliberately:

  • rm -f PR_BODY.md TASK.md in the commit step, so the tree is clean.
  • /TASK.md and /PR_BODY.md in .gitignore, so a missed delete cannot land
    them anyway.

The .gitignore entries are the guarantee and the rm is the tidy-up. An
unattended workflow should not depend on remembering a delete: the declarative
rule holds even if the imperative one is edited away later. Both are anchored
with a leading / so only the repo root is affected, never a TASK.md that
belongs to something else deeper in the tree.

Verification

  • dispatch.yml parses, and the strip is asserted present in the
    Commit, push, open PR step.
  • git check-ignore -v confirms the rules bind:
TASK.md          ignored=True   .gitignore:11:/TASK.md
PR_BODY.md       ignored=True   .gitignore:12:/PR_BODY.md
harness/tui.go   ignored=False

Scope

.github/workflows/dispatch.yml and .gitignore. No Go code touched.

Does not retroactively clean #41; that file is removed in that PR directly.

@mike-diff
mike-diff merged commit e81f055 into main Aug 20, 2026
2 checks passed
@mike-diff
mike-diff deleted the ci/dispatch-strip-task branch August 20, 2026 23:55
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.

1 participant