Skip to content

ci(upstream): keep merge report cleanup clean#54

Merged
code-yeongyu merged 1 commit into
mainfrom
code-yeongyu/fix-upstream-agent-report-clean-gate
Jun 21, 2026
Merged

ci(upstream): keep merge report cleanup clean#54
code-yeongyu merged 1 commit into
mainfrom
code-yeongyu/fix-upstream-agent-report-clean-gate

Conversation

@code-yeongyu

@code-yeongyu code-yeongyu commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Fixes the upstream-agent merge workflow clean-tree failure from Actions run 27799681367.

What changed

  • Added scripts/archive-upstream-agent-report.mjs to copy .github/agent/last-merge-report.md into the QA evidence directory without leaving the automation branch dirty.
  • If the report was accidentally committed by the merge agent, the helper removes it with a narrow cleanup commit before the workflow clean-tree gate runs.
  • Updated upstream-agent-merge.yml to use the helper instead of cp + rm.

Evidence

  • RED: local-ignore/qa-evidence/20260619-actions-27799681367/red-existing-report-rm.txt reproduces D .github/agent/last-merge-report.md and old gate exit 1.
  • GREEN targeted: node --test scripts/archive-upstream-agent-report.test.mjs passed.
  • GREEN surface: local-ignore/qa-evidence/20260619-actions-27799681367/green-archive-report-gate.txt shows the helper preserves evidence and leaves git status --porcelain empty.
  • npm run check passed locally and in the pre-commit hook.
  • npm run build passed locally.

Known caveat

  • npm test was run; it failed on unrelated live-provider/auth-dependent tests (401 invalid x-api-key, missing Cloudflare env) plus existing coding-agent live/RPC/flaky failures. packages/tui tests passed.

Summary by cubic

Fixes the upstream-agent merge workflow’s clean-tree gate by archiving and cleanly removing the merge report so the branch stays clean and the gate stops failing.

  • Bug Fixes
    • Added scripts/archive-upstream-agent-report.mjs to copy .github/agent/last-merge-report.md to the QA evidence dir ($EVIDENCE_DIR or local-ignore/qa-evidence/upstream-agent) and remove the source.
    • If the report was committed, makes a small cleanup commit; if untracked, deletes it without committing. Leaves git status empty for the clean-tree gate.
    • Updated upstream-agent-merge.yml to call the script instead of cp + rm.
    • Added scripts/archive-upstream-agent-report.test.mjs for coverage.

Written for commit 3098091. Summary will update on new commits.

Review in cubic

@code-yeongyu code-yeongyu merged commit 731e9d9 into main Jun 21, 2026
3 of 4 checks passed
@code-yeongyu code-yeongyu deleted the code-yeongyu/fix-upstream-agent-report-clean-gate branch June 21, 2026 08:41
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