Skip to content

Backend: close the BuildCloud porting gaps (#6353) - #6359

Merged
shai-almog merged 7 commits into
masterfrom
backend-buildcloud-gaps-6353
Nov 30, 2026
Merged

shai-almog merged 7 commits into
masterfrom
backend-buildcloud-gaps-6353

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Closes #6353. Fixes the six Backend gaps found while porting a Spring Boot service.

  1. Remember-me at /oauth2/authorize. A remember-me login counts as signed in at the authorize and device-verification endpoints, as it does in Spring Authorization Server, so a silent prompt=none refresh gets a code after the session has expired. Bearer, Basic and API-key credentials are still refused.
  2. cn1.scheduler.enabled=false stops every scheduled job from starting. Jobs are still listed under /manage/jobs, a manual trigger still runs one, and a manual run never puts a held-back job back on its timetable.
  3. HttpStatusEntryPoint answers with {"timestamp","status","error","path"} instead of an empty body. This differs from Spring on purpose, because a Codename One RequestBuilder needs a body to report the error.
  4. Spring session keys. server.servlet.session.timeout (Boot duration formats), server.servlet.session.cookie.name/.same-site/.secure and spring.session.store-type are read when the matching cn1.session.* key is unset. Any other server.servlet.session.* key gets a warning at start-up.
  5. Session attribute codecs. The build generates a JSON codec for every class passed to HttpSession.setAttribute, and for the class passed to the new getAttribute(name, Class). Nothing is a build error, because the memory store holds any object.
    • Note: constructor results are now typed, so Json.write(new Foo(..)) fails the build when Foo can't be written as JSON. Before, that only failed at run time.
  6. Embedded static assets can be up to 32 MiB (was 2 MiB). Each asset is split into 1 MiB generated classes so no generated method or class hits a JVM limit.

The developer guide pages for sessions, scheduling, security and views are updated to match.

Two adversarial review rounds over the whole branch found these, all fixed:

  • Manual trigger refused while scheduling was disabled.
  • Anonymous classes in double-brace initialisation typed at Json.write.
  • Session attribute classes given a codec only when they could also be read back.
  • A false claim that the 401 body matches Spring.
  • Duration overflow.

Tests: targeted backend and build-engine suites pass (389 tests). The quality gate passes: SpotBugs, PMD and Checkstyle on backend; SpotBugs on build-engine.

🤖 Generated with Claude Code

shai-almog and others added 6 commits November 29, 2026 12:37
- Accept remember-me authentication at /oauth2/authorize and device
  verification, as Spring Authorization Server does; request-borne
  credentials (bearer, basic, API keys) stay refused.
- cn1.scheduler.enabled=false keeps every scheduled job from starting.
- HttpStatusEntryPoint answers with Spring Boot's JSON error body.
- Read server.servlet.session.timeout/cookie.* and spring.session.store-type
  when the cn1.session.* key is unset; report unread server.servlet.session.*.
- The build writes JSON codecs for session attribute types (setAttribute,
  getAttribute(name, Class)), and constructor results are typed in the scan;
  HttpSession.getAttribute(name, Class) reads any store back into the class.
- Embedded static assets go up to 32 MiB, split into 1 MiB part classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Scheduler: a disabled scheduler still gives jobs their executors, so a
  manual trigger runs one as documented; test covers it.
- JsonCallSites: type only constructors that follow a NEW (not super/this),
  skip anonymous and local classes, and register session attribute classes
  for writing as well as reading.
- HttpStatusEntryPoint: say plainly the body differs from Spring on purpose.
- HttpServer: reasonPhrase no longer swallows reason()'s comment.
- Sessions: Duration digits capped against overflow, reject a trailing T,
  name the Spring key in validation errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…metable

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The server runtime builds against vm/JavaAPI, whose Class.cast returns
Object; cast after the isInstance check instead, as Json.convert does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: 3 alert(s) (1 errors, 2 warnings, 0 suggestions) (exit code 1) (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: 1 advisory match(es) — top: ANY_BODY (1) (report)
  • Image references: No unused images detected (report)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog
shai-almog merged commit e8133df into master Nov 30, 2026
17 of 25 checks passed
@shai-almog
shai-almog deleted the backend-buildcloud-gaps-6353 branch November 30, 2026 11:13
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.

Backend: gaps found porting BuildCloud (remember-me at /oauth2/authorize, scheduler switch, empty 401 body, session config)

1 participant