A definition whose source answered with no buckets is invisible: neither a result nor a refusal
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start by tracing ComputeReport and the public contracts in Data\ResultSet and Data\RunReport, then compare how selected definitions, empty readings, refusals, requested, and computed are represented. Done means a surface can distinguish an empty answer from a definition not selected for the run without treating the empty answer as a refusal; the payload does not name a test file.
Written by the indexing model from the issue text.
Description
Found while building module-ecommerce-reporting-api.
ComputeReport records a refusal only when it could not obtain a definition. A source that answers
successfully with an empty list<Reading> produces no result row, no refusal, and no increment to
$computed:
$readings = $this->read($definition, $run->tenant_id, $window); // []
if ($readings instanceof RefusalReason) { ... } // not taken
foreach ($readings as $reading) { ... } // no iterations
Neither published shape closes the gap afterwards. Data\ResultSet carries lines and refusals
and does not say which definitions the run requested. Data\RunReport carries requested as a
count, and computed counts buckets rather than definitions, so the counts cannot be
differenced to recover the names either.
So a surface cannot distinguish "the source answered, and there was nothing in that window" from
"that definition was not part of this run at all". Both are silence, which is the shape the module
exists to remove — §4.2 of the wave brief is that a run must never make an unanswered question look
like an answered one, and this is the one path where it still can.
The run-level version of the same distinction is answerable and the API package answers it: no run
at all is a 404 no_run, and a run with zero results and zero refusals is a 200 with two empty
arrays.
Smallest fix that would close it: have ComputeReport record the definition names it selected — on
the run, beside refusals, or in RunReport — so a surface can subtract. An empty-answer refusal
reason would be wrong: the source did answer, and "nothing happened in this window" is a legitimate
result rather than a failure to obtain one.
- Dominant language
- PHP
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from liberusoftware/module-ecommerce-reporting
-
liberusoftware/module-ecommerce-reporting#7 · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 74/100
All issues in liberusoftware/module-ecommerce-reporting
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100