site/org: the .org wiki's landing page and its two dashboards
Ruled by Captain Bob, 2026-11-07: a generic landing page for anonymous visitors, a login-protected admin dashboard for him, and a protected contributors' dashboard. Main.WebHome (everyone), Admin.WebHome (XWiki.rajames alone), Contributors.WebHome (XWiki.StarshipContributors and the administrator); CI shown as Gitea's live workflow badges. install.sh puts them on the wiki through XWiki's REST API, with the group and the space rights, and checks a guest's view. Not yet run: the .org XWiki answers 503. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
= Admin Dashboard =
|
||||
|
||||
{{info}}
|
||||
Only the project's administrator can see this page (its space's rights: view and edit, ##XWiki.rajames## alone).
|
||||
{{/info}}
|
||||
|
||||
== CI ==
|
||||
|
||||
|=Workflow|=Status|=Runs
|
||||
|Acceptance -- the gate on every PR into master|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/acceptance.yml/badge.svg]]|[[runs>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions?workflow=acceptance.yml]]
|
||||
|Build -- the quick check on StarForth-v4.0.0|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/build.yml/badge.svg?branch=StarForth-v4.0.0]]|[[runs>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions?workflow=build.yml]]
|
||||
|Nightly -- acceptance, images to Nexus, proofs (03:00 UTC)|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/nightly.yml/badge.svg?branch=master]]|[[runs>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions?workflow=nightly.yml]]
|
||||
|Nightly documents (04:00 UTC)|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/nightly-docs.yml/badge.svg?branch=master]]|[[runs>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions?workflow=nightly-docs.yml]]
|
||||
|Runner image|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/runner-image.yml/badge.svg?branch=master]]|[[runs>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions?workflow=runner-image.yml]]
|
||||
|Release (a v<version> tag)|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/release.yml/badge.svg]]|[[runs>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions?workflow=release.yml]]
|
||||
|
||||
== Work ==
|
||||
|
||||
* [[Open pull requests>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/pulls?state=open]]
|
||||
* [[Open issues>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues?state=open]] -- [[in progress>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues?state=open&labels=23]], [[blocked>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues?state=open&labels=20]], [[needs acceptance>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues?state=open&labels=21]]
|
||||
* [[Milestones>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/milestones]] and [[the project board>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/projects]]
|
||||
* [[Branch protection and secrets>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/settings/branches]] -- ##master##: no pushes, merges only after Acceptance
|
||||
* [[Actions secrets>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/settings/actions/secrets]] -- ##NEXUS_CI_PASSWORD##, ##PACKAGES_TOKEN##, ##CAPSULE_SIGN_KEY##
|
||||
* [[Runners>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/settings/actions/runners]]
|
||||
* [[Access tokens>>https://gitea.starshipos-f18.org/user/settings/applications]] -- revoke what a session no longer needs
|
||||
|
||||
== Artifacts ==
|
||||
|
||||
* [[Nexus: org.starship snapshots>>https://nexus.starshipos-f18.org/#browse/browse:starshipos-snapshots:org%2Fstarship]] -- ##kernelImage## (##pc##, ##raspi5##, ##milkv##, ##logs##), ##documentation## (##book##, ##vol1##-##vol3##, ##api##)
|
||||
* [[Nexus: releases>>https://nexus.starshipos-f18.org/#browse/browse:starshipos-releases:org%2Fstarship]]
|
||||
* [[Container images>>https://gitea.starshipos-f18.org/rajames/-/packages]] -- ##lithosananke-runner##, the CI runner image
|
||||
|
||||
== Sites ==
|
||||
|
||||
* [[starshipos-f18.com>>https://starshipos-f18.com/]] -- the public face, and [[Try it>>https://starshipos-f18.com/bin/view/TryIt/]]
|
||||
* [[Contributors' dashboard>>Contributors.WebHome]]
|
||||
* [[Wiki administration>>path:/bin/admin/XWiki/XWikiPreferences]] -- users, groups (##XWiki.StarshipContributors##), rights
|
||||
@@ -0,0 +1,51 @@
|
||||
= Contributors' Dashboard =
|
||||
|
||||
{{info}}
|
||||
For members of ##XWiki.StarshipContributors## and the administrator. Ask Captain Bob to be added.
|
||||
{{/info}}
|
||||
|
||||
== How We Work: the Captain Bob Method ==
|
||||
|
||||
Neither agile nor waterfall. One process from the developer's desk to ##master##:
|
||||
|
||||
1. **Found** -- an issue says what is wrong or missing, with the evidence (a log, a line of code).
|
||||
1. **Ruled** -- Captain Bob decides what is to be done. Nothing is built without a ruling, and no fix nobody asked for.
|
||||
1. **Built** -- on the working branch, ##StarForth-v4.0.0##. C99, no GNU extensions; compose in FORTH before adding a C word.
|
||||
1. **Verified** -- the acceptance protocol, below; its logs are committed under ##logs/##.
|
||||
1. **Merged** -- a pull request into ##master##, which runs acceptance by itself. ##master## takes nothing else.
|
||||
|
||||
== The Acceptance Protocol ==
|
||||
|
||||
Run in this order, one QEMU at a time, in the foreground:
|
||||
|
||||
{{code language="none"}}
|
||||
make -f kernel/Makefile ARCH=amd64 clean qemu
|
||||
make -f kernel/Makefile ARCH=aarch64 clean qemu
|
||||
make -f kernel/Makefile ARCH=riscv64 clean qemu
|
||||
make -f kernel/Makefile ARCH=amd64 clean qemu-stick-high
|
||||
make -C v4 test-32
|
||||
{{/code}}
|
||||
|
||||
Each boot reaches ##[zuse@Hera] ok>## with ##POST: PASSED## and every POST check passing, and the
|
||||
three architectures report the same ##dict_hash##. ##make ARCH=amd64,aarch64,riscv64 init##
|
||||
installs everything this needs.
|
||||
|
||||
|=Check|=Status
|
||||
|Acceptance|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/acceptance.yml/badge.svg]]
|
||||
|Build (StarForth-v4.0.0)|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/build.yml/badge.svg?branch=StarForth-v4.0.0]]
|
||||
|Nightly|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/nightly.yml/badge.svg?branch=master]]
|
||||
|
||||
== Where Things Are ==
|
||||
|
||||
* [[The repository>>https://gitea.starshipos-f18.org/rajames/LithosAnanke]] -- start with ##README.md## and ##docs/README.md##; the design record is ##docs/fabric/FABRIC-3.md##
|
||||
* [[New issue>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues/new/choose]] -- the forms: bug, work, ruling, board
|
||||
* [[Open features>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues?state=open&labels=2]] and [[bugs>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues?state=open&labels=1]]
|
||||
* [[Board bring-up>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues?state=open&milestone=2]] -- ##boards/BRINGUP.md##
|
||||
* Before touching a capsule (##capsules/*.4th##): read ##experiments/bare_metal/README.md## -- the block ranges are shared by every capsule
|
||||
|
||||
== Rules That Bite ==
|
||||
|
||||
* No new branch, no ##git stash##, without Captain Bob's say-so.
|
||||
* Never modify a registered, tested FORTH word to "fix" it; the problem is in the caller.
|
||||
* ACL policy lives in ##ACL.4th##, not in C.
|
||||
* Tags are sacred: each has the logs proving its state.
|
||||
@@ -0,0 +1,40 @@
|
||||
{{box cssClass="floatinginfobox" title="**StarshipOS**"}}
|
||||
* **Kernel**: LithosAnanke v2.1.0 (UEFI, bare metal)
|
||||
* **Runtime**: StarForth v4, the F18 engine (v3.2.0 kept)
|
||||
* **Architectures**: amd64, aarch64, riscv64
|
||||
* **Boards**: PC (UEFI stick), Raspberry Pi 5, Milk-V Mars
|
||||
* **Language**: C99 and FORTH
|
||||
{{/box}}
|
||||
|
||||
= StarshipOS =
|
||||
|
||||
StarshipOS is an operating system with no other operating system underneath it. **LithosAnanke**, a
|
||||
UEFI microkernel, boots straight from the firmware and runs **StarForth** -- a FORTH virtual
|
||||
machine -- as its only runtime. There is no libc and no shell: the system speaks FORTH.
|
||||
|
||||
This wiki is the project's working home: its design, its record and its dashboards. The public
|
||||
face of StarshipOS -- what it is, and a machine to try in your browser -- is
|
||||
[[starshipos-f18.com>>https://starshipos-f18.com/]].
|
||||
|
||||
== The Project ==
|
||||
|
||||
* [[The source>>https://gitea.starshipos-f18.org/rajames/LithosAnanke]] -- the kernel, StarForth, the proofs and the documents, in one repository
|
||||
* [[Issues>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/issues]] -- what is found, ruled, built and verified
|
||||
* [[Pull requests>>https://gitea.starshipos-f18.org/rajames/LithosAnanke/pulls]] -- the only way into ##master##
|
||||
|
||||
== How a Change Is Accepted ==
|
||||
|
||||
Every change passes the same **acceptance protocol**, by hand or in CI: the kernel booted in QEMU on
|
||||
amd64, aarch64 and riscv64 to its prompt, its power-on self-test passing every check; the PC stick
|
||||
loaded the way a PC loads it; and the 32-bit build's tests. A pull request into ##master## runs it
|
||||
by itself, and nothing that fails it is merged.
|
||||
|
||||
|=Check|=Status
|
||||
|Acceptance (pull requests)|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/acceptance.yml/badge.svg]]
|
||||
|Nightly: acceptance, images, proofs|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/nightly.yml/badge.svg?branch=master]]
|
||||
|Nightly: documents|[[image:https://gitea.starshipos-f18.org/rajames/LithosAnanke/actions/workflows/nightly-docs.yml/badge.svg?branch=master]]
|
||||
|
||||
== Contributors ==
|
||||
|
||||
Contributors have a dashboard of their own: [[log in>>path:/bin/login/XWiki/XWikiLogin]], then
|
||||
[[Contributors>>Contributors.WebHome]].
|
||||
@@ -0,0 +1,22 @@
|
||||
# site/org -- the .org XWiki's pages
|
||||
|
||||
The project's working wiki at `starshipos-f18.org` (the public face is the `.com`; `demo/` has its
|
||||
"Try it" page). Three pages, ruled by Captain Bob on 2026-11-07:
|
||||
|
||||
| Page | File | Who sees it |
|
||||
|---|---|---|
|
||||
| `Main.WebHome` -- the landing page | `Main.WebHome.xwiki` | everyone, guests included |
|
||||
| `Admin.WebHome` -- the admin dashboard | `Admin.WebHome.xwiki` | the administrator (`XWiki.rajames`) alone |
|
||||
| `Contributors.WebHome` -- the contributors' dashboard | `Contributors.WebHome.xwiki` | the group `XWiki.StarshipContributors`, and the administrator |
|
||||
|
||||
The dashboards show CI as Gitea's live workflow badges, which need no login and no script rights.
|
||||
|
||||
`install.sh` puts them on the wiki through its REST API, makes the group and the rights, and checks
|
||||
as a guest that the landing page is readable and the dashboards are not:
|
||||
|
||||
```
|
||||
XWIKI_USER=rajames XWIKI_PASSWORD=... site/org/install.sh
|
||||
```
|
||||
|
||||
Contributors are added to `XWiki.StarshipContributors` in the wiki's administration (Users and
|
||||
Groups). The wiki-wide rights -- what guests may do anywhere else -- are the wiki's own, not this.
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
#!/bin/bash
|
||||
# install.sh -- the .org XWiki's three pages (Captain Bob, 2026-11-07): a landing page anyone can
|
||||
# read, an admin dashboard for the administrator alone, and a contributors' dashboard for the
|
||||
# group XWiki.StarshipContributors (and the administrator). Through XWiki's REST API:
|
||||
#
|
||||
# Main.WebHome Main.WebHome.xwiki rights untouched: the wiki's own (guests view)
|
||||
# Admin.WebHome Admin.WebHome.xwiki Admin.WebPreferences: view, edit, comment,
|
||||
# delete -- $ADMIN_USER alone
|
||||
# Contributors.WebHome Contributors.WebHome.xwiki Contributors.WebPreferences: view, comment --
|
||||
# XWiki.StarshipContributors and $ADMIN_USER;
|
||||
# edit, delete -- $ADMIN_USER
|
||||
# XWiki.StarshipContributors the group, created empty; members are added in the wiki's
|
||||
# administration (Users and Groups)
|
||||
#
|
||||
# An allow on a space denies that right there to everyone not named -- guests included.
|
||||
#
|
||||
# XWIKI_USER=rajames XWIKI_PASSWORD=... site/org/install.sh [https://starshipos-f18.org]
|
||||
#
|
||||
# Run it again after editing a page: pages are replaced, rights and the group are added once.
|
||||
# It ends by checking, without logging in, that the landing page is readable and the dashboards
|
||||
# are not.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
base=${1:-https://starshipos-f18.org}
|
||||
rest="$base/rest/wikis/xwiki"
|
||||
user=${XWIKI_USER:?set XWIKI_USER}
|
||||
pass=${XWIKI_PASSWORD:?set XWIKI_PASSWORD}
|
||||
admin=${ADMIN_USER:-XWiki.$user}
|
||||
group=XWiki.StarshipContributors
|
||||
auth=(-u "$user:$pass")
|
||||
|
||||
page() { # page <space> <name> <title> [file]: create or replace
|
||||
local body
|
||||
body=$(python3 -c '
|
||||
import sys
|
||||
from xml.sax.saxutils import escape
|
||||
title, path = sys.argv[1], sys.argv[2]
|
||||
content = open(path).read() if path else ""
|
||||
print("<page xmlns=\"http://www.xwiki.org\"><title>%s</title><syntax>xwiki/2.1</syntax>"
|
||||
"<content>%s</content></page>" % (escape(title), escape(content)))' "$3" "${4:-}")
|
||||
curl -fsS -o /dev/null -w " page $1.$2: %{http_code}\n" "${auth[@]}" -X PUT \
|
||||
-H 'Content-Type: application/xml' --data-binary "$body" "$rest/spaces/$1/pages/$2"
|
||||
}
|
||||
objects() { # objects <space> <page> <class>: how many the page has
|
||||
curl -fsS "${auth[@]}" -H 'Accept: application/json' "$rest/spaces/$1/pages/$2/objects/$3" |
|
||||
python3 -c 'import json,sys; print(len(json.load(sys.stdin).get("objectSummaries") or []))'
|
||||
}
|
||||
object() { # object <space> <page> <class> <property=value>...: add one
|
||||
local s=$1 p=$2 c=$3; shift 3
|
||||
local args=(--data-urlencode "className=$c")
|
||||
for kv in "$@"; do args+=(--data-urlencode "property#$kv"); done
|
||||
curl -fsS -o /dev/null -w " $s.$p: $c added (%{http_code})\n" "${auth[@]}" -X POST "${args[@]}" \
|
||||
"$rest/spaces/$s/pages/$p/objects"
|
||||
}
|
||||
|
||||
echo "=== $base, as $user"
|
||||
page Main WebHome "StarshipOS" Main.WebHome.xwiki
|
||||
page Admin WebHome "Admin Dashboard" Admin.WebHome.xwiki
|
||||
page Contributors WebHome "Contributors' Dashboard" Contributors.WebHome.xwiki
|
||||
|
||||
echo "=== the group $group"
|
||||
page XWiki StarshipContributors "Starship Contributors"
|
||||
if [ "$(objects XWiki StarshipContributors XWiki.XWikiGroups)" = 0 ]; then
|
||||
object XWiki StarshipContributors XWiki.XWikiGroups "member="
|
||||
else
|
||||
echo " already a group"
|
||||
fi
|
||||
|
||||
echo "=== rights"
|
||||
page Admin WebPreferences "Admin rights"
|
||||
if [ "$(objects Admin WebPreferences XWiki.XWikiGlobalRights)" = 0 ]; then
|
||||
object Admin WebPreferences XWiki.XWikiGlobalRights \
|
||||
"levels=view,edit,comment,delete" "users=$admin" "groups=" "allow=1"
|
||||
else
|
||||
echo " Admin: rights there already, left as they are"
|
||||
fi
|
||||
page Contributors WebPreferences "Contributors rights"
|
||||
if [ "$(objects Contributors WebPreferences XWiki.XWikiGlobalRights)" = 0 ]; then
|
||||
object Contributors WebPreferences XWiki.XWikiGlobalRights \
|
||||
"levels=view,comment" "users=$admin" "groups=$group" "allow=1"
|
||||
object Contributors WebPreferences XWiki.XWikiGlobalRights \
|
||||
"levels=edit,delete" "users=$admin" "groups=" "allow=1"
|
||||
else
|
||||
echo " Contributors: rights there already, left as they are"
|
||||
fi
|
||||
|
||||
echo "=== as a guest"
|
||||
bad=
|
||||
for p in Main Admin Contributors; do
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' -H 'Accept: application/json' "$rest/spaces/$p/pages/WebHome")
|
||||
case "$p:$code" in
|
||||
Main:200|Admin:401|Admin:403|Contributors:401|Contributors:403)
|
||||
echo " $p.WebHome: $code -- as it should be";;
|
||||
*) echo " $p.WebHome: $code -- NOT as it should be"; bad=1;;
|
||||
esac
|
||||
done
|
||||
[ -z "$bad" ] || { echo "install: a guest's view is wrong; see above" >&2; exit 1; }
|
||||
echo "=== done: $base/bin/view/Main/"
|
||||
Reference in New Issue
Block a user