context overflow definition seems like it is off by 1
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 106
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
The Context Overflow definition from the Context Processing Algorithm, 5.2.3 reads as follows:
If the number of entries in the remote contexts array exceeds a processor defined limit, a context overflow error has been detected and processing is aborted; otherwise, add context to remote contexts.
Technically what this would seem to mean is that if your processor defined limit is 3 then:
[a; b; c]-> no error because the number of entries is equal to the limit. Then after this step it will be[a; b; c; d]and will not fail until it reaches this code the next time (presumably while processinge).[a; b; c; d]-> throws an error but only when the first part of this statement is encountered.
In this edge case this could produce a valid resulting context that has a remote contexts array one larger than the processor defined limit.
It would seem that one of three things should happen here:
- Switch the order of the statements. Add context to remote contexts and then make the statement that "if the number of entries in the remote contexts array exceeds…"
- Change the language to be "equal to" instead of "exceeds." So it would now read "if the number of entries in the remote contexts array is equal to a processor defined limit…" This does not allow for duplicate entries in the array to be merged together if read strictly (and there is no indication of deduplication anywhere I can see in the description of remote contexts at this time)
- Define the size of the remote context array as having an event (possibly expressed somewhere else) that reads "if the size of the remote contexts array is ever made to be greater than a processor defined limit, then generate a context overflow error…"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Context Processing Algorithm section 5.2.3 and the linked context-overflow definition. Trace the limit check against the [a; b; c; d] example and compare the three proposed interpretations; this is done when the specification clearly defines whether adding an entry beyond the limit must raise an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100