aboutsummaryrefslogtreecommitdiff
path: root/internal/apply/apply.go
Commit message (Collapse)AuthorAgeFilesLines
* a symlink in the sorted directory no longer redirects a stepLukasz Kasprzak2 days1-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Placeholders were already stopped from sending a file out of the directory a rule named. A symlink is a name too, and the directory krino sorts is by the threat model's own premise a place the internet writes into: a link named after a rule's destination sent moves and copies anywhere, and under (on-conflict overwrite) trashed a file OUTSIDE the sorted directory - while the plan showed the in-tree text and the run reported success. A step whose destination passes through a symlink at or below the directory being sorted now fails. A destination the configuration names outside it - ~/docs on another disk - is the user's own arrangement and is followed as before; both cases have a test. End to end, the review's scenario (Out -> ~/secret, overwrite): before: 1 applied, the user's file replaced and trashed after: 0 applied 1 failed, the file untouched, nothing trashed Two bookkeeping bugs in MkdirAllTracked went with it: a dangling symlink read as a missing directory and was then recorded as one krino had created - undo would have unlinked a link krino never made - and a directory created by someone else between the check and the mkdir was recorded the same way.
* a file trashed to make room is logged the moment it is trashedLukasz Kasprzak2 days1-7/+29
| | | | | | | | | | | | | | | | | | | The displace was carried out first and logged only when the whole step finished - for a copy or a cross-device move, the entire data transfer later. A process killed in that window left the user's file in the Trash with nothing recording it: krino log said "nothing applied" and undo offered nothing. It is its own action with its own line (spec §9), so it is now written the moment trash.Put returns, through a hook ChainLogged calls before the step that needed the name begins. A displace that cannot be logged fails the step rather than compounding an unrecorded destructive act with a second one. Verified by killing krino -9 mid-copy with 600 MB in flight: before: krino log "nothing applied", 0 displace lines after: krino log "1 displaced", 1 displace line
* the module path is git.labunix.xyz/krinoLukasz Kasprzak2 days1-3/+3
| | | | | | | | | | | So that go install can find it. cgit serves no go-import meta tag, so nginx answers a ?go-get=1 request for /NAME with one pointing at https://git.labunix.xyz/NAME.git; the alternative was carrying a .git suffix through every import line forever. One sed over the imports, both go.mod files, and the dependency gate's whitelist. Nothing else depends on the path. go install works from the next tag, the first release whose go.mod carries it.
* comments that explain the code, not how it was writtenLukasz Kasprzak2 days1-7/+7
| | | | | | | | | | | | | | | | | | About 340 comments cited the development process: task and plan numbers, fix waves, rulings, reviewers, and the author in the third person with a date. None of that exists outside the work itself, so to a reader it pointed at nothing. Each one now states the engineering reason it was standing in front of; where a comment was provenance and nothing else, it is gone. References to docs/design.md and docs/gui-design.md by section stay: both ship with the repository. The design documents lose their amendment diaries - CHANGELOG.md is that record - and the GUI's says plainly that the window has gone further than the document. Only comments changed. Every .go file was parsed and its code printed with comments stripped, before and after: the two hashes are identical across all 175 files.
* plan 10: an interrupt stops between steps; nohup keeps ignoring hangupsLukasz Kasprzak5 days1-2/+10
|
* plan 9: undo checks trash identity, groups by directory, re-checks at ↵Lukasz Kasprzak5 days1-1/+1
| | | | execution, removes directories it recreates
* plan 9: apply logs each step as it completes and stops a chain that landed ↵Lukasz Kasprzak5 days1-19/+45
| | | | elsewhere
* plan 8: apply refuses a source swapped for a symlink or another fileLukasz Kasprzak5 days1-4/+16
|
* krino: release 0.0.1 — man pages, install, examples, cross and release, ↵v0.0.1Lukasz Kasprzak7 days1-1/+1
| | | | | | | | | README, changelog Also: undo removes the directories its run created; a hardlink is never a duplicate of its own other name; a flag written before "undo" is honoured; --version prints no leading v. Duplicate conditions with different scopes not sharing an original is documented as a known limitation.
* krino: acting — trash, journal, apply, lock, review, undoLukasz Kasprzak7 days1-0/+209