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.
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.
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.
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.
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.
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.
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.
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.
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.
@@ 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()
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.