fix: preserve Hono JSX runtime in generated site images #289

Merged
erik merged 2 commits from fix/task-c54ad4d2-hono-jsx-runtime into main 2026-10-04 14:59:29 -05:00
Owner

Summary

  • Copy the existing tsconfig.json into the production runtime so tsx uses Hono JSX, without React.
  • Keep a lightweight archive-content regression checking the runtime Dockerfile, Hono JSX configuration, and absence of React dependencies.
  • Add a short upgrade note for existing generated sites.

User-approved reduced scope and CI policy

  • Removed container smoke scripts, test commands, and CI/release container validation. No Docker was installed on CI and no runner permissions were changed.
  • Integration tests NEVER run in CI or release workflows: removed ordinary CI browser/E2E execution and changed both npm release workflows from npm test to npm run test:ci. Full integration and visual tests remain local-only.
  • Recorded the policy in AGENTS.md and docs/CONTRIBUTING.md and expanded the existing workflow regression to protect it.
  • Updated task acceptance criteria to match the approved reduced scope.

Verification

  • ./scripts/pre-pr.sh passed after reduction: generated CSS, formatting, lint, type checks, and 895 local tests.
  • Before reducing scope, reproduced homepage HTTP 500 / ReferenceError: React is not defined in the original production image, while both health endpoints returned HTTP 200.
  • Previously verified the corrected production image and extracted template artifact return HTTP 200 for /, /health, and /api/v1/health without React. Runtime fix unchanged. No further container validation is required.
  • git diff --check passed.

Task: #task-c54ad4d2

No template release has been published. Awaiting updated unit-only CI, independent review, and explicit human merge approval.

## Summary - Copy the existing tsconfig.json into the production runtime so tsx uses Hono JSX, without React. - Keep a lightweight archive-content regression checking the runtime Dockerfile, Hono JSX configuration, and absence of React dependencies. - Add a short upgrade note for existing generated sites. ## User-approved reduced scope and CI policy - Removed container smoke scripts, test commands, and CI/release container validation. No Docker was installed on CI and no runner permissions were changed. - Integration tests NEVER run in CI or release workflows: removed ordinary CI browser/E2E execution and changed both npm release workflows from npm test to npm run test:ci. Full integration and visual tests remain local-only. - Recorded the policy in AGENTS.md and docs/CONTRIBUTING.md and expanded the existing workflow regression to protect it. - Updated task acceptance criteria to match the approved reduced scope. ## Verification - ./scripts/pre-pr.sh passed after reduction: generated CSS, formatting, lint, type checks, and 895 local tests. - Before reducing scope, reproduced homepage HTTP 500 / ReferenceError: React is not defined in the original production image, while both health endpoints returned HTTP 200. - Previously verified the corrected production image and extracted template artifact return HTTP 200 for /, /health, and /api/v1/health without React. Runtime fix unchanged. No further container validation is required. - git diff --check passed. Task: #task-c54ad4d2 No template release has been published. Awaiting updated unit-only CI, independent review, and explicit human merge approval.
fix: preserve Hono JSX configuration in production site images
Some checks failed
CI / build-lint-test (pull_request) Failing after 2m9s
48fd21055a
Copy runtime tsconfig and smoke-test standalone containers and extracted template artifacts so homepage failures cannot pass health-only validation.

Task: #task-c54ad4d2
fix: keep JSX regression lightweight and integration tests out of CI
All checks were successful
CI / build-lint-test (pull_request) Successful in 58s
b2eaab87d5
Honor the approved reduced scope: remove container validation and keep the runtime config and artifact regression. Make browser and federation integration tests local-only across CI and release workflows, and document and test that policy.

Task: #task-c54ad4d2
Author
Owner

Independent review — approved

  • PR: #289 (open; reviewed head b2eaab87d5ce4b507ad5c70d7b801f432dd388c9).
  • Task: task-c54ad4d2. Reviewed the current five acceptance criteria and user-approved reduced scope, not the superseded container-validation/publication scope.
  • Summary: the minimal runtime copy preserves Hono JSX configuration; archive regression and upgrade guidance cover distribution and existing generated sites. CI changes enforce the explicitly required local-only integration/browser/container policy.

