4 Commits

Author SHA1 Message Date
HAL9000 2e3e116b42 fix(error-handling): _handle_file_edit() now respects encoding parameter
Remove duplicate step function definition in tool_builtins_steps.py that
was shadowing the decorated @when handler, causing the Behave step to be
orphaned at runtime. Add CHANGELOG entry documenting the encoding fix for
issue #7559.

ISSUES CLOSED: #7559

# Conflicts:
#	CHANGELOG.md
2026-04-21 08:45:06 +00:00
HAL9000 fca440a62c fix(error-handling): _handle_file_edit() now respects encoding parameter
- Fixed _handle_file_edit() to use encoding=inputs.get("encoding", "utf-8") for both read_text() and write_text() calls, ensuring encoding is explicit and not dependent on the platform default.
- Added encoding field to the FILE_EDIT_SPEC schema to surface encoding choices to callers.

ISSUES CLOSED: #7559
2026-04-21 08:45:06 +00:00
HAL9000 e18ac5f23c fix(security): replace startswith sandbox check with Path.relative_to() in validate_path #7558
CI / lint (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 21s
CI / push-validation (pull_request) Successful in 20s
CI / build (pull_request) Successful in 24s
CI / typecheck (pull_request) Successful in 50s
CI / security (pull_request) Successful in 59s
CI / helm (pull_request) Successful in 44s
CI / integration_tests (pull_request) Successful in 4m41s
CI / unit_tests (pull_request) Successful in 5m24s
CI / docker (pull_request) Successful in 52s
CI / coverage (pull_request) Successful in 7m38s
CI / e2e_tests (pull_request) Successful in 2m14s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-regression (push) Failing after 0s
CI / benchmark-publish (push) Failing after 0s
CI / lint (push) Successful in 18s
CI / quality (push) Successful in 40s
CI / typecheck (push) Successful in 41s
CI / security (push) Successful in 42s
CI / build (push) Successful in 25s
CI / push-validation (push) Successful in 30s
CI / helm (push) Successful in 56s
CI / e2e_tests (push) Successful in 3m3s
CI / unit_tests (push) Successful in 4m3s
CI / integration_tests (push) Successful in 4m8s
CI / docker (push) Successful in 52s
CI / coverage (push) Successful in 7m22s
CI / status-check (push) Successful in 1s
The validate_path() function in file_tools.py used str.startswith() to
verify that a resolved path stays within the sandbox root. This allowed
sibling directories whose names share a string prefix with the sandbox
(e.g. /tmp/sandbox-escape/ bypassing /tmp/sandbox/) to escape the
containment check.

Replace the string prefix check with Path.relative_to(root), which
performs a proper OS-level path prefix comparison using path separators.
Add a Behave regression scenario tagged @tdd_issue @tdd_issue_7558 that
exercises the prefix-collision bypass to prevent regressions.

ISSUES CLOSED: #7558
2026-04-17 04:50:55 +00:00
Jeff (CTO) 2277ac1b8e feat(tool): add built-in file tools
CI / lint (pull_request) Failing after 14s
CI / typecheck (pull_request) Successful in 27s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Successful in 22s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Failing after 4m37s
CI / build (pull_request) Successful in 16s
CI / lint (push) Failing after 11s
CI / typecheck (push) Successful in 27s
CI / coverage (push) Has been skipped
CI / security (push) Successful in 22s
CI / quality (push) Successful in 15s
CI / unit_tests (pull_request) Successful in 10m13s
CI / docker (pull_request) Has been skipped
CI / integration_tests (push) Failing after 4m42s
CI / build (push) Successful in 14s
CI / unit_tests (push) Successful in 9m56s
CI / docker (push) Has been skipped
2026-02-14 14:03:28 -05:00