Skip to content

Commit eaec638

Browse files
committed
Fix v1.1.1 cross-platform release checks
1 parent c35bc5c commit eaec638

9 files changed

Lines changed: 24 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project are documented here.
44

5+
## 1.1.1 - 2026-07-16
6+
7+
- Preserve installer metadata on Python 3.9 by using the cross-version
8+
`os.stat(..., follow_symlinks=False)` API.
9+
- Normalize checksum paths to POSIX form so validation is identical on
10+
Windows, macOS, and Linux.
11+
- Supersede the unreleased `v1.1.0` tag without moving it.
12+
513
## 1.1.0 - 2026-07-16
614

715
- Define the real enforcement boundary: the guard protects only visible tool

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ and keep using Codex normally.
2020
Copy this version-pinned prompt into a new Codex task:
2121

2222
```text
23-
Install Codex Destructive Guard v1.1.0 from this public repository:
23+
Install Codex Destructive Guard v1.1.1 from this public repository:
2424
https://github.com/nuuxcode/codex-destructive-guard
2525
2626
First inspect README.md, .agents/plugins/marketplace.json, the plugin manifest,
27-
hooks/hooks.json, scripts/guard.py, and checksums/v1.1.0.sha256. If they match
28-
the documented behavior, install the marketplace with --ref v1.1.0 and then
27+
hooks/hooks.json, scripts/guard.py, and checksums/v1.1.1.sha256. If they match
28+
the documented behavior, install the marketplace with --ref v1.1.1 and then
2929
install codex-destructive-guard@codex-destructive-guard. Do not modify unrelated
3030
settings and do not run a destructive live test. Show me the exact installed
3131
hook command and explain how to review and trust it in /hooks.
@@ -37,7 +37,7 @@ Requirements: Codex with plugin support and Python 3.9 or newer. The recommended
3737
installation is immutable and reviewable:
3838

3939
```sh
40-
codex plugin marketplace add nuuxcode/codex-destructive-guard --ref v1.1.0
40+
codex plugin marketplace add nuuxcode/codex-destructive-guard --ref v1.1.1
4141
codex plugin add codex-destructive-guard@codex-destructive-guard
4242
```
4343

@@ -60,15 +60,15 @@ The fallback installer copies the same reviewed script into `CODEX_HOME` and
6060
merges one handler into `hooks.json`:
6161

6262
```sh
63-
git clone --branch v1.1.0 --depth 1 https://github.com/nuuxcode/codex-destructive-guard.git
63+
git clone --branch v1.1.1 --depth 1 https://github.com/nuuxcode/codex-destructive-guard.git
6464
cd codex-destructive-guard
65-
shasum -a 256 -c checksums/v1.1.0.sha256
65+
shasum -a 256 -c checksums/v1.1.1.sha256
6666
python3 install.py
6767
```
6868

6969
On Windows PowerShell, use `py -3 install.py` and compare
7070
`Get-FileHash plugins/codex-destructive-guard/scripts/guard.py -Algorithm SHA256`
71-
with the value in `checksums/v1.1.0.sha256`.
71+
with the value in `checksums/v1.1.1.sha256`.
7272

7373
The installer:
7474

checksums/v1.1.1.sha256

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6b60a7897f592241db5667eb684283856746baa9f7ac6219115dfaf8cb4fa81b plugins/codex-destructive-guard/scripts/guard.py

install.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626

2727
PLUGIN_NAME = "codex-destructive-guard"
28-
RELEASE_VERSION = "1.1.0"
28+
RELEASE_VERSION = "1.1.1"
2929
INSTALLED_SCRIPT_NAME = "codex_destructive_guard.py"
3030
INSTALL_MANIFEST_NAME = "codex_destructive_guard.install.json"
3131
INSTALL_MANIFEST_SCHEMA = 1
@@ -71,14 +71,14 @@ def path_xattrs(path: Path) -> Dict[str, bytes]:
7171

7272

7373
def apply_existing_metadata(source: Path, target: Path) -> None:
74-
source_stat = source.stat(follow_symlinks=False)
74+
source_stat = os.stat(source, follow_symlinks=False)
7575
shutil.copystat(source, target, follow_symlinks=False)
7676
os.chmod(target, stat.S_IMODE(source_stat.st_mode))
7777
if hasattr(os, "chown"):
7878
try:
7979
os.chown(target, source_stat.st_uid, source_stat.st_gid)
8080
except PermissionError as exc:
81-
target_stat = target.stat(follow_symlinks=False)
81+
target_stat = os.stat(target, follow_symlinks=False)
8282
if (target_stat.st_uid, target_stat.st_gid) != (source_stat.st_uid, source_stat.st_gid):
8383
raise RuntimeError("Could not preserve ownership for {}".format(source)) from exc
8484
for name, value in path_xattrs(source).items():

plugins/codex-destructive-guard/.codex-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codex-destructive-guard",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Inspect supported Codex tool calls and block common destructive operations.",
55
"author": {
66
"name": "Mounssif BOUHLAOUI",

plugins/codex-destructive-guard/scripts/guard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from typing import Iterator, Optional, Sequence, Tuple
1717

1818

19-
VERSION = "1.1.0"
19+
VERSION = "1.1.1"
2020
MAX_INPUT_CHARS = 2_000_000
2121
SHELL_TOOL_NAMES = {"Bash", "exec", "exec_command", "unified_exec", "shell"}
2222
PATCH_TOOL_NAMES = {"apply_patch", "Edit", "Write"}

scripts/test_codex_plugin_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
ROOT = Path(__file__).resolve().parents[1]
1616
PLUGIN_ID = "codex-destructive-guard@codex-destructive-guard"
17-
EXPECTED_VERSION = "1.1.0"
17+
EXPECTED_VERSION = "1.1.1"
1818

1919

2020
def run_json(codex: str, codex_home: Path, *arguments: str) -> object:

scripts/validate_repo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def validate(root: Optional[Path] = None) -> None:
137137
checksum_path = root / "checksums" / "v{}.sha256".format(version)
138138
expected_checksum = "{} {}".format(
139139
sha256_file(guard_path),
140-
guard_path.relative_to(root),
140+
guard_path.relative_to(root).as_posix(),
141141
)
142142
require(
143143
checksum_path.read_text(encoding="utf-8").strip() == expected_checksum,

tests/test_release_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_release_guard_checksum_is_current(self):
5252
)["version"]
5353
expected = "{} {}".format(
5454
hashlib.sha256(guard.read_bytes()).hexdigest(),
55-
guard.relative_to(ROOT),
55+
guard.relative_to(ROOT).as_posix(),
5656
)
5757
checksum = (ROOT / "checksums" / "v{}.sha256".format(version)).read_text(
5858
encoding="utf-8"

0 commit comments

Comments
 (0)