Skip to content

templates: every generated page routes a failure through the shared refusal gate (#7263) - #7271

Open
delchev wants to merge 1 commit into
masterfrom
issue-7263-raw-message-surfaces
Open

templates: every generated page routes a failure through the shared refusal gate (#7263)#7271
delchev wants to merge 1 commit into
masterfrom
issue-7263-raw-message-surfaces

Conversation

@delchev

@delchev delchev commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • mvn -T 1C formatter:validate with the formatter cache wiped - BUILD SUCCESS (175 files in tests-integrations processed)
  • mvn -T 1C -P quick-build install -DskipTests of the worktree
  • IntentEmissionCoverageIT green - it generates, renders (Velocity) and compiles the whole emission project, so every changed template is exercised and the new walk runs over the real output
  • Not run: the browser-level behaviour (a 500 on the admin page showing HTTP 500 - the server log has the reason.), which no IT drives - the same source-text-plus-render bar templates: give the my/partner form and document header save an applyApiError (#7242) #7259 used

Fixes #7263

🤖 Generated with Claude Code

…efusal gate (#7263)

#7259 (#7242) gave the personal/partner form and document pages an applyApiError
and left the rest of the generated pages on the raw e.message - the developer-
facing text of ApiError, which with spring.web.error.include-message=always is a
500's Hibernate/JDBC sentence (#7151):

- the administration page, listed in #7242's evidence, concatenated
  'HTTP <status>: ' + body.message with no status gate at all, with a comment
  saying an admin wants the raw truth;
- the personal/partner list and the personal calendar loads kept
  `(e && e.message) || 'Could not load ...'`, although the PR said every
  remaining load path had moved;
- the standalone report page and the task form had the same shape, each with
  its own fetch client.

Every one of them now goes through App.services.apiErrors.refusalMessageFor:
the server's text is quoted only for a 400/409 that is one short sentence
without markup, everything else keeps the neutral fallback. The admin, report
and task-form pages are standalone, so they load apiError.js from
application-core by absolute URL - it depends on nothing but window.App - and
hand the gate an { httpStatus, errorMessage } shaped like ApiError; the raw
text goes to console.error, on the admin surface too. The admin banner now
distinguishes a refusal it may show (err.shown) from a transport failure, whose
own message is developer-facing like any other.

IntentEmissionCoverageIT no longer names four files: it walks EVERY emitted
.js/.html under gen/ and fails on `(e && e.message)` / `String(e.message`, so a
page a template adds later cannot fall outside the check by not being named.
The harmonia-ui guide records the rule and the five rounds it took to reach
every surface.

Verified: mvn -T 1C formatter:validate (cache wiped) green; quick-build install
of the worktree; IntentEmissionCoverageIT green (it renders and compiles the
generated project, so the changed templates are exercised through Velocity).

Fixes #7263

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

templates: the admin surface and the my/partner list+calendar loads still show the raw e.message after #7259 (#7242)

1 participant