Repository navigation
fix(cli): preserve configurations when confirmed saves fail - #221
Merged
n-papaioannou merged 1 commit intoOct 7, 2026
Merged
n-papaioannou merged 1 commit into
n-papaioannou merged 1 commit into
Conversation
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
rudycelekli
requested review from
Sebabaian,
dimneo,
n-papaioannou and
stefyi-4355
as code owners
October 7, 2026 21:08
n-papaioannou
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Save
ifixai.yamlatomically by reusing the existing_write_report_atomicfile writer. The setup wizard's confirmed save currently callsPath.write_texton the configuration itself, truncating an existing usable configuration before a write can fail.Resolve the requested path before calling the atomic helper, so valid symlink chains remain links and their ultimate target is updated. Return the same requested config path. The existing helper stages in the target directory, preserves an existing file's mode, honors the umask for new files, and cleans an unsuccessful temporary write.
Native reproduction
An owned subprocess applies
RLIMIT_FSIZE=128and ignoresSIGXFSZinside that subprocess only. The actual writer raisesOSError/EFBIGon a larger new configuration. On unchanged main, the prior 72-byte known-good configuration becomes a partial 128-byte file. After this fix, the same native failure leaves the prior bytes intact with no temporary file left behind. This does not fill a real disk or modify operator configuration.Verification
resourceis unavailable.ruff check ifixai(existing Ruff0.15.21),bandit -r ifixai -ll, and targeted advisory mypy: passed.ifixai validate:60 inspections valid; every one of11 example fixtures valid.The production writer caller is the setup wizard's save confirmation. Local checks reuse the existing Python3.11 dependencies and invoke the actual writer and filesystem; no live/paid model call or manual interactive wizard session is claimed. The exact pushed commit passed all required fork CI jobs on Python3.10/3.11/3.12 (run37686800389). Upstream PR checks are not reported yet; its merge state is BLOCKED.