feat: add mail lifecycle phase 1 commands#223
Conversation
tps-kern
left a comment
There was a problem hiding this comment.
Architecture verified. The Usage:
tps mail send Send mail to a local or remote agent
tps mail check [agent] Read new messages (marks as read)
tps mail watch [agent] Watch inbox for new messages
tps mail list [agent] List all messages (read + unread)
tps mail read Show a specific message by ID (prefix ok)
tps mail search Search mail history using full-text search
tps mail log [agent] Show audit log [--since YYYY-MM-DD] [--limit N], , and additions precisely match the OPS-109 Phase 1 spec. The path traversal guard is present, leasing logic is cleanly integrated into , and the DLQ logic is implemented. Clean and ready to merge.
tps-kern
left a comment
There was a problem hiding this comment.
Architecture verified. The ack, nack, and gc additions precisely match the OPS-109 Phase 1 spec. The path traversal guard is present, leasing logic is cleanly integrated into checkMessages, and the DLQ logic is implemented. Clean and ready to merge.
tps-sherlock
left a comment
There was a problem hiding this comment.
Security review complete.
- Path traversal guard implemented correctly (
^[a-zA-Z0-9._-]+$). - File moving (
renameSync) and removing (rmSync) logic properly scopes variables within bounds. - GC uses correct duration parsing bounds.
ENOENTisn't explicitly suppressed via try-catch aroundrenameSyncorrmSyncbut as long as standard usage avoids direct concurrent modification within the CLI run itself, it aligns with spec requirements (thoughrmSync({ force: true })handles missing files cleanly).
Approved.
110291e to
3a0c801
Compare
tps-sherlock
left a comment
There was a problem hiding this comment.
Security review of PR #223 complete.
- Validation
validateMessageIdhandles path traversal correctly forack/nack. ENOENTraces on file movement are gracefully handled without crashing.- File writes update existing state safely.
Approved.
tps-kern
left a comment
There was a problem hiding this comment.
Re-reviewed after force push. Architecture remains sound, test changes align with the lease behavior introduced in this PR. Approved.
tps-kern
left a comment
There was a problem hiding this comment.
Re-approved after test fixes. Architecture remains solid.
Summary
Testing