Commit Graph
23 Commits
Author SHA1 Message Date
sneak 9b0186c481 Say script/bootstrap pins node and yarn only when absent (refs #7)
check / check (push) Waiting to run
The README Entrypoints line and the TODO.md Completed Steps entry said
script/bootstrap installs a pinned node and yarn. It installs them at the
pinned versions only when they are missing and uses a node or yarn already
installed whatever its version, as its header comment says.

Model: opus-5-5
2026-10-06 08:25:55 +00:00
clawbot 8125d4aebf Reformat the existing Markdown with prettier (closes #7)
check / check (push) Successful in 4m50s
The output of make fmt after the previous commit: README.md and TODO.md
are rewrapped at 80 columns, and the TODO.md Workflow list uses -
markers. No wording changes. REPO_POLICIES.md was already formatted.

Model: opus-5-5
2026-10-06 06:31:14 +00:00
clawbot 47e48a2529 Format Markdown with prettier in script/fmt and script/fmt-check (refs #7)
check / check (push) Failing after 4m19s
script/fmt now also runs prettier over every Markdown file, and
script/fmt-check checks them without writing. prettier is pinned in
package.json and yarn.lock. script/bootstrap keeps its Go and apt
handling and gains the canonical pinned node (nvm from a hash-checked
archive) and yarn (corepack) install, then installs the locked
packages. Both fmt scripts find yarn the canonical way, sourcing nvm
when yarn is not on PATH. The new files and the yarn lookup come from
sneak/prompts at cc440118c876. The vendored REPO_POLICIES.md already
passes prettier, so it is not ignored. The Markdown is reformatted in
the next commit.

Deviation: package.json drops the canonical "license": "MIT" line; this
repo is WTFPL.

Model: opus-5-5
2026-10-06 06:30:59 +00:00
clawbot 17b6b84322 Bring the repo up to the standard layout (closes #1)
check / check (push) Successful in 5m6s
Vendors .gitignore, .dockerignore, .editorconfig, REPO_POLICIES.md,
script/cibuild, script/docker, script/lint, script/test and the CI
workflow byte-identical from sneak/prompts commit cc440118c876; the
two ignore files then add this repo's own build output, root-anchored
so cmd/bsdaily/ stays in. The Dockerfile gains a lint phase on the
golangci-lint image already pinned and a test phase on the Debian Go
image with sqlite3 and zstd; the build stage copies a file from each,
so a plain docker build cannot skip them. Nothing installs
golangci-lint on the host. On apt, script/bootstrap refreshes the
package lists once before its first install.

.golangci.yml and the lint cleanup: #6

Model: opus-5-5
2026-10-06 08:25:03 +02:00
sneak e2dd090309 Refresh vendored REPO_POLICIES.md
check / check (push) Successful in 1m10s
2026-07-07 00:19:32 +02:00
sneak 8ee180e27c Adopt scripts-to-rule-them-all: script/ entrypoints, Makefile shims 2026-07-07 00:19:20 +02:00
sneak 84f8366c41 Add standard Workflow section to TODO.md
check / check (push) Successful in 1m23s
2026-07-06 21:06:40 +02:00
sneak 2645f60536 Add TODO.md
check / check (push) Successful in 1m20s
2026-07-06 20:35:45 +02:00
sneak a256b83734 Fix errcheck lint failures with proper error handling
check / check (push) Successful in 1m42s
Handle every error return flagged by golangci-lint's errcheck rather
than discarding it:

- run.go: add a cleanup() helper that logs a warning (and ignores
  ErrNotExist) when removing a temp file fails, so leaked scratch files
  are surfaced; use it for all best-effort removals.
- copy.go / extract.go: log a warning on deferred Close() failures for
  the source file, destination DB, and result-set rows.
- extract.go: on the rollback path, ignore the benign sql.ErrTxDone
  (already committed) and log any other rollback failure.
- verify.go: add killCat() which ignores os.ErrProcessDone (zstdcat
  already exited via SIGPIPE) and logs any unexpected kill failure.

make check is clean (0 lint issues, tests pass).
2026-06-28 10:25:47 +02:00
sneak 8845f0ade6 Add minimal compilation smoke test; tidy go.mod
check / check (push) Failing after 59s
Add a smoke test that references the package's exported surface so go
test fails if it stops compiling. Run go mod tidy to promote cobra to
a direct dependency.
2026-06-28 10:09:56 +02:00
sneak 7316054b07 Add README, LICENSE, Makefile, Dockerfile, and CI
Add a detailed README, WTFPL LICENSE, and build/CI tooling modeled on
the vaultik repo (Makefile, multi-stage digest-pinned Dockerfile,
.gitea/workflows/check.yml). Bump Go to 1.26.4 and pin golangci-lint
to v2.12.2. gofmt existing sources so the new fmt-check gate passes.
2026-06-28 10:08:44 +02:00
sneak 9c4f8a7cc9 latest 2026-06-28 09:42:31 +02:00
sneak 05b5c2b528 fix SQLite database locking issues
- Use tx.QueryRow instead of db.QueryRow within transaction for media table check
- Switch to WAL mode instead of OFF for better concurrency handling
- Add busy_timeout pragma to wait up to 5 seconds if database is locked
- Clear transaction variable after commit to prevent defer rollback issues
2026-02-12 13:40:58 -08:00
sneak 8e3a868b7a remove parallel processing to fix SQLite locking issues
- Remove parallel.go entirely
- Process days strictly sequentially to avoid SQLITE_BUSY errors
- Complete each day fully (extract, dump, compress, verify, write) before starting next
- Clean up temp files immediately after each day to save disk space
- SQLite cannot handle multiple concurrent ATTACH operations on same database
2026-02-12 13:26:55 -08:00
sneak 56c3fe7804 fix Linux build: use golang.org/x/sys/unix for Fadvise
Replace syscall.Fadvise with unix.Fadvise from golang.org/x/sys/unix
which is the correct portable way to access fadvise on Linux
2026-02-12 13:15:39 -08:00
sneak 156217043e change temp directory to NVMe storage
Move temporary working directory from /srv/tmp to /srv/storage/tmp
to leverage NVMe storage for better I/O performance during extraction
2026-02-12 13:10:04 -08:00
sneak f23db96922 optimize file copy performance for large database files
- Increase copy buffer from 4MB to 256MB for NVMe-speed transfers
- Add Linux-specific fadvise hints for sequential reads and prefetching
- Pre-allocate destination file to avoid fragmentation
- Add throughput monitoring to track copy performance
- Platform-specific build tags for Linux optimizations
2026-02-12 13:08:08 -08:00
sneak cf79e008b5 speed optimizations 2026-02-12 13:01:52 -08:00
sneak 2d46dc70a9 date range 2026-02-11 03:01:48 -08:00
sneak 3c890f0b83 speed up database pruning for throwaway copies
Disable crash-safety pragmas (synchronous=OFF, journal_mode=MEMORY),
use a 200MB page cache, disable foreign keys to avoid per-row CASCADE
overhead, bulk-delete junction tables explicitly, and wrap all deletes
in a single transaction.
2026-02-09 01:48:42 -08:00
sneak c31484f0cf support targeting specific date 2026-02-09 01:18:16 -08:00
sneak 136a090b6d change url 2026-02-09 00:48:03 -08:00
sneak e6e85b6e11 initial 2026-02-09 00:42:06 -08:00