Skip to content

documentation/reverse-spec - #50

Open
redcatbear wants to merge 17 commits into
mainfrom
documentation/reverse-spec
Open

redcatbear wants to merge 17 commits into
mainfrom
documentation/reverse-spec

Conversation

@redcatbear

@redcatbear redcatbear commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

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.

@redcatbear redcatbear self-assigned this Oct 1, 2026
@redcatbear redcatbear added the documentation User guides, turorials, specifications label Oct 1, 2026

@redcatbear redcatbear left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1st self-review done

Comment thread doc/requirements/requirements.md Outdated
Comment thread doc/requirements/requirements.md
Comment thread doc/requirements/requirements.md
Comment thread doc/requirements/requirements.md Outdated
Comment thread doc/requirements/requirements.md

Rationale:

The README presents the builder as a fluent API and the implementation accumulates message fragments.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error.reporting.java is not a good module name. com.exasol.errorreporting would be better.

Should we rename it?

Comment on lines +400 to +405
### 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a scenario where mitigations are added to the builder before the message. The result must be the same.

Comment thread doc/design/solution_strategy.md
Comment thread doc/design/open_issues.md
Comment on lines +10 to +11
* `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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These open issues could be fixed easily. Please create a ticket to do that.

Comment thread doc/design/open_issues.md
Comment on lines +19 to +20
* 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a ticket to update the README

Comment thread doc/design/open_issues.md
Comment on lines +24 to +25
* 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a spec item saying that callers are responsible for censoring sensitive data and cover this by documentation.

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation User guides, turorials, specifications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants