fix: let capture resolve and intent seed stamp a valid impact#136
Open
REPPL wants to merge 3 commits into
Open
fix: let capture resolve and intent seed stamp a valid impact#136REPPL wants to merge 3 commits into
REPPL wants to merge 3 commits into
Conversation
The issue_impact_valid and intent_impact_valid record-lint blockers require a valid impact on records in the release set (resolved/ issues, shipped/ intents), but the verbs that mint those records had no way to set one. The tool's own path therefore produced records its own gates reject: `capture resolve` moved an issue to resolved/ with no impact, and `intent "<text>"` seeded a draft that carried no impact through planning to shipped/. capture.Resolve now takes a required Impact, validated against the shared changelog enum (no default — empty or invalid is refused, never guessed) and written bare (impact: fix), never YAML-quoted, so the frontmatter line-scanner and the enum agree. intent.CreateFromText takes an optional impact, validated the same way and rejected as internal (an intent is user-facing by definition), stamped onto the draft so it survives the impact-preserving move to shipped/. The --impact flag on `capture resolve` is enforced in the core rather than via cobra MarkFlagRequired, keeping the CLI tree's no-required-flags invariant (TestLiveTreeMarksNoFlagRequired). capture wontfix is untouched: a non-action ships nothing, so wontfix/ carries no impact. Resolves ledger iss-117. Assisted-by: Claude:claude-opus-4-8
Dogfood proof of the impact write-path fix: `abcd capture resolve iss-117 ... --impact fix` moved the record open/ -> resolved/ and stamped a bare, valid impact, which record-lint's issue_impact_valid accepts (0 blockers). Assisted-by: Claude:claude-opus-4-8
The iss-117 correctness review confirmed a pre-existing sibling of the same class: Reconcile mints shipped/ records gated by intent_impact_valid but has no way to stamp impact. Recorded first, never fixed ahead of an armed detector. Assisted-by: Claude:claude-fable-5
This was referenced Jul 25, 2026
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.
Fixes the write paths behind ledger issue iss-117 (major):
abcd capture resolveand the intent seed-draft path could not setimpact, so records the tool itself produced were rejected by its ownissue_impact_valid/intent_impact_validrecord-lint blockers.What changed
capture resolvegains--impact, validated in the core via the sharedchangelog.ParseImpactenum — no default, empty/invalid refused (enforced in core, notMarkFlagRequired, preserving the CLI's zero-required-flags invariant).CreateFromText/seedDraft) gains an optional impact, rejectinginternal(intents are user-facing by definition).internal/core/capture/serialize.go: newrawScalartype writes the impact bare (impact: fix) rather than YAML-quoted (the quoted form fails the blocker); byte-guarded against structure injection.capture wontfixruled out (wontfix records carry no impact gate); intent Plan/Reconcile ruled out (frontmatter survives the rename; Reconcile must not auto-invent impact — the gate correctly prompts the human).commands/abcd/capture.md,commands/abcd/intent.md, regenerated CLI reference + surface registry, CHANGELOG entry.impact: fixstamped — the ledger move rides this branch (no trailing chore PR).Verification
TestResolveProducesImpactValidRecordandTestCreateFromTextStampsImpactlint the produced records with the real blockers and get 0 findings.make preflightexit 0 (build, gofmt, vet, tests, race) andrecord-lintexit 0 blockers.The correctness review confirmed one pre-existing sibling outside this item's scope: the intent ship path (
Reconcile,internal/core/intent/lifecycle.go) cannot stamp impact, so a no-impact seed can still reachshipped/and tripintent_impact_valid. Recorded as iss-126 (third commit on this branch) rather than fixed here — finding first, fix behind an armed detector.Validators were deliberately not touched — root-cause class is the write paths.