gitvow 0.34.2__tar.gz → 0.34.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitvow-0.34.2/src/gitvow.egg-info → gitvow-0.34.3}/PKG-INFO +1 -1
- {gitvow-0.34.2 → gitvow-0.34.3}/pyproject.toml +1 -1
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/hooks/__init__.py +18 -4
- {gitvow-0.34.2 → gitvow-0.34.3/src/gitvow.egg-info}/PKG-INFO +1 -1
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_hooks_disabled.py +10 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/LICENSE +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/README.md +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/setup.cfg +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/__init__.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/__main__.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/adapters.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/carry.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/claims.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/cli.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/collect.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/decisions.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/default_policy.json +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/digest.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/export.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/install.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/intent.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/notes.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/outcomes.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/pack.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/paths.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/policy.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/pricing.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/proposals.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/providers.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/reach.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/recall.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/redact.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/report.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/rules.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/safewrite.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/scan.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/selftest.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/serve.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/snapshots.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/state.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/status.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/sync.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/targets.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow/transcript.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow.egg-info/SOURCES.txt +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow.egg-info/dependency_links.txt +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow.egg-info/entry_points.txt +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow.egg-info/requires.txt +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/src/gitvow.egg-info/top_level.txt +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_adapters.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_answered_confirm_commit.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_carry.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_claims.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_collect.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_command_position.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_commit_window.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_cost.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_decisions.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_defects_0_32_1.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_digest.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_duplicate_hooks.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_e2e_globalopt.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_export.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_external_adapter.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_git_rules.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_hardening.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_hooks.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_install_cli.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_intent.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_native_question.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_opencode.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_outcomes.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_pack.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_packaging.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_policy.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_policy_refresh.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_proposals.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_providers.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_reach.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_recall.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_redact.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_report.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_rules.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_scan.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_serve.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_snapshots.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_status.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_status_environment.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_symlinked_paths.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_sync.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_sync_http.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_targets.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_tiers.py +0 -0
- {gitvow-0.34.2 → gitvow-0.34.3}/tests/test_transcript_formats.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitvow
|
|
3
|
-
Version: 0.34.
|
|
3
|
+
Version: 0.34.3
|
|
4
4
|
Summary: Provenance and policy gate for AI-agent coding sessions: session trailers on commits, redacted session notes in git, a tool-call gate, and a local ledger. No runtime dependencies.
|
|
5
5
|
Author-email: Nikhil Bora <nikhil@wirevow.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gitvow"
|
|
7
|
-
version = "0.34.
|
|
7
|
+
version = "0.34.3"
|
|
8
8
|
description = "Provenance and policy gate for AI-agent coding sessions: session trailers on commits, redacted session notes in git, a tool-call gate, and a local ledger. No runtime dependencies."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
@@ -666,10 +666,7 @@ def _push_notes_after(cwd: str, command: str) -> None:
|
|
|
666
666
|
remote, and say so in the log. Never for our own notes push."""
|
|
667
667
|
if os.environ.get("GITVOW_PUSHING_NOTES"):
|
|
668
668
|
return
|
|
669
|
-
|
|
670
|
-
remote = m.group(2) if m else "origin"
|
|
671
|
-
if remote.startswith(("refs/", ":")) or ("/" in remote and not remote.startswith(("http", "git@", "ssh"))):
|
|
672
|
-
remote = "origin"
|
|
669
|
+
remote = push_remote(command)
|
|
673
670
|
rc, _, _ = git(["for-each-ref", "--count=1", "refs/notes/gitvow/"], cwd)
|
|
674
671
|
if rc != 0:
|
|
675
672
|
return
|
|
@@ -728,3 +725,20 @@ HANDLERS = {
|
|
|
728
725
|
"Stop": stop,
|
|
729
726
|
"Subagent": subagent_event,
|
|
730
727
|
}
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
def push_remote(command: str) -> str:
|
|
731
|
+
"""The remote named by the `git push` in a shell line, read from the git segment itself, not from any word
|
|
732
|
+
`push` in the line: `echo "--- push main" && git push origin main` once yielded `main"`. Default origin."""
|
|
733
|
+
from ..policy import _program_and_args, _segments
|
|
734
|
+
|
|
735
|
+
for seg in _segments(command) or []:
|
|
736
|
+
prog, args = _program_and_args(seg)
|
|
737
|
+
if os.path.basename(prog) != "git" or "push" not in args:
|
|
738
|
+
continue
|
|
739
|
+
after = args[args.index("push") + 1 :]
|
|
740
|
+
positional = [a for a in after if not a.startswith("-")]
|
|
741
|
+
if positional and not positional[0].startswith(("refs/", ":")):
|
|
742
|
+
return positional[0]
|
|
743
|
+
return "origin"
|
|
744
|
+
return "origin"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitvow
|
|
3
|
-
Version: 0.34.
|
|
3
|
+
Version: 0.34.3
|
|
4
4
|
Summary: Provenance and policy gate for AI-agent coding sessions: session trailers on commits, redacted session notes in git, a tool-call gate, and a local ledger. No runtime dependencies.
|
|
5
5
|
Author-email: Nikhil Bora <nikhil@wirevow.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -9,6 +9,7 @@ from gitvow.hooks import (
|
|
|
9
9
|
hooks_disabled_by_env,
|
|
10
10
|
post_tool_use,
|
|
11
11
|
pre_tool_use,
|
|
12
|
+
push_remote,
|
|
12
13
|
session_start,
|
|
13
14
|
user_prompt_submit,
|
|
14
15
|
)
|
|
@@ -177,3 +178,12 @@ def test_a_commit_and_push_chain_sends_the_note_with_the_push(repo, home, payloa
|
|
|
177
178
|
assert code == 0 and "session note attached" in msg
|
|
178
179
|
local = git(repo, "rev-parse", "refs/notes/gitvow/sess-1")
|
|
179
180
|
assert git(bare, "rev-parse", "refs/notes/gitvow/sess-1") == local # the note just written is on the remote
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def test_the_remote_comes_from_the_git_segment_not_from_any_push_word():
|
|
184
|
+
assert push_remote('echo "--- push main" && git push origin main 2>&1; echo "exit $?"') == "origin"
|
|
185
|
+
assert push_remote("git -C /r push upstream feature") == "upstream"
|
|
186
|
+
assert push_remote("git push --force-with-lease team HEAD:refs/heads/x") == "team"
|
|
187
|
+
assert push_remote("git push") == "origin"
|
|
188
|
+
assert push_remote("git push :refs/tags/v1") == "origin"
|
|
189
|
+
assert push_remote("gitvow push-notes") == "origin"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|