Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
About Files History Releases Proposed changes Issues For developers
site-builder: pause the /aienet/ hello form until browser gates pass
merged 794d468b1cc55de7 #182 · opened 2026-10-30 16:04 UTC · closed 2026-10-30 16:14 UTC · merged 2026-10-30 16:14 UTC
Imported from GitHub aien-dev/aienos.com#182, by drakestapleton
Base af9dd476dc020dbe2fbe50f3d0fc674bd7022f9d · Head 7177512ce4d2788d505f130680319159a91ff882
Merged on GitHub as 147ced4d8d758ee60c02f5c0b0bb88a88d86d85b ; reachable from main fd39d660fb7cc2ec09d0871c1f29cc074363ad59 (observed 2026-11-18T16:38:12Z)
drakestapleton reviewed (COMMENTED) on 2026-10-30 16:15 UTC
Post-merge check of 7177512 (merged as 147ced4 ): no problems found. With AIENET_HELLO_FORM off (agora.rs:26), the built /aienet/ page shows the paused note, the form is inert, both buttons are disabled, and the aienet.js script tag is left out of the head (main.rs render_aienet_document). Any /agora/api/ text is stripped and asserted absent (agora.rs:71-72). The source aienet.html names no API path, script or form action anyway, and no other page includes aienet.js. Only agora.rs and main.rs changed, with no om/agora-page, public/ or sha256 sidecar files. CI was 11/11 green.
A missed replacement does fail the build: replace_one (agora.rs:48-49) asserts the target appears exactly once before replacen, and it runs during the build.
Small follow-ups:
No test feeds replace_one a page missing a target. A #[should_panic] test on a trimmed page would pin that behavior down.
Both new tests return early when the flag is on, so they check nothing once the form is turned back on.
Not checked: whether the shared SEO pass adds any script after the page test runs, and the nginx routes. /js/aienet.js presumably still ships as a static file, though nothing on the page loads it.
— Grokbot
Apply it
git checkout -b patch-794d468b1cc55de7 af9dd476dc020dbe2fbe50f3d0fc674bd7022f9d
curl -fsSL https://interplane.io/drakestapleton/aienos.com/patches/794d468b1cc55de7 .patch | git am
Raw patch (mbox) · Diff
Provenance
This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:
github-import 1
aien-dev/aienos.com
182
7177512ce4d2788d505f130680319159a91ff882
{"kind":"github-import","owner":"aien-dev","repo":"aienos.com","number":182,"url":"https://github.com/aien-dev/aienos.com/pull/182","export_sha256":"8ece92e1057e3cbc924084bd6b2aea957f4dbb0d6f03f2b07d3eb99757ab3bdf ","imported_utc":"2026-11-18T16:38:12Z"}
Changes
diff --git a/crates/site-builder/src/components/agora.rs b/crates/site-builder/src/components/agora.rs
index 7a27531a ..9cadde36 100644
--- a/crates/site-builder/src/components/agora.rs
+++ b/crates/site-builder/src/components/agora.rs
@@ -20,15 +20,59 @@ pub fn render_agora_page() -> Markup {
}
}
+/// Hello form gate. Stays false until the /aienet/ browser gates pass
+/// (missing consent sends nothing, success needs ack plus readback,
+/// an uncertain write is not repeated). Flip to true to turn it back on.
+pub const AIENET_HELLO_FORM: bool = false;
+
+pub const AIENET_PAUSED_NOTE: &str = "The hello form is paused until browser testing is done, so profiles can't be registered from this page yet.";
+
/// Human-authorized Aienet registration, emitted entirely by Omega.
+/// While `AIENET_HELLO_FORM` is false the form is inert and both buttons are disabled.
pub fn render_aienet_page() -> Markup {
+ let page = include_str!("../../../../om/agora-page/aienet.html");
+ let body = if AIENET_HELLO_FORM {
+ page.to_string()
+ } else {
+ pause_aienet_hello_form(page)
+ };
html! {
main id="main-content" {
- (PreEscaped(include_str!("../../../../om/agora-page/aienet.html")))
+ (PreEscaped(body))
}
}
}
+/// One replacement. A missed target would leave the live control in place, so the
+/// build stops instead of publishing a form that still submits.
+fn replace_one(haystack: &str, from: &str, to: &str) -> String {
+ assert_eq!(haystack.matches(from).count(), 1, "aienet pause missed its target in aienet.html: {from}");
+ haystack.replacen(from, to, 1)
+}
+
+fn pause_aienet_hello_form(page: &str) -> String {
+ let form = replace_one(
+ page,
+ "<form id=\"aienet-form\" class=\"hub-card\">",
+ &format!("<p id=\"aienet-paused\" role=\"status\">{AIENET_PAUSED_NOTE}</p><form id=\"aienet-form\" class=\"hub-card\" inert>"),
+ );
+ let submit = replace_one(
+ &form,
+ "<button id=\"aienet-submit\" type=\"submit\">",
+ "<button id=\"aienet-submit\" type=\"submit\" disabled>",
+ );
+ let paused = replace_one(
+ &submit,
+ "<button id=\"aienet-recheck\" type=\"button\">",
+ "<button id=\"aienet-recheck\" type=\"button\" disabled>",
+ );
+ // The Omega page does not inline the hello routes today. If it ever does,
+ // drop them here so a paused document cannot name the live door.
+ let paused = paused.replace("/agora/api/", "");
+ assert!(!paused.contains("/agora/api/"), "paused /aienet/ page still contains /agora/api/");
+ paused
+}
+
#[cfg(test)]
mod tests {
use super::*;
@@ -45,6 +89,28 @@ mod tests {
.to_string()
}
+ #[test]
+ fn aienet_form_cannot_submit_while_flag_is_off() {
+ if AIENET_HELLO_FORM { return; }
+ let source = include_str!("../../../../om/agora-page/aienet.html");
+ let p = render_aienet_page().into_string();
+ let replacements = [
+ ("<form id=\"aienet-form\" class=\"hub-card\">", "<form id=\"aienet-form\" class=\"hub-card\" inert>"),
+ ("<button id=\"aienet-submit\" type=\"submit\">", "<button id=\"aienet-submit\" type=\"submit\" disabled>"),
+ ("<button id=\"aienet-recheck\" type=\"button\">", "<button id=\"aienet-recheck\" type=\"button\" disabled>"),
+ ];
+ for (from, to) in replacements {
+ assert_eq!(source.matches(from).count(), 1, "pause target missing from aienet.html: {from}");
+ assert!(!p.contains(from), "replacement did not happen: {from}");
+ assert_eq!(p.matches(to).count(), 1, "replacement missing: {to}");
+ }
+ assert_eq!(p.matches("id=\"aienet-paused\"").count(), 1);
+ assert!(p.contains(AIENET_PAUSED_NOTE));
+ assert!(p.contains("role=\"status\""));
+ assert!(!p.contains("aienet.js"));
+ assert!(!p.contains("/agora/api/"), "paused page still contains an Agora API path");
+ }
+
#[test]
fn aienet_artifacts_match_the_omega_generator_hashes() {
for (artifact, sidecar) in [
diff --git a/crates/site-builder/src/main.rs b/crates/site-builder/src/main.rs
index 99a78f33 ..e8aa1c6e 100644
--- a/crates/site-builder/src/main.rs
+++ b/crates/site-builder/src/main.rs
@@ -50,6 +50,20 @@ fn strip_legacy_progress_dataset(dist: &Path) {
println!(" [ASSETS] Removed the legacy inline progress dataset from the zh-CN mirror");
}
+fn render_aienet_document() -> maud::Markup {
+ render_page_layout(
+ "Sign your agent up for Aienet | AienOS",
+ "Human-authorized public agent signup for the Aienet prototype, using Agora profiles.",
+ "https://www.aienos.com/aienet/",
+ "website",
+ html! {
+ link rel="stylesheet" href="/assets/agora.css";
+ @if components::agora::AIENET_HELLO_FORM { script src="/js/aienet.js" defer {} }
+ },
+ components::agora::render_aienet_page(),
+ )
+}
+
fn build_pure_rust_site(dist: &Path, facts_path: &Path) {
if let Ok(ledger) = fs::read_to_string("public/data/now.tsv") {
ledger_public::check_public(&ledger).expect("refusing to build with an unprojected public ledger");
@@ -371,17 +385,7 @@ fn build_pure_rust_site(dist: &Path, facts_path: &Path) {
fs::write(dist.join("agora/index.html"), agora_page.into_string()).expect("Failed to write agora/index.html");
println!(" [PAGE] Emitted /agora/");
- let aienet_page = render_page_layout(
- "Sign your agent up for Aienet | AienOS",
- "Human-authorized public agent signup for the Aienet prototype, using Agora profiles.",
- "https://www.aienos.com/aienet/",
- "website",
- html! {
- link rel="stylesheet" href="/assets/agora.css";
- script src="/js/aienet.js" defer {}
- },
- components::agora::render_aienet_page(),
- );
+ let aienet_page = render_aienet_document();
fs::create_dir_all(dist.join("aienet")).expect("Failed to create aienet dir");
fs::write(dist.join("aienet/index.html"), aienet_page.into_string()).expect("Failed to write aienet/index.html");
println!(" [PAGE] Emitted /aienet/");
@@ -1068,6 +1072,23 @@ mod tests {
assert!(unpinned_uses(" - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0").is_empty());
}
+ /// The document `main` writes for /aienet/, head included, before the shared SEO pass.
+ #[test]
+ fn aienet_built_page_has_no_script_or_api_while_form_is_paused() {
+ if components::agora::AIENET_HELLO_FORM { return; }
+ let page = render_aienet_document().into_string();
+ assert!(page.contains("<!DOCTYPE html>"));
+ assert!(page.contains("<head>"));
+ assert!(page.contains("href=\"/assets/agora.css\""));
+ assert!(page.contains("src=\"/js/turing-look.js\""));
+ assert!(page.contains("id=\"aienet-paused\""));
+ assert!(page.contains("class=\"hub-card\" inert>"));
+ assert!(page.contains("type=\"submit\" disabled>"));
+ assert!(page.contains("id=\"aienet-recheck\" type=\"button\" disabled>"));
+ assert!(!page.contains("aienet.js"), "full /aienet/ page still loads aienet.js");
+ assert!(!page.contains("/agora/api/"), "full /aienet/ page still names /agora/api/");
+ }
+
#[test]
fn test_layout_rendering() {
let markup = render_base_layout(html! { p { "Test" } });