Repository navigation
fix(goals): "ready to close" asks the number, not the task list (v0.456.1) - #860
Merged
Merged
Conversation
…56.1) A goal was proposed for closing — and its owner carded that it was finished — as soon as every filed task was done, with no reference to its metric. On the instapods clicks goal that put a green "Ready to close" pill beside a metric panel reading "59 of 100 · Not moving", and an Inbox card saying the goal was finished while it was 41 clicks short. Task completion is the weakest evidence a measured goal has, so it no longer gets a vote: readyToClose (and the scheduler sweep that reads it) excludes a goal with a metric unless its verdict is `achieved`; the console derives the same way. A goal with no metric is unchanged. The quieter fact is still said, because it is worth knowing: a measured goal whose filed work ran out gets a muted line that the plan ran out before the number did — close it only if the outcome is good enough, or plan the gap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
A goal was offered for closing as soon as every task filed under it was done:
No reference to the metric. On the live instapods clicks goal that rendered a green "Ready to close" pill directly beside a metric panel reading "59 of 100 · Not moving" — the same page contradicting itself — and the scheduler's completion sweep had already carded the owner that the goal was finished while it was 41 clicks short.
The rule predates metrics, and its own comment is the argument against it: "all the filed tasks are done" is a weaker claim than "the outcome was achieved". Once a goal says what number it is about, the task list is the weakest evidence it has.
Fix
GoalStore.readyToClose— and thereforeAutomations.sweepCompletedGoals, which reads it — excludes a goal with a metric unlessmetricStatus().verdict === 'achieved'.goalCompletenow takes the metric status; the goals list already carriesmetricson its payload).Testing
scripts/goal-metric-review-test.cjsgrows a section pinning all four cases: no-metric goal still closes on tasks, a measured goal short of target is not offered, a measured goal at target is, and no "goal is finished" card is raised for the short one. Note the third case uses adirection: 'down'metric, so the guard isachieved, notvalue >= target. Fullnpm run test:governancepasses;cd web && npm run buildpasses.🤖 Generated with Claude Code