Repository navigation
fix: write goal flags as booleans and record their provenance - #382
Merged
Merged
Conversation
bborbe
marked this pull request as ready for review
November 17, 2026 03:37
Contributor
There was a problem hiding this comment.
The change correctly writes a goal's flag as an unquoted YAML boolean and composes flag_set_by/flag_set_at onto the same map so the single WriteGoal persists all three together, mirroring the established task set contract; I verified the ordering, the set-path refusal, the clear routing, and the generated mock against the worktree and found no blocking defect. Non-blocking gaps remain: a clear-path hole that can still produce an unattributed flagged goal despite the new documented invariant, and missing tests for the new flag-value parsing and the goal-specific --by guard.
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.
What
vault-cli goal set <goal> flag truewroteflag: "true"— a quoted string — and had no way to record who set the flag.task sethas written an unquoted boolean plusflag_set_by/flag_set_atsince the flag-provenance change; the goal verb never got the same treatment.Why
scripts/flagged-rows.pyin claude-supervisor refuses a goal flag carrying noflag_set_by(agent-set-flag), so an agent-set goal flag opens nothing. The quoted form only survives because that script'sFLAG_TRUTHYtolerates it — any strict reader (flag is True) silently drops the row. Hand-fixing the frontmatter does not stick: the nextgoal setrewrites it.Change
GoalFrontmatter:setFlagField/SetFlag/ClearFlag, acase "flag"inSetField, and provenance cleanup inClearField— a mirror of the task path.writeFlagProvenancelifted from a method on*frontmatterSetOperationto a package-level helper over*domain.FrontmatterMap, taking the entity type so both verbs share one truthiness switch.flagProvenanceSetRefusaltakes the entity type, so a goal refusal namesvault-cli goal set.EntitySetOperation.Executecarriesactor; theme / objective / vision / topic ignore it.--byregistered forgoalonly, with the task verb's non-flag-key guard.integration/cli_test.go);docs/goal-writing.md;## Unreleasedbullet.Evidence
Fixture vault, freshly built binary:
make precommitgreen on the branch.Task: 7c1e4b2a-3f6d-4e8a-9b51-2d0a6c8f4e17