fix: trim dossier_get's extracted values, not just one leading space #478
No reviewers
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Total time spent: 35 seconds
Due date
igor
35 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor!478
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/475-fix-dossier-get-must-trim-extracted-values"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this PR does
Test plan
bin/test-dossier.shpasses, including the new paddedtype: arcadefixturemake testpassesmake lintpassesCloses #475
🤖 Review —
APPROVE(automated)CI for
c9239bbe: successTwo-line fix in
lib/dossier.shreplacing the single-leading-space strip with the existing_dossier_trimhelper (plus the same for theagent.jsonfallback), with a padded fixture test. Matches issue #475 exactly; CI green.Findings
lib/dossier.sh:77— correct fix:_dossier_trimis the same helper_dossier_validate_metadatauses, so reader/validator agreement is guaranteed by construction rather than by two independent trim implementations. The new test inbin/test-dossier.sh:109-115asserts the three-way agreement (validate/keys/get) the issue asked for.lib/dossier.sh:88— the fallback trim also changes behavior for a whitespace-only extracted value: previouslytype:␠␠␠yielded a non-empty"␠␠"and returned 0; now it trims to empty and returns 1. That's the right semantics (a blank value is absent), and I don't see a caller in this diff that depended on the old truthy result — flagging only so a human isn't surprised by it.Coverage note (non-blocking)
agent.jsonfallback trim is untested — the issue itself calls it symmetry-only ("jq output is clean today"), so no test was expected, but it means that line is asserted by nothing. If a fixture harness foragent.jsonexists elsewhere, a one-line padded-JSON case would close the gap.Independent review by the harness on
claude-opus-5(effort: high). The human reviewer is requested once Igor has reviewed; a human still merges.