test(agents): capture file_write accepting a malformed path bug (#175) #178

Merged
CoreRasurae merged 1 commit from tdd/m1-file-write-path-validation into develop 2026-11-20 11:30:01 +00:00
Member

Summary

Adds a failing-first Behave regression test proving issue #175: ToolAgent._validate_file_path_safety (src/cleveractors/agents/tool.py) only checks a file_write file argument for traversal, absolute-path, and home-directory escapes — it has no check that the string is a well-formed path containing only path-legal characters. A corrupted argument (an embedded HTML/markup fragment, or a whitespace-run indicating a concatenated/corrupted string) therefore sails through validation untouched and only fails deep inside FileAccessCore.write() with a raw OSError, instead of being rejected up front with a descriptive ExecutionError.

Two scenarios are added to features/tool_agent.feature (extending the existing features/steps/tool_agent_steps.py, no new feature/step file):

  • One reproducing the exact markup fragment captured in issue #175's evidence log.
  • One covering a different malformed-path shape (an embedded double-space run suggesting two paths got concatenated), per the issue's instruction not to restrict coverage to markup alone.

Both are tagged @tdd_issue @tdd_issue_175 @tdd_expected_fail per the mandatory Bug Fix TDD Workflow. Confirmed locally that removing @tdd_expected_fail makes both scenarios fail with a plain AssertionError (bug reproduced); with the tag present, TddExpectedFailPolicy inverts the failure so nox -s unit_tests stays green.

The actual fix (a path-character/well-formedness check in _validate_file_path_safety) lands separately on bugfix/m1-file-write-path-validation per issue #175.

Test plan

  • nox -s lint — green
  • nox -s format -- --check — green
  • nox -s typecheck — green (Pyright strict, 0 errors)
  • nox -s security_scan — green (bandit + semgrep, 0 findings)
  • nox -s dead_code — green (vulture)
  • nox -s unit_tests — green (3342 scenarios passed, including the 2 new TDD scenarios)
  • nox -s coverage_report — 97.3% (≥ 96.5% threshold)
  • nox -s integration_tests — green (382 Robot tests passed)
  • Confirmed the new scenarios fail via AssertionError with @tdd_expected_fail removed, and pass via inversion with it present

Closes #176
Refs #175

## Summary Adds a failing-first Behave regression test proving issue #175: `ToolAgent._validate_file_path_safety` (`src/cleveractors/agents/tool.py`) only checks a `file_write` `file` argument for traversal, absolute-path, and home-directory escapes — it has no check that the string is a well-formed path containing only path-legal characters. A corrupted argument (an embedded HTML/markup fragment, or a whitespace-run indicating a concatenated/corrupted string) therefore sails through validation untouched and only fails deep inside `FileAccessCore.write()` with a raw `OSError`, instead of being rejected up front with a descriptive `ExecutionError`. Two scenarios are added to `features/tool_agent.feature` (extending the existing `features/steps/tool_agent_steps.py`, no new feature/step file): - One reproducing the exact markup fragment captured in issue #175's evidence log. - One covering a different malformed-path shape (an embedded double-space run suggesting two paths got concatenated), per the issue's instruction not to restrict coverage to markup alone. Both are tagged `@tdd_issue @tdd_issue_175 @tdd_expected_fail` per the mandatory Bug Fix TDD Workflow. Confirmed locally that removing `@tdd_expected_fail` makes both scenarios fail with a plain `AssertionError` (bug reproduced); with the tag present, `TddExpectedFailPolicy` inverts the failure so `nox -s unit_tests` stays green. The actual fix (a path-character/well-formedness check in `_validate_file_path_safety`) lands separately on `bugfix/m1-file-write-path-validation` per issue #175. ## Test plan - [x] `nox -s lint` — green - [x] `nox -s format -- --check` — green - [x] `nox -s typecheck` — green (Pyright strict, 0 errors) - [x] `nox -s security_scan` — green (bandit + semgrep, 0 findings) - [x] `nox -s dead_code` — green (vulture) - [x] `nox -s unit_tests` — green (3342 scenarios passed, including the 2 new TDD scenarios) - [x] `nox -s coverage_report` — 97.3% (≥ 96.5% threshold) - [x] `nox -s integration_tests` — green (382 Robot tests passed) - [x] Confirmed the new scenarios fail via `AssertionError` with `@tdd_expected_fail` removed, and pass via inversion with it present Closes #176 Refs #175
CoreRasurae added this to the v2.1.0 milestone 2026-11-19 22:30:19 +00:00
feat(skills): add --relaxed flag to ease skill packaging checks
Some checks failed
CI / lint (pull_request) Successful in 1m19s
CI / typecheck (pull_request) Successful in 1m23s
CI / security (pull_request) Successful in 1m50s
CI / build (pull_request) Successful in 1m58s
CI / quality (pull_request) Successful in 2m17s
CI / integration_tests (pull_request) Successful in 4m5s
CI / unit_tests (pull_request) Successful in 7m32s
CI / benchmark (pull_request) Failing after 33m23s
CI / coverage (pull_request) Successful in 5m28s
CI / status-check (pull_request) Successful in 2s
318b0a8baf
Add a --relaxed CLI flag to pack_skill.py that eases the 1024-character
description maximum and the unsupported-frontmatter-field check while
iterating on a draft skill. Every other validation rule stays exactly
as strict as today, so --relaxed cannot be used to smuggle a genuinely
invalid skill past review.

A skill packed with --relaxed must still round-trip through
unpack_skill.py, so the same flag and the same two relaxed checks are
threaded through SkillDirectoryUnpacker as well; an unsupported
top-level field survives the round trip via a new Skill.extra_fields
carried only under relaxed validation.

Both flags are explicit, opt-in keyword arguments on
SkillDirectoryPacker.pack, SkillDirectoryUnpacker.unpack, and
SkillValidator.validate rather than a global switch, so strict
validation remains the unconditional default for every other caller
(e.g. agent skill loading, ADR-2034 D-5).

ISSUES CLOSED: #171
test(agents): capture file_write accepting a malformed path bug (#175)
Some checks failed
CI / lint (pull_request) Successful in 1m21s
CI / typecheck (pull_request) Successful in 1m50s
CI / security (pull_request) Successful in 1m13s
CI / quality (pull_request) Successful in 1m34s
CI / build (pull_request) Successful in 1m52s
CI / integration_tests (pull_request) Successful in 3m45s
CI / benchmark (pull_request) Failing after 32m42s
CI / unit_tests (pull_request) Successful in 6m28s
CI / coverage (pull_request) Successful in 7m2s
CI / status-check (pull_request) Successful in 3s
3080eeef5a
Adds a failing-first Behave regression test proving issue #175:
ToolAgent._validate_file_path_safety (src/cleveractors/agents/tool.py)
only checks a file_write `file` argument for traversal, absolute-path,
and home-directory escapes. It has no check that the string is a
well-formed path containing only path-legal characters, so a corrupted
argument (an embedded HTML/markup fragment leaked from an LLM's
context, or a whitespace-run indicating a concatenated/corrupted
string) sails through validation untouched and only fails deep inside
FileAccessCore.write() with a raw OSError, instead of being rejected
up front with a descriptive ExecutionError.

Extends the existing features/tool_agent.feature /
features/steps/tool_agent_steps.py pair (rather than adding a new
feature/step file, per the project's step-file rules) with two
scenarios: one reproducing the exact markup fragment captured in
issue #175's evidence log, and one covering a different malformed-path
shape (an embedded double-space run suggesting two paths got
concatenated), per the issue's instruction not to restrict coverage to
markup alone. Both point `file` at a path whose parent directories
don't exist, so an unvalidated attempt reaches FileAccessCore.write()
and fails with "[Errno 2] No such file or directory" wrapped as
"File write failed: ...". The new `the file write should be rejected
by path validation before any filesystem call` step asserts the error
message contains neither "Errno" nor "No such file", which fails via
a plain AssertionError today (confirmed locally by removing the tag
and re-running), proving the bug; with @tdd_expected_fail present,
TddExpectedFailPolicy inverts the failure so nox -s unit_tests stays
green.

The scenarios are tagged @tdd_issue, @tdd_issue_175, and
@tdd_expected_fail per the TDD issue-capture workflow.

The actual fix (a path-character/well-formedness check in
_validate_file_path_safety) lands separately on
bugfix/m1-file-write-path-validation per issue #175.

Refs: #175, #176
hurui200320 requested changes 2026-11-20 05:01:43 +00:00
Dismissed
hurui200320 left a comment
See approval below

PR Review: !178 (Ticket #176)

Verdict: Request Changes

The TDD-capture work — the actual deliverable of this ticket — is excellent and was fully verified locally: both new @tdd_expected_fail scenarios genuinely reproduce bug #175 (with the tag stripped they fail with plain AssertionErrors surfacing the raw [Errno 2] No such file or directory), pass via the inversion policy with the tag present, use assert only, comply with the three-tag rules, and run against isolated per-scenario sandbox temp dirs (FileAccessCore.write never creates parent directories, so the ENOENT reproduction is deterministic). A full nox -s unit_tests run on the PR head is green — 159 features / 3342 scenarios / 0 failed, matching the PR report — and agent-side skill loading (skills.py:239) still validates strictly, so the ADR-2034 D-5 default is untouched.

However, the PR cannot be merged as-is: it carries a second, unrelated commit — the entire !177/#171 --relaxed feature — that its title and description never mention. That is the one blocking finding below.

No comments or reviews existed on this PR, and the author posted no responses elsewhere deciding items out-of-scope, so nothing was dropped from this review. Red-tape items (missing ISSUES CLOSED footer on the test commit, unchecked subtask checkboxes on #176, develop-vs-master base) are excluded per reviewer instruction.

Critical Issues

None

Major Issues

  1. PR content does not match its title/description: it contains the complete !177/#171 feature commit.
    • Commit 318b0a8b (feat(skills): add --relaxed flag to ease skill packaging checks, footer ISSUES CLOSED: #171) is the parent of the TDD commit and accounts for 11 of the 13 changed files (~416 of 448 added lines: skill_packer.py, skill_schema.py, skill_unpacker.py, both CLIs, both skill feature/step files, docs, CHANGELOG), yet the PR title/body describe only the #176 test capture and never mention #171.
    • The identical commit is the head commit of open PR !177 (feature/m1-skill-packer-relaxed-mode → develop), which is the branch #171's Metadata prescribes; this PR's branch is #176's metadata branch tdd/m1-file-write-path-validation.
    • Consequences: approving/merging !178 silently merges the #171 feature under a PR that never describes it; if !177 is later rebased/amended, the stale duplicate commit here can conflict with or revert those changes; and one branch carrying two issues' work across two open PRs violates the atomic-commit / branch-per-issue rules.
    • Recommendation: rebase tdd/m1-file-write-path-validation onto origin/develop, dropping 318b0a8b — verified the TDD commit 3080eee is fully self-contained (only features/tool_agent.feature + features/steps/tool_agent_steps.py) — and leave #171 to the already-approved !177. Alternatively, if bundling is intentional, retitle/describe the PR to cover both issues, add Closes #171, and close !177.

Minor Issues

  1. Inaccurate docs claim about strict unpack of unsupported top-level fields — docs/guides/skill-packages.md:350-352 and src/cleveractors/agents/skill_unpacker.py:252-258. The guide says unsupported top-level fields are written back "instead of raising a validation error" and that "without --relaxed an over-long description or an unsupported field still fails exactly as before". The second half is false for the unsupported field: SkillValidator.validate has no unknown-key rejection, so strict unpack silently drops the field (verified in code; it never failed, before or after). Reword and scope the "still fails" sentence to the description-length case. (Same finding was raised on the identical commit in !177; not yet addressed.)
  2. Strict-mode error text reworded, contra #171's "byte-for-byte unchanged without --relaxed" — src/cleveractors/agents/skill_schema.py:307-324. _validate_length now emits must be at least 1 characters (max: 1024), got N instead of must be 1-1024 characters, got N for every strict failure, including compatibility (max 500). Only the max_len=None case needs new wording; keep the old format when max_len is not None (which also fixes the "1 characters" grammar). No test asserts the old text (verified by grep), so nothing breaks either way.
  3. Acceptance-criteria coverage gaps for the bundled feature — features/skill_directory_packages.feature / features/skill_directory_unpacking.feature: no --relaxed × --check or --relaxed × --output scenarios (both explicitly listed in #171's AC), and "every other rejection still fires under --relaxed" is spot-checked for only 3 of the enumerated checks — name pattern/length, compatibility length, safe_mode type, resource-path validation, and name-matches-directory are not re-asserted under the flag. Risk is nil given the flag-orthogonal implementation, but the scenarios are one-liners and would close the AC exactly.

Nits

  1. features/skill_directory_packages.feature:181 — "--relaxed does not relax the minimum description length" actually exercises the non-empty-string check (_require_string rejects "" before _validate_length runs). Behavior is correct and the AC is satisfied, but the scenario name overstates what is exercised.
  2. src/cleveractors/agents/skill_schema.py:207-209 — the relaxed docstring on SkillValidator.validate mentions only the description max-length; under relaxed it also populates Skill.extra_fields (round-trip data). Worth a sentence.
  3. src/cleveractors/agents/skill_unpacker.py:107-110 — the "cannot clobber a known field" comment holds only for validator-produced Skills; a directly constructed Skill(extra_fields={"name": ...}) would clobber rendered frontmatter because fields.update() runs last. Consider noting the precondition.

Summary

The #176 deliverable itself is done exactly right: the two scenarios cover the captured markup corruption from #175's evidence plus a second malformed shape (whitespace run) as the ticket demands, the @tdd_expected_fail inversion was independently re-verified in both directions on the PR head, and the full Behave suite (3342 scenarios) passes locally. The sole blocker is branch composition: the PR also carries the entire already-approved !177/#171 feature commit without mentioning it. Rebase the TDD commit onto origin/develop (or explicitly fold #171 into this PR's description and close !177), and optionally pick up the cheap docs/message-accuracy fixes already flagged on !177. Once the stray commit is removed, this is a clean Approve.

<details> <summary>See approval below</summary> ## PR Review: !178 (Ticket #176) ### Verdict: Request Changes The TDD-capture work — the actual deliverable of this ticket — is excellent and was fully verified locally: both new `@tdd_expected_fail` scenarios genuinely reproduce bug #175 (with the tag stripped they fail with plain `AssertionError`s surfacing the raw `[Errno 2] No such file or directory`), pass via the inversion policy with the tag present, use `assert` only, comply with the three-tag rules, and run against isolated per-scenario sandbox temp dirs (`FileAccessCore.write` never creates parent directories, so the ENOENT reproduction is deterministic). A full `nox -s unit_tests` run on the PR head is green — 159 features / 3342 scenarios / 0 failed, matching the PR report — and agent-side skill loading (`skills.py:239`) still validates strictly, so the ADR-2034 D-5 default is untouched. However, the PR cannot be merged as-is: it carries a second, unrelated commit — the entire !177/#171 `--relaxed` feature — that its title and description never mention. That is the one blocking finding below. No comments or reviews existed on this PR, and the author posted no responses elsewhere deciding items out-of-scope, so nothing was dropped from this review. Red-tape items (missing `ISSUES CLOSED` footer on the test commit, unchecked subtask checkboxes on #176, develop-vs-master base) are excluded per reviewer instruction. ### Critical Issues None ### Major Issues 1. **PR content does not match its title/description: it contains the complete !177/#171 feature commit.** - Commit `318b0a8b` (`feat(skills): add --relaxed flag to ease skill packaging checks`, footer `ISSUES CLOSED: #171`) is the parent of the TDD commit and accounts for 11 of the 13 changed files (~416 of 448 added lines: `skill_packer.py`, `skill_schema.py`, `skill_unpacker.py`, both CLIs, both skill feature/step files, docs, CHANGELOG), yet the PR title/body describe only the #176 test capture and never mention #171. - The identical commit is the head commit of open PR !177 (`feature/m1-skill-packer-relaxed-mode` → `develop`), which is the branch #171's Metadata prescribes; this PR's branch is #176's metadata branch `tdd/m1-file-write-path-validation`. - Consequences: approving/merging !178 silently merges the #171 feature under a PR that never describes it; if !177 is later rebased/amended, the stale duplicate commit here can conflict with or revert those changes; and one branch carrying two issues' work across two open PRs violates the atomic-commit / branch-per-issue rules. - Recommendation: rebase `tdd/m1-file-write-path-validation` onto `origin/develop`, dropping `318b0a8b` — verified the TDD commit `3080eee` is fully self-contained (only `features/tool_agent.feature` + `features/steps/tool_agent_steps.py`) — and leave #171 to the already-approved !177. Alternatively, if bundling is intentional, retitle/describe the PR to cover both issues, add `Closes #171`, and close !177. ### Minor Issues 1. **Inaccurate docs claim about strict unpack of unsupported top-level fields** — `docs/guides/skill-packages.md:350-352` and `src/cleveractors/agents/skill_unpacker.py:252-258`. The guide says unsupported top-level fields are written back "instead of raising a validation error" and that "without `--relaxed` an over-long description or an unsupported field still fails exactly as before". The second half is false for the unsupported field: `SkillValidator.validate` has no unknown-key rejection, so strict unpack silently drops the field (verified in code; it never failed, before or after). Reword and scope the "still fails" sentence to the description-length case. (Same finding was raised on the identical commit in !177; not yet addressed.) 2. **Strict-mode error text reworded, contra #171's "byte-for-byte unchanged without --relaxed"** — `src/cleveractors/agents/skill_schema.py:307-324`. `_validate_length` now emits `must be at least 1 characters (max: 1024), got N` instead of `must be 1-1024 characters, got N` for every strict failure, including `compatibility` (max 500). Only the `max_len=None` case needs new wording; keep the old format when `max_len is not None` (which also fixes the "1 characters" grammar). No test asserts the old text (verified by grep), so nothing breaks either way. 3. **Acceptance-criteria coverage gaps for the bundled feature** — `features/skill_directory_packages.feature` / `features/skill_directory_unpacking.feature`: no `--relaxed` × `--check` or `--relaxed` × `--output` scenarios (both explicitly listed in #171's AC), and "every other rejection still fires under `--relaxed`" is spot-checked for only 3 of the enumerated checks — name pattern/length, compatibility length, `safe_mode` type, resource-path validation, and name-matches-directory are not re-asserted under the flag. Risk is nil given the flag-orthogonal implementation, but the scenarios are one-liners and would close the AC exactly. ### Nits 1. `features/skill_directory_packages.feature:181` — "--relaxed does not relax the minimum description length" actually exercises the non-empty-string check (`_require_string` rejects `""` before `_validate_length` runs). Behavior is correct and the AC is satisfied, but the scenario name overstates what is exercised. 2. `src/cleveractors/agents/skill_schema.py:207-209` — the `relaxed` docstring on `SkillValidator.validate` mentions only the description max-length; under relaxed it also populates `Skill.extra_fields` (round-trip data). Worth a sentence. 3. `src/cleveractors/agents/skill_unpacker.py:107-110` — the "cannot clobber a known field" comment holds only for validator-produced Skills; a directly constructed `Skill(extra_fields={"name": ...})` would clobber rendered frontmatter because `fields.update()` runs last. Consider noting the precondition. ### Summary The #176 deliverable itself is done exactly right: the two scenarios cover the captured markup corruption from #175's evidence plus a second malformed shape (whitespace run) as the ticket demands, the `@tdd_expected_fail` inversion was independently re-verified in both directions on the PR head, and the full Behave suite (3342 scenarios) passes locally. The sole blocker is branch composition: the PR also carries the entire already-approved !177/#171 feature commit without mentioning it. Rebase the TDD commit onto `origin/develop` (or explicitly fold #171 into this PR's description and close !177), and optionally pick up the cheap docs/message-accuracy fixes already flagged on !177. Once the stray commit is removed, this is a clean Approve. </details>
hurui200320 left a comment

PR Review: !178 (Ticket #176) — focused on commit 3080eee (updated review)

Verdict: Approve

Supersedes my earlier review (#9873). Per the author's clarification, this PR depends on !177: the feat(skills) commit 318b0a8b at the base of this branch is !177's head — the branch was cut from it, which is why the feature code appears in this PR's raw diff. Under that assumption, the commit under review for ticket #176 is 3080eee only (features/tool_agent.feature + features/steps/tool_agent_steps.py). The findings my earlier review raised against the --relaxed commit (strict-unpack docs wording, _validate_length message text, #171 AC coverage gaps) belong to !177, are already recorded there, and are intentionally not re-reported here.

Merge-order note (non-blocking): merge !177 first; once it lands, this PR's diff reduces to the TDD commit alone. If !178 merged first, develop would receive the #171 feature through a PR body that never describes it, and #171 would remain open with its implementation already merged.

Critical Issues

None

Major Issues

None

Minor Issues

None

Nits (informational, for the upcoming #175 fix branch)

  1. The rejection check is intentionally a negative heuristic — the step asserts the raised ExecutionError message contains neither "Errno" nor "No such file" — exactly as #176's subtasks prescribe. Heads-up for the fix: the eventual validation error message must not embed the underlying OS error text (e.g. don't quote [Errno 2] … inside the new message), or these scenarios will keep failing after @tdd_expected_fail is removed.
  2. The second scenario (weird spaced/nested_dir/leaf.md) encodes the requirement that the fix reject whitespace-run/concatenated paths, not just markup characters. Per #175's expected behavior the fix must cover both shapes; if it only blacklists markup characters, this scenario will fail post-tag-removal — correctly forcing the broader check.

Summary

The TDD capture fulfills every #176 acceptance criterion, and I re-verified it independently on the PR head rather than trusting the report:

  • Bug genuinely reproduced: with @tdd_expected_fail temporarily stripped, both scenarios fail with plain AssertionError ("Bug #175 reproduced: … raw OS error"), the captured stderr showing File write failed … [Errno 2] No such file or directory reaching the filesystem. With the tag restored, both pass via the TddExpectedFailPolicy inversion. (Temporary edit for verification only; working tree restored afterwards.)
  • Spec/tags: @tdd_issue @tdd_issue_175 @tdd_expected_fail present and combination-valid; assertions use assert only; no mocks added; malformed paths point at nonexistent parents inside per-scenario sandbox temp dirs, and FileAccessCore.write never creates parent directories, so the ENOENT reproduction is deterministic — no real filesystem is touched.
  • Coverage: two shapes covered (the exact markup fragment from #175's evidence log, plus a whitespace-run path), extending the existing feature/step pair per the step-file rules. Full nox -s unit_tests on this commit: 159 features / 3342 scenarios / 0 failed — matching the PR report; coverage unaffected (author reports 97.3%).
  • Stale-tag safety: TddExpectedFailPolicy.on_scenario fails the scenario if the bug is fixed without removing the tag, so the capture cannot silently rot.

With the !177 dependency acknowledged, nothing blocks this PR. Recommended sequence: merge !177, then this PR (after which the diff is test-only), then the #175 fix removes the tag.

## PR Review: !178 (Ticket #176) — focused on commit 3080eee (updated review) ### Verdict: Approve Supersedes my earlier review (#9873). Per the author's clarification, this PR **depends on !177**: the `feat(skills)` commit `318b0a8b` at the base of this branch is !177's head — the branch was cut from it, which is why the feature code appears in this PR's raw diff. Under that assumption, the commit under review for ticket #176 is **`3080eee` only** (`features/tool_agent.feature` + `features/steps/tool_agent_steps.py`). The findings my earlier review raised against the `--relaxed` commit (strict-unpack docs wording, `_validate_length` message text, #171 AC coverage gaps) belong to !177, are already recorded there, and are intentionally **not** re-reported here. **Merge-order note (non-blocking):** merge !177 first; once it lands, this PR's diff reduces to the TDD commit alone. If !178 merged first, develop would receive the #171 feature through a PR body that never describes it, and #171 would remain open with its implementation already merged. ### Critical Issues None ### Major Issues None ### Minor Issues None ### Nits (informational, for the upcoming #175 fix branch) 1. The rejection check is intentionally a negative heuristic — the step asserts the raised `ExecutionError` message contains neither `"Errno"` nor `"No such file"` — exactly as #176's subtasks prescribe. Heads-up for the fix: the eventual validation error message must not embed the underlying OS error text (e.g. don't quote `[Errno 2] …` inside the new message), or these scenarios will keep failing after `@tdd_expected_fail` is removed. 2. The second scenario (`weird spaced/nested_dir/leaf.md`) encodes the requirement that the fix reject whitespace-run/concatenated paths, not just markup characters. Per #175's expected behavior the fix must cover both shapes; if it only blacklists markup characters, this scenario will fail post-tag-removal — correctly forcing the broader check. ### Summary The TDD capture fulfills every #176 acceptance criterion, and I re-verified it independently on the PR head rather than trusting the report: - **Bug genuinely reproduced:** with `@tdd_expected_fail` temporarily stripped, both scenarios fail with plain `AssertionError` ("Bug #175 reproduced: … raw OS error"), the captured stderr showing `File write failed … [Errno 2] No such file or directory` reaching the filesystem. With the tag restored, both pass via the `TddExpectedFailPolicy` inversion. (Temporary edit for verification only; working tree restored afterwards.) - **Spec/tags:** `@tdd_issue @tdd_issue_175 @tdd_expected_fail` present and combination-valid; assertions use `assert` only; no mocks added; malformed paths point at nonexistent parents inside per-scenario sandbox temp dirs, and `FileAccessCore.write` never creates parent directories, so the ENOENT reproduction is deterministic — no real filesystem is touched. - **Coverage:** two shapes covered (the exact markup fragment from #175's evidence log, plus a whitespace-run path), extending the existing feature/step pair per the step-file rules. Full `nox -s unit_tests` on this commit: 159 features / 3342 scenarios / 0 failed — matching the PR report; coverage unaffected (author reports 97.3%). - **Stale-tag safety:** `TddExpectedFailPolicy.on_scenario` fails the scenario if the bug is fixed without removing the tag, so the capture cannot silently rot. With the !177 dependency acknowledged, nothing blocks this PR. Recommended sequence: merge !177, then this PR (after which the diff is test-only), then the #175 fix removes the tag.
CoreRasurae force-pushed tdd/m1-file-write-path-validation from 3080eeef5a
Some checks failed
CI / lint (pull_request) Successful in 1m21s
CI / typecheck (pull_request) Successful in 1m50s
CI / security (pull_request) Successful in 1m13s
CI / quality (pull_request) Successful in 1m34s
CI / build (pull_request) Successful in 1m52s
CI / integration_tests (pull_request) Successful in 3m45s
CI / benchmark (pull_request) Failing after 32m42s
CI / unit_tests (pull_request) Successful in 6m28s
CI / coverage (pull_request) Successful in 7m2s
CI / status-check (pull_request) Successful in 3s
to 547352e094
Some checks failed
CI / security (pull_request) Has started running
CI / unit_tests (pull_request) Has started running
CI / integration_tests (pull_request) Has started running
CI / quality (pull_request) Successful in 54s
CI / benchmark (pull_request) Has started running
CI / typecheck (pull_request) Successful in 1m28s
CI / lint (pull_request) Successful in 1m42s
CI / build (pull_request) Successful in 54s
CI / coverage (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
2026-11-20 11:00:48 +00:00
Compare
CoreRasurae force-pushed tdd/m1-file-write-path-validation from 547352e094
Some checks failed
CI / security (pull_request) Has started running
CI / unit_tests (pull_request) Has started running
CI / integration_tests (pull_request) Has started running
CI / quality (pull_request) Successful in 54s
CI / benchmark (pull_request) Has started running
CI / typecheck (pull_request) Successful in 1m28s
CI / lint (pull_request) Successful in 1m42s
CI / build (pull_request) Successful in 54s
CI / coverage (pull_request) Has been cancelled
CI / status-check (pull_request) Has been cancelled
to e4bd277e87
Some checks failed
CI / lint (pull_request) Successful in 48s
CI / build (pull_request) Successful in 1m17s
CI / quality (pull_request) Successful in 1m38s
CI / typecheck (pull_request) Successful in 1m47s
CI / security (pull_request) Successful in 2m38s
CI / integration_tests (pull_request) Successful in 2m40s
CI / unit_tests (pull_request) Successful in 6m38s
CI / coverage (pull_request) Successful in 5m31s
CI / status-check (pull_request) Successful in 1s
CI / typecheck (push) Successful in 2m24s
CI / lint (push) Successful in 2m29s
CI / quality (push) Successful in 1m59s
CI / security (push) Successful in 2m25s
CI / build (push) Successful in 47s
CI / integration_tests (push) Successful in 3m33s
CI / benchmark (pull_request) Failing after 32m22s
CI / unit_tests (push) Successful in 6m45s
CI / coverage (push) Successful in 6m41s
CI / status-check (push) Successful in 7s
CI / benchmark (push) Failing after 17m6s
2026-11-20 11:03:10 +00:00
Compare
CoreRasurae deleted branch tdd/m1-file-write-path-validation 2026-11-20 11:30:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveractors-core!178
No description provided.