Skip to content

factory: two tests expect the commit attribution and check-run source #1899 added - #2151

Merged
santoshkumarradha merged 6 commits into
app/v3from
c34/publish-trailer
Nov 2, 2026
Merged

santoshkumarradha merged 6 commits into
app/v3from
c34/publish-trailer

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

Two tests on app/v3 still expected what the code did before #1899, which changed both behaviours on purpose:

 internal/factory/run  TestPublishCommitsPushesAndOpensThePullRequestWithTheTrailer
-  commit message == title + "\n\n" + approval trailer
+  commit message == title + "\n\n" + approval trailer
+                    + "\n\nAssisted-by: CodeAF\nCo-Authored-By: CodeAF <…agentfield-bot…>"

 internal/praf/github  TestFilesChecksAndOneIssue
-  runs[0] == CheckRun{Name: "build", …}
+  runs[0] == CheckRun{Source: "check_run", Name: "build", …}
  • Publish commit. commitApproved (internal/factory/run/publish.go) signs the approved commit with codeaf's shared attribution, no model named, unless the repository refuses trailers. Its doc comment says so. The test now pins that exact message, approval trailer first.
  • Check runs. Since Factory: automate issue-to-PR work and maintain PRs through review #1899 every CheckRun names its source (a commit status or a check run). The roll-up itself was right: a completed failure makes the checks failure while another run is still queued. Only the struct literal was stale.

No production code changes.

Evidence

test app/v3 this branch
TestPublishCommitsPushesAndOpensThePullRequestWithTheTrailer FAIL publish_test.go:301 (message carries the attribution) ok (whole internal/factory/run package ok)
TestFilesChecksAndOneIssue FAIL forge_detail_test.go:79 (Source:check_run missing from the literal) ok

Merge Danger

Door: two-way

Blast Radius: tests only.

🤖 Generated with Claude Code

Since #1899 the publish commit carries the approval trailer and then
codeaf's shared attribution (Assisted-by and the co-author line, no model
named). The test still expected the approval trailer alone.
Since #1899 every check run names its source (a commit status or a check
run). The test compared against a run without one. A completed failure
still rolls the checks up to failure while another run is queued.
@santoshkumarradha
santoshkumarradha marked this pull request as ready for review November 2, 2026 06:03
@santoshkumarradha
santoshkumarradha merged commit 72f88af into app/v3 Nov 2, 2026
@santoshkumarradha
santoshkumarradha deleted the c34/publish-trailer branch November 2, 2026 06:03
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