Skip to content

Commit 0d05c6a

Browse files
authored
Merge pull request #27 from IgnazioDS/branch/release-v2.6.0
[codex] v2.6.0 DX and docs consolidation
2 parents 0477b23 + 87de90c commit 0d05c6a

26 files changed

Lines changed: 561 additions & 80 deletions

.env.example

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ CLOUD_BIND_HOST=127.0.0.1
3838
# Admin dashboard server auth
3939
# ---------------------------------------------------------------------------
4040
ADMIN_UI_USERNAME=admin
41-
# direct hash for non-Docker admin runs; keep bcrypt values single-quoted in .env
42-
# to avoid docker compose interpolation of "$" segments.
41+
# Dev-safe defaults below map to ADMIN_UI_PASSWORD=admin123! so a fresh clone can
42+
# follow the runbook without hand-editing auth secrets first. Keep direct bcrypt
43+
# hashes single-quoted in .env to avoid docker compose interpolation of "$" segments.
4344
# example: cd apps/admin && node -e "const b=require('bcryptjs'); console.log(b.hashSync('admin123!', 12));"
44-
ADMIN_UI_PASSWORD_HASH='REPLACE_WITH_BCRYPT_HASH'
45+
ADMIN_UI_PASSWORD_HASH='$2a$12$bBcV9Ds2tcdutyB7gyXLf.GGxhg0Fwgu.MnQ7EAdAqRqCPqjMRanu'
4546
# Docker Compose-safe variant (base64 of the bcrypt hash above)
4647
# example: cd apps/admin && node -e "const b=require('bcryptjs'); process.stdout.write(Buffer.from(b.hashSync('admin123!', 12), 'utf8').toString('base64'));"
47-
ADMIN_UI_PASSWORD_HASH_B64=REPLACE_WITH_BCRYPT_HASH_BASE64
48+
ADMIN_UI_PASSWORD_HASH_B64=JDJhJDEyJGJCY1Y5RHMydGNkdXR5QjdneVhMZi5HR3hoZzBGd2d1Lk1uUTdFQWRBcVJxQ1Bxak1SYW51
4849
ADMIN_UI_SESSION_SECRET=dev-admin-session-secret-change-me
4950
ADMIN_UI_SESSION_TTL_MINUTES=480
5051
ADMIN_UI_SESSION_SECURE=0

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to SentinelID are documented in this file.
44

5+
## v2.6.0 (2026-03-07)
6+
7+
### DX and Docs Consolidation
8+
- Advanced the SentinelID release line to `v2.6.0` across release-critical docs, Make help text, desktop package/config metadata, pilot evidence targets, and cloud API metadata.
9+
- Added canonical Make wrappers for developer setup and doc validation (`make install-dev`, `make check-version-consistency`, `make check-docs-consistency`, `make check-fresh-clone`) so local and CI guidance can point to one command set.
10+
- Rewrote the runbook beginner path around `make install-dev`, `make demo-up`, `make demo-verify`, `make demo`, and `make demo-down`, and updated `.env.example` with dev-safe admin auth defaults so fresh clones no longer require manual env debugging.
11+
- Added `scripts/release/check_docs_consistency.sh` to fail `make release-check` when key docs drift back to raw script invocations, obsolete env var names, or legacy phase-doc clutter.
12+
- Created `docs/archive/` policy guidance and added coverage that root `docs/` stays free of `phase*.md` files.
13+
514
## v2.5.0 (2026-03-07)
615

716
### Operational Robustness and Observability

Makefile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
.PHONY: help \
2+
install-dev \
23
demo-up \
34
demo-desktop \
45
demo-desktop-verify \
56
demo \
67
demo-verify \
78
demo-down \
89
demo-checklist \
10+
check-fresh-clone \
911
check-no-orphans \
1012
check-no-duplicates \
1113
check-invariants \
14+
check-version-consistency \
15+
check-docs-consistency \
1216
check-release-tag \
1317
gen-types \
1418
bundle-edge \
@@ -43,7 +47,10 @@
4347
clean
4448

