Pulse/scripts/release_control
rcourtman ef50c10a9a fix(release-control): scrub inherited git env in hook scratch-repo helpers
Pre-commit runs from a linked git worktree export an absolute GIT_DIR.
The release-control test helpers and the test-patched branch of
git_env() only removed GIT_INDEX_FILE, so their scratch-repo commands
targeted the REAL repository: 'git init' in a tempdir re-initialized it
with core.bare=true (breaking git status/commit for every checkout and
worktree) and the subsequent scratch 'git add' failed the hook.

Scrub GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE, and GIT_COMMON_DIR in:
- git_env() of format_staged_go.py, governance_stage_guard.py, and
  subsystem_contracts.py (test-patched branch only; production hook
  behavior unchanged)
- the scratch-repo git() helpers in format_staged_go_test.py,
  governance_stage_guard_test.py, readiness_assertion_guard_test.py,
  subsystem_contracts_test.py

Matches the pattern contract_audit_test.py and status_audit_test.py
already used. Verified the full hook test battery passes with
GIT_DIR/GIT_WORK_TREE/GIT_INDEX_FILE pointed at a canary repo, which
stays un-corrupted.
2026-07-17 15:52:11 +01:00
..
internal Prepare v6.0.1 patch release 2026-07-04 19:32:01 +01:00
agent_preflight.py Add canonical agent preflight gate 2026-03-20 10:23:29 +00:00
agent_preflight_test.py Update release control to use main 2026-07-05 15:20:37 +01:00
ai_runtime_docs_policy_test.py Bound automatic Patrol inference allowances 2026-07-16 19:55:44 +01:00
canonical_completion_guard.py Fix CI false positives in the canonical completion guard 2026-07-08 14:35:07 +01:00
canonical_completion_guard_test.py Enforce installation-scoped license invalidation 2026-07-14 16:18:21 +01:00
commercial_cancellation_reactivation_proof.py Restore public release proof entrypoints 2026-03-28 17:35:17 +00:00
commercial_cancellation_reactivation_rehearsal.py Restore public release proof entrypoints 2026-03-28 17:35:17 +00:00
contract_audit.py Fix contract audit sibling roots in worktrees 2026-05-13 15:22:33 +01:00
contract_audit_test.py Fix contract audit sibling roots in worktrees 2026-05-13 15:22:33 +01:00
control_plane.py Map legacy stable releases in control plane 2026-04-11 13:23:07 +01:00
control_plane_audit.py feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
control_plane_audit_test.py Update release control to use main 2026-07-05 15:20:37 +01:00
dev_runtime_governance_test.py Harden dev agent deploy SSH host verification 2026-04-22 11:41:50 +01:00
documentation_currentness_test.py backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
format_staged_go.py fix(release-control): scrub inherited git env in hook scratch-repo helpers 2026-07-17 15:52:11 +01:00
format_staged_go_test.py fix(release-control): scrub inherited git env in hook scratch-repo helpers 2026-07-17 15:52:11 +01:00
generate_platform_support_backend_module.py Fix Unraid agent host profile detection 2026-05-08 11:05:14 +01:00
generate_platform_support_frontend_module.py Correct VMware platform readiness classification 2026-05-22 09:13:29 +01:00
governance_stage_guard.py fix(release-control): scrub inherited git env in hook scratch-repo helpers 2026-07-17 15:52:11 +01:00
governance_stage_guard_test.py fix(release-control): scrub inherited git env in hook scratch-repo helpers 2026-07-17 15:52:11 +01:00
mobile_relay_auth_approvals_proof.py Restore public release proof entrypoints 2026-03-28 17:35:17 +00:00
mobile_release_gate.py Add mobile impact gate to release dispatch 2026-07-07 18:21:20 +01:00
mobile_release_gate_test.py Add mobile impact gate to release dispatch 2026-07-07 18:21:20 +01:00
paid_feature_claims_proof.py Add paid feature claim proof bundle 2026-04-29 14:18:43 +01:00
proof_entrypoints_test.py Add paid feature claim proof bundle 2026-04-29 14:18:43 +01:00
pulse_intelligence_gate.py chore: seal Pulse Intelligence release gate 2026-07-13 01:14:19 +01:00
pulse_intelligence_gate_test.py chore: seal Pulse Intelligence release gate 2026-07-13 01:14:19 +01:00
readiness_assertion_guard.py Converge UI primitives and readiness guards 2026-06-13 16:31:52 +01:00
readiness_assertion_guard_test.py fix(release-control): scrub inherited git env in hook scratch-repo helpers 2026-07-17 15:52:11 +01:00
record_rc_to_ga_blocked.py Prepare v6.0.0-rc.4 release packet 2026-05-05 15:32:32 +01:00
record_rc_to_ga_rehearsal.py Govern RC-to-GA rehearsal record capture 2026-04-11 14:08:57 +01:00
registry_audit.py Scrub hook Git env for registry sibling reads 2026-05-13 15:07:17 +01:00
registry_audit_test.py Enforce server-owned Patrol Autopilot acknowledgement 2026-07-11 23:12:00 +01:00
relay_registration_reconnect_drain_proof.py Restore public release proof entrypoints 2026-03-28 17:35:17 +00:00
release_candidate_manifest_test.py Build releases once and promote verified candidates 2026-07-09 22:21:34 +01:00
release_promotion_policy_support.py Govern RC-to-GA rehearsal record capture 2026-04-11 14:08:57 +01:00
release_promotion_policy_support_test.py Pin workflow actions and CI image versions 2026-04-22 10:12:15 +01:00
release_promotion_policy_test.py fix(release): fail closed on malformed release notes 2026-07-17 11:12:22 +01:00
render_release_body.py fix(release): fail closed on malformed release notes 2026-07-17 11:12:22 +01:00
render_release_body_test.py fix(release): fail closed on malformed release notes 2026-07-17 11:12:22 +01:00
repo_file_io.py backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
repo_file_io_test.py backend and governance: MCP contract, agent capabilities, API, and release-control 2026-06-23 17:26:15 +01:00
resolve_release_promotion.py Make stable patch releases unattended 2026-07-09 20:16:13 +01:00
resolve_release_promotion_test.py Make stable patch releases unattended 2026-07-09 20:16:13 +01:00
ssh_host_key_policy_test.py Harden dev agent deploy SSH host verification 2026-04-22 11:41:50 +01:00
staged_commit_shape_guard.py Add contract-neutral bypass to staged shape guard 2026-04-17 12:24:01 +01:00
staged_commit_shape_guard_test.py Add contract-neutral bypass to staged shape guard 2026-04-17 12:24:01 +01:00
status_audit.py Fix status audit sibling roots in worktrees 2026-05-13 15:40:08 +01:00
status_audit_test.py Fix status audit sibling roots in worktrees 2026-05-13 15:40:08 +01:00
status_lookup.py Promote lane expansion as active v6 target 2026-03-19 09:45:43 +00:00
status_lookup_test.py Add governed action audit preflight 2026-04-25 22:35:19 +01:00
subsystem_contracts.py fix(release-control): scrub inherited git env in hook scratch-repo helpers 2026-07-17 15:52:11 +01:00
subsystem_contracts_test.py fix(release-control): scrub inherited git env in hook scratch-repo helpers 2026-07-17 15:52:11 +01:00
subsystem_lookup.py Govern public v6 preview ops ownership 2026-04-15 09:24:41 +01:00
subsystem_lookup_test.py Enforce installation-scoped license invalidation 2026-07-14 16:18:21 +01:00
validate_artifact_release_line.py Allow stable patch artifact publishing 2026-07-04 20:49:47 +01:00
validate_artifact_release_line_test.py Prepare v6.0.4-rc.2 support build 2026-07-06 09:22:44 +01:00
work_claim.py Add governed work-claim tooling 2026-03-19 10:06:39 +00:00
work_claim_test.py Add governed work-claim tooling 2026-03-19 10:06:39 +00:00