Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .trinity/seals/t27os_T27osInstall.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"built_by": "t27c-bootstrap@0.5.2+c948f4df7",
"closure": [
{
"spec": "specs/claw/text.t27",
"spec_hash": "sha256:968755ec1917f766eb2cdd0ab4c0c48aef028a0e7d69e191911695e925b286ad"
}
],
"config": "gen=c,rust,verilog,zig;tests=zig",
"gen_hash_c": "sha256:1f41a6bb4d9ec65c187790eb458760fb7467780b2e8651dad5941a26dabc5936",
"gen_hash_rust": "sha256:3b70f85eb46ff31a0e7b52cf82f209121d124884eabd41e7e31cd62436fe0757",
"gen_hash_verilog": "sha256:1d90aa61656131b78be2afd49581c00ed5e1ab82db2adac6686132b357eacc98",
"gen_hash_zig": "sha256:e6999d57214ce4e9e2adadbe99b8f51982bcc17f1d7bf8b776d24ddc8bf5945b",
"module": "T27osInstall",
"ring": 12,
"seal_schema": 2,
"sealed_at": "2026-10-19T14:01:03Z",
"sealed_by": "t27c-bootstrap@0.5.2",
"spec_hash": "sha256:7315ca7fc6c30d92907c3311015ec5511e4d76622073032f9211ffe601a172c4",
"spec_path": "specs/t27os/install.t27",
"tests": {
"failed": 0,
"failing": [],
"forced": false,
"passed": 16,
"total": 16,
"vacuous": 0
},
"toolchain": {
"test_runner": "sha256:8512b80da533b79289110fca4a65f3336abd7a059ca4b72ea595d5e33ff8ad10",
"zig": "0.16.0"
}
}
81 changes: 40 additions & 41 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
# Minimal top-level convenience targets for t27.
#
# This Makefile is intentionally thin: it only wraps existing scripts so common
# developer checks have a memorable entry point. It is NOT wired into CI (the
# required checks are the ruleset's answer:
# gh api repos/gHashTag/t27/rules/branches/master) and adds no build logic of its own.
#
# Anchor: phi^2 + phi^-2 = 3

.PHONY: help verify seal-check seal install-hooks warnings-baseline

# Default target: list what is available.
# T27 OS: one installer, built with make (#11044), and the developer shortcuts below it. Thin on
# purpose: the install decisions (platform, prefix, version pin, idempotence, uninstall list, dry run,
# opt-in flags) are specs/t27os/install.t27; this file names the same files and flags and carries
# them out with cargo and install(1). Not wired into CI (the required checks are the ruleset's answer:
# gh api repos/gHashTag/t27/rules/branches/master). Anchor: phi^2 + phi^-2 = 3

PREFIX ?= /usr/local
T27B := $(filter arm64 aarch64,$(shell uname -m))
LIST := $(PREFIX)/share/t27/install.list
PAIRS := scripts/tri:bin/tri target/release/t27c:bin/t27c target/release/tri:target/release/tri target/release/t27c:target/release/t27c $(if $(T27B),target/release/t27b:bin/t27b) $(if $(filter on,$(CLAW)),$(foreach f,specs/claw/service.t27 specs/claw/text.t27 .trinity/seals/claw_ClawService.json .trinity/seals/claw_ClawText.json,$(f):share/t27/claw/$(f)))

.PHONY: help install uninstall verify seal-check seal warnings-baseline

## make install build and install tri, t27c and t27b under PREFIX (/usr/local); PIN=<version> insists on that t27c
## make -n install print the plan and change nothing
## make install PREFIX=$HOME/.local install under a directory you own
## make install CLAW=on also install TRI CLAW; EARN=on, the lab node, is refused
## make uninstall remove exactly the files the install listed
## tri --version check an install, from PREFIX/bin
## make help this list; advisory shortcuts: make seal-check | seal | verify | warnings-baseline
help:
@echo "t27 convenience targets:"
@echo " make seal-check Report whether the NMSE manifest seal is fresh"
@echo " vs sha256(bootstrap/src/compiler.rs) (advisory)."
@echo " make seal Recertify the NMSE seal against the current"
@echo " compiler.rs -- explicit, prompts for confirmation."
@echo " make install-hooks Install the local git hooks (incl. the advisory"
@echo " pre-push seal-staleness warning)."
@echo " make warnings-baseline Count non-test build warnings vs the recorded"
@echo " baseline and list the top files (advisory; #969)."
@echo " make verify Run all advisory pre-PR checks at once (seal-check"
@echo " + warnings-baseline + quick test + gate-preview"
@echo " + reseal-preview); never blocks. Skip flags:"
@echo " VERIFY_SKIP_TEST / VERIFY_SKIP_GATES /"
@echo " VERIFY_SKIP_RESEAL =1."

# Advisory umbrella: run the seal-freshness, warnings-baseline, and a quick test
# back-to-back and print one compact summary. Never edits code, never reseals,
# always exits 0 -- a convenience entry point for a pre-PR glance. The real gate
# stays the required CI checks (gh api repos/gHashTag/t27/rules/branches/master).
@sed -n 's/^## / /p' $(MAKEFILE_LIST)

