Skip to content

release: v0.4.0-rc.1 (dev → main) - #38

Merged
akosidencio merged 132 commits into
mainfrom
dev
Nov 27, 2026
Merged

akosidencio merged 132 commits into
mainfrom
dev

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Brings main up to dev at a59be85 so v0.4.0-rc.1 can be tagged on main. The release workflow refuses a tag that is not on main.

What lands on main

Checks

After merge

Nothing is tagged or published by this PR. Once main CI is green, tag the merge commit:

git fetch origin && git switch main && git pull --ff-only
node scripts/release/release-plan.js plan --tag v0.4.0-rc.1
git tag -a v0.4.0-rc.1 -m "TailFlow v0.4.0-rc.1 (prerelease)"
git push origin v0.4.0-rc.1

latest stays at 0.3.3.

- ObservabilityEvent envelope (schema v1) with provenance, catalog of
  supported event types, strict validation, and LogRecord conversion.
- Capture modes (metadata/redacted/full), bounded heuristic redactor with
  per-source PEM block tracking, and collection-boundary policy.
- [storage] and [privacy] config sections with strict parsing.
- Ignore docs/internal/ (internal reports are never committed).
Single-writer batching thread behind a bounded queue, WAL, transactional
migrations, persistent AUTOINCREMENT cursors, FTS5, chunked retention
(age, payload age, size cap with incremental vacuum), durable gap rows
for every detected loss, unclean-run recovery, and completeness metadata
on every query. Includes persistence, ordering, retention, privacy and
fault-injection tests.
… guards

- Single ingestion point: daemon filter, redaction (live + durable),
  ring/SSE, then non-blocking hand-off to storage.
- Bus lag is counted, recorded as a durable gap, injected as a visible
  [tailflow] warn record, and reported as ingest_dropped on /health and
  legacy agent endpoints (additive fields only).
- SSE client lag emits a named 'gap' event (ignored by older clients).
- GET /api/v1/{events,events/{seq},storage/status,storage/retention,
  collectors/status,schema,privacy}; unknown params are 400s.
- Collector lifecycle persisted as system.collector.* events.
- Origin / Sec-Fetch-Site / URI-length / body-limit guards.
- 'tailflow-daemon storage path|status|check|purge' (purge needs --yes).
- SIGTERM handling and ordered shutdown that drains the writer.
- Source::kind() (default impl) so events carry their collector type.
- Route, security, SSE, and binary-level kill -9 / restart tests.
MCP and tailflow-logs output now states when ingest_dropped > 0, and a
wait timeout no longer claims the condition 'did not occur' after loss.
Shows storage state, size, retention, oldest retained event, event
count, loss/gap/error counters, capture mode, and collector health.
Listens for the SSE 'gap' event, counts missed records, and rehydrates.
…review

Benchmark findings:
- Queries scanned the whole table: SELECT min(seq), max(seq) defeats the
  single-aggregate rowid optimization (~300 ms per query at 3M rows).
- Retention never settled under ingestion (freelist-driven more_work) and
  used blocking TRUNCATE checkpoints; now thresholded vacuum, PASSIVE
  checkpoints, 2k-row chunks, per-phase timings, resumable size eviction.
- quick_check after an unclean exit blocked startup (~30 s at 1.2 GB);
  it now runs on a background read connection and reports via status.

Independent review findings:
- Invalid events, late submissions, and in-flight losses are counted and
  recorded; ids are bounded so long project paths still persist.
- A run whose final commit failed is never marked clean.
- Gaps at a retention boundary survive; session deletes write their gap
  atomically with the first chunk; unclean gaps span to the newest seq.
- Migrations re-check the version under the write lock.
- Liveness probe errs toward alive; heartbeats re-arm wrongly closed runs.
- Page byte budget, include_payload limit 100, direct serialization.
- New database files are 0600; collector counters capped; bounded purge.
- Redaction walks nested attributes and covers SECRET_KEY, *_PASS, and
  PGP private key blocks.
- bench_storage: redaction cost, batching effect, persistence latency at
  fixed rates, bulk load, query/FTS latency, retention under concurrent
  ingest, restart and recovery time, size-cap eviction.
- loadgen + sse_probe + scripts/bench/daemon_bench.py: compare daemon
  binaries on identical load (CPU, RSS, SSE latency, loss, shutdown).