4549
help:
46-
@echo "SentinelID v2.5.0 Commands"
50+
@echo "SentinelID v2.6.0 Commands"
51+
@echo ""
52+
@echo "Setup"
53+
@echo " make install-dev Install edge/admin/desktop dev dependencies from lockfiles"
4754
@echo ""
4855
@echo "Demo"
4956
@echo " make demo-up Start cloud/admin/postgres and wait for health"
@@ -53,9 +60,12 @@ help:
5360
@echo " make demo-desktop-verify Launch desktop and auto-close (CI-friendly, no Docker)"
5461
@echo " make demo-down Stop demo stack (use V=1 to remove volumes)"
5562
@echo " make demo-checklist Print demo checklist path (OPEN=1 to open locally)"
63+
@echo " make check-fresh-clone Clone current branch to a temp dir and run the beginner path"
5664
@echo " make check-no-orphans Verify no orphan edge process is running"
5765
@echo " make check-no-duplicates Verify duplicate source artifact pairs are absent"
5866
@echo " make check-invariants Validate loopback/auth/support-bundle runtime invariants"
67+
@echo " make check-version-consistency Verify release-critical version markers stay aligned"
68+
@echo " make check-docs-consistency Validate canonical docs commands and env names"
5969
@echo " make check-release-tag Verify RELEASE_EXPECT_TAG points to HEAD"
6070
@echo ""
6171
@echo "Build"
@@ -96,6 +106,9 @@ help:
96106
@echo "Docs"
97107
@echo " RUNBOOK.md is the authoritative run/test path"
98108

109+
install-dev:
110+
@./scripts/install_dev.sh
111+
99112
bundle-edge:
100113
@./scripts/bundle_edge_venv.sh
101114

@@ -125,12 +138,21 @@ demo-checklist:
125138
fi; \
126139
fi
127140

141+
check-fresh-clone:
142+
@./scripts/check_fresh_clone_bootstrap.sh
143+
128144
check-no-orphans:
129145
@./scripts/check_no_orphan_edge.sh
130146

131147
check-no-duplicates:
132148
@./scripts/release/check_no_duplicate_pairs.sh
133149

150+
check-version-consistency:
151+
@./scripts/release/check_version_consistency.sh
152+
153+
check-docs-consistency:
154+
@./scripts/release/check_docs_consistency.sh
155+
134156
check-release-tag:
135157
@./scripts/release/check_release_tag_alignment.sh
136158

RUNBOOK.md

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SentinelID Runbook (v2.5.0)
1+
# SentinelID Runbook (v2.6.0)
22

33
This is the single source of truth for local setup, run, and validation.
44

@@ -9,10 +9,9 @@ This is the single source of truth for local setup, run, and validation.
99
- Node.js 18+
1010
- Rust toolchain (Tauri)
1111
- Docker + `docker compose`
12+
- Poetry 1.8.x
1213

13-
## Install Poetry (pipx, PEP 668-safe)
14-
15-
On macOS with Homebrew Python, install Poetry via `pipx`:
14+
Install Poetry with `pipx` on macOS/Homebrew Python:
1615

