proposal: a report may declare its own user-set parameters - #54
Merged
Conversation
A report is read for a period, a threshold or a name the reader chooses, and filter is fixed when the report is generated. Only the balance report escapes this, by hardwiring its own From/To window - the argument that the mechanism belongs to reports in general. Proposes reports[].parameters, with the load-bearing decision stated: a parameter is bound on every read, so the unset case is carried by initial rather than by a vanishing predicate, and an untouched set of parameters must not change which rows the report contains. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposal document for #53. Adds
proposals/0021-report-parameters.md; touches nothing underversions/.The gap
A report is read for a period, for amounts above a threshold, for a counterparty whose name someone half-remembers.
filteris fixed when the report is generated, and per-column filtering can only reach the columns the report already displays - so a period becomes one report per period, and the interesting filter (a field the report does not show) forces a column nobody wanted.The balance report already escapes this by hardwiring its own From/To window, because its opening/period/closing shape cannot be specified without one. That is the argument the mechanism belongs to reports in general.
The shape
targetuses the vocabulary a dimension already resolves (a field, or a one-hoprelation.fieldthat joins like a dimension does - which is what lets a report be filtered by a field it does not display).What the normative half turns on
A parameter is bound on every read. Everything else follows: a predicate that vanishes while its input is empty makes the query shape depend on which inputs the reader touched, and a report like that is one no surface can present, cache or explain. So the unset case is carried by a value -
initial- which makes it the value the untouched report shows, and it is required unless the comparison has a neutral default (a date bound; alikesearch).Two consequences worth reading in the file, because each is a way for a report to be quietly wrong:
timestamptarget compares by date, or alebound excludes the chosen day's own rows.The
## Notessection records what is deliberately excluded and why: a relation-valued parameter (a picker over another entity's rows - a different construct),gt/lt/ne(no neutral form), and a translated label (one question for every generated caption).The proposal carries
Specification text, both anchors and the Appendix A row, so a release can fold it without reconstructing the discussion.Reference implementation: eclipse-dirigible/dirigible#6911 (eclipse-dirigible/dirigible#6357). Site page: IntentFile/intentfile.github.io#41.
Left open for discussion.
🤖 Generated with Claude Code