New docs/storage.md (storage location, durability, completeness, retention,
capture modes and redaction, health, purge, unavailable storage, v1 API,
migration from memory-only). README, architecture, features,
getting-started, limitations, roadmap, agents, CHANGELOG [Unreleased], and
tailflow.example.toml updated. Agent collectors are described as future
work, not as implemented.
Profiling the 3M-event benchmark showed one retention COMMIT taking 24 s:
FTS5 'deletemerge' synchronously rewrote heavily tombstoned segments.
Disable deletemerge and run a bounded 'merge' step after deletions.
Worst size-eviction pass: 23.5 s -> 0.73 s. Bench gains a
size_existing mode with a per-phase breakdown.
M1: durable event engine and observability foundation
…creenshot

- Banner (1600x600 SVG): typography-first, charcoal with one cyan accent
  taken from the dashboard wordmark; system fonts, no external resources.
- Architecture (SVG): sources -> tailflow-daemon -> dashboard, HTTP/SSE,
  tailflow-mcp, tailflow-logs. Agent activity collectors are drawn as
  planned, not shipped.
- Dashboard screenshot captured from a local dev build with synthetic
  demo services; shows live redaction of a bearer token.
…gents

Restructure the README around what a first-time visitor needs: what
TailFlow is, why it exists, what works today, how to run it, and what is
next.

- Mark each feature as released (v0.3.3) or next release (on dev), so
  durable history, retention, and redaction are not presented as part of
  the npm release.
- State plainly that agent activity (sessions, tool calls, file edits,
  commands) is not collected yet; it appears only in the roadmap.
- Add a support matrix: Claude Code and shell agents supported, other MCP
  clients experimental.
- Add privacy and resource-use facts with config keys and defaults.
- Replace the crates.io badge (tailflow-core is not published) with
  release, npm, CI, platform, and license badges.
