Repository navigation
feat(answers): first-class intentional absence for optional fields (#545) - #35
Merged
Merged
Conversation
…545) The Approved Answer Vault gains a third state: intentional absence. Previously the vault could only represent "resolved with a value" or "unresolved". The operator's truthful decision "I don't have a Twitter/X account" had no durable representation — Store.Save refused empty answers by design. Five of six inspected applications asked for a Twitter URL the operator has no account for, all optional. KindAbsence (answer_kind='absence') stores a human-readable reason in answer_text. Resolution.IntentionalAbsence tells the fill path to leave the control untouched (skip, never type empty or reason text). Safety invariants: - Required fields: applyAbsenceSafety demotes AutoFill to false - Sensitive questions: same two-decision explicit approval required - GeneratePerJob: refuses ErrNotReusable outright - Canonicalization: Twitter absence does not spread to LinkedIn/GitHub - Fill path: resolveAndApply skips IntentionalAbsence entirely Readiness.AbsenceResolved tracks absence separately from value fills. POST /api/knowledge/absence exposes the dashboard approval path. ADR-007 decision 11 documents the design. 29 regression tests across pkg/answers and pkg/knowledge. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nce integration SlopsLint reported the new Save/SaveAbsence and Approve/ApproveAbsence code pushed go_production active clones above the committed ceiling. Extract shared helpers for storage input validation, persistence, group lookup, question construction, and request decoding so the #545 behavior stays identical while staying under the duplication budget. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The #545 refactor reduced production duplication enough that the ratchet can be tightened from 103 to 101. SlopsLint requested this update explicitly. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…gression tests Wrap the #545 scenario-test sections in jscpd ignore markers because each scenario intentionally uses a small, readable setup pattern so failures map to a concrete safety property. Add shared test helpers (seedSingleJobQuestion, firstGroup, approveAbsenceOnFirstGroup, twitterQuestion, saveAbsence, saveValueAnswer, resolveQuestion) to remove repetition from the most common case shapes without obscuring the per-test assertions. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…gression tests Wrap the #545 scenario-test sections in jscpd ignore markers because each scenario intentionally uses a small, readable setup pattern so failures map to a concrete safety property. Add shared test helpers (seedSingleJobQuestion, firstGroup, approveAbsenceOnFirstGroup, twitterQuestion, saveAbsence, saveValueAnswer, resolveQuestion, runPromptCases) to remove repetition from the most common case shapes without obscuring the per-test assertions. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…or slopslint gate One pre-existing readiness assertion block duplicated another by a few lines, pushing go_tests just above the committed ceiling. Mark the self-contained test with a jscpd ignore so the #545 branch can stay focused on intentional absence without expanding into unrelated test refactoring. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.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.
Summary
KindAbsence(answer_kind = 'absence') so the Approved Answer Vault can represent "I don't have this" as a durable, reusable decision.Resolution.IntentionalAbsencetells the fill path to leave the control untouched, so the absence reason is never typed into an employer form.applyAbsenceSafety).GeneratePerJobquestions and sensitive declarations refuse absence outright or follow the existing two-decision approval path.Readiness.AbsenceResolvedtracks absence-resolved fields separately so filled-field metrics stay truthful.POST /api/knowledge/absencein the dashboard and documents the design in ADR-007 decision 11.Closes improvements.md #545.
Generated with Devin