Skip to content

Commit 2b220be

Browse files
committed
docs: record 0.5 release truth and onboarding
1 parent e937d48 commit 2b220be

26 files changed

Lines changed: 3113 additions & 416 deletions

AGENTS.md

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
# Agent And Operator Process
2+
3+
This file is the durable working contract for people and agents changing this
4+
repo. Product principles live in [PRINCIPLES.md](PRINCIPLES.md), current truth
5+
lives in [state.md](state.md), and open work lives in [TASKS.md](TASKS.md).
6+
7+
## Branch Roles
8+
9+
- `main` is the stable release line.
10+
- `review/0.5.0` is the public review branch for this candidate stack.
11+
- `live` represents the exact code deployed to the public Home URL.
12+
- Treat any other local branch or target-host checkout as evidence only after
13+
reporting its exact branch, commit, tree id, dirty status, and verification
14+
command.
15+
- Always report remote divergence. A local branch being green is not the same as
16+
`elacity/<branch>` being up to date.
17+
18+
## Branch Lifecycle
19+
20+
Before creating, deleting, merging, or publishing branches, produce a short
21+
branch inventory:
22+
23+
```bash
24+
git status --short --branch
25+
git branch --list --format='%(refname:short) %(objectname:short) %(upstream:short) %(subject)'
26+
git worktree list
27+
```
28+
29+
Every active local branch must have a role. If the branch is not `main`, `live`,
30+
or the current development line, classify it before doing more work:
31+
32+
- unique work to merge;
33+
- byte-identical duplicate of another branch;
34+
- dirty worktree to preserve;
35+
- backup branch kept only until the user confirms cleanup.
36+
37+
Delete no branch or worktree until its tree identity and dirty state are known.
38+
For same-tree checks, compare tree objects, not just commit subjects:
39+
40+
```bash
41+
git rev-parse <branch>^{tree}
42+
git rev-parse <target>^{tree}
43+
git diff --stat <target>...<branch>
44+
```
45+
46+
Avoid creating timestamped backup branches during normal work. If a backup is
47+
unavoidable, name the reason, keep a cleanup task with it, and remove it after
48+
the protected work is merged or proven duplicate.
49+
50+
## Publishing Terms And Gates
51+
52+
Use precise verbs. If the user says "publish" without a target, restate the
53+
target before acting.
54+
55+
- prepare: make a local, reviewable commit or commit set; do not push or deploy.
56+
- publish for review: push the named local branch to the named remote only after
57+
reporting commits, divergence, and verification.
58+
- deploy live: update `https://elastos.elacitylabs.com/apps/home/` from a named
59+
commit and verify the served artifact hashes before moving `live`.
60+
- release: merge to `main`, update release notes/version/tag, and push only
61+
after the release gate passes.
62+
63+
Default safety rule: code is not pushed, deployed, tagged, or merged to `main`
64+
unless the user explicitly asks for that action after seeing the relevant local
65+
state and verification result. "Looks good" after reviewing one commit is not
66+
permission to publish unrelated remaining commits.
67+
68+
Before any remote push, show:
69+
70+
```bash
71+
git log --oneline <upstream>..HEAD
72+
git diff --stat <upstream>...HEAD
73+
git rev-list --left-right --count <upstream>...HEAD
74+
```
75+
76+
Before deploying public Home, show the exact commit being deployed, confirm that
77+
`live` either already points to that commit or will be moved only after
78+
successful verification, and preserve a rollback path for the installed binary,
79+
capsules, provider config, and `components.json`.
80+
81+
## Review And Commit Discipline
82+
83+
- Keep commits authority-bound and reviewable: one coherent concern per commit,
84+
with its own verification commands.
85+
- Do not hide corrective commits. If a reviewed commit must be repaired before
86+
publish, fold the repair into the coherent slice before asking for review.
87+
- Preserve reviewed history by default. When a branch has a reviewed prefix and
88+
an unpublished tail, reorganize only the unpublished tail unless the user
89+
explicitly asks to redo the whole branch.
90+
- If a commit is too small, badly titled, or only fixes the immediately previous
91+
unpublished commit, merge it into that unpublished slice before review instead
92+
of publishing a corrective follow-up.
93+
- Do not delete or rewrite dirty worktrees unless the user explicitly approves
94+
it. If duplicate trees exist, prove byte identity and clean status before
95+
recommending deletion.
96+
- Avoid volatile proof logs in durable docs. Store open work in `TASKS.md`,
97+
verified current truth in `state.md`, and release history in
98+
`elastos/CHANGELOG.md`.
99+
100+
## Verification Gate
101+
102+
Use the smallest checks that cover the touched surface, but do not skip the
103+
basic gate before handing work back:
104+
105+
```bash
106+
git diff --check
107+
node scripts/home-entropy-check.mjs
108+
(cd elastos && cargo fmt --all -- --check)
109+
cargo fmt --manifest-path capsules/chain-provider/Cargo.toml -- --check
110+
```
111+
112+
Run Rust workspace commands from `elastos/`, not the repo root. Add narrow tests
113+
for touched crates or scripts, for example:
114+
115+
```bash
116+
(cd elastos && cargo test -p elastos-server people_discovery -- --nocapture)
117+
cargo test --manifest-path capsules/chain-provider/Cargo.toml -- --nocapture
118+
```
119+
120+
For Browser-facing changes, include the relevant Browser entropy/smoke gates and
121+
do not claim product readiness unless `scripts/browser-objective-audit.mjs`
122+
passes with accepted product media plus matching manual UX evidence.
123+
124+
For installed provider changes, also prove the installed binary and manifest:
125+
126+
```bash
127+
scripts/installed-provider-verify.sh <provider>
128+
```
129+
130+
## Public Live Deployment
131+
132+
The public live host must preserve its data root, signing key, passkey state, and
133+
provider config while replacing only intentional release artifacts.
134+
135+
Any public-live mutation requires explicit user approval before the mutation,
136+
even when a dry-run plan reports ready artifacts.
137+
138+
Current public-live convention:
139+
140+
- gateway root: `$ELASTOS_LIVE_HOME`
141+
- data root: `$ELASTOS_LIVE_XDG_DATA_HOME/elastos`
142+
- public URL: `https://elastos.elacitylabs.com/apps/home/`
143+
144+
For source-home rebuilds, keep `HOME` and `XDG_DATA_HOME` pointed at the live
145+
root, but pin Rust tooling to the real toolchain. Otherwise `rustup` can look in
146+
the live home and miss installed targets such as `wasm32-wasip1`.
147+
148+
```bash
149+
HOME="$ELASTOS_LIVE_HOME" \
150+
XDG_DATA_HOME="$ELASTOS_LIVE_XDG_DATA_HOME" \
151+
CARGO_HOME="$ELASTOS_OPERATOR_CARGO_HOME" \
152+
RUSTUP_HOME="$ELASTOS_OPERATOR_RUSTUP_HOME" \
153+
PATH="$ELASTOS_OPERATOR_CARGO_HOME/bin:$PATH" \
154+
ELASTOS_QUIET_RUNTIME_NOTICES=1 \
155+
scripts/setup-source-home.sh
156+
```
157+
158+
`setup-source-home.sh` builds native provider binaries, builds first-party WASM
159+
capsules, installs app capsule trees with their root WASM entrypoints, stamps
160+
`components.json`, and prepares source-home runtime helpers. Before restart:
161+
162+
- back up the live binary, `components.json`, provider config, and capsule tree;
163+
- install the rebuilt `elastos/target/release/elastos`;
164+
- keep Browser supervisor scripts on a stable live-data path, not a temporary
165+
checkout path.
166+
167+
After restart, verify:
168+
169+
```bash
170+
curl -fsS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8090/apps/home/
171+
curl -fsS -o /dev/null -w '%{http_code}\n' https://elastos.elacitylabs.com/apps/home/
172+
curl -fsS https://elastos.elacitylabs.com/apps/home/ | sha256sum
173+
sha256sum \
174+
"$ELASTOS_LIVE_XDG_DATA_HOME/elastos/capsules/home/browser/index.html" \
175+
capsules/home/browser/index.html
176+
```
177+
178+
Review the new gateway log for provider verification warnings, signer DID
179+
mismatches, invalid Home launch tokens, and app-launch `400`/`500` errors before
180+
declaring public live ready.
181+
182+
## Staging Machines
183+
184+
Use target roles consistently:
185+
186+
- public server: public live proof and non-KVM gateway/remote-engine consumer;
187+
- Mac: staging, macOS VZ Browser proof, and cross-platform proof;
188+
- Jetson: Linux/crosvm native Browser target and intended main device proof.
189+
190+
Mac staging requires durable SSH before serious testing. `tmate` is acceptable
191+
only as a break-glass bootstrap channel. During that bootstrap, create or reuse a
192+
dedicated staging account, install an agent-owned public key in
193+
the target account's authorized-keys file, disable password assumptions, record a local SSH host
194+
alias, and verify non-interactive commands work. If no durable SSH is available,
195+
say the Mac is blocked instead of implying it was verified.
196+
197+
Do not commit staging aliases, private key names, reverse-tunnel ports, local
198+
worktree paths, or operator usernames. Keep those details in local operator
199+
notes and pass them through explicit environment variables or CLI flags.
200+
201+
Target proof must cite the exact source tree, target-local commit or artifact
202+
receipt, and verification command used for the run. Do not treat a missing
203+
active Browser page as a passing Browser product proof.
204+
205+
## Browser Claim Discipline
206+
207+
The current 0.5.0 Browser product contract is WebRTC remote display through the
208+
Runtime Browser Engine Adapter with Runtime-only networking and explicit Browser
209+
Engine/Exit service selection. `runtime_frame`, `diagnostic_frame`, screenshot,
210+
and image-polling display paths are removed from the product path and must not be
211+
reintroduced as compatibility fallbacks.
212+
213+
Mac VZ and Linux/crosvm Jetson are host adapters behind the same Browser/Net/
214+
Exit/Wallet contracts. This public server is a non-KVM gateway and remote-engine
215+
consumer, not a local product Browser VM provider. Host-specific launchers are
216+
implementation details behind Runtime contracts, not separate Browser products.
217+
218+
Native Browser helpers and hosted/Selkies proof tooling may exist, but native,
219+
hosted, macOS, Linux, Jetson, arbitrary media, wallet-dapp, or microVM Browser
220+
support is not accepted from source presence alone. Product Browser readiness
221+
requires target evidence for audio/video/input, frame continuity, heartbeat and
222+
reconnect behavior, explicit close/orphan cleanup, and wallet dapp flows, plus a
223+
hash-bound manual UX report where required.
224+
225+
A macOS `.dmg` is a packaging goal, not current support. It requires a stable
226+
macOS source-home path, provider binaries, launch wrapper, passkey/origin policy,
227+
update story, and human Home/app/chat proof. Do not conflate `.dmg` packaging
228+
with Browser engine isolation or product media proof.
229+
230+
Cosmopolitan Libc may be researched for small C/C++ helper binaries, but it is
231+
not a drop-in answer for Rust workspace packaging, Chromium, WebView, GPU/audio,
232+
microVM isolation, or `.dmg` distribution.

0 commit comments

Comments
 (0)