Fixes
- Linux: a tailed file kept one core at ~100 % (inotify access events
  from the collector's own re-reads fed back into it). Access events
  other than close-after-write are ignored.
- A non-UTF-8 byte ended capture for process/stdin sources and failed
  the file collector. Lines are now decoded lossily.
- Collector lines were unbounded. They are capped at 64 KiB and marked;
  the cut drops the token it lands in so no secret fragment escapes
  redaction.

Performance
- Ring stores Arc<SeqRecord> shared with the live bus and every SSE
  subscriber; bounded by bytes as well as count (--buffer-mb, 16 MiB).
- Allocation-free LogLevel::detect (M1 version kept as a test oracle).
- One payload copy for the storage twin; no per-event source clone;
  /api/records serialized from the ring; cheaper sources()/summarize().
- Storage commits every 500 ms (was 100 ms) or 512 events: about two
  thirds fewer SQLite writes at typical rates. History trails live
  ingestion by up to ~0.5 s; batch_max_delay_ms restores 100.
- Reader pool prefers one warm connection; idle readers release cache.
- File collector: adaptive fallback poll (250 ms to 2 s), immediate
  shutdown.
- Two Tokio workers by default (TOKIO_WORKER_THREADS overrides).
- Release profile: fat LTO, one codegen unit, stripped symbols.
- Removed atty (RUSTSEC-2021-0145, RUSTSEC-2024-0375) and the unused
  notify-debouncer-mini and tokio-stream (core).
Live SSE batches append instead of re-merging and re-sorting the whole
5,000-record buffer, rows re-render only when their record changes, and
JSON payloads parse once per row. Script time on the dashboard's main
thread drops about 60 %; the bundle grows 0.3 kB.
scripts/bench/resource_bench.py measures CPU, wakeups, private memory,
disk writes, SQLite write amplification, latency and loss per scenario
with interleaved binaries; compare.py flags regressions beyond the
observed spread; check_budgets.py (new CI job 'resources') fails only on
event loss, release binary size over budgets.json, or memory over
generous ceilings - never on timing. loadgen gains burst, large-payload
and linger modes; bench_pipeline times each ingestion stage.
M1.5: performance, memory and binary size
Four tests waited a fixed time and assumed the code under test would act
inside it; on a loaded host it did not:

- lock_contention_is_retried_without_loss held a lock 5.3 s against a 5 s
  busy timeout; a writer that started late committed without a retry.
- queue_overflow_is_counted_recorded_and_reported held a lock 1.5 s; a slow
  submit loop outlasted it and the loss landed in two gap rows.
- review_r2_loss_during_the_final_commit_is_never_marked_clean could see
  its lock expire before the final commit.
- file_collector_survives_invalid_utf8 and the rotation test slept 300 ms
  before writing; a collector that opened the file later started past it.

The lock tests now hold the lock on their own connection and release it
when health shows the state under test (Degraded after a failed attempt;
Stopped after the final commit). The file tests append numbered markers
until the newest is delivered. Assertions are unchanged or stronger.

The read-only-directory case of the schema test is skipped when directory
permissions are not enforced (root in a CI container).
…kio, rustix, anyhow

rusqlite 0.40.2 -> 0.41.1 moves the bundled SQLite from 3.53.2 to 3.54.1
(libsqlite3-sys 0.39.1), fixing CVE-2026-119375: uninitialized page-cache
memory returned when a database is opened with a -wal file of a
different page size. rusqlite 0.41 declares Rust 1.89, so the MSRV moves
from 1.88 to 1.89 (CI job, Cargo.toml and docs updated together).

rusqlite 0.41 requires &mut Connection to change the progress handler (a
soundness fix). Query execution now borrows its reader mutably; the
deadline guard holds that borrow, derefs to the connection for the query
and still removes the handler on drop, including on unwind.

Minimal patched versions, no other dependency changes:
- url 2.5.8 -> 2.5.9 (RUSTSEC-2026-0592; bollard never calls Url::origin)
- tokio 1.51.0 -> 1.51.6 (RUSTSEC-2026-0386)
- rustix 1.1.4 -> 1.1.6 (RUSTSEC-2026-0486)
- anyhow 1.0.102 -> 1.0.103 (RUSTSEC-2026-0190)

cargo audit: 0 vulnerabilities (was 2). Remaining warnings are lru, paste
(ratatui 0.29), instant (notify 7) and chrono: unmaintained or not
reachable, and fixable only with major upgrades of those crates.
…nup cycle

Retention deletes the oldest events; their FTS5 entries stay in the index
as tombstones until the segment holding them is merged. The bounded
('merge', 64) after each evicting pass only merges a level once it holds
four segments, so the oldest, largest segments - where eviction puts its
tombstones - were almost never rewritten. Under continuous eviction the
index swung between ~3x and ~13x its compacted size and, because the size
cap counts it, took that space from history.

A cleanup cycle that deleted events now ends with one ('merge', -64): the
same bounded amount of work, with every level eligible. Merging consumes
the oldest, mostly-tombstoned segments first, so one step per cycle keeps
up. Running it on every pass instead re-optimized the whole index
continuously (about 3x ingest time) and was rejected.

Streaming 5M events through a 32 MB cap (bench_storage fts_maint):
  FTS bytes per live event   407 median, 913 max -> 91 (compacted: 68)
  live events held           39k (23k-48k)      -> 67.5k (67k-68k)
  WAL bytes per event        1,849              -> 1,855
  retention pass p99 / max   867 / 1,397 ms     -> 364 / 444 ms
At this extreme (a cycle per 20k events at full ingest rate) wall time is
+21%, partly from keeping 72% more rows.

RetentionReport gains `fts_compacted` (additive in storage status).
New test: search results stay identical to a scan of live rows and the
index stays compact under continuous eviction; it fails on the old code.
… shutdown on Windows

On Windows the daemon stopped cleanly only on Ctrl+C in its own console:
terminate_signal() never fired there. A supervisor (which sends
Ctrl+Break to a process in its own group), closing the console window,
logoff or system shutdown ended the process without draining the storage
queue, and the next start recorded an unclean-shutdown gap.

Also documents a pre-existing Windows limitation: with no cheap process
liveness probe, a killed daemon is recognised only once its heartbeat is
more than 60 s old.
… experiment

resource_bench.py:
- soak:<minutes>[:max_size_mb] runs a 300 s cycle of idle, 10, 100,
  1,000/s, a 10k/s burst and 10/s, with two SSE clients that reconnect
  every cycle, a query every 2 s (every 15th a heavy history or
  common-term FTS read) and retention under a 32 MB cap. Every 10 s it
  records memory, CPU, live events, DB and WAL size, loss counters and
  queue depth; it also records each retention pass, each query's latency,
  and every 15 min the macOS malloc zone (live vs dirty vs fragmented)
  and FTS segment size. It ends with an exact loss check and
  PRAGMA quick_check.
- soak_report.py summarizes a soak by hour and fits memory slopes over
  the last half and quarter.
- An SSE probe that exits non-zero or prints unparseable output yields no
  data instead of a crash.

check_budgets.py: evaluation is now a pure function, any scenario
exception is a failure, --require-size-budget fails a platform without
recorded sizes, and --inject {crash, probe, probe_garbage, loss, missing,
size} injects a real fault: SIGKILL of the daemon, a dead or garbled
probe, storage loss from a 256-event queue and a held write lock, a
missing status endpoint, or a 1-byte size budget. gate_selftest.py
requires the gate to pass when clean and to fail, with the expected
message, for each fault and for 13 synthetic results.

bench_storage --only fts_maint streams events through a size cap with a
retention cycle after each batch and compares FTS maintenance variants:
bytes per live event, live rows, query latency, and WAL frames written
per step, counted exactly by pinning the WAL.
…e budget

New `platforms` job (windows-latest x86_64 MSVC, macos-latest arm64): the
full test suite, a release build, and scripts/smoke/platform_smoke.py. The
smoke script (standard library only) starts the release daemon, checks the
HTTP API, database creation, file and process collection, zero loss,
graceful stop (SIGTERM; Ctrl+Break on Windows), history surviving a restart
with no unclean gap, and hard-kill recovery (asserted on Unix, reported on
Windows). Its JSON report is uploaded.

The `resources` job runs gate_selftest.py after the gate, requires a size
budget for its platform, fails if the results file is missing, and has a
45-minute timeout. `quality` now also waits for `platforms`.
Records the FTS5 compaction fix, Windows graceful shutdown, the bundled SQLite security update with its MSRV bump, and the patched advisories.
… index

Replaces the once-per-cycle ('merge', -64) from fcb8c3e. A negative merge
regroups every segment onto one level and starts a whole-index merge;
FTS5's automerge then continues that merge inside ordinary insert
commits, so its cost grows with the index and lands on ingestion. On a
256 MB index, cleanup cycles were about 3x slower, and ('merge', -16) cost
the same as -64.

A cleanup cycle that deleted events now ends with one transaction that
sets 'deletemerge' to 10 %, runs ('merge', 64), and sets 'deletemerge'
back to 0. A level whose segments are mostly tombstones is merged even
when it holds a single segment. Automatic deletemerge during commits stays
off; M1 measured a 24 s COMMIT with it on. On the same 256 MB index, 60
cycles of 20k inserts plus 20k evictions:

  no maintenance   index 231-368 B per live row
  targeted merge   78-117 B; call p50 167 ms, max 2.7 s (host load ~200)
  negative merge   70 B, but 20 of 60 cycles done when the others finished

Review fixes in the same code:
- Full-text merges are best effort: a failure (e.g. BUSY from a CLI
  command) is logged and leaves fts_compacted false. It no longer fails
  an otherwise completed pass, drops its report or skips the checkpoint.
- A cleanup backlog that keeps setting more_work also compacts every
  20th pass, so compaction no longer waits for the backlog to clear.
- The trigger is a pure function over retention::Cycle, unit-tested for
  single-pass, multi-pass and long-backlog cycles. A second test checks
  that deletemerge is back at 0 and that search still sees exactly the
  live rows.

The CHANGELOG also restates Windows shutdown behavior: Ctrl+Break is
graceful, and console close is best effort within the ~5 s Windows
allows.
- unclean_previous_run_is_recovered_as_a_gap_of_unknown_size relied on the
  pid probe, which Windows does not have. On non-Unix the dead run now
  gets a 120 s-old heartbeat, so the test exercises Windows' real
  detection path (heartbeat staleness) instead of failing.
- The two process tests in bounded_ingestion.rs run POSIX shell (`;`,
  printf, /dev/zero), but Windows runs commands via cmd.exe. They are
  cfg(unix), like e2e_restart and the background-child restart test.
Ctrl+Break stops the daemon gracefully. Console close is best effort:
Windows ends the process about 5 s after delivering it, and an
interrupted drain is recorded at the next start like any unclean stop.
Logoff and shutdown events reach services only; they are still listened
for in case the daemon runs as one.
perf(observe): merge notifications per path before the queue (M4-F)
Follow-up to #25 from an independent security review (no critical or
high findings):

