From 0b36fb73e10483ef15f4b6b42e4a830a90828328 Mon Sep 17 00:00:00 2001 From: S'Bussiso Dube <80188685+Sbussiso@users.noreply.github.com> Date: Wed, 9 Sep 2026 19:29:33 -0700 Subject: [PATCH] Follow the cameranode rename through Command Center MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Companion to Sentinel-CameraNode#retire-cloudnode-name, which renamed the Cargo package sourcebox-sentry-cloudnode -> sourcebox-sentry- cameranode. Four things here referenced the old name. install.sh needed care rather than deletion. Its post-extract rename looked like dead code the moment the package was renamed, but this script installs from the LATEST GitHub RELEASE, and every published release still contains a pre-rename archive. Deleting the rename would have broken installs silently — extraction succeeds and the binary is simply absent under the name every later step expects. It is now a guarded compat shim that fires for old archives and no-ops for new ones, with a comment saying when it is safe to delete. Two other spots in the same file were genuinely wrong after the rename and would have failed immediately: the Windows hint told operators to run `sourcebox-sentry-cloudnode setup` after the MSI, which now installs cameranode.exe; and the build-from-source path copied target/release/sourcebox-sentry-cloudnode, which cargo no longer produces. AGENTS.md's preserved-identifier list needed a real correction, not an update. It claimed the AES key-derivation domain was `opensentry-cameranode-machine-id-v2` and had always been preserved. The code said `cloudnode` — the list was simply wrong, and had been. It is accurate now only because the rename made it so, which is worth recording explicitly: a future reader comparing that line against the code will find a match, and should not read the match as evidence the string was never touched. The note now also carries the warning that belongs with it — that string is a domain separator, and changing it after the first real install means an existing node.db silently fails to decrypt. CONTRIBUTING.md carried a three-line caveat explaining why the binary was called cloudnode. Deleted; the reason is gone. prompts.py described list_nodes as returning "CloudNode hardware status" — that text goes to the model, so the agent was being taught a name the product no longer uses. 864 tests pass, ruff clean, install.sh passes bash -n. Co-Authored-By: Claude Opus 5 --- AGENTS.md | 9 +++++- CONTRIBUTING.md | 5 +--- backend/app/sentinel_agent/prompts.py | 2 +- backend/scripts/install.sh | 40 ++++++++++++++++----------- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 059d09b..0f6f48b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,14 @@ Sentinel Command Center — cloud dashboard for managing and viewing security cameras under the **Sentinel by SourceBox** product brand. FastAPI backend + React 19 frontend with Clerk authentication. Live video is streamed through an in-memory segment cache — **no Tigris, no S3, no presigned URLs in the live path**. -> **Brand-history note for grep-discoverability:** the product has carried three names — `OpenSentry` (early), `SourceBox Sentry` (mid), and `Sentinel by SourceBox` (current, from May 2026 onward). The `Sentinel AI` name is reserved specifically for the AI-agent feature. Both GitHub repos were renamed in May 2026: Command Center `OpenSentry-Command` → `Sentinel-Command`, and CameraNode `opensentry-cloud-node` → `Sentinel-CameraNode` (note the deliberate "CameraNode" — the repo name now describes the artifact more literally, while the binary, install paths, and product UI keep saying "CameraNode"). GitHub auto-redirects the old URLs, so any hardcoded reference in a release artifact / cached doc / external bookmark continues to resolve. Identifiers preserved verbatim across the entire rebrand (do **not** rename these without a migration plan): the binary name `sourcebox-sentry-cameranode`, the env-var prefix `SOURCEBOX_SENTRY_*`, the Windows install path `C:\ProgramData\SourceBoxSentry\`, the AES key-derivation domain string `opensentry-cameranode-machine-id-v2` (see CameraNode `database.rs::KEY_DOMAIN_V2`), and the production hostname `sentinel-command.com` (tied to the Fly app, decoupled from the repo rename). +> **Brand-history note for grep-discoverability:** the product has carried three names — `OpenSentry` (early), `SourceBox Sentry` (mid), and `Sentinel by SourceBox` (current, from May 2026 onward). The `Sentinel AI` name is reserved specifically for the AI-agent feature. Both GitHub repos were renamed in May 2026: Command Center `OpenSentry-Command` → `Sentinel-Command`, and CameraNode `opensentry-cloud-node` → `Sentinel-CameraNode` (note the deliberate "CameraNode" — the repo name now describes the artifact more literally, while the binary, install paths, and product UI keep saying "CameraNode"). GitHub auto-redirects the old URLs, so any hardcoded reference in a release artifact / cached doc / external bookmark continues to resolve. Identifiers preserved verbatim across the rebrands (do **not** rename these without a migration plan): the env-var prefix `SOURCEBOX_SENTRY_*`, the Windows install path `C:\ProgramData\SourceBoxSentry\`, and the production hostname `sentinel-command.com` (tied to the Fly app, decoupled from the repo rename). + +Two identifiers that this list previously claimed were preserved **were renamed on 2026-09-09**, while the product had zero installs — the only window in which either is free: + +- The binary, `sourcebox-sentry-cloudnode` → `sourcebox-sentry-cameranode`. It had lagged the repo by a full brand, so release assets shipped under a dead name and the installer carried a rename workaround to hide it. +- The AES key-derivation domain, `opensentry-cloudnode-machine-id-v2` → `opensentry-cameranode-machine-id-v2` (CameraNode `database.rs::KEY_DOMAIN_V2`). **This list already recorded the `cameranode` spelling, which was simply wrong** — the code had always said `cloudnode`. It is accurate now, but was not before, so do not treat a match here as evidence. + +That second one is the dangerous kind: it is a domain separator, and changing it means an existing encrypted `node.db` silently fails to open — no error, it just does not decrypt. From the first real install onward it needs a migration path, not an edit. ## Contents diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6dbf0fe..35a2598 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,10 +63,7 @@ npm run dev # http://localhost:5173 ```bash cd Sentinel-CameraNode cargo build --release -# Binary name is `cloudnode`, not `cameranode`: the Cargo package name -# predates the CloudNode -> CameraNode rename and is deliberately kept, -# since changing it would orphan existing systemd units and installs. -./target/release/sourcebox-sentry-cloudnode setup +./target/release/sourcebox-sentry-cameranode setup ``` See the [CameraNode README](https://github.com/SourceBox-LLC/Sentinel-CameraNode) for full setup instructions. diff --git a/backend/app/sentinel_agent/prompts.py b/backend/app/sentinel_agent/prompts.py index 6f9bd2a..e44ae33 100644 --- a/backend/app/sentinel_agent/prompts.py +++ b/backend/app/sentinel_agent/prompts.py @@ -37,7 +37,7 @@ - watch_camera multi-frame burst (2-10 frames over a window) - get_stream_url authenticated HLS playback URL - list_camera_groups org's camera groups -- list_nodes CloudNode hardware status +- list_nodes CameraNode hardware status - get_node one node's detail - get_camera_recording_policy - get_stream_logs viewer audit diff --git a/backend/scripts/install.sh b/backend/scripts/install.sh index 7a4a7b0..7952f49 100644 --- a/backend/scripts/install.sh +++ b/backend/scripts/install.sh @@ -149,7 +149,7 @@ case "$OS" in echo "For Windows, download the MSI installer from the latest release:" echo " https://github.com/SourceBox-LLC/Sentinel-CameraNode/releases/latest" echo "" - echo "(Run the MSI, then 'sourcebox-sentry-cloudnode setup' from an admin PowerShell.)" + echo "(Run the MSI, then 'sourcebox-sentry-cameranode setup' from an admin PowerShell.)" exit 1 ;; esac @@ -372,22 +372,31 @@ if [ -n "$DOWNLOAD_URL" ]; then echo -e "${DIM}No SHA256SUMS for this release — skipping checksum verification.${NC}" fi - # Detect archive type and extract. The archived binary is still - # named sourcebox-sentry-cloudnode (Cargo.toml's package/binary - # name is intentionally never renamed post-launch, see that - # file's own comment — it would orphan existing systemd units / - # Windows services / install paths). We install it locally under - # the current sourcebox-sentry-cameranode name, so every archive - # branch below needs an explicit rename after extraction. + # Detect archive type and extract. + # + # The Cargo package/binary was renamed sourcebox-sentry-cloudnode + # -> sourcebox-sentry-cameranode on 2026-09-09, so NEW archives + # already carry the right name. Releases cut before that date + # still contain the old one, and this script always pulls the + # LATEST release — which is a pre-rename build until the next one + # ships. So the rename below is now a COMPATIBILITY SHIM, not a + # workaround: it fires for old archives and no-ops for new ones. + # + # Delete it once the oldest release anyone might install from is + # post-rename. Until then, removing it breaks installs silently — + # extraction succeeds and the binary is simply absent under the + # name every later step expects. case "$DOWNLOAD_URL" in *.tar.gz|*.tgz) tar -xzf "$TMPFILE" -C "$INSTALL_DIR" - mv -f "$INSTALL_DIR/sourcebox-sentry-cloudnode" "$INSTALL_DIR/sourcebox-sentry-cameranode" + [ -f "$INSTALL_DIR/sourcebox-sentry-cloudnode" ] \ + && mv -f "$INSTALL_DIR/sourcebox-sentry-cloudnode" "$INSTALL_DIR/sourcebox-sentry-cameranode" ;; *.zip) if check_cmd unzip; then unzip -qo "$TMPFILE" -d "$INSTALL_DIR" - mv -f "$INSTALL_DIR/sourcebox-sentry-cloudnode.exe" "$INSTALL_DIR/sourcebox-sentry-cameranode.exe" 2>/dev/null || true + [ -f "$INSTALL_DIR/sourcebox-sentry-cloudnode.exe" ] \ + && mv -f "$INSTALL_DIR/sourcebox-sentry-cloudnode.exe" "$INSTALL_DIR/sourcebox-sentry-cameranode.exe" 2>/dev/null || true else echo -e "${RED}Error: unzip is required to extract this release.${NC}" rm -f "$TMPFILE" @@ -658,12 +667,11 @@ if [ -z "$DOWNLOAD_URL" ]; then echo -e "${DIM}Building (~10-15 min on Raspberry Pi 4)...${NC}" (cd "$CLONE_DIR" && cargo build --release --quiet) - # cargo builds the binary under its Cargo.toml package name - # (sourcebox-sentry-cloudnode, deliberately never renamed — see the - # extraction step above for why); we install it locally as - # sourcebox-sentry-cameranode to match every other reference in - # this script. - cp "$CLONE_DIR/target/release/sourcebox-sentry-cloudnode" "$INSTALL_DIR/sourcebox-sentry-cameranode" + # A source build produces sourcebox-sentry-cameranode directly since + # the 2026-09-09 package rename — no copy-and-rename dance needed. + # (The release-archive path above still shims the old name, because + # published releases predate the rename.) + cp "$CLONE_DIR/target/release/sourcebox-sentry-cameranode" "$INSTALL_DIR/sourcebox-sentry-cameranode" chmod +x "$INSTALL_DIR/sourcebox-sentry-cameranode" echo -e "${GREEN}Build complete.${NC}"