install:
@case "$$(uname -s)-$$(uname -m)" in Darwin-arm64|Darwin-x86_64|Linux-aarch64|Linux-x86_64) ;; *) echo "unsupported platform: $$(uname -s) $$(uname -m)" >&2; exit 2;; esac
@case "$(PREFIX)" in *" "*|*..*) ;; /?*) exit 0;; esac; echo "PREFIX must be an absolute path, no spaces, no ..: $(PREFIX)" >&2; exit 2
@test "$(EARN)" != on || { echo "EARN=on: no lab node ships in this checkout yet; nothing was installed" >&2; exit 2; }
./scripts/tri disk
cargo build --release -p t27c -p tri $(if $(T27B),-p t27b)
@test -z "$(PIN)" || test "$$(target/release/t27c --version)" = "t27c $(PIN)" || { echo "version pin $(PIN) not met: $$(target/release/t27c --version)" >&2; exit 2; }
@set -e; for p in $(PAIRS); do s=$${p%%:*}; d=$(PREFIX)/$${p#*:}; mkdir -p "$$(dirname "$$d")"; m=755; case "$$s" in specs/*|.trinity/*) m=644;; esac; install -C -m $$m "$$s" "$$d"; done
@set -e; mkdir -p $(PREFIX)/share/t27; m=$$({ cat $(LIST) 2>/dev/null || :; printf '%s\n' $(PAIRS) | sed 's/^[^:]*://'; echo share/t27/install.list; } | sort -u); [ "$$m" = "$$(cat $(LIST) 2>/dev/null)" ] || printf '%s\n' "$$m" > $(LIST)
$(if $(filter on,$(CLAW)),@cd $(PREFIX)/share/t27/claw && $(PREFIX)/bin/t27c seal --verify specs/claw/service.t27)

uninstall:
@if [ ! -f $(LIST) ]; then echo "nothing to remove: no $(LIST)"; elif grep -qE '^/|\.\.' $(LIST); then echo "$(LIST) names a path outside PREFIX; nothing removed" >&2; exit 2; else cd $(PREFIX) && xargs rm -f < share/t27/install.list && rmdir share/t27/claw/specs/claw share/t27/claw/specs share/t27/claw/.trinity/seals share/t27/claw/.trinity share/t27/claw share/t27 target/release target 2>/dev/null; true; fi

# Advisory umbrella: seal freshness, warnings baseline and a quick test; always exits 0.
verify:
@scripts/verify.sh

# Advisory: report NMSE seal freshness. Exit 0 fresh / 2 stale / 3 unsealed.
# Never reseals; refreezing stays an explicit reviewed step.
# Advisory: NMSE seal freshness. Exit 0 fresh / 2 stale / 3 unsealed. Never reseals.
seal-check:
@scripts/reseal-check.sh

# Explicit, reviewed reseal: recertify the NMSE seal against the current
# compiler.rs. Prompts for confirmation (or RESEAL_YES=1); never automatic.
# Explicit, reviewed reseal of the NMSE seal; prompts, or RESEAL_YES=1.
seal:
@scripts/reseal-apply.sh

# Install the local git hooks (advisory pre-push includes the seal check).
install-hooks:
@scripts/install-git-hooks.sh

# Advisory: count non-test build warnings vs the recorded baseline and list the
# top offending files, to track #969 dead-code progress. Never edits code.
# Advisory: non-test build warnings vs the recorded baseline (#969). Never edits code.
warnings-baseline:
@scripts/warnings-baseline.sh
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,23 @@ t27 is the core of [Trinity S3AI](https://github.com/gHashTag/trinity) -- a neur

## Quick Start

T27 OS has one installer, and it is built with `make`. From a clone of this repository, with `cargo` on your PATH (macOS or Linux, arm64 or x86_64):

```bash
# Clone
git clone https://github.com/gHashTag/t27.git
cd t27
make install # build tri, t27c and t27b, install them under /usr/local
make -n install # print the plan, change nothing
make install PREFIX=$HOME/.local # install under a directory you own, no sudo
make install CLAW=on # also install TRI CLAW, the merge and gate agent of specs/claw/
make uninstall # remove exactly the files the install listed
make help
tri --version # with PREFIX/bin on your PATH
```

# Build the bootstrap compiler (Rust); use ./scripts/tri as the CLI entry (wraps t27c)
cd bootstrap && cargo build --release
cd ..
A second `make install` changes nothing, and t27b is installed on arm64 only. `CLAW=on` installs TRI CLAW's service spec (`specs/claw/service.t27`) with its seals and verifies them with `t27c seal --verify`; TRI CLAW has no server of its own, so that check is its start. The lab node that earns test-network XP by running lab gates is opt-in as `EARN=on`, off by default, and no lab node ships in this repository yet, so `make install EARN=on` stops before it changes anything. Phones do not run `make`; they join through the trios app. The decisions behind the installer are in [`specs/t27os/install.t27`](specs/t27os/install.t27).

### Use the toolchain

```bash
# Parse a spec (canonical CLI: tri → wraps bootstrap t27c)
./scripts/tri parse specs/base/types.t27

Expand Down
Loading
Loading