- Sign-in writes are flushed again (durable). A sign-in can evict a
  session, and on filesystems that may write metadata before data
  (ext4 data=writeback, some FUSE/network filesystems) an unflushed write
  after a sign-out could expose the freed blocks of an older store.
  Startup, idle-clock and shutdown writes stay unflushed.
- A revocation or sign-out whose write fails now removes the old store
  (which still holds the removed sessions) instead of leaving it to be
  restored within 15 minutes of a restart; failure to remove it too is
  logged as an error. Pre-existing since M4.
- The directory flush opens with O_DIRECTORY | O_NOFOLLOW, so a FIFO or
  symlink planted at the path fails at once instead of blocking under
  the persist lock.
- Temporary file names get a random part, so a file left by a crash
  cannot collide with a later run reusing the pid and counter.
- Doc comments: durability of Synced writes is claimed for Unix only.

New test: a_revocation_that_cannot_be_written_fails_closed.
fix(auth): durable sign-in, fail-closed revocation, safer flushes (M4-F)
With --only idle_observe:1 the trees were never built, so the daemon ran
with no observed roots and the run reported baseline wakeups as if it
were observing. Build the trees for any idle_observe:<n> or
idle_dashboard filter, and fail the run if the roots never reach
'observing'.
bench: idle_observe:<n> filters build the project trees (M4-F)
Lead with the product positioning and separate the published v0.3.3
from what is on dev for v0.4.0. Quick start: npm installs v0.3.3; the
source build of dev now builds the dashboard first. Add how evidence
works, platform support with what CI actually tests, limitations, an
upgrade note, and a current/validating/planned roadmap. Replace the
unsourced idle/per-event figures with measured ones and their host.

