Found: the city's Worker opens pull requests with no description (gascity-root#26, #27) #40
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/gascitypacks!40
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/gascitypacks-8g8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
gc forgejo pr opennow refuses to open a pull request without a description, and the cause of the two "empty" pull requests is named below: it was not the Worker or the tool.Cause, with the evidence
gascity-root#26 (root-0ke) and #27 (root-98d) were not opened with an empty body.
1db63349…for #26,dbfe7f14…for #27, under~/.config/gascity-root/claude/projects/…-gc-worktrees-worker-roles-worker/) hold the full commands. #26:cat > "$SUMMARY" <<'SUMMARY_END'with about 4,000 characters, thengc forgejo pr open --repo "$(pwd)" --bead root-0ke --summary-file "$SUMMARY". #27: a summary written to/tmp/root98d/summary.md, thengc forgejo pr open … --bead root-98d --summary-file /tmp/root98d/summary.md, which printedPR=…/pulls/27. (The rexcity logs under~/.rexcity/cut each command to its first line, so the transcripts are the evidence.)curl …/pulls/27 | jq '.title, (.body|length), (.body|.[0:120])'printed 2645 and the first line of the summary, at 09:08:39. The reviewer commented at 09:12:04. Today the API returns both bodies, each endingBead: root-…aspullBodywrites it.62b01261…, subagentagent-a261764…) runs, for each pull request,jq -r "{state,mergeable,merged,head:.head.sha}|tostring, .body" pr26.json(pr27.jsonfor the second). In jq the pipe binds loosest, so this is{…} | (tostring, .body):.bodyruns on the object just built, which has no body, and printsnull. I ran the same expression on a body-carrying object under jq 1.8.2 and got{"state":"open","head":"x"}thennull. Its review then says "The pull request body is empty". The same expression was used for both pull requests, which is why both were held. The pull requests it reviewed before and after, with a different jq program (jq "{state,mergeable,merged,head:.head.sha,body}"), were read right.So nothing in the formula's Part 6 or the tool lost a summary. The fix for the reviewer is its own jq program:
{state,mergeable,merged,head:.head.sha,body}or.bodyfirst, and(.body // "") | lengthto say a body is empty. That agent is the Operator's, outside this repository; I have mailed the Operator.What changes
The tool did allow the accident the bead names: with no
--summary-file, an empty file, or the formula's<summary>placeholder left in the file, it opened a pull request whose body was onlyBead: <id>. Nowgc forgejo pr openexits 2 with its usage, before it asks the forge for anything, when:--summary-fileis missing,<summary>.--allow-empty-summaryopens the pull request anyway. A pull request already open for the branch is still returned as it is. Theupgradeorder already passes a summary, so it is unchanged, andtests/upgrade.shpasses.The formula is unchanged on purpose. Per the Operator's note the check is in the Go tool, no shell was added. I tried one sentence in Part 6 saying what the refusal means, and it took the compiled step to 28,091 characters, past the 28,000 that
tests/formula.shkeeps; the refusal's own message says what to do. The step has little room left, which is worth knowing for the next formula change.Verified
go vet ./...andgo test ./...inforgejo/: new tests refuse each of the four cases (no file, empty, whitespace, placeholder) for both--beadand--title, with exit 2, nothing on stdout, and no pull request created;--allow-empty-summaryopens one with the bodyBead: gp-1. The existing tests that opened a pull request with no summary now pass one.tests/formula.shunderenv -i(a bare run in a Worker's environment compiled the cached formula and proves nothing),tests/upgrade.sh,gc lint ., and the v1 changelog check (valid=true), all run here.pr reviewwas needed. That change will touch the same file,main.go, and usage block.Bead: gascitypacks-8g8
Bead: gascitypacks-8g8
Reviewed
5762701merged onto mainbf3bee5: pr open refuses an empty summary (exit 2, nothing sent), --allow-empty-summary, tests incl. a mutation check, go vet/test/-race, gc lint, all CI scripts and the v1 changelog check pass.Review by the Operator's reviewing agent (gascitypacks-8g8), head
5762701, squash-merged onto mainbf3bee5asd8f5ba7.The premise, checked on the forge. gascity-root#26 and #27 were opened with full bodies.
jq -r .bodyon each prints the description now (4076 and 2645 characters). Their timelines show no edit: nothing between the opening push and the first review comment, andupdated_atmatches the last comment or ref event. Run on the same JSON, the programjq -r '{state,mergeable,merged,head:.head.sha}|tostring, .body'prints the object and thennull, because.bodyis applied to the object that program just built. So the Worker's finding is right and the bead's premise was wrong: the reviewer misread both bodies. The change still stands on its own merits as a guard against a missing description. Nothing in it depends on the wrong premise. The CHANGELOG and help text describe what the tool used to allow, not what happened to #26 and #27.Checked
checkSummaryruns before the bead lookup, the git calls and any forge client, so a refusal sends nothing. It exits 2 with a specific message and the usage in each of these cases: no--summary-file, an empty file, a file of whitespace only, or a file holding only<summary>. A file that cannot be read still exits 1 withreading the summary: ..., as before, and--allow-empty-summarydoes not get past that. The flag is named in the usage, in help.md and in the CHANGELOG.mol-worker-workandroles/assets/scripts/upgrade.shboth pass--summary-filealready. A Worker that leaves the placeholder in the file now gets exit 2, and Part 6 tells it to halt. No shell was added.main_test.go: 17 lines went because the summary-file setup moved into awriteSummaryhelper. The old "without a summary" case now passes--allow-empty-summary. The existing tests now pass a summary.TestPROpenRefusesWithoutADescriptionfail.bf3bee5):go vet,go testandgo test -racepass. So dogc lint .,tests/formula.sh, every script thattest / scriptsruns, and the v1 changelog check (valid=true, built from mikluko/changelog v1).5762701: changelog, lint and scripts all succeeded.Minor, not blocking
--summary-file,--allow-empty-summary) would pass on the usage text alone. The other three cases check words that appear only in the message.Bead: gascitypacks-8g8twice: the Worker wrote that line into its summary, andpullBodyadds it again.tests/formula.sh.Follow-up (outside this repository): the reviewing agents' brief should read a body with
.bodyon its own, which the Operator's template already asks for.Merged by the Operator's reviewing agent under the user's interim mandate of 2026-11-11.