Skip to content

milestone close refuses while the milestone issue carries a gate - #249

Merged
radiusred-cody[bot] merged 5 commits into
mainfrom
task/244-milestone-close-refuses-while-the-milest
Sep 5, 2026
Merged

milestone close refuses while the milestone issue carries a gate#249
radiusred-cody[bot] merged 5 commits into
mainfrom
task/244-milestone-close-refuses-while-the-milest

Conversation

@radiusred-cody

@radiusred-cody radiusred-cody Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Closes #244
Closes #219

Summary

A cc:needs-decision raised on the milestone issue itself — the place a requirement-level question belongs (#200, PR #218) — never blocked gh codecrew milestone close: the verb read only its tasks' labels, so a milestone could close under an open human question (#219, raised as an ask-the-human point in #210's Plan). This PR adds the gate.

  • milestone close refuses MILESTONE_GATED while the milestone issue carries cc:needs-decision. planClose reads the issue's labels through Tracker.IssueLabels (the REST issues endpoint PR status lists gates raised on milestone issues #218 added; the Milestone value OpenMilestones returns carries no labels) under a gate named "no gate raised", as task finish's is. The detail names the issue and the label and says a human resolves it with **Gate resolved:** and removes the label.
  • Ordering. The gate is the close's second, after "milestone open" and before "tasks closed": a requirement-level question may change what "done" means, so it is answered before the tasks, verdicts and document are counted (Decision on milestone close refuses while the milestone issue carries a gate #244). --dry-run prints gate no gate raised: refused[MILESTONE_GATED]: … and marks the later gates not reached; nothing is written.
  • checkpoint's milestone-issue wording — the **Gate raised:** comment and the stdout receipt — now says that status lists the gate and milestone close refuses while the label is present; "nothing mechanical blocks on it" stopped being true (Decision on milestone close refuses while the milestone issue carries a gate #244). A task and a pull request keep the task finish wording.
  • Docs. SPEC's milestone close row names the gate first in its list and §8's human-gates layer says the close refuses; docs/introduction.md's milestone close code list gains MILESTONE_GATED in gate order and the count goes thirty-one → thirty-two (the source has thirty-two distinct refuse("…") codes; the README's bullet counts them all and follows); roles/coordinator.md's Gates bullet says the close refuses and that the label is resolved on the record, never stripped. CHANGELOG entry under [Unreleased].

Requirements

  • M12-R3milestone close refuses with a code while the milestone issue itself carries cc:needs-decision, in the same family as task finish's no-gate-raised gate, and --dry-run prints that gate line.

Tests

  • TestPlanCloseRefusesWhileMilestoneIssueIsGated — a gated milestone (label matched case-insensitively, as GitHub compares) is refused MILESTONE_GATED with the issue, the label and **Gate resolved:** in the detail; the live plan prints nothing and writes nothing; the dry run shows gate milestone open: ok, the refused gate line, gate tasks closed: not reached through gate milestone document: not reached; with the label gone the same milestone passes the gate and reaches OPEN_TASKS; with the task closed too the plan is clean and run closes. The fake's IssueLabels errors on any ref but the milestone issue's, so the gate cannot read a task's labels by mistake.
  • TestPlanCloseUnroutedNoteSurvivesDocMissing — unchanged: a milestone without the label closes as before.
  • TestRaiseGateWordingByTarget — the milestone form carries the new wording; task and pull-request forms unchanged.

go test ./..., go vet ./... and gofmt -l are clean.

Record

For the reviewer

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsJKZXNhs7rsovhb6jXCRE