The architecture diagram gains the opt-in observation input; the
overview screenshot is re-captured from the synthetic e2e fixture.
Hooks still do not report shell edits, but [observe] now records them
as unattributed observations. Metadata mode keeps the program, a known
subcommand and a pattern-matched script name; failure text can quote
command output. Codex install rules and live-validation status. The
inspector window is 30 s, not 60 s; which dashboard views follow the
stream and which poll; the full endpoint list; current cost figures.
Auth endpoints and refusal status codes; the dev proxy forwards
/events, /api and /health; dependency advisories; exit code 4 and
'status' vs 'sources'; unknown /api/* parameter names are ignored.
Limitations open with the validation still pending for v0.4.0, and add
mmap, observer overflow and older-client notes. The architecture
overview shows the spool, observer, Git snapshots and agent stream and
drops the obsolete pre-history diagram. Roadmap is regrouped without
milestone labels; the changelog gains the observer, startup and
sign-in durability changes merged after M4.
scripts/docs/check_docs.py (stdlib only) checks relative links and
anchors, forbids links to docs/internal, matches documented API paths
to the daemon's routes and toml keys to the config structs, and with
--bin checks every documented command and flag against --help. It runs
in the build job. e2e/screens.mjs signs in so it works against the
authenticated daemon.
docs: v0.4.0 documentation accuracy audit
Drop the release-status note and every unreleased/upcoming/dev label:
no Status column, one npm quick start that includes agent hooks,
--observe and the dashboard sign-in, a plain build-from-source section,
and a roadmap of what is available today and what is planned. Known
limitations (live Codex, Windows agents) stay where they describe
behaviour.
docs(readme): present the README as the released v0.4.0
Two daemons starting together on a new data directory could fail to open
the shared database, and the loser ran memory-only. Reproduced with 8
concurrent openers: 18-25 failures per 400 rounds. This is the cause of the
intermittent macOS CI failures in concurrent_first_open_applies_the_migration_once
and events_committed_by_another_daemon_stream_live_and_resume_after_restart.

Two causes:

- The identity check read page_count, application_id, user_version and the
  table count in separate snapshots. An opener could see another process's
  unstamped page 1 and then its new tables, and refuse TailFlow's own
  database as ForeignDatabase. The four values are now read in one
  statement, so one snapshot: tables are only ever visible together with
  the application id stamp.
- PRAGMA journal_mode = WAL needs an exclusive lock to leave rollback mode
  and returns SQLITE_BUSY at once, without calling the busy handler, while
  another connection holds the file ("database is locked"). It is now
  retried on BUSY/LOCKED with a short backoff for up to BUSY_TIMEOUT.

The regression test now runs 60 rounds of 8 openers released together by a
barrier and checks the final schema version and journal mode. It fails
without the WAL retry. With the fix: 0 failures in 3 x 400 rounds.
The NewerSchema check ran on the identity snapshot only. If a newer build
migrated the same new file past this build's schema between that check and
migrate(), this build returned Ok and wrote into the newer database,
breaking the rule that newer databases are never modified.

migrate() and each migration's write transaction now refuse a user_version
above the newest migration this build knows, without writing. Found in the
v0.4.0 release-candidate review.
attach_session_store read run/sessions-<port>.json with a plain open: it
followed symlinks, blocked on a FIFO, and checked neither owner nor mode.
The private-directory rule existed only on the write side. With a shared
or pre-created TAILFLOW_DATA_DIR, another local user could create run/ and
plant a fresh store holding a secret they know. The daemon loaded it (the
rewrite then failed with only a warning) and accepted that session cookie.
The default data directory is in the user's home and was not exposed.

On Unix the store is now read only when its directory and the file belong
to this user with no group or other access, and the file is a regular file.
It is opened with O_NOFOLLOW | O_NONBLOCK. Anything else is ignored with a
warning: no sessions are restored and the user signs in again. Windows
keeps relying on the per-user ACLs of the data directory.

The two tests that write a store by hand now make it private, as the
daemon does (tempfile creates 0755 directories). A new test covers a
shared directory, a group/world-readable file, a symlink and a FIFO, with
a private store as the control. Found in the v0.4.0 release-candidate
review; pre-existing since M4-A.
build-binaries compiles from the committed Cargo.toml version, and the
publish job only rewrites package.json files from the tag. Tagging v0.4.0
on a tree still at 0.3.3 would therefore publish npm 0.4.0 packages whose
binaries report 0.3.3 (daemon /api version, runs.version, MCP serverInfo,
user agent, banners). v0.3.0-v0.3.3 avoided this with a manual bump commit,
but nothing enforced it.

- quality: fail first unless the tag equals both Cargo.toml's workspace
  version and npm/tailflow/package.json's version.
- Build, clippy and test with --locked, as ci.yml already does.
- Attach SHA256SUMS covering every tarball and .exe on the GitHub Release.

Checked locally: the guard passes for v0.3.3 and fails for v0.4.0 and an
empty tag on the current tree; actionlint is clean.
…st-open

fix(storage): concurrent first opens of a new database all succeed (v0.4.0 RC)
…tore

fix(auth): restore browser sessions only from a private session store
ci(release): refuse a tag that does not match the committed version
A live Codex 0.171 session on macOS (codex exec, hook trust granted per
run) exercised sessions, resume, subagents, apply_patch create/modify/
delete, token counts, spool replay and metadata-mode privacy. All matched
the adapter. It also showed that Codex sends a shell command's output as a
plain string with no exit code, so a failed Codex command is recorded as
outcome unknown, the same as a successful one.

The README, agent-capture, limitations and roadmap pages said Codex had
never run live. They now say what was verified (macOS only) and what is
still unconfirmed: the interactive /hooks trust review, and Linux and
Windows. The synthetic fixture README notes that the guessed Bash response
shape was confirmed.
docs: record the live Codex validation and Codex's missing exit codes
node scripts/bump-version.js 0.4.0: the Cargo workspace version, the
tailflow npm package with its platform pins, and the five platform
packages. cargo update -w refreshed only the five workspace entries in
Cargo.lock, so the --locked release build accepts it.

CHANGELOG: 0.4.0 is dated 2026-11-27, the 'not yet released' note is
removed, and the compare links now cover v0.3.3...v0.4.0 and
v0.4.0...HEAD.
- Remove the 'v0.4.0 (upcoming, on dev)' banners and '(v0.4.0, upcoming)'
  labels. Pages now say 'Since v0.4.0'; per-feature version notes stay.
- getting-started: drop the 'which version' note (npm now installs
  0.4.0); build from source clones main instead of dev.
- limitations: 'Validation still pending for v0.4.0' becomes 'Not yet
  validated', with the same open items (Windows agents, 24-hour Linux
  run, quiet-host benchmarks, Codex outside macOS).
- roadmap: 'Added in v0.4.0' and 'Still being validated'.
- docs index: main describes the latest release.
- agents.md: the /health example shows 0.4.0, and without a credential
  only ok, version and auth_required are returned.
The README's 'Resource use' row, the 'Resource cost' table in storage.md,
and the dashboard's CPU and main-thread figures all came from one loaded
development Mac, not a dedicated benchmark host. They are removed.

- storage.md keeps the on-disk size per event under a 'Disk use' heading.
- dashboard.md keeps the behaviour (about 60 rendered rows; a 250 ms
  commit check while a tab is open) without the measurements.
- limitations.md now says no CPU or memory figures are published until
  TailFlow is benchmarked on a dedicated host and on Linux and Windows.
The release workflow had no notion of a prerelease. A v0.4.0-rc.1 tag
would have run `npm publish` with no --tag. npm 11 refuses that for a
prerelease version; older npm tags it `latest`. The GitHub release
would also have been created as a regular latest release.

scripts/release/release-plan.js now derives the channel from the
version alone:
- 0.4.0 is stable: npm `latest`, GitHub release marked latest.
- -rc.N, -beta.N and -alpha.N are prereleases: npm `next`, GitHub
  prerelease, make_latest false.
- Any other version is refused.

A prerelease also needs docs/releases/v<version>.md, which becomes the
release body.

plan job (runs first):
- Keeps the PR #33 guard and widens it: the tag must match Cargo.toml,
  every Cargo.lock workspace entry, all six npm manifests and the five
  platform pins.

build job:
- Binaries on runnable targets must report the tag's version.

publish job:
- Re-checks the plan and refuses incomplete staged binaries.
- Passes an explicit --tag to every `npm publish`. Platform packages go
  first; the main package goes only once every platform package it pins
  is on the registry.
- Skips versions already published, so a failed run can be re-run.
- Afterwards waits out registry lag and checks that the dist-tag points
  at the version and, for a prerelease, that `latest` did not move.
- No longer rewrites versions; the tree must already carry them.

Pinned:
- Every action to a commit SHA.
- Rust 1.100.0 and Node 24.22.3.
- `npm install -g npm@latest` removed: that is now npm 12. Node 24.22.3
  bundles npm 11.19.1, which supports trusted publishing.
- cross to a revision and its aarch64 image to a digest.
- Runner labels to ubuntu-24.04 and windows-2025-vs2026.
- No build cache in the binary job.

Re-runs and gates:
- Artifacts are kept 7 days instead of 1, so failed jobs can be re-run.
- The registry wait is about 5 minutes.
- The tag must be on main (every earlier tag is).
- setup-node runs on every build runner.

Permissions:
- Top-level permissions are contents: read.
- Only publish-npm has id-token: write.
- The GitHub release moves to its own job, the only one with
  contents: write.

bump-version.js:
- Rejects malformed versions.
- Replaces a prerelease version in Cargo.toml; the old [\d.]+ pattern
  left 0.4.0-rc.1 in place when bumping to 0.4.0.
- Updates the Cargo.lock workspace entries.
- Verifies the result.

Testing:
- 26 node:test cases: stable, rc, beta, alpha, malformed and mismatched
  versions, publish order, dist-tags, retries, registry lag, the
  latest-moved check, the bump round trip, the plan CLI outputs, and workflow
  pinning.
- They run in CI's web job.
dev was bumped to 0.4.0 in #35, but the stable release gates (24-hour
Linux run, quiet-host benchmarks, real Windows agents) are still open.
The first public build is therefore a release candidate.

Version:
- node scripts/bump-version.js 0.4.0-rc.1 sets the Cargo workspace,
  all six npm manifests and the platform pins.
- cargo update -w refreshes the five Cargo.lock workspace entries.
- All four binaries report 0.4.0-rc.1.

CHANGELOG:
- The 0.4.0 entry becomes 0.4.0-rc.1, with a prerelease note.
- A release-pipeline entry covers the release workflow PR.
- Compare links now cover v0.3.3...v0.4.0-rc.1 and v0.4.0-rc.1...HEAD.

docs/releases/v0.4.0-rc.1.md is the GitHub release body. It covers:
- install, and rollback with the agent hooks removed first: a v0.3.3
  binary answers the hook with exit 2, which agents treat as "block";
- changes since v0.3.3 and the breaking authentication changes;
- what is validated and what is not;
- Codex command outcomes;
- known issues and how to report bugs.

README, getting-started and the docs index:
- Install with tailflow@next, because `npm install -g tailflow`
  still gives 0.3.3, which lacks agent capture.
- One short note links to the release notes.

limitations: the platform row states the glibc floors.

npm README: installs tailflow@next.

npm launcher: the missing-platform hint names the exact version.
Without it, npm would install the platform package's `latest` (0.3.3)
under a 0.4.0-rc.1 launcher.
…nels

ci(release): publish prereleases to npm next and as GitHub prereleases
@akosidencio
akosidencio merged commit 6adbacf into main Nov 27, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant