fix(#1824): add body to enrollment commit messages - #1825
Conversation
Enrollment commits created by reconcile-repos.sh used bare subject lines with no body. Repos enforcing gitlint rule B6 (body-is-missing) rejected these at the merge queue. Update all four commit message call sites (add, update, refresh, and remove shim) to include a subject, blank line, and a brief body with lines ≤72 characters. The write_shim_to_branch_from_default function already supports multiline messages via jq --arg, so only the strings at the call sites needed changing. Add assertions in reconcile-repos-test.sh that verify captured commit messages contain a non-trivial body with proper formatting. Note: make lint could not run (Go toolchain download permission denied in sandbox). Shell tests passed. Closes #1824
Site previewPreview: https://53f7e71b-site.fullsend-ai.workers.dev Commit: |
ReviewFindingsInfo
Previous runReviewFindingsLow
Previous run (2)ReviewFindingsLow
Info
Previous run (3)ReviewFindingsLow
|
| @@ -169,3 +180,65 @@ if grep -q "contents/.github/workflows/fullsend.yaml.*--method PUT" "${GH_LOG}"; | |||
| fi | |||
There was a problem hiding this comment.
[low] test-inadequate
Only the stale-shim-update commit message path is exercised by the test. The enrollment, refresh-existing-PR, and removal paths are not reached, so their commit messages are not validated.
Suggested fix: Add test scenarios exercising the other three commit message paths: a repo with no existing shim (enrollment), a repo with an existing enrollment PR (refresh), and a disabled repo with an existing shim (removal).
| @@ -169,3 +180,65 @@ if grep -q "contents/.github/workflows/fullsend.yaml.*--method PUT" "${GH_LOG}"; | |||
| fi | |||
There was a problem hiding this comment.
[low] test-inadequate
The removal commit message is sent via the Contents API DELETE endpoint using --field, not via the Git Objects API with --input stdin. The test infrastructure only captures stdin payloads for git/commits calls, so the removal message cannot be validated even if a removal scenario were added.
Suggested fix: Extend the mock gh script to also capture --field message= values for DELETE calls to the contents endpoint.
|
/fs-fix |
Add test scenarios for enrollment (new repo), refresh (existing PR), and removal (disabled repo) code paths. Previously only the stale-shim update path was exercised. Capture removal commit messages sent via the Contents API DELETE endpoint (--field message=...) in addition to git/commits stdin, so all four commit-message formats are validated. Addresses review feedback on #1825 Signed-off-by: fullsend-fix <fullsend-code@users.noreply.github.com>
🔧 Fix agent — iteration 1 (human-triggered)Addressed both review findings. The test now exercises all four commit-message paths (update, enroll, refresh, remove) and captures removal messages sent via the Contents API DELETE endpoint. Fixed (2):
Tests: passed Updated by fullsend fix agent |
| fi | ||
|
|
||
| # Delete the shim workflow on the removal branch. | ||
| REMOVE_COMMIT_MSG="chore: remove fullsend shim workflow |
There was a problem hiding this comment.
[low] naming-convention
REMOVE_COMMIT_MSG breaks the established naming pattern. The existing variables for this operation use the UNENROLL prefix (UNENROLL_BRANCH, UNENROLL_PR_TITLE, UNENROLL_PR_BODY). Consider renaming to UNENROLL_COMMIT_MSG for consistency.
| echo "✓ $REPO has existing enrollment PR: $EXISTING_PR" | ||
| # Update the shim on the existing branch to reflect the latest content. | ||
| if ! write_shim_to_branch_from_default "$REPO" "$ENROLL_BRANCH" "$(shim_content_b64)" "chore: update fullsend shim workflow"; then | ||
| REFRESH_COMMIT_MSG="chore: update fullsend shim workflow |
There was a problem hiding this comment.
[low] naming-convention
UPDATE_COMMIT_MSG and REFRESH_COMMIT_MSG have identical text. If the stale-shim-update and existing-PR-refresh operations are semantically the same, consolidate into a single variable defined alongside the other constants at the top of the file. If they are intended to diverge, differentiate the messages now.
| continue | ||
| fi | ||
|
|
||
| # Verify no line in the message exceeds 72 characters. |
There was a problem hiding this comment.
[low] test-integrity
The commit message line-length check applies the 72-character limit to all lines including the subject. Conventional commit convention limits subjects to 50 characters. Not a bug (the actual subjects are well under 50 chars), but the test would not catch a subject between 51-72 characters if one were introduced later.
|
/fs-fix |
- Rename REMOVE_COMMIT_MSG to UNENROLL_COMMIT_MSG for consistency with UNENROLL_BRANCH, UNENROLL_PR_TITLE, UNENROLL_PR_BODY - Consolidate identical UPDATE_COMMIT_MSG and REFRESH_COMMIT_MSG into a single UPDATE_COMMIT_MSG constant defined at the top - Add 50-character subject line length check to commit message tests Addresses review feedback on #1825 Signed-off-by: fullsend-fix <fullsend-code@users.noreply.github.com>
🔧 Fix agent — iteration 2 (human-triggered)Addressed 3 of 5 review findings with code fixes (naming convention for UNENROLL_COMMIT_MSG, consolidation of duplicate UPDATE/REFRESH commit message constants, 50-char subject length test). Disagreed with 2 findings (test-inadequate claims) because the test infrastructure already covers all four commit message paths including the DELETE endpoint capture. Fixed (3):
Disagreed (2):
Tests: passed Updated by fullsend fix agent |
| while IFS= read -r bline; do | ||
| if [ "${#bline}" -gt 72 ]; then | ||
| echo "FAIL: commit message #${msg_index} has a line exceeding 72 chars" | ||
| echo " line (${#bline} chars): $bline" |
There was a problem hiding this comment.
[low] test-inadequate
The commit message validation loop checks that each captured message is well-formed but does not assert the expected count of messages (should be 4: one each for update, add, refresh, and remove). If a code path silently fails to produce a commit, the test would still pass as long as at least one message is captured and well-formed.
Suggested fix: Add an assertion after the validation loop: [ "$msg_index" -eq 4 ] || { echo "FAIL: expected 4 commit messages, got $msg_index"; exit 1; }
| @@ -362,7 +367,11 @@ if [ -n "$ENABLED_REPOS" ]; then | |||
| continue | |||
There was a problem hiding this comment.
[low] code-organization
ENROLL_COMMIT_MSG and UNENROLL_COMMIT_MSG are defined inside their respective loop bodies (reassigned on every iteration), while UPDATE_COMMIT_MSG is defined once at the top level alongside UPDATE_PR_BODY. All three are constant strings — hoisting them to the top would be more consistent.
Suggested fix: Move ENROLL_COMMIT_MSG and UNENROLL_COMMIT_MSG definitions to the top of the script alongside UPDATE_COMMIT_MSG (after line 51).
|
/fs-fix |
Hoist ENROLL_COMMIT_MSG and UNENROLL_COMMIT_MSG to top-level constants alongside UPDATE_COMMIT_MSG for consistency and clarity. Assert expected commit message count (4) in the test to catch regressions where a commit call site is silently skipped. Addresses review feedback on #1825 Signed-off-by: fullsend-fix <fullsend-code@users.noreply.github.com>
🔧 Fix agent — iteration 3 (human-triggered)Addressed both review findings: added expected commit message count assertion (4) in the test, and hoisted ENROLL_COMMIT_MSG and UNENROLL_COMMIT_MSG to top-level constants for consistency. Fixed (2):
Tests: passed Updated by fullsend fix agent |
Enrollment commits created by reconcile-repos.sh used bare subject lines with no body. Repos enforcing gitlint rule B6 (body-is-missing) rejected these at the merge queue.
Update all four commit message call sites (add, update, refresh, and remove shim) to include a subject, blank line, and a brief body with lines ≤72 characters. The write_shim_to_branch_from_default function already supports multiline messages via jq --arg, so only the strings at the call sites needed changing.
Add assertions in reconcile-repos-test.sh that verify captured commit messages contain a non-trivial body with proper formatting.
Note: make lint could not run (Go toolchain download permission denied in sandbox). Shell tests passed.
Closes #1824
Post-script verification
agent/1824-enrollment-commit-body)972ce7f6654f0b7edaf699298901b10db69e4e4c..HEAD)