Acceptance criteria

  • 1 — met: template/site/Dockerfile copies /app/tsconfig.json into the runtime stage. Existing configuration uses jsxImportSource: "hono/jsx"; React is not added to dependencies or imports.
  • 2 — met: accepted prior local production evidence shows the original homepage returning HTTP 500 with React is not defined while both health endpoints pass; corrected image and extracted archive pass /, /health, and /api/v1/health. Read /tmp/slugkit-smoke-before.log, /tmp/slugkit-smoke-after.log, and /tmp/slugkit-artifact-smoke.log. The runtime Dockerfile and tsconfig are unchanged from the previously verified implementation. No new container run is needed or performed.
  • 3 — met: real-template archive regression checks packaged Dockerfile/tsconfig against source, runtime-stage copying, Hono JSX options, and absent React production/development dependencies.
  • 4 — met: newly introduced container smoke tooling/commands/validation are absent from the final tree and diff. Ordinary CI no longer installs Chromium or runs browser/E2E tests; ordinary CI and both npm release workflows use npm run test:ci, excluding *.integration.test.ts. The template-artifact release only packages/uploads and has no container/integration/browser test execution or Docker provisioning. Existing dev-environment regression covers workflow policy; full integration and visual coverage remain local-only.
  • 5 — met: AGENTS.md and docs/CONTRIBUTING.md state the CI prohibition; template/site/README.md explains the runtime configuration and exact copy/rebuild upgrade for existing generated sites.

Verification and findings

  • Existing reduced-scope ./scripts/pre-pr.sh evidence: /tmp/slugkit-pre-pr-reduced.log ends with all checks passed; workspace totals are 895 tests. CSS, formatting, lint and type checks also passed.
  • Pipeline: green — fj actions -R forgejo tasks confirms run #489, build-lint-test, success at b2eaab87d5; remote branch head matches. Failed superseded run #488 is not the current gate.
  • Scope, maintainability, regression coverage, security impact and documentation reviewed. No blocking issues; no review warnings. Criteria: 5 total / 5 met / 0 missing.
  • Review only: no project edits, tests rerun, container checks, installations, workflow dispatch, publication, merge or task closure. Publication is not required by the approved scope.
  • Final verdict: approved. Merge approval: waiting-human.
  • Next: wait for explicit human merge approval; keep the PR open and task in progress.
### Independent review — approved - PR: https://forge.caradoc.com/erik/slugkit/pulls/289 (open; reviewed head `b2eaab87d5ce4b507ad5c70d7b801f432dd388c9`). - Task: `task-c54ad4d2`. Reviewed the current five acceptance criteria and user-approved reduced scope, not the superseded container-validation/publication scope. - Summary: the minimal runtime copy preserves Hono JSX configuration; archive regression and upgrade guidance cover distribution and existing generated sites. CI changes enforce the explicitly required local-only integration/browser/container policy. #### Acceptance criteria - [x] **1 — met:** `template/site/Dockerfile` copies `/app/tsconfig.json` into the runtime stage. Existing configuration uses `jsxImportSource: "hono/jsx"`; React is not added to dependencies or imports. - [x] **2 — met:** accepted prior local production evidence shows the original homepage returning HTTP 500 with `React is not defined` while both health endpoints pass; corrected image and extracted archive pass `/`, `/health`, and `/api/v1/health`. Read `/tmp/slugkit-smoke-before.log`, `/tmp/slugkit-smoke-after.log`, and `/tmp/slugkit-artifact-smoke.log`. The runtime Dockerfile and tsconfig are unchanged from the previously verified implementation. No new container run is needed or performed. - [x] **3 — met:** real-template archive regression checks packaged Dockerfile/tsconfig against source, runtime-stage copying, Hono JSX options, and absent React production/development dependencies. - [x] **4 — met:** newly introduced container smoke tooling/commands/validation are absent from the final tree and diff. Ordinary CI no longer installs Chromium or runs browser/E2E tests; ordinary CI and both npm release workflows use `npm run test:ci`, excluding `*.integration.test.ts`. The template-artifact release only packages/uploads and has no container/integration/browser test execution or Docker provisioning. Existing dev-environment regression covers workflow policy; full integration and visual coverage remain local-only. - [x] **5 — met:** `AGENTS.md` and `docs/CONTRIBUTING.md` state the CI prohibition; `template/site/README.md` explains the runtime configuration and exact copy/rebuild upgrade for existing generated sites. #### Verification and findings - Existing reduced-scope `./scripts/pre-pr.sh` evidence: `/tmp/slugkit-pre-pr-reduced.log` ends with all checks passed; workspace totals are 895 tests. CSS, formatting, lint and type checks also passed. - Pipeline: **green** — `fj actions -R forgejo tasks` confirms run **#489**, `build-lint-test`, **success** at `b2eaab87d5`; remote branch head matches. Failed superseded run #488 is not the current gate. - Scope, maintainability, regression coverage, security impact and documentation reviewed. No blocking issues; no review warnings. Criteria: **5 total / 5 met / 0 missing**. - Review only: no project edits, tests rerun, container checks, installations, workflow dispatch, publication, merge or task closure. Publication is not required by the approved scope. - Final verdict: **approved**. Merge approval: **waiting-human**. - Next: wait for explicit human merge approval; keep the PR open and task in progress.
erik merged commit fabeab1c4c into main 2026-10-04 14:59:29 -05:00
erik deleted branch fix/task-c54ad4d2-hono-jsx-runtime 2026-10-04 14:59:29 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit!289
No description provided.