| 1 | id: SYS-REQ-045 |
| 2 | version: 1 |
| 3 | status: review |
| 4 | priority: shall |
| 5 | category: functional |
| 6 | req_type: guarantee |
| 7 | fretish: the parser shall always satisfy !stringEnd_returns_negative_one | caller_handles_stringEnd_sentinel |
| 8 | description: When internal helper stringEnd returns -1 indicating no closing quote was found, all callers of stringEnd shall treat this as a malformed-string condition and shall not proceed with normal value extraction. |
| 9 | formalization_strategy: fretish |
| 10 | informal_verification: |
| 11 | method: "" |
| 12 | evidence: "" |
| 13 | verified: false |
| 14 | component: parser |
| 15 | rationale: stringEnd returning -1 is a sentinel value that indicates truncated or malformed string input. All callers must check for this before using the return value as an offset. |
| 16 | tags: |
| 17 | - sentinel |
| 18 | - data-constraint |
| 19 | variables: |
| 20 | - stringEnd_returns_negative_one |
| 21 | - caller_handles_stringEnd_sentinel |
| 22 | traces: |
| 23 | satisfies: |
| 24 | - STK-REQ-001 |
| 25 | verified_by_extra: |
| 26 | - deep_spec_test.go |
| 27 | documented_by_extra: |
| 28 | - README.md |
| 29 | reviewed_at: "2026-04-27T06:25:19.298877Z" |
| 30 | reviewed_by: human:leonidbugaev |
| 31 | verification: |
| 32 | assurance_level: E |
| 33 | formalization_status: valid |
| 34 | review: |
| 35 | status: approved |
| 36 | reviewer: human:leonidbugaev |
| 37 | reviewed_at: "2026-04-23T00:00:00Z" |
| 38 | ai_generated: false |
| 39 | history: |
| 40 | created_by: agent:claude |
| 41 | created_at: "2026-04-14T18:00:00Z" |
| 42 | last_modified_by: agent:claude |
| 43 | last_modified_at: "2026-04-14T18:00:00Z" |
| 44 | obligation_class: sentinel_value_boundary |
| 45 | lifecycle: |
| 46 | change_history: |
| 47 | - date: "2026-04-14T18:00:00Z" |
| 48 | from: draft |
| 49 | to: review |
| 50 | reason: Added explicit sentinel-value boundary requirement for stringEnd callers. |
| 51 | changed_by: agent:claude |