fix: dossier_get must trim extracted values (validator accepts what the reader returns padded) #475
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: 3 minutes 45 seconds
Due date
igor
3 minutes 45 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#475
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
One-line fix + one test. In
lib/dossier.sh,dossier_getechoes the raw value after stripping at most ONE leading space (value="${value# }"), while_dossier_validate_metadatatrims before comparing. Consequence, reproduced on master:The change: in
dossier_get, trim the extracted value (leading AND trailing whitespace) with the existing_dossier_trimhelper before the empty-check and echo. Apply the same to theagent.jsonfallback values for symmetry (jq output is clean today, but the contract should be uniform).The test: extend
bin/test-dossier.shwith a padded fixture (type: arcade) asserting three-way agreement:dossier_validatepasses,dossier_keysliststype, anddossier_getreturns exactlyarcade.Nothing else in scope.