1716
```bash
1817
brew install pipx
@@ -23,19 +22,44 @@ poetry --version
2322

2423
If `poetry` is not on your PATH yet, restart your shell.
2524

25+
## Getting Started
26+
27+
The deterministic beginner path is:
28+
29+
```bash
30+
git clone <repo-url>
31+
cd SentinelID
32+
make install-dev
33+
cp .env.example .env
34+
make demo-up
35+
make demo-verify
36+
DEMO_AUTO_CLOSE_SECONDS=30 make demo
37+
make demo-down
38+
```
39+
40+
What this does:
41+
42+
- `make install-dev` installs edge, desktop, and admin dependencies from lockfiles.
43+
- `cp .env.example .env` gives you a dev-safe local config with matching admin credentials (`admin` / `admin123!`) and no manual secret generation.
44+
- `make demo-up` starts postgres, cloud, and admin and waits for health.
45+
- `make demo-verify` checks the non-interactive beginner path and is the canonical CI/headless command.
46+
- `make demo` launches the desktop flow for the interactive walkthrough. Use `DEMO_AUTO_CLOSE_SECONDS` when you want a scripted close.
47+
- `make demo-down` tears down the stack.
48+
49+
If you only want the non-interactive validation path, stop after `make demo-verify` and run `make demo-down`.
50+
2651
## Environment
2752

2853
```bash
2954
cp .env.example .env
3055
```
3156

32-
Required values:
57+
`.env.example` is intentionally runnable for local development. Copy it as-is unless you are testing a non-default configuration.
58+
59+
Canonical environment names:
3360

34-
- `EDGE_AUTH_TOKEN`
35-
- `ADMIN_API_TOKEN`
36-
- `ADMIN_UI_USERNAME`
37-
- `ADMIN_UI_PASSWORD_HASH` (bcrypt hash for non-Docker runs; keep bcrypt values single-quoted in `.env`) or `ADMIN_UI_PASSWORD_HASH_B64` (recommended for Docker Compose)
38-
- `ADMIN_UI_SESSION_SECRET`
61+
- `ADMIN_API_TOKEN` is the source-of-truth admin credential in `.env`, Docker Compose, and docs.
62+
- `EDGE_AUTH_TOKEN` protects loopback admin/bearer endpoints on edge.
3963
- In `EDGE_ENV=prod`, device and master-key initialization require OS keychain access by default. Use `ALLOW_KEYCHAIN_FALLBACK=1` only for controlled debugging when fallback storage is unavoidable.
4064

4165
Optional values:
@@ -68,10 +92,10 @@ Optional verification fallback toggle (dev only):
6892

6993
## Dependency Installation
7094

95+
Use the canonical setup command:
96+
7197
```bash
72-
cd apps/edge && poetry install && cd ../..
73-
cd apps/desktop && npm install && cd ../..
74-
cd apps/admin && npm install && cd ../..
98+
make install-dev
7599
```
76100

77101
Important:
@@ -112,12 +136,14 @@ alembic revision --autogenerate -m "describe schema change"
112136

113137
If you use local cloud runtime without Docker, run `alembic upgrade head` before starting uvicorn.
114138

115-
## Recommended Local Run (3 Terminals)
139+
## Advanced Split-Terminal Workflow
140+
141+
Use this only when you intentionally want the services and desktop in separate shells after the beginner path is already working.
116142

117-
Terminal 1: Cloud + Admin (Docker)
143+
Terminal 1: Cloud + Admin (Docker-first)
118144

119145
```bash
120-
docker compose up --build
146+
make demo-up
121147
```
122148

123149
Terminal 2: Edge API (loopback-only)
@@ -161,7 +187,7 @@ make demo-down
161187
make demo-down V=1
162188
```
163189

164-
## Desktop UX (v2.5.0)
190+
## Desktop UX (v2.6.0)
165191

166192
Primary tabs in the desktop UI:
167193

@@ -324,22 +350,22 @@ Mode behavior:
324350
Distribution smoke:
325351

326352
```bash
327-
./scripts/smoke_test_bundling.sh
353+
make smoke-bundling
328354
```
329355

330-
Optional local sanity check for "no Poetry at runtime" path:
356+
Optional local sanity check for the bundled runtime path:
331357

332358
```bash
333-
PATH="/usr/bin:/bin:/usr/sbin:/sbin" SKIP_DESKTOP_BUILD=1 ./scripts/smoke_test_bundling.sh
359+
SKIP_DESKTOP_BUILD=1 make smoke-bundling
334360
```
335361

336362
## Support Bundle (Sanitized)
337363

338364
Generate a support/debug bundle without raw frames, embeddings, tokens, or signatures:
339365

340366
```bash
341-
EDGE_TOKEN="${EDGE_AUTH_TOKEN}" ADMIN_TOKEN="${ADMIN_API_TOKEN}" ./scripts/support_bundle.sh
342-
./scripts/check_local_support_bundle_sanitization.sh
367+
EDGE_AUTH_TOKEN="${EDGE_AUTH_TOKEN}" ADMIN_API_TOKEN="${ADMIN_API_TOKEN}" make support-bundle
368+
make check-local-support-bundle
343369
```
344370

345371
Artifact path:

apps/cloud/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async def lifespan(app: FastAPI):
8989

