Repository navigation
Conversation
…the binary comparison runner
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.
Small test-side tidy-ups. The only non-test change is a rename and its comment in
internal/db.rows.Err()inTestEditReadsTagListOnce: the loop over the schema rows now checksrows.Err()afterwards, so a failed read is not taken as an empty schema.ThingsDate.AddDaysin tests: eachThingsDateFromTime(t.AddDate(0, 0, n))in a test is nowThingsDateFromTime(t).AddDays(n)(in add, edit, importcreate, when, membership, tasks and view_order tests). The dates are the same. The two uses incmd/things/when.goare production code and are not changed here.closedTodayUnlogged→closedUnloggedininternal/db/tasks.go: the rule covers every choice of the "Move completed items to Logbook" setting, including "manually" (logInterval4), where a row is held whatever day it closed. So "today" in the name was wrong. The doc comment now says the two-condition rule is the "daily" one.tools/compare/: the old-vs-new binary comparison runner used in the refactor: simplify code churned through 0.10.0 #442 review, now kept in the repo.run.shruns twothingsbinaries on fresh copies of a seeded test database (internal/db/dbtest/schema.sqlplusseed.sql).openandosascriptare replaced by shims that only log, so nothing reaches Things. It diffs stdout, stderr, the exit code, the shim log and the task statuses. The usage header at the top gives an example./code-review
OLD/NEWto absolute paths (underenv -ia bare name was not found, and both runs failed the same way and reported SAME); buildbase.sqliteunder a temporary name so a failed seed is not reused; exit 1 on DIFF; have the osascript shim stamp today's midnight rather than a fixed 2025 date, which counted as already logged. Also fixed a stale "AddDate" comment.#in NAME/OUT in the sed path rewrite, and quoting a uuid in the shim's SQL (local dev tool, unusual input). Closingrowsbefore thet.Fatalfcalls inside the loop (it only matters once the test has already failed). Movingwhen.go:75,86toAddDays(production code, outside this tests-only change).