W7 done done
This commit is contained in:
parent
abcb66717e
commit
ad2ba7b632
@ -13,7 +13,7 @@ RENDER(Request& context)
|
||||
{
|
||||
if(!test_demo_request_allowed(context))
|
||||
{
|
||||
test_demo_render_restricted_html(context, "Error reporting", "intentionally crash or abort request workers");
|
||||
test_demo_render_restricted_html(context, "Error reporting", "crash or abort request workers for diagnostics");
|
||||
return;
|
||||
}
|
||||
String mode = context.get["mode"];
|
||||
@ -38,7 +38,7 @@ RENDER(Request& context)
|
||||
<a href="index.uce">UCE Test</a>:
|
||||
Error reporting
|
||||
</h1>
|
||||
<p>These actions intentionally trigger guest traps so you can verify that UCE returns a usable `500` response from a healthy worker instead of dropping the upstream connection.</p>
|
||||
<p>These actions trigger guest traps so you can verify that UCE returns a usable `500` response from a healthy worker instead of dropping the upstream connection.</p>
|
||||
<ul>
|
||||
<li><a href="?mode=trap">Trigger an explicit trap (`__builtin_trap`)</a></li>
|
||||
<li><a href="?mode=recurse">Trigger stack exhaustion (unbounded recursion)</a></li>
|
||||
|
||||
@ -9,7 +9,7 @@ It keeps the PHP starter around as reference while mirroring the same broad stru
|
||||
- `components/` for reusable UI building blocks
|
||||
- `themes/`, `js/`, and `img/` for theme templates and static assets
|
||||
|
||||
This port intentionally leans on UCE's component layer rather than treating components as a compatibility shim. The page shell, nav/footer chrome, theme switcher, dashboard blocks, workspace primitives, and marketing sections are all rendered through `component()`.
|
||||
This port uses UCE's component layer rather than treating components as a compatibility shim. The page shell, nav/footer chrome, theme switcher, dashboard blocks, workspace primitives, and marketing sections are all rendered through `component()`.
|
||||
|
||||
Theme rendering is split the same way as the PHP starter:
|
||||
|
||||
@ -19,7 +19,7 @@ Theme rendering is split the same way as the PHP starter:
|
||||
|
||||
Those page templates are the authoritative shell layer, and in the UCE port they are proper `COMPONENT(...)` units rather than standalone page entrypoints. `index.uce` owns the app-local router, captures the `main` fragment, then hands off to `themes/page.uce`. That component resolves `context.call["app"]["page_type"]` by checking `themes/<current-theme>/page.<page_type>.uce` first and then `themes/common/page.<page_type>.uce`, matching the PHP starter's page-layer flow without an extra shell implementation.
|
||||
|
||||
The router is intentionally normal UCE code instead of a runtime feature. It checks `views/<path>.uce`, then `views/<path>/index.uce`, then parent index handlers such as `views/workspace/index.uce` with the last segment stored as `context.call["route"]["param"]`. Matching view files are invoked with `component()`, and view files expose `COMPONENT(Request& context)` rather than `RENDER(Request& context)` because they are intended to render only through the central router. This gives the starter hierarchical/file-based routing while keeping policy in the app.
|
||||
The router is normal UCE code instead of a runtime feature. It checks `views/<path>.uce`, then `views/<path>/index.uce`, then parent index handlers such as `views/workspace/index.uce` with the last segment stored as `context.call["route"]["param"]`. Matching view files are invoked with `component()`, and view files expose `COMPONENT(Request& context)` rather than `RENDER(Request& context)` because they render through the central router. This gives the starter hierarchical/file-based routing while keeping policy in the app.
|
||||
|
||||
Starter-local web affordances live in `components/theme/web_affordances.uce`; currently this provides `COMPONENT:island` for progressive enhancement without adding global UCE runtime APIs. Component-specific CSS/JS is emitted by `ONCE(Request& context)` in the component unit that owns it, or by a small shared asset component when multiple sibling components need the same files. The router's 404 body is also a normal component at `components/basic/notfound.uce`, keeping page fragments out of the front controller.
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ RENDER(Request& context)
|
||||
<div class="eyebrow">PHP energy, C++ runtime</div>
|
||||
<h1>Make dynamic websites like it's 2006.</h1>
|
||||
<p class="hero-lead">
|
||||
UCE is a deliberately direct web runtime: files are pages, templates live next to control flow,
|
||||
UCE is a direct web runtime: files are pages, templates live next to control flow,
|
||||
nginx fronts the whole thing, and a request can compile into a wasm module on first hit.
|
||||
It is built in the image of PHP's non-architecture, but with an explicit request object,
|
||||
component rendering, and a built-in WebSocket broker.
|
||||
|
||||
@ -23,6 +23,6 @@ RENDER(Request& context)
|
||||
site_tests_page_start("API Coverage Manifest", "Repository-level guard that public wasm-unit APIs have an explicit test/doc/internal decision.");
|
||||
String out = shell_exec("cd /Code/uce.openfu.com/uce && python3 scripts/api_coverage_manifest.py");
|
||||
check("api coverage manifest", contains(out, "API coverage manifest ok"), out);
|
||||
site_tests_summary(passed, failed, skipped, "This page intentionally runs only on trusted/local test requests.");
|
||||
site_tests_summary(passed, failed, skipped, "This page runs only on trusted/local test requests.");
|
||||
site_tests_page_end();
|
||||
}
|
||||
|
||||
@ -289,6 +289,6 @@ RENDER(Request& context)
|
||||
f64 drawn_float = draw_float(1.0, 2.0);
|
||||
check("gen_sha1() / gen_*() / draw_*()", gen_sha1("uce") == gen_sha1("uce") && gen_sha1("uce") != gen_sha1("UCE") && noise32_a == noise32_b && noise64 > 0 && noise01 >= 0.0 && noise01 <= 1.0 && ranged_int >= 10 && ranged_int <= 20 && ranged_float >= 1.0 && ranged_float <= 2.0 && drawn_int >= 1 && drawn_int <= 3 && drawn_float >= 1.0 && drawn_float <= 2.0, "noise32=" + std::to_string((u64)noise32_a) + " noise64=" + std::to_string(noise64) + " noise01=" + std::to_string(noise01) + " draw=" + std::to_string(drawn_int));
|
||||
|
||||
site_tests_summary(passed, failed, skipped, "These assertions intentionally stay pure and side-effect free so they remain safe on the public site.");
|
||||
site_tests_summary(passed, failed, skipped, "These assertions stay pure and side-effect free so they remain safe on the public site.");
|
||||
site_tests_page_end();
|
||||
}
|
||||
|
||||
@ -65,6 +65,6 @@ RENDER(Request& context)
|
||||
<a class="button" href="?action=destroy">Destroy Session</a>
|
||||
</div><?
|
||||
|
||||
site_tests_summary(passed, failed, skipped, "This page intentionally mutates only response headers and the test cookie/session namespace used by the suite.");
|
||||
site_tests_summary(passed, failed, skipped, "This page mutates only response headers and the test cookie/session namespace used by the suite.");
|
||||
site_tests_page_end();
|
||||
}
|
||||
@ -81,6 +81,6 @@ RENDER(Request& context)
|
||||
check("memcache_escape_key() / memcache_escape_keys()", memcache_escape_key("a b") == "a_b" && escaped_keys.size() == 2 && !contains(escaped_keys[1], "\n"), join(escaped_keys, ","));
|
||||
check("signal_name() / runtime_safe_key() / backtrace helpers", signal_name(SIGSEGV) == "SIGSEGV" && runtime_safe_key(" task one ") == gen_sha1("task one") && runtime_safe_key(" ") == "" && capture_backtrace_string() == "" && backtrace_frames_string(0, 0) == "", signal_name(SIGSEGV) + " / " + runtime_safe_key(" task one "));
|
||||
|
||||
site_tests_summary(passed, failed, skipped, "This page intentionally limits writes to /tmp/uce-site-tests-io.txt so it stays disposable.");
|
||||
site_tests_summary(passed, failed, skipped, "This page limits writes to /tmp/uce-site-tests-io.txt so it stays disposable.");
|
||||
site_tests_page_end();
|
||||
}
|
||||
@ -14,5 +14,5 @@ services.uce|Sockets And Services|Network/service helpers that are restricted ou
|
||||
tasks.uce|Tasks|Background task helper coverage.|http suite uce internal|Tasks|1|1
|
||||
api_coverage.uce|API Coverage Manifest|Repository-level guard that public wasm APIs have tests/docs or an explicit internal decision.|http suite uce internal|API Coverage Manifest|1|1
|
||||
security_headers.uce|Security Header Sanitizer|Low-level response header sanitizer fixture covered by the security smoke suite.|security http internal fixture|security header sanitizer test|0|1
|
||||
cli.uce|CLI Fixture|Local CLI socket fixture; HTTP render intentionally returns 404.|cli internal fixture|uce-unit-cli|0|0
|
||||
cli.uce|CLI Fixture|Local CLI socket fixture; HTTP render returns 404.|cli internal fixture|uce-unit-cli|0|0
|
||||
call_helpers.uce|Unit Call Fixture|Fixture for unit_call and unit_render helper tests.|internal fixture|UNIT_RENDER_FIXTURE|0|0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user