9090
app = FastAPI(
9191
title="SentinelID Cloud",
92-
version="2.5.0",
92+
version="2.6.0",
9393
lifespan=lifespan,
9494
)
9595

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
from __future__ import annotations
2+
3+
import subprocess
4+
import tempfile
5+
from pathlib import Path
6+
7+
REPO_ROOT = Path(__file__).resolve().parents[3]
8+
DOCS_CONSISTENCY_SCRIPT = REPO_ROOT / "scripts" / "release" / "check_docs_consistency.sh"
9+
FRESH_CLONE_SCRIPT = REPO_ROOT / "scripts" / "check_fresh_clone_bootstrap.sh"
10+
11+
12+
def test_docs_root_has_no_phase_markdown_files() -> None:
13+
docs_root = REPO_ROOT / "docs"
14+
phase_files = sorted(path.name for path in docs_root.glob("phase*.md"))
15+
assert phase_files == []
16+
17+
18+
def test_docs_consistency_script_passes() -> None:
19+
result = subprocess.run(
20+
[str(DOCS_CONSISTENCY_SCRIPT)],
21+
cwd=REPO_ROOT,
22+
capture_output=True,
23+
text=True,
24+
check=False,
25+
)
26+
27+
assert result.returncode == 0, result.stderr or result.stdout
28+
assert "Docs consistency check passed" in result.stdout
29+
30+
31+
def test_docs_consistency_script_passes_without_rg() -> None:
32+
env = {"PATH": "/usr/bin:/bin:/usr/sbin:/sbin"}
33+
result = subprocess.run(
34+
[str(DOCS_CONSISTENCY_SCRIPT)],
35+
cwd=REPO_ROOT,
36+
capture_output=True,
37+
text=True,
38+
check=False,
39+
env=env,
40+
)
41+
42+
assert result.returncode == 0, result.stderr or result.stdout
43+
assert "Docs consistency check passed" in result.stdout
44+
45+
46+
def test_fresh_clone_bootstrap_dry_run_uses_canonical_make_targets() -> None:
47+
result = subprocess.run(
48+
[str(FRESH_CLONE_SCRIPT), "--dry-run"],
49+
cwd=REPO_ROOT,
50+
capture_output=True,
51+
text=True,
52+
check=False,
53+
)
54+
55+
assert result.returncode == 0, result.stderr or result.stdout
56+
assert "install lockfile-managed dev dependencies" in result.stdout
57+
assert "install-dev" in result.stdout
58+
assert "demo-up" in result.stdout
59+
assert "demo-verify" in result.stdout
60+
assert "demo-down" in result.stdout
61+
62+
63+
def test_docs_consistency_requires_full_command_tokens() -> None:
64+
with tempfile.TemporaryDirectory() as tmp_dir:
65+
root = Path(tmp_dir)
66+
(root / "docs").mkdir()
67+
(root / "RUNBOOK.md").write_text(
68+
"\n".join(
69+
[
70+
"make install-dev",
71+
"make demo-up",
72+
"make demo-verify",
73+
"make demo-up",
74+
"make demo-down",
75+
]
76+
),
77+
encoding="utf-8",
78+
)
79+
(root / "docs" / "RELEASE.md").write_text(
80+
"\n".join(
81+
[
82+
"make release-check",
83+
"make check-version-consistency",
84+
"make check-docs-consistency",
85+
]
86+
),
87+
encoding="utf-8",
88+
)
89+
(root / "docs" / "PACKAGING.md").write_text(
90+
"\n".join(
91+
[
92+
"make bundle-edge",
93+
"make build-desktop-web",
94+
"make smoke-bundling",
95+
]
96+
),
97+
encoding="utf-8",
98+
)
99+
(root / "docs" / "RECOVERY.md").write_text(
100+
"\n".join(["make smoke-cloud-recovery", "make support-bundle"]),
101+
encoding="utf-8",
102+
)
103+
(root / "docs" / "DEMO_CHECKLIST.md").write_text("make demo-up\n", encoding="utf-8")
104+
105+
env = {
106+
"PATH": "/usr/bin:/bin:/usr/sbin:/sbin",
107+
"DOCS_CONSISTENCY_ROOT_DIR": str(root),
108+
"DOCS_CONSISTENCY_DOCS": "RUNBOOK.md docs/RELEASE.md docs/PACKAGING.md docs/RECOVERY.md docs/DEMO_CHECKLIST.md",
109+
}
110+
result = subprocess.run(
111+
[str(DOCS_CONSISTENCY_SCRIPT)],
112+
cwd=REPO_ROOT,
113+
capture_output=True,
114+
text=True,
115+
check=False,
116+
env=env,
117+
)
118+
119+
assert result.returncode == 1
120+
assert "Missing required docs guidance in RUNBOOK.md: make demo" in result.stdout
121+
assert "Missing required docs guidance in docs/PACKAGING.md: make build-desktop" in result.stdout

apps/desktop/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)