You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/08/29 07:49:59 UTC

(causeway) 03/03: docs(openspec): archive HTMX resource page reload

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git

commit e31bd024400542f2e1468fda119ac136ed7e1e2d
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Aug 29 09:48:57 2026 +0200

    docs(openspec): archive HTMX resource page reload
---
 .../.openspec.yaml                                 |  0
 .../design.md                                      |  0
 .../proposal.md                                    |  0
 .../generic-htmx-web-component-viewer/spec.md      |  0
 .../tasks.md                                       |  0
 .../generic-htmx-web-component-viewer/spec.md      | 33 ++++++++++++++++++++--
 6 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/openspec/changes/reload-htmx-resource-pages/.openspec.yaml b/openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/.openspec.yaml
similarity index 100%
rename from openspec/changes/reload-htmx-resource-pages/.openspec.yaml
rename to openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/.openspec.yaml
diff --git a/openspec/changes/reload-htmx-resource-pages/design.md b/openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/design.md
similarity index 100%
rename from openspec/changes/reload-htmx-resource-pages/design.md
rename to openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/design.md
diff --git a/openspec/changes/reload-htmx-resource-pages/proposal.md b/openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/proposal.md
similarity index 100%
rename from openspec/changes/reload-htmx-resource-pages/proposal.md
rename to openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/proposal.md
diff --git a/openspec/changes/reload-htmx-resource-pages/specs/generic-htmx-web-component-viewer/spec.md b/openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/specs/generic-htmx-web-component-viewer/spec.md
similarity index 100%
rename from openspec/changes/reload-htmx-resource-pages/specs/generic-htmx-web-component-viewer/spec.md
rename to openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/specs/generic-htmx-web-component-viewer/spec.md
diff --git a/openspec/changes/reload-htmx-resource-pages/tasks.md b/openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/tasks.md
similarity index 100%
rename from openspec/changes/reload-htmx-resource-pages/tasks.md
rename to openspec/changes/archive/2026-08-29-reload-htmx-resource-pages/tasks.md
diff --git a/openspec/specs/generic-htmx-web-component-viewer/spec.md b/openspec/specs/generic-htmx-web-component-viewer/spec.md
index 375373f30e1..048f4cc9b35 100644
--- a/openspec/specs/generic-htmx-web-component-viewer/spec.md
+++ b/openspec/specs/generic-htmx-web-component-viewer/spec.md
@@ -94,6 +94,7 @@ The HTMX route resolver SHALL select one trusted custom page registered for the
 
 ### Requirement: Convention-registered private HTML pages
 The HTMX viewer SHALL discover trusted `.html` page resources from one documented private classpath root and SHALL register each resource by the exact public logical type represented by its filename.
+It SHALL support configured `CACHED` and `RELOAD` resource-page modes, SHALL default to `CACHED`, and MUST keep the registered page set immutable between application-context startups in both modes.
 
 #### Scenario: Application packages an exact logical-type page
 - **WHEN** an application packages `META-INF/causeway/webcomponents/pages/petclinic.PetOwner.html`
@@ -105,11 +106,37 @@ The HTMX viewer SHALL discover trusted `.html` page resources from one documente
 - **THEN** classpath discovery includes that page in the same immutable registry
 - **AND** the resource is not exposed by the ordinary static-resource handler
 
-#### Scenario: Page content is loaded
-- **WHEN** a qualifying resource is decoded during startup
-- **THEN** it is read as bounded non-empty UTF-8 literal HTML
+#### Scenario: Cached page content is loaded
+- **WHEN** a qualifying resource is decoded during startup in the default `CACHED` mode
+- **THEN** it is read as bounded non-empty UTF-8 literal HTML and retained immutably for subsequent renders
 - **AND** no expression, route value, object identifier, metamodel value, persistence value, or GraphQL result is interpolated into its text
 
+#### Scenario: Reload page content is initially loaded
+- **WHEN** a qualifying resource is decoded during startup in configured `RELOAD` mode
+- **THEN** the same bounded non-empty UTF-8 and NUL-content validation runs before registration completes
+- **AND** the definition retains authority for its exact logical type without retaining startup content as a stale fallback
+
+#### Scenario: Existing reload page is edited
+- **WHEN** the content of an already-registered page resource changes on the running classpath in `RELOAD` mode
+- **AND** a subsequent route render selects that page
+- **THEN** the viewer opens and validates the resource again and renders its current literal HTML
+- **AND** no Spring application-context restart, classpath rescan, public page fetch, or Java fragment-factory invocation is required
+
+#### Scenario: Reloaded content is defective
+- **WHEN** an already-registered page in `RELOAD` mode becomes unreadable, oversized, empty, malformed UTF-8, or contains forbidden NUL content
+- **THEN** the affected render fails with a bounded safe diagnostic
+- **AND** the viewer does not serve cached stale content, expose an absolute resource path, or silently use generic object layout fallback
+
+#### Scenario: Page registration changes while running
+- **WHEN** a page resource is added, deleted, renamed, or changed to claim another logical type after viewer startup
+- **THEN** the immutable registry does not add, remove, or rename that registration in either mode
+- **AND** an application-context restart is required to re-run bounded discovery and conflict validation
+
+#### Scenario: Invalid resource-page mode is configured
+- **WHEN** application configuration supplies a resource-page mode other than `CACHED` or `RELOAD`
+- **THEN** viewer startup fails through bounded configuration binding
+- **AND** it does not infer behavior from the classpath launch mechanism
+
 #### Scenario: Page registration is defective
 - **WHEN** a discovered page has an invalid logical-type filename, exceeds a documented bound, is empty, contains malformed UTF-8 or forbidden NUL content, cannot be read, or conflicts with another definition
 - **THEN** viewer startup fails with a bounded safe diagnostic