Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

feat(workflow): open the direct-push flow — retire the raw-public-push blocker

Ruben Lütke0b3291cee088
diff --git a/.githooks/pre-push b/.githooks/pre-push
index a942197c04..21a76e28d8 100755
--- a/.githooks/pre-push
+++ b/.githooks/pre-push
@@ -1,23 +1,12 @@
#!/bin/sh
-# >>> guard_no_raw_public_push (managed by scripts/ci/install_git_hooks.py) >>>
-# Hard-block a raw push to the PUBLIC flagship repo PersonalJarvis/PersonalJarvis.
-# That repo only ever receives a depersonalized snapshot via the public-release
-# privacy gate (CLAUDE.md rule 2). git passes: pre-push <name> <url>.
-__pj_guard="scripts/ci/guard_no_raw_public_push.py"
-if [ -f "$__pj_guard" ]; then
- __pj_py="/c/Program Files/Python311/python.exe"
- [ -x "$__pj_py" ] || __pj_py="$(command -v python3 || command -v python)"
- if [ -n "$__pj_py" ]; then
- "$__pj_py" "$__pj_guard" "$1" "$2" </dev/null || exit 1
- fi
-fi
-# <<< guard_no_raw_public_push <<<
-# pre-push: versioned local mirror of the privacy + language CI gates.
+# pre-push: versioned local mirror of the credential + language CI gates.
#
-# Layer 1 of a 3-layer privacy defence. It runs two checks per push:
+# Direct pushes to the public repo are the NORMAL flow (CLAUDE.md rule 2,
+# standard shared-history workflow since 2026-07-18). What stays fail-closed
+# is credential protection, never a raw-push block.
#
-# 1. PRIVACY gate (FAIL-CLOSED on positive findings) — scripts/ci/privacy_pre_push.py
-# (A) blocks any direct push to the PUBLIC repo (PersonalJarvis/PersonalJarvis);
+# 1. CREDENTIAL gate (FAIL-CLOSED on positive findings) — scripts/ci/privacy_pre_push.py
+# (A) logs a heads-up when the target is the public repo (never blocks);
# (B) blocks a commit carrying a private maintainer email (author/committer);
# (C) blocks a real secret / forbidden secret file in the pushed files.
# The gate itself fails OPEN only when it genuinely cannot run (no python,
@@ -249,8 +238,8 @@ rm -f "$refs_file"
if [ "$status" -ne 0 ]; then
echo ""
if [ "$privacy_hit" -ne 0 ]; then
- echo "pre-push BLOCKED: PRIVACY gate (public target / private email / secret)."
- echo " See the findings above. Public releases go via the depersonalized release snapshot."
+ echo "pre-push BLOCKED: CREDENTIAL gate (private email / secret in pushed files)."
+ echo " See the findings above. Remove the credential from the commit, then retry."
fi
if [ "$language_hit" -ne 0 ]; then
echo "pre-push BLOCKED: LANGUAGE gate (newly added German text)."
diff --git a/.gitignore b/.gitignore
index db685859ad..f86221f0ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,11 @@ htmlcov/
node_modules/
dist/
build/
+# EXCEPTION: the built web UI ships IN the repo — a fresh clone/installer must
+# have a servable frontend without a Node toolchain (public installs relied on
+# this on every v1.0.x release). Rebuilt + committed as part of each release.
+!jarvis/ui/web/dist/
+!jarvis/ui/web/dist/**
# Installer-managed-install marker: written by install/installer.py at install
# time to opt a checkout into in-app self-update. Must NEVER be committed — a
diff --git a/AGENTS.md b/AGENTS.md
index 3cccef28c0..af7a8e6db9 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -141,16 +141,6 @@ histories. What remains is credential protection, **fail-closed**:
naming, logos, third-party assets. No scanner clears it; flag concerns to
the maintainer instead of shipping them.
-**Transition to the shared history (delete this block once done):** before
-the FIRST direct push of local `main` to the public repo: (a) purge
-`install/keys/offline-ceremony.key.enc` + `install/keys/pq-mldsa65.key.enc`
-from local history (`git filter-repo --invert-paths`) — they were never
-public and must not become so; (b) force-push the unified, filtered `main`
-as the new public history; (c) retool `.githooks/pre-push` from raw-push
-blocking (`guard_no_raw_public_push.py` / `privacy_pre_push.py`) to
-credential-scan-only. Until (a)–(c) land, do NOT raw-push to the public
-repo — full history verified key-clean otherwise (gitleaks, 2026-07-17).
-
**Two volumes:** *Update (DEFAULT)* — "push", "sichere den Stand", "update
GitHub" → normal push, **no bump / tag / release**. *Release (explicit
only)* — "Mach ein Release", "mach eine neue Version" <!-- i18n-allow: quoted German maintainer trigger phrases -->
diff --git a/CLAUDE.md b/CLAUDE.md
index 3cccef28c0..af7a8e6db9 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -141,16 +141,6 @@ histories. What remains is credential protection, **fail-closed**:
naming, logos, third-party assets. No scanner clears it; flag concerns to
the maintainer instead of shipping them.
-**Transition to the shared history (delete this block once done):** before
-the FIRST direct push of local `main` to the public repo: (a) purge
-`install/keys/offline-ceremony.key.enc` + `install/keys/pq-mldsa65.key.enc`
-from local history (`git filter-repo --invert-paths`) — they were never
-public and must not become so; (b) force-push the unified, filtered `main`
-as the new public history; (c) retool `.githooks/pre-push` from raw-push
-blocking (`guard_no_raw_public_push.py` / `privacy_pre_push.py`) to
-credential-scan-only. Until (a)–(c) land, do NOT raw-push to the public
-repo — full history verified key-clean otherwise (gitleaks, 2026-07-17).
-
**Two volumes:** *Update (DEFAULT)* — "push", "sichere den Stand", "update
GitHub" → normal push, **no bump / tag / release**. *Release (explicit
only)* — "Mach ein Release", "mach eine neue Version" <!-- i18n-allow: quoted German maintainer trigger phrases -->
diff --git a/scripts/ci/guard_no_raw_public_push.py b/scripts/ci/guard_no_raw_public_push.py
deleted file mode 100644
index 9cb24c7a8d..0000000000
--- a/scripts/ci/guard_no_raw_public_push.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env python3
-"""Pre-push guard: hard-block a RAW push to the public flagship repo.
-
-Doctrine (CLAUDE.md "THE GitHub repository", CLOUD.md "Canonical repositories"):
-the public **`PersonalJarvis/PersonalJarvis`** repo is written EXCLUSIVELY by the
-depersonalized public-release process — a secrets-/PII-scrubbed snapshot.
-A plain `git push` of raw working state to it is a defect (it would leak the
-maintainer's name, paths, `jarvis.toml`, `.env`, `data/`, Vault, …).
-
-This guard makes rule 2 *enforced*, not just documented. It is invoked by the
-`pre-push` hook with git's standard args (`<remote-name> <remote-url>`) and exits
-non-zero — aborting the push — when the destination is the public flagship.
-
-Why this never blocks the legitimate release: the release pushes from a
-*separate, fresh clone* (its own `.git`), so this working-repo hook is not on that
-push path at all. Normal `git push origin` to a non-flagship working repo is
-allowed. Only a raw push from THIS working tree to `PersonalJarvis/PersonalJarvis`
-is stopped.
-
-Escape hatch (should essentially never be needed): set `ALLOW_PUBLIC_RAW_PUSH=1`
-in the environment for a single push. Even then, prefer the skill.
-
-stdlib-only; runs on a bare `python:3.11-slim` container.
-"""
-from __future__ import annotations
-
-import re
-import sys
-
-# The public flagship, case-sensitive on BOTH path segments.
-# Only the PascalCase repo name is the protected target.
-PUBLIC_OWNER = "PersonalJarvis"
-PUBLIC_REPO = "PersonalJarvis"
-
-
-def _owner_repo(url: str) -> tuple[str, str] | None:
- """Extract ``(owner, repo)`` from an https or ssh GitHub remote URL.
-
- Returns ``None`` if the URL is not a github.com remote we recognise.
- """
- u = url.strip()
- # [email protected]:Owner/Repo(.git) | ssh://[email protected]/Owner/Repo(.git)
- # https://github.com/Owner/Repo(.git) | https://[email protected]/Owner/Repo
- m = re.search(r"github\.com[/:]+([^/]+)/([^/]+?)(?:\.git)?/?$", u)
- if not m:
- return None
- return m.group(1), m.group(2)
-
-
-def is_public_flagship(url: str) -> bool:
- """True iff ``url`` points at the case-exact public flagship repo."""
- parsed = _owner_repo(url)
- if parsed is None:
- return False
- owner, repo = parsed
- # Case-SENSITIVE: `PersonalJarvis/PersonalJarvis` is public; the lower-case
- # `…/personal-jarvis` backstage must not trip the guard.
- return owner == PUBLIC_OWNER and repo == PUBLIC_REPO
-
-
-def main(argv: list[str]) -> int:
- # git invokes pre-push as: pre-push <remote-name> <remote-url>
- # We accept either order / a single arg defensively.
- candidates = [a for a in argv[1:] if a]
- url = ""
- for a in candidates:
- if "github.com" in a:
- url = a
- break
- if not url and candidates:
- url = candidates[-1]
-
- # Public-flagship push guard DISABLED at the maintainer's explicit request
- # (2026-07-03). Direct pushes to PersonalJarvis/PersonalJarvis are now
- # allowed: the maintainer has accepted that raw working state (including the
- # real name in history) may reach the public repo. Credential safety now
- # rests on .gitignore (which keeps .env / keys / jarvis.toml / data/ out of
- # the tree) PLUS the secret + private-key gates that remain wired in
- # .githooks/pre-push. Restore the original block from git history to re-enable.
- if is_public_flagship(url):
- sys.stderr.write(
- "guard_no_raw_public_push: guard DISABLED by maintainer request — "
- f"allowing this push to {url}.\n"
- )
- return 0
-
-
-if __name__ == "__main__":
- raise SystemExit(main(sys.argv))
diff --git a/scripts/ci/install_git_hooks.py b/scripts/ci/install_git_hooks.py
index 31f0ed4112..29248ccb3e 100644
--- a/scripts/ci/install_git_hooks.py
+++ b/scripts/ci/install_git_hooks.py
@@ -1,22 +1,27 @@
#!/usr/bin/env python3
-"""Install the repo's local git hooks (idempotent, additive).
+"""Wire up the repo's tracked git hooks (idempotent).
-Right now this installs ONE guard: a `pre-push` block that hard-blocks a raw push
-from the working repo to the public flagship `PersonalJarvis/PersonalJarvis`
-(see `scripts/ci/guard_no_raw_public_push.py` + CLAUDE.md "THE GitHub repository").
+Since 2026-07-18 the repo uses the standard shared-history workflow
+(CLAUDE.md rule 2): direct pushes to the public flagship repo are the normal
+flow, protected by the fail-closed credential gates inside the tracked
+``.githooks/pre-push`` hook (secret scan, private-key gate) plus GitHub-side
+secret scanning with push protection. The old raw-push hard-block
+(``guard_no_raw_public_push``) is retired.
Run once per fresh clone / worktree:
python scripts/ci/install_git_hooks.py
-It is **additive and idempotent**: if a `pre-push` hook already exists (e.g. the
-language-policy gate), the guard block is inserted right after the shebang and the
-rest of the hook is left untouched. Re-running is a no-op. `.git/hooks/` is not
-version-controlled, so this installer (which IS tracked) is how the guard travels
-with the codebase.
+It does two things, both idempotent:
-stdlib-only; resolves the hooks dir via `git rev-parse` so it works in linked
-worktrees too.
+1. Points ``core.hooksPath`` at the tracked ``.githooks/`` dir so the
+ versioned hooks actually run (a per-clone setting a fresh clone lacks).
+2. Removes a previously injected ``guard_no_raw_public_push`` block from a
+ legacy ``.git/hooks/pre-push``, so old clones stop hard-blocking the now
+ normal public push.
+
+stdlib-only; resolves the hooks dir via ``git rev-parse`` so it works in
+linked worktrees too.
"""
from __future__ import annotations
@@ -27,23 +32,6 @@ import sys
MARKER_BEGIN = "# >>> guard_no_raw_public_push (managed by scripts/ci/install_git_hooks.py) >>>"
MARKER_END = "# <<< guard_no_raw_public_push <<<"
-GUARD_BLOCK = f"""{MARKER_BEGIN}
-# Hard-block a raw push to the PUBLIC flagship repo PersonalJarvis/PersonalJarvis.
-# That repo only ever receives a depersonalized snapshot via the public-release
-# privacy gate (CLAUDE.md rule 2). git passes: pre-push <name> <url>.
-__pj_guard="scripts/ci/guard_no_raw_public_push.py"
-if [ -f "$__pj_guard" ]; then
- __pj_py="/c/Program Files/Python311/python.exe"
- [ -x "$__pj_py" ] || __pj_py="$(command -v python3 || command -v python)"
- if [ -n "$__pj_py" ]; then
- "$__pj_py" "$__pj_guard" "$1" "$2" </dev/null || exit 1
- fi
-fi
-{MARKER_END}
-"""
-
-NEW_HOOK = "#!/bin/sh\n" + GUARD_BLOCK + "exit 0\n"
-
def _git(*args: str) -> str:
return subprocess.run(
@@ -52,12 +40,7 @@ def _git(*args: str) -> str:
def _ensure_hookspath() -> None:
- """If the repo ships a tracked ``.githooks/`` dir, point git at it.
-
- The repo keeps its hooks under version control in ``.githooks/`` (the language
- gate + this guard), but ``core.hooksPath`` is a per-clone setting that a fresh
- clone does not have. Set it so the tracked hooks actually run.
- """
+ """If the repo ships a tracked ``.githooks/`` dir, point git at it."""
tracked = _git("ls-files", ".githooks/")
if not tracked:
return # repo doesn't use a tracked hooks dir → leave default .git/hooks
@@ -76,6 +59,27 @@ def _hooks_path() -> str:
return out if os.path.isabs(out) else os.path.join(top, out)
+def _strip_legacy_guard(pre_push: str) -> None:
+ """Remove the retired raw-push guard block from a legacy hook file."""
+ if not os.path.exists(pre_push):
+ return
+ with open(pre_push, encoding="utf-8") as fh:
+ content = fh.read()
+ if MARKER_BEGIN not in content:
+ return
+ start = content.index(MARKER_BEGIN)
+ end = content.index(MARKER_END)
+ if end < start:
+ return # malformed markers → leave the file alone
+ end += len(MARKER_END)
+ # Also swallow the trailing newline of the removed block, if present.
+ if end < len(content) and content[end] == "\n":
+ end += 1
+ with open(pre_push, "w", encoding="utf-8", newline="\n") as fh:
+ fh.write(content[:start] + content[end:])
+ print(f"pre-push: removed the retired raw-push guard block ({pre_push}).")
+
+
def main() -> int:
try:
_ensure_hookspath()
@@ -84,33 +88,8 @@ def main() -> int:
sys.stderr.write("install_git_hooks: not inside a git repo (or git missing).\n")
return 1
- os.makedirs(hooks_dir, exist_ok=True)
- pre_push = os.path.join(hooks_dir, "pre-push")
-
- if os.path.exists(pre_push):
- with open(pre_push, encoding="utf-8") as fh:
- content = fh.read()
- if MARKER_BEGIN in content:
- print(f"pre-push: public-push guard already installed ({pre_push}).")
- return 0
- lines = content.splitlines(keepends=True)
- if lines and lines[0].startswith("#!"):
- new = lines[0] + GUARD_BLOCK + "".join(lines[1:])
- else:
- new = "#!/bin/sh\n" + GUARD_BLOCK + content
- action = "extended existing"
- else:
- new = NEW_HOOK
- action = "created"
-
- with open(pre_push, "w", encoding="utf-8", newline="\n") as fh:
- fh.write(new)
- try:
- os.chmod(pre_push, 0o755) # noqa: S103 - a git hook must be executable
- except OSError:
- pass # Windows / filesystems without exec bit - git for Windows runs it anyway.
-
- print(f"pre-push: {action} hook with the public-push guard ({pre_push}).")
+ _strip_legacy_guard(os.path.join(hooks_dir, "pre-push"))
+ print("git hooks wired (tracked .githooks/ active; no injected blocks).")
return 0