Back to feed

sledtools/pika branch #108

pika-git-rename-1

Rename pika-news to pika-git

Target branch: master

Merge Commit: cd69f3abdc79b282aa6fddf319e077cd6855bb07

branch: merged tutorial: ready ci: success
Open CI Details

Continuous Integration

CI: success

Compact status on the review page, with full logs on the CI page.

Open CI Details

Latest run #134 success

10 passed

head 2c53edbbd382aa6f860dd5374fdcd39a3e0be176 · queued 2026-03-26 02:37:08 · 10 lane(s)

queued 7s · ran 2m 26s

check-pika-rust · success check-pika-followup · success check-notifications · success check-agent-contracts · success check-rmp · success check-pikachat · success check-pikachat-typescript · success check-apple-host-sanity · success check-pikachat-openclaw-e2e · success check-fixture · success

Summary

This branch performs a comprehensive rename of the pika-news crate and all its references to pika-git across the entire repository. The rename touches the Cargo workspace configuration, the crate directory itself (moving crates/pika-news/ to crates/pika-git/), all HTTP API route prefixes (from /news/ to /git/), configuration file names and defaults, environment variable names, CI path triggers, Nix deployment modules, infrastructure secrets references, helper scripts, documentation, and HTML templates. No functional logic changes are made — this is a pure identity/branding rename from the legacy pika-news name to the more accurate pika-git name that reflects the tool's role as a browser-first git forge rather than a news feed generator.

Tutorial Steps

Rename the crate directory and Cargo manifest

Intent: Move the crate from `crates/pika-news/` to `crates/pika-git/` and update the package name and binary name in `Cargo.toml` so that `cargo build` produces a `pika-git` binary.

Affected files: Cargo.toml, Cargo.lock, crates/pika-git/Cargo.toml, crates/pika-git/.gitignore

