Parse NIL APPENDLIMIT values in STATUS responses - #749
Conversation
nevans
left a comment
There was a problem hiding this comment.
Similar to #748, can you add an example to test/net/imap/fixtures/response_parser/status_responses.yml, please?
If you leave out the :expected: value, the generated test will be pending and it will print out the appropriate :expected: for you to inspect, copy, and paste.
|
Added the requested status_responses.yml fixture for APPENDLIMIT NIL. The full response-parser test file passes: 211 tests, 281 assertions. |
|
Upstream added the adjacent empty-STATUS fixture after the approval, which created a content conflict in the same YAML section. I merged current master, retained both fixtures without changing the APPENDLIMIT parser fix, and reran the focused response-parser suite: 212 tests, 282 assertions, all passing. GitHub dismissed the approval because of the merge commit, so this is ready for a quick re-approval when convenient. |
Summary
Handle the NIL alternative of STATUS APPENDLIMIT explicitly. Numeric APPENDLIMIT already parses through generic number handling, but a mailbox reporting no limit currently raises ResponseParseError. Preserve numeric values and represent NIL as Ruby nil.
Reproduction
Verification
rake teston this isolated branch: 1726 tests, 12602 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications, Ruby 4.0.6 via rbenv. Baseline also passes 1,726 tests; assertion counts vary slightly between runs.6d2ef7a636a1e2449187a83b06ac7a5baa54ead2; runtime differs from released 0.6.6 only in documentation before this change. Existing upstream PR searches found no matching fix.Compatibility and limits
No signature, dependency or Ruby-minimum change. Valid APPENDLIMIT NIL responses now parse; numeric values retain Integer representation. This does not implement client-side APPEND size enforcement or change unknown extension parsing. No production or external IMAP service used. Other Ruby/OS versions were not run locally. Local success does not imply upstream CI approval or exhaustive coverage.