You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the unbounded POSIX system call with fork, exec, wait, and process-group cleanup. Add native timeout regression coverage and document the Linux runtime and optional WSL PATH setup.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,11 @@
10
10
11
11
- Changed `EncodingFixTool.sh` to launch the native Linux64 executable directly instead of invoking the Windows EXE through WSL interoperability.
12
12
- Made Git execution, shell quoting, user config discovery, and path containment platform-correct; Linux avoids treating its UTF-8 default encoding as a legacy ANSI candidate while Windows retains active-code-page compatibility.
13
+
- Updated the agent skill with the native Linux runtime layout, optional WSL `PATH` setup, and fresh-shell verification.
14
+
15
+
### Fixed
16
+
17
+
- Bounded Linux Git command execution to 30 seconds and terminated the command process group on timeout so child processes are not left running.
- Run a minimal Linux64 program whose only dependency is `System.SysUtils` through `dcclinux64.exe`.
25
+
Expect: compilation reaches the linker instead of failing with F2063 for `Posix.Unistd`.
26
+
Touches: Delphi 12 installation or DelphiAIKit build environment
27
+
Verify: build-only
28
+
Notes: The project search path contains the expected Delphi 12 Linux64 release RTL folder, and namespace variants do not change the failure. A minimal `uses Posix.Unistd` probe fails under `dcclinux64.exe`; `System.SysUtils` fails transitively on the same unit, while other POSIX DCUs load. Raw MSBuild reproduces DAK, so this is not caused by EncodingFixTool conditionals or DAK command construction. RAD Studio succeeds through its in-process Linux64 compiler DLL.
- DIAGNOSTIC: DelphiAIKit, raw MSBuild, and a minimal `dcclinux64.exe` probe all fail in the installed command-line toolchain with F2063 for `Posix.Unistd`; tracked separately as T-010.
Notes: Strict RED/GREEN was completed. RED reached the 35-second emergency harness limit with exit 124. GREEN enforces the production timeout internally, terminates the process group, reaps the child, and emits `process timed out`. The IDE-built Linux64 executable supplied the native runtime proof; T-010 isolates the unrelated standalone compiler installation failure.
Copy file name to clipboardExpand all lines: agent-skill/encodingfix-delphi-cleanup/SKILL.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,35 @@ Run EncodingFixTool after AI/editor work may have changed Delphi line endings or
16
16
17
17
Do not use it for unrelated dirty files, vendored code, non-Delphi cleanup, or as a replacement for the repo's build/test gates. Binary `.dfm` files are safe because EncodingFixTool skips them.
18
18
19
+
## Runtime Setup
20
+
21
+
The Linux/WSL runtime consists of both files in this layout:
22
+
23
+
```text
24
+
bin/EncodingFixTool.sh
25
+
bin/Linux64/EncodingFixTool
26
+
```
27
+
28
+
The wrapper launches the native Linux64 binary directly. It does not use `EncodingFixTool.exe`, `wslpath`, or WSL Windows interoperability. Keep the wrapper executable and the `Linux64` directory next to it.
29
+
30
+
Adding `bin` to `PATH` is optional. It is needed only to invoke `EncodingFixTool.sh` by name from any directory; repo-local `./bin/EncodingFixTool.sh` works without it. For Bash login shells, add the native Linux path to `~/.profile`:
Add the same idempotent entry to `~/.bashrc` when direct non-login interactive shells must resolve it. Non-interactive automation does not reliably read either file; give the runner an explicit `PATH` or use the absolute/repo-local wrapper path.
40
+
41
+
For a checkout on a mounted Windows drive, convert the directory once when determining that native path, for example `wslpath -u 'F:\projects\MaxLogic\EncodingFix\bin'`. Verify the shell modes configured by our setup before relying on the command:
42
+
43
+
```bash
44
+
command -v EncodingFixTool.sh
45
+
EncodingFixTool.sh help>/dev/null
46
+
```
47
+
19
48
## Core Workflow
20
49
21
50
1. Check the dirty set first:
@@ -28,7 +57,7 @@ If unrelated user changes are dirty, avoid broad cleanup. Narrow `path=...`, ove
28
57
29
58
2. In a Git worktree, prefer the AI cleanup preset.
30
59
31
-
From Linux or WSL, run the Bash wrapper. It launches the native Linux64 binary directly, so Linux paths are passed through unchanged and WSL Windows interoperability is not involved. If the repo `bin` directory is on `PATH`, prefer:
60
+
From Linux or WSL, run the Bash wrapper. Linux paths are passed through unchanged. If the repo `bin` directory is on `PATH`, prefer:
Copy file name to clipboardExpand all lines: agent-skill/encodingfix-delphi-cleanup/evals/evals.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,11 @@
15
15
"id": 3,
16
16
"prompt": "The worktree has my unrelated changes plus your generated Delphi units. Fix only your files' line endings and tell me what happened.",
17
17
"expected_output": "The agent should not run a broad scope=git-changed cleanup over all dirty files. It should narrow path or extensions, ask if needed, run dry when scope is unclear, and report scanned/changed/skipped/failed counts."
18
+
},
19
+
{
20
+
"id": 4,
21
+
"prompt": "Set up EncodingFixTool for an agent running natively in WSL without Windows interop. Explain whether PATH is required and verify the installation.",
22
+
"expected_output": "The agent should keep bin/EncodingFixTool.sh beside bin/Linux64/EncodingFixTool, explain that PATH is optional unless the wrapper must run by name, use a native Linux bin path in ~/.profile for login shells and ~/.bashrc for non-login interactive Bash when requested, require an explicit path or PATH for non-interactive automation, and verify command resolution plus help output."
Copy file name to clipboardExpand all lines: agent-skill/encodingfix-delphi-cleanup/references/encodingfix-tool.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,15 @@ Use this reference when the standard `preset=delphi-ai scope=git-changed` workfl
6
6
7
7
Prefer `EncodingFixTool` from `PATH` on Windows or `EncodingFixTool.sh` on Linux/WSL. Repo-local paths are `.\bin\EncodingFixTool.exe` on Windows and `./bin/EncodingFixTool.sh` on Linux/WSL. The shell launcher executes `bin/Linux64/EncodingFixTool` directly and does not use Windows interoperability.
8
8
9
+
On Linux/WSL, the wrapper and binary are one runtime bundle:
10
+
11
+
```text
12
+
bin/EncodingFixTool.sh
13
+
bin/Linux64/EncodingFixTool
14
+
```
15
+
16
+
`PATH` is optional. Add the absolute native `bin` path to `~/.profile` for login shells and to `~/.bashrc` for direct non-login interactive Bash shells. Non-interactive automation should receive an explicit `PATH` or use the absolute/repo-local wrapper path. Verify configured shells with `command -v EncodingFixTool.sh` followed by `EncodingFixTool.sh help`.
17
+
9
18
## Delphi AI Preset
10
19
11
20
`preset=delphi-ai` is designed for AI/editor cleanup:
To install this as an agent skill, copy the `encodingfix-delphi-cleanup/` folder into the agent's skills directory. Keep `SKILL.md`, `references/`, and `evals/` together.
100
+
To install this as an agent skill, copy the `encodingfix-delphi-cleanup/` folder into the agent's skills directory. Keep `SKILL.md`, `references/`, and `evals/` together. The skill files do not install the CLI runtime: install or build the Windows executable separately, and on Linux/WSL keep `EncodingFixTool.sh` together with `Linux64/EncodingFixTool` as shown above.
0 commit comments