Evidence
@@ -19,7 +19,7 @@ members = [
   "crates/pika-tls",
   "crates/rmp-cli",
   "crates/pika-server",
-  "crates/pika-news",
+  "crates/pika-git",
@@ -1,10 +1,10 @@
 [package]
-name = "pika-news"
+name = "pika-git"
 version = "0.1.0"
 edition = "2021"
 
 [[bin]]
-name = "pika-news"
+name = "pika-git"
 path = "src/main.rs"
@@ -5979,6 +5979,37 @@ dependencies = [
+[[package]]
+name = "pika-git"
+version = "0.1.0"

The workspace-level Cargo.toml replaces crates/pika-news with crates/pika-git in the members list. The crate-level Cargo.toml (renamed from crates/pika-news/Cargo.toml to crates/pika-git/Cargo.toml) updates both the [package] name and [[bin]] name fields to pika-git. The Cargo.lock reflects this by removing the old pika-news package entry and adding a new pika-git entry with identical dependencies.

A new .gitignore at crates/pika-git/.gitignore ignores pika-git.toml and *.db, matching the old crates/pika-news/.gitignore pattern. The root .gitignore is also updated to reference crates/pika-git/pika-git.toml instead of the old path.

Rename all HTTP route prefixes from /news/ to /git/

Intent: Update every API endpoint and web route so the URL namespace changes from `/news/` to `/git/`, keeping all route structures and handler logic identical.

Affected files: crates/ph/src/api.rs, crates/ph/src/commands.rs, crates/ph/src/session.rs, crates/ph/src/tests.rs, crates/pika-git/src/web.rs

Evidence
@@ -63,20 +63,20 @@ impl ApiClient {
-        self.send(Method::POST, "/news/auth/challenge", None::<&()>, false)
+        self.send(Method::POST, "/git/auth/challenge", None::<&()>, false)
@@ -141,7 +141,7 @@ pub(crate) fn cmd_url
-        "{}/news/branch/{}",
+        "{}/git/branch/{}",
@@ -24,7 +24,7 @@ pub(crate) fn build_nip98_verify_event_json
-    let verify_url = format!("{}/news/auth/verify", base_url.trim_end_matches('/'));
+    let verify_url = format!("{}/git/auth/verify", base_url.trim_end_matches('/'));
@@ -59,10 +59,10 @@ fn login_persists_session_against_auth_flow
-                "/news/auth/challenge",
+                "/git/auth/challenge",

The ph CLI client (crates/ph/src/api.rs) changes every route string: /news/auth/challenge/git/auth/challenge, /news/auth/verify/git/auth/verify, /news/api/me/git/api/me, /news/api/forge/branch/…/git/api/forge/branch/…, and all CI action routes (/news/branch/{id}/ci/fail/…/git/branch/{id}/ci/fail/…, etc.).

The cmd_url function in commands.rs updates the user-facing URL it prints. The NIP-98 auth event builder in session.rs updates the verify URL used in the Nostr event tag.

All test routes in crates/ph/src/tests.rs are updated to match — every mock Axum router now registers handlers under /git/ instead of /news/.

On the server side, crates/pika-git/src/web.rs nests all routes under /git instead of /news, and internal redirect targets and link generators reference the new prefix.

Update configuration defaults and environment variable names

Intent: Rename the default config file, database file, webhook secret environment variable, and all references in the config module to use the `pika-git` naming convention.

Affected files: crates/pika-git/src/config.rs, crates/pika-git/src/cli.rs, crates/pika-git/pika-git.example.toml

Evidence
@@ -11,7 +11,7 @@ pub const DEFAULT_WEBHOOK_SECRET_ENV
-pub const DEFAULT_WEBHOOK_SECRET_ENV: &str = "PIKA_NEWS_WEBHOOK_SECRET";
+pub const DEFAULT_WEBHOOK_SECRET_ENV: &str = "PIKA_GIT_WEBHOOK_SECRET";
@@ -103,7 +103,7 @@ impl Config {
-                forge.hook_url = Some(format!("http://127.0.0.1:{}/news/webhook", self.bind_port));
+                forge.hook_url = Some(format!("http://127.0.0.1:{}/git/webhook", self.bind_port));
@@ -4,7 +4,7 @@ use clap
-#[command(name = "pika-news", about = "Generate browser-first branch tutorials")]
+#[command(name = "pika-git", about = "Run the browser-first git forge")]
@@ -21,7 +21,7 @@ pub struct ServeArgs
-    #[arg(long, default_value = "pika-news.toml")]
+    #[arg(long, default_value = "pika-git.toml")]
@@ -30,7 +30,7 @@ pub struct ServeArgs
-    #[arg(long, default_value = "pika-news.db")]
+    #[arg(long, default_value = "pika-git.db")]

The config.rs module updates the DEFAULT_WEBHOOK_SECRET_ENV constant from PIKA_NEWS_WEBHOOK_SECRET to PIKA_GIT_WEBHOOK_SECRET. The auto-generated default hook_url now points to /git/webhook instead of /news/webhook.

The CLI argument parser in cli.rs renames the binary from pika-news to pika-git, changes the description to "Run the browser-first git forge", and updates default values for --config (now pika-git.toml) and --db (now pika-git.db). The default output filename for local mode changes from pika-news-local.html to pika-git-local.html.

The example config file is renamed from pika-news.example.toml to pika-git.example.toml with the hook_url inside updated accordingly.

All unit tests in cli.rs that reference path strings are updated to use the new names.

Migrate all SQL migrations and source files under the new crate path

Intent: Relocate every source file and SQL migration from `crates/pika-news/` to `crates/pika-git/` without any content changes to the migrations themselves, preserving the database schema exactly.

Affected files: crates/pika-git/migrations/0001_init.sql, crates/pika-git/migrations/0002_add_unified_diff.sql, crates/pika-git/migrations/0003_chat_sessions.sql, crates/pika-git/migrations/0004_inbox.sql, crates/pika-git/migrations/0005_auth_tokens.sql, crates/pika-git/migrations/0006_allowlist.sql, crates/pika-git/migrations/0007_inbox_dismissals.sql, crates/pika-git/migrations/0008_artifact_versions.sql, crates/pika-git/migrations/0009_branch_forge.sql, crates/pika-git/migrations/0010_allowlist_forge_write.sql, crates/pika-git/migrations/0011_ci_lanes_and_nightlies.sql, crates/pika-git/migrations/0012_ci_lane_leases.sql, crates/pika-git/migrations/0013_ci_lane_claim_tokens.sql, crates/pika-git/migrations/0014_branch_inbox.sql, crates/pika-git/migrations/0015_mirror_sync_runs.sql, crates/pika-git/migrations/0016_ci_rerun_provenance.sql, crates/pika-git/migrations/0017_ci_lane_concurrency_groups.sql, crates/pika-git/migrations/0018_ci_lane_pikaci_metadata.sql, crates/pika-git/migrations/0019_dismiss_closed_branch_inbox.sql, crates/pika-git/migrations/0020_ci_queue_state_and_target_health.sql, crates/pika-git/migrations/0021_restore_branch_closed_inbox.sql, crates/pika-git/migrations/0022_branch_inbox_review_progress.sql, crates/pika-git/migrations/0023_branch_chat.sql, crates/pika-git/migrations/0024_ci_lane_structured_pikaci_target.sql

Evidence
rename from crates/pika-news/migrations/0001_init.sql
rename to crates/pika-git/migrations/0001_init.sql
rename from crates/pika-news/migrations/0024_ci_lane_structured_pikaci_target.sql
rename to crates/pika-git/migrations/0024_ci_lane_structured_pikaci_target.sql

All 24 SQL migration files are pure renames from crates/pika-news/migrations/ to crates/pika-git/migrations/ with no content changes. The migration numbering and SQL statements are preserved exactly, ensuring existing databases can continue to be used without re-migration.

Likewise, all Rust source files (auth.rs, branch_store.rs, chat_store.rs, ci.rs, ci_manifest.rs, ci_state.rs, ci_store.rs, cli.rs, config.rs, forge.rs, forge_runtime.rs, forge_service.rs, inbox_store.rs, live.rs, local.rs, main.rs, mirror.rs, mirror_store.rs, model.rs, pikaci_store.rs, poller.rs, render.rs, storage.rs, tutorial.rs, web.rs, worker.rs) and all HTML templates are moved under crates/pika-git/.

Update test fixtures to use pika-git naming

Intent: Ensure all unit and integration tests reference the new database file name, webhook URL, and config variable names so the test suite remains green after the rename.

Affected files: crates/pika-git/src/auth.rs, crates/pika-git/src/branch_store.rs, crates/pika-git/src/ci.rs, crates/pika-git/src/ci_manifest.rs, crates/pika-git/src/forge.rs, crates/pika-git/src/mirror.rs, crates/pika-git/src/poller.rs, crates/pika-git/src/web.rs

Evidence
@@ -217,7 +217,7 @@ mod tests {
-        let db_path = dir.path().join("pika-news.db");
+        let db_path = dir.path().join("pika-git.db");
@@ -769,7 +769,7 @@ mod tests {
-            hook_url: Some("http://127.0.0.1:9999/news/webhook".to_string()),
+            hook_url: Some("http://127.0.0.1:9999/git/webhook".to_string()),
@@ -880,7 +880,7 @@ mod tests {
-            webhook_secret_env: "PIKA_NEWS_WEBHOOK_SECRET".to_string(),
+            webhook_secret_env: "PIKA_GIT_WEBHOOK_SECRET".to_string(),
@@ -307,7 +307,7 @@ mod tests {
-            selected_lane_ids(&["crates/pika-news/src/web.rs"]),
+            selected_lane_ids(&["crates/pika-git/src/web.rs"]),

Across all test modules, temporary database paths change from pika-news.db to pika-git.db. Test config structs update hook_url from /news/webhook to /git/webhook and webhook_secret_env from PIKA_NEWS_WEBHOOK_SECRET to PIKA_GIT_WEBHOOK_SECRET.

The ci_manifest.rs test that verifies path-based lane selection now checks crates/pika-git/src/web.rs instead of crates/pika-news/src/web.rs. The forge.rs test for mirror lock file location asserts the file ends with pika-git-mirror.lock. The auth.rs verify event test updates the URL constant to https://git.pikachat.org/git/auth/verify.

Update CI path triggers in forge-lanes.toml

Intent: Ensure CI lane path filters trigger on changes under the new `crates/pika-git/` directory instead of the old `crates/pika-news/` path.

Affected files: ci/forge-lanes.toml

Evidence
@@ -80,7 +80,7 @@ paths = [
-  "crates/pika-news/**",
+  "crates/pika-git/**",
@@ -117,7 +117,7 @@ paths = [
-  "crates/pika-news/**",
+  "crates/pika-git/**",

The ci/forge-lanes.toml manifest has two lane definitions with path trigger lists. Both replace crates/pika-news/** with crates/pika-git/** so that changes to the renamed crate still trigger the appropriate CI lanes.

Update Nix infrastructure modules and secrets

Intent: Rename the NixOS service module, update package references, systemd unit names, and SOPS secrets entries to reflect the pika-git identity.

Affected files: flake.nix, infra/nix/modules/pika-git.nix, infra/nix/modules/pika-news.nix, infra/nix/modules/builder.nix, infra/secrets/.sops.yaml, infra/secrets/pika-news.yaml

Evidence
@@ -76,7 +76,7 @@ flake.nix
-          pika-news = pkgs.callPackage ./nix/pkgs/pika-news.nix {};
+          pika-git = pkgs.callPackage ./nix/pkgs/pika-git.nix {};
@@ -126,8 +126,8 @@ flake.nix
-            ./infra/nix/modules/pika-news.nix
+            ./infra/nix/modules/pika-git.nix

The flake.nix renames the package attribute from pika-news to pika-git and the NixOS module import from pika-news.nix to pika-git.nix. The module file itself is renamed and internally updates:

  • The systemd service unit name from pika-news to pika-git
  • The ExecStart binary path to reference the pika-git binary
  • The --config and --db flags to use pika-git.toml and pika-git.db
  • Environment variable references from PIKA_NEWS_WEBHOOK_SECRET to PIKA_GIT_WEBHOOK_SECRET
  • The state directory from /var/lib/pika-news to /var/lib/pika-git

The builder.nix module updates its reference to the pika-git package. The SOPS secrets configuration (.sops.yaml and the secrets YAML file) is updated to reference pika-git paths.

Update HTML templates to use /git/ URL prefix

Intent: Replace all `/news/` URL references in Askama HTML templates with `/git/` so that links, form actions, API fetch calls, and asset paths work under the new route namespace.

Affected files: crates/pika-git/templates/base.html, crates/pika-git/templates/feed.html, crates/pika-git/templates/detail.html, crates/pika-git/templates/inbox.html, crates/pika-git/templates/admin.html, crates/pika-git/templates/branch_ci.html, crates/pika-git/templates/branch_ci_live.html, crates/pika-git/templates/branch_ci_summary.html, crates/pika-git/templates/nightly.html, crates/pika-git/templates/nightly_live.html

Evidence
@@ base.html
-  <a href="/news/">Feed</a>
+  <a href="/git/">Feed</a>
@@ feed.html
-    <a href="/news/branch/{{ branch.id }}">{{ branch.name }}</a>
+    <a href="/git/branch/{{ branch.id }}">{{ branch.name }}</a>
@@ detail.html
-  fetch('/news/branch/{{ branch_id }}/chat'
+  fetch('/git/branch/{{ branch_id }}/chat'
@@ admin.html
-  fetch('/news/admin/allowlist'
+  fetch('/git/admin/allowlist'

Every HTML template under crates/pika-git/templates/ is updated to replace /news/ with /git/ in:

  • Navigation links (/news//git/, /news/inbox/git/inbox, /news/admin/git/admin)
  • Branch detail links (/news/branch/{id}/git/branch/{id})
  • CI page links (/news/branch/{id}/ci/git/branch/{id}/ci)
  • Nightly page links (/news/nightly/{id}/git/nightly/{id})
  • JavaScript fetch() calls for chat, merge, close, CI actions, and admin endpoints
  • Form action URLs and EventSource SSE stream endpoints

The templates are otherwise unchanged — no layout or logic modifications.

Rename helper scripts and documentation

Intent: Update the local development wrapper script, documentation files, and README references so that users and contributors find correct instructions after the rename.

Affected files: scripts/pika-git, scripts/news, README.md, crates/pika-git/README.md, docs/forge-hosted-manual-qa.md, docs/incus-migration-plan.md, todos/pika-git.md, todos/pika-git-pikaci-boundary.md, .agents/skills/orchestrate/SKILL.md, scripts/test_forge_github_ci_shim.py, just/infra.just

Evidence
@@ README.md
-│   ├── pika-news/     Browser-first PR/news feed generator
+│   ├── pika-git/     Browser-first PR/git feed generator
@@ scripts/pika-git (new)
+PIKA_GIT_PORT=${PIKA_GIT_PORT:-8787}
+DB="$TMP_DIR/pika-git.db"
+CONFIG="$TMP_DIR/pika-git.toml"
@@ SKILL.md
-  log metadata; the real gap was that `pika-news` flattened
+  log metadata; the real gap was that `pika-git` flattened

The scripts/news helper is replaced by scripts/pika-git. The new script uses PIKA_GIT_PORT instead of PIKA_NEWS_PORT, generates pika-git.toml and pika-git.db under .tmp/, and runs cargo watch on the pika-git binary.

The root README.md updates the directory tree listing and the link to the crate README. The crate-level README.md is fully updated with the new names, URLs, environment variables, and script paths.

Documentation files (forge-hosted-manual-qa.md, incus-migration-plan.md) and todo files are updated or renamed. The orchestration skill document (.agents/skills/orchestrate/SKILL.md) replaces pika-news references with pika-git. The just/infra.just recipes reference the new service and package names. The test_forge_github_ci_shim.py test script updates its webhook URL to /git/webhook.

Update the web module's router and redirect logic

Intent: Ensure the Axum web server nests all routes under `/git` and that internal redirects, link generation, and webhook endpoints use the new prefix.

Affected files: crates/pika-git/src/web.rs

Evidence
@@ web.rs
-    let news_routes = Router::new()
+    let git_routes = Router::new()
@@ web.rs
-    Router::new().nest("/news", news_routes)
+    Router::new().nest("/git", git_routes)
@@ web.rs
-            Redirect::to("/news/")
+            Redirect::to("/git/")
@@ web.rs
-                    format!("/news/branch/{}", branch_id)
+                    format!("/git/branch/{}", branch_id)

The web.rs module renames the internal router variable from news_routes to git_routes and nests it under /git instead of /news. All Redirect::to() calls, format strings for branch/nightly/CI URLs, and the root redirect (//git/) are updated.

The webhook handler route changes from /news/webhook to /git/webhook. Chat, admin, auth, and API sub-routes all inherit the new /git prefix through the nest. The SSE live-streaming endpoints (/git/branch/{id}/ci/live/stream, /git/nightly/{id}/live/stream) and all form POST targets are updated accordingly.

Test helpers in web.rs that construct request URIs are also updated to use /git/ paths.

Diff