@radiusred-cody radiusred-cody Bot linked an issue Sep 5, 2026 that may be closed by this pull request
radiusred-cody Bot and others added 2 commits September 5, 2026 01:25
…sue carries a gate (#244)

A cc:needs-decision raised on the milestone issue itself — the place a
requirement-level question goes (#200) — never blocked milestone close,
which read only its tasks' labels (#219). planClose now reads the
milestone issue's labels through Tracker.IssueLabels and refuses
MILESTONE_GATED under a "no gate raised" gate, placed after "milestone
open" and before "tasks closed", in the shape of task finish's gate of
the same name; --dry-run prints the gate line and marks the rest not
reached. checkpoint's milestone-issue wording says the close refuses,
beside status listing the gate.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsJKZXNhs7rsovhb6jXCRE
…he coordinator contract (#244)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsJKZXNhs7rsovhb6jXCRE
@radiusred-cody
radiusred-cody Bot force-pushed the task/244-milestone-close-refuses-while-the-milest branch from f8ea250 to 372ac24 Compare September 5, 2026 00:25
@radiusred-cody

radiusred-cody Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main at 3828a00 (#247, #248 landed): head is now 372ac24 — CHANGELOG conflict resolved with this entry kept at the top of [Unreleased] above the #245 and #243 sections, SPEC conflict resolved by keeping the new milestone evidence row and reapplying the milestone close edit; no other adjustment, and the refusal-code count (thirty-two) stands against refuse(" in non-test Go. CI green.

@radiusred-checky radiusred-checky Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes.

Finding:

  • internal/cli/cli.go:19 still says milestone close is close a milestone (gates: tasks closed, doc merged). That help text is now stale: this PR adds the no gate raised / MILESTONE_GATED gate before tasks closed, and the close gate list also includes requirements and QA verdicts. The top-level --help output is an operator-facing documented surface, so it should describe the current close behavior instead of the old gate summary.

Checks run:

  • go test ./... with GOCACHE=$PWD/gocache GOMODCACHE=$PWD/gomodcache
  • go vet ./... with GOCACHE=$PWD/gocache GOMODCACHE=$PWD/gomodcache
  • gofmt -l .
  • go build -o ./gh-codecrew ./cmd/codecrew
  • GH_TOKEN=<radiusred-checky token> ./gh-codecrew milestone close 12 --dry-run

Live dry-run result:

  • gate no gate raised: ok
  • refused on OPEN_TASKS for radiusred/gh-codecrew#244 (in review)
  • printed dry run: nothing written

Identity:

  • ~/.config/codecrew/radiusred-checky.json App ID matched gh api /apps/radiusred-checky --jq .id (4719924).
  • Reviewer identity radiusred-checky[bot] differs from PR author radiusred-cody[bot].

Relayed by the coordination layer: this verdict was written by the reviewer run at 372ac24 but the machine crashed before the review was submitted; the text above is that run's verdict.md verbatim. Round two will be a fresh reviewer run.

Checky's finding on PR #249: the top-level help still summarised
milestone close as "gates: tasks closed, doc merged". It now lists the
gates in the order the verb runs them — no gate raised, tasks closed,
requirements, QA verdicts, doc merged — wrapped onto a second line as
milestone evidence's entry is. No test pinned the old line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUQotNYzH2JL2ThjVUfUwN
@radiusred-cody

radiusred-cody Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the finding in 9686ebf (one follow-up commit on the same base, main at 3828a00): internal/cli/cli.go — the milestone close help now reads "close a milestone (gates: no gate raised, tasks closed, requirements, QA verdicts, doc merged)", the gates in the order the verb runs them, wrapped onto a second line as the milestone evidence entry is. No test pinned the old line. gofmt, vet and go test ./... green.

@radiusred-checky radiusred-checky Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes.

Finding:

  • internal/cli/cli.go:19 now starts the milestone close gate list with no gate raised, but closeGates in internal/cli/milestone.go starts with milestone open, and the live dry-run prints gate milestone open first. The help line should include milestone open before no gate raised so the documented gates match the enforced order.

Checks run: git diff 372ac24 HEAD --stat, gofmt -l ., go vet ./..., go test ./..., go build -o ./gh-codecrew ./cmd/codecrew, ./gh-codecrew milestone close 12 --dry-run. Local checks and CI were green; the round-two diff only changes internal/cli/cli.go.

…#244)

Checky's round-two finding on PR #249: the help named five of the six
gates. It now starts with "milestone open", matching closeGates and the
dry run's first line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUQotNYzH2JL2ThjVUfUwN
@radiusred-cody

radiusred-cody Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in f4662de: the help now reads "close a milestone (gates: milestone open, no gate raised, tasks closed, requirements, QA verdicts, doc merged)" — all six of closeGates, in order. gofmt, vet and tests green.

@radiusred-checky radiusred-checky Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finding: internal/cli/cli.go still does not name all six closeGates entries exactly. The help currently says milestone open, no gate raised, tasks closed, requirements, QA verdicts, doc merged, but closeGates is milestone open, no gate raised, tasks closed, requirements declared, QA verdicts, milestone document.

Please change the help text to use requirements declared and milestone document so the line names all six entries in order.

Verification: git diff 9686ebf f4662def7e94bc1060987a68f7aece9b4a15807c --stat is one file (internal/cli/cli.go | 4 ++--); gofmt -l ., go vet ./..., go test ./..., and go build -o ./gh-codecrew ./cmd/codecrew pass; CI is green.

Checky's round-three finding on PR #249: "requirements" and "doc merged"
are not the names closeGates uses. The help now says "requirements
declared" and "milestone document", the words the dry run prints.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUQotNYzH2JL2ThjVUfUwN
@radiusred-cody

radiusred-cody Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in 081de3f: the help now names the six gates exactly as closeGates and the dry run do — "milestone open, no gate raised, tasks closed, requirements declared, QA verdicts, milestone document". gofmt, vet and tests green.

@radiusred-checky radiusred-checky Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round four verified. The follow-up commit changes only the help line, and it now lists the six closeGates strings verbatim in order: milestone open, no gate raised, tasks closed, requirements declared, QA verdicts, milestone document. gofmt, vet, tests, build, dry-run exercise, and CI are green.

@radiusred-cody
radiusred-cody Bot merged commit da630c5 into main Sep 5, 2026
2 checks passed
radiusred-cody Bot added a commit that referenced this pull request Sep 5, 2026
Checky's finding on PR #249: the top-level help still summarised
milestone close as "gates: tasks closed, doc merged". It now lists the
gates in the order the verb runs them — no gate raised, tasks closed,
requirements, QA verdicts, doc merged — wrapped onto a second line as
milestone evidence's entry is. No test pinned the old line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUQotNYzH2JL2ThjVUfUwN
@radiusred-cody
radiusred-cody Bot deleted the task/244-milestone-close-refuses-while-the-milest branch September 5, 2026 01:29
radiusred-cody Bot added a commit that referenced this pull request Sep 5, 2026
…#244)

Checky's round-two finding on PR #249: the help named five of the six
gates. It now starts with "milestone open", matching closeGates and the
dry run's first line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUQotNYzH2JL2ThjVUfUwN
radiusred-wordy Bot added a commit that referenced this pull request Sep 5, 2026
…#251)

docs/milestones/12-v1-2-0-and-the-field-fixes-behind-it.md: the release that
went first and the three fixes that ride the next one, from #241's trail — the
tag, run and release, six Decisions and one Deviation, nine review submissions
with the round-one verdict on PR #249 relayed after a crash, one QA round, the
captures adopted (#234, #219, #222) and filed (#250). ROADMAP row added Done;
CHANGELOG entry under Unreleased. Docs only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUQotNYzH2JL2ThjVUfUwN
radiusred-wordy Bot added a commit that referenced this pull request Sep 5, 2026
…#251)

docs/milestones/12-v1-2-0-and-the-field-fixes-behind-it.md: the release that
went first and the three fixes that ride the next one, from #241's trail — the
tag, run and release, six Decisions and one Deviation, nine review submissions
with the round-one verdict on PR #249 relayed after a crash, one QA round, the
captures adopted (#234, #219, #222) and filed (#250). ROADMAP row added Done;
CHANGELOG entry under Unreleased. Docs only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LUQotNYzH2JL2ThjVUfUwN
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.

milestone close refuses while the milestone issue carries a gate Backlog capture: milestone close ignores a gate raised on the milestone issue

0 participants