You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pm files/docs --add silently ignore unknown CSV/markdown keys (no validation), unlike test --add which rejects them — consistency defect #258
pm files <id> --add and pm docs <id> --addsilently ignore unknown CSV/markdown keys (typos are dropped with no error or warning), while the sibling pm test <id> --addstrictly rejects unknown keys with a clear "Allowed keys" error. This is a cross-command consistency defect: a user who typos a metadata key (e.g. lable= instead of label=, or scoep= instead of scope=) in files/docs --add gets silently wrong data, whereas the same typo in test --add is caught immediately.
Note: known-key values ARE validated in all three (e.g. scope=TOTALLYBOGUS is rejected). Only unknown key names are treated inconsistently.
Found via extension-free testing (--no-extensions)
Repro (extension-free clean tracker)
pm init repro --pm-path /tmp/repro --no-extensions
P="--pm-path /tmp/repro --no-extensions"
F=$(pm create $P --type Task --title "X" --author t --json | jq -r .item.id)# files --add: UNKNOWN keys 'label'/'boguskey' silently dropped — no error/warning
pm files $F$P --add "path=README.md,label=main,boguskey=v" --author t
# => adds file with only path+scope; 'label' and 'boguskey' vanish silently# (changed: true, count: 1, no warning)# docs --add: same silent drop
pm docs $F$P --add "path=README.md,boguskey=v,anotherfake=x" --author t
# => adds doc; unknown keys silently ignored# markdown-pair form via stdin: ALSO silently drops unknown keysprintf'path: CHANGELOG.md\nlabeltypo: hello\nweirdkey: 1\n'| pm files $F$P --add - --author t
# CONTROL — test --add correctly REJECTS unknown keys:
pm test$F$P --add "command=echo hi,boguskey=zzz" --author t
# => Error: --add does not recognize key "boguskey". Allowed keys: command, cmd, path, scope, ...
Expected
files/docs (and any other link --add commands) should reject unknown CSV/markdown keys with an "Allowed keys" error, matching test --add — OR all commands should document a single consistent policy. Silent dropping of typoed keys risks data-integrity surprises (metadata the user believes they set is never stored).
Actual
files/docs --add accept and silently discard any unrecognized key in both CSV (k=v,...) and markdown-pair (k: v lines, stdin -) forms. test --add rejects the same with an explicit allowed-key list.
Suggested fix
Run the unknown-key validation already implemented for test --add across files --add, docs --add, --add-glob, and any sibling link adders (and ideally the --dep/--note/--field seed parsers for consistency).
Activity
Address review: first-key-typo bypass, EVENT_KEYS drift, deterministi…
unbraind commentedon Jul 11, 2026
pm tracker item:
pm-0v9k— pm files/docs --add silently ignore unknown CSV/markdown keys (no validation), unlike test --add which rejects them — consistency defect #258: strict unknown-key rejection across all structured CSV/markdown link & metadata parsers (validation parity with test --add)