documentation/reverse-spec - #50
redcatbear wants to merge 17 commits into
Conversation
Contains open issues.
…s with GitHub issues.
redcatbear
left a comment
There was a problem hiding this comment.
1st self-review done
|
|
||
| Rationale: | ||
|
|
||
| The README presents the builder as a fluent API and the implementation accumulates message fragments. |
There was a problem hiding this comment.
| The README presents the builder as a fluent API and the implementation accumulates message fragments. | |
| A fluent API is easy to use and the resulting code is easy to read. |
|
|
||
| Rationale: | ||
|
|
||
| This convenience API was introduced in version 0.3.0. |
There was a problem hiding this comment.
| This convenience API was introduced in version 0.3.0. | |
| This makes the API more convenient to use. |
|
|
||
| Rationale: | ||
|
|
||
| The behavior is asserted for named and unnamed placeholders and avoids silently producing an incomplete error message. |
There was a problem hiding this comment.
| The behavior is asserted for named and unnamed placeholders and avoids silently producing an incomplete error message. | |
| * The behavior is asserted for named and unnamed placeholders and avoids silently producing an incomplete error message. | |
| * Throwing an exception at runtime may suppress a more helpful error and make debugging harder. |
|
|
||
| Rationale: | ||
|
|
||
| Visualizing null values is better in an error reporting library than rising `NullPointerExceptions`. |
There was a problem hiding this comment.
| Visualizing null values is better in an error reporting library than rising `NullPointerExceptions`. | |
| * Visualizing null values is better in an error reporting library than rising `NullPointerExceptions`. | |
| * Null can be a valid value and should be distinguishable from other values. |
|
|
||
| Rationale: | ||
|
|
||
| The README defines automatic quoting as the default and lists the supported types. |
There was a problem hiding this comment.
| The README defines automatic quoting as the default and lists the supported types. | |
| This allows distinguishing values in error messages. |
(or something similar)
| ### Render Collections Recursively | ||
| `req~render-collections-recursively~1` | ||
|
|
||
| When a parameter is a collection, rendering encloses the elements in brackets, separates them with comma-space, and applies the selected quoting mode to each element. |
There was a problem hiding this comment.
No change: What about recursive collections? ;)
| ### Preserve Parameter Metadata | ||
| `req~preserve-parameter-metadata~1` | ||
|
|
||
| The parameter model exposes a name, value, and optional description so catalog tooling can inspect parameter descriptions independently of rendered output. |
There was a problem hiding this comment.
The catalog tooling does not read the model directly, but reconstructs it by parsing the source code. Not sure if this requirement is necessary.
| ### Expose The Library As A Java Module | ||
| `req~expose-java-module~1` | ||
|
|
||
| The published library exposes the `com.exasol.errorreporting` package from the `error.reporting.java` module. |
There was a problem hiding this comment.
error.reporting.java is not a good module name. com.exasol.errorreporting would be better.
Should we rename it?
| ### Render Multiple Mitigations | ||
| `scn~render-multiple-mitigations~1` | ||
|
|
||
| **Given** mitigations `Fix it.` and `Contact support.` in that order | ||
| **When** the builder is rendered | ||
| **Then** the result contains `Known mitigations:` and two ordered `* ` list items |
There was a problem hiding this comment.
Add a scenario where mitigations are added to the builder before the message. The result must be the same.
| * `ParameterDefinitionList` intentionally returns the first duplicate definition; this fault-tolerance detail is documented in code and tests but is not currently a separate user-level requirement. | ||
| * `PlaceholderMatcher` is a public iterable API beyond the primary builder workflow; its iterator contract is tested but only indirectly represented in the system requirements. |
There was a problem hiding this comment.
These open issues could be fixed easily. Please create a ticket to do that.
| * README output examples contain stray backticks and inconsistent sample values, while tests define the exact implementation output. | ||
| * README lifecycle guidance mentions `error_code_config.yml`, but that file and enforcement logic are outside this repository. |
There was a problem hiding this comment.
Create a ticket to update the README
| * Confirm whether crawler integration and module resolution need dedicated integration tests. | ||
| * OFT implementation and unit-test markers are now present for the covered design items; the module export item still lacks a modular runtime test. |
There was a problem hiding this comment.
We could decide here:
- integration tests are located in the crawler
- no tests required for the Java module.
|
|
||
| Missing placeholders become visible diagnostic text rather than exceptions. Null values become `<null>`. The builder does not validate error-code syntax. | ||
|
|
||
| An important design rule in this project is that it is always better to have incomplete error output than missing output. Especially, if the missing part is highlighted. |
There was a problem hiding this comment.
Also don't throw runtime exceptions to avoid suppressing more important application errors.
|
|
||
| ## Security and Privacy | ||
|
|
||
| The library has no authentication, authorization, storage, or network boundary. Parameter values are inserted into returned strings; callers remain responsible for avoiding secrets or sensitive data in error messages. |
There was a problem hiding this comment.
We should add a spec item saying that callers are responsible for censoring sensitive data and cover this by documentation.
|



Reverse-enginieered the specification with the OpenFastTrace reverse-spec-skill.
Please note that this PR also contains a bigger project keeper version jump, so many files (especially CI) are touched even though this does not directly have anything to do with the reverse specification.