November 6, 2026
3 pull requests merged across 2 repos
Offline-Protocol/offline-protocol-sdk
Moves every install pin from 0.31.0 to 0.32.0 ahead of the v0.32.0 tag: the README install table and its Swift and Android snippets, the Java and Python binding READMEs, the service image README, and the C# \LibraryVersion\ doc example (which still said 0.31.0 after #700).
Same scope as #642 for 0.31.0, plus the C# line. Run logs in docs/bridges/kotlin-devices.md and the rc example in docs/bridges/ruby.md name 0.31.0 as history and stay.
bahdotsh/wrkflw
Fixes the findings from the principal review of #163. That review asked for changes on three points: kept workspaces trusted a directory the job can write to, the log redactor had gaps, and the TUI's event-driven job state was wrong for batched matrix legs and skipped jobs. This PR fixes those and nearly all the other findings. Each commit covers one area and passes fmt and clippy on its own.
Checkout sync and workspaces
- Symlinks are never followed. A step that replaced a directory or
.gitin its kept workspace with a symlink made the next checkout prune the link's target on the host. A symlink at a file made the copy write through it. The sync now removes whatever non-directory sits where a directory belongs, and never trusts a symlink as an up-to-date copy. - Tracked files always reach the workspace, as in a clone, even where
.gitignoreor the user's global excludes match them. The tracked set comes fromgit ls-files. Untracked files inside an ignored directory stay out. Withoutgit, the old rules apply. - Hidden files the repository deleted are removed when git tracked them at the last sync. Untracked tool state such as
.pytest_cachestill stays. .git/configis mirrored withoutcore.hooksPath,core.fsmonitorandcore.worktree, which would run host programs or point outside the workspace.- Callers of one reusable workflow get their own workspaces. The key includes the calling job; other keys are unchanged, so existing workspaces stay valid.
WRKFLW_WORKSPACES_DIRis made absolute.cleanreports an unreadable root as an error. The "in use" message also nameswrkflw clean.
Secrets in logs and live output
- The log masker is scoped to runs. It starts empty when a run starts while no other run is going, and keeps values until then. In the TUI, an
::add-mask::mainno longer masks every later "main" in the session. - Docker, Podman and Kubernetes commands are masked before
{:?}formatting, and the environment is logged by name only. Debug escaping hid secrets containing"or\from the redactor. - Credential-like names match by word end (
APIKEY,DB_PASS), soAUTHOR=mainno longer counts. If the redactor can't be installed, the log says so. - The sandbox and secure-emulation scripts log at debug level, as emulation already does.
- Live output: stdout and stderr keep separate partial lines. Lines are sent under the buffer lock, so observers see them in order. An overflowing workflow command is held to its newline even after a redraw, so the end of an
::add-mask::value no longer streams. A value too long to collect registers no prefix. Blank lines are kept, and long redrawn lines are cut at a redraw. - A partial UTF-8 character after an invalid byte is kept for the next read.
Executor events
- Skipped jobs emit
job_startedandjob_finished(statusskipped). This covers skips byif:, a failedneedsjob, fail-fast, GitLab rules andgate: false. History merges these with the result as before. - Folded matrix legs are matched to results by position, so legs with duplicate names no longer swap results. A folded leg whose original was skipped says so.
TUI
- A matrix job stays running until every leg has ended, including between
max-parallelbatches. The UI compares against the matrix size from the workflow when a matrix isn't built from an expression. - The graph and header follow the running workflow, as the Jobs and Log views do. ↑↓ browse other workflows' graphs once the run ends.
- The Jobs cursor stays on its job when the result reorders the pane.
- Late output no longer makes a finished job look running.
- The Output pane says how many earlier lines it isn't showing.
- Failure tail lines are capped at 4096 bytes.
- Durations round instead of truncating, so 59m 59.9s reads
1h 00m. A finished run readstook 3.9s, matching its steps. - Help no longer overflows on terminals wider than 7,281 columns. Two dead helpers are removed.
CLI and docs
- The executor reads env switches exactly as clap does, without trimming. The agreement test now covers spaces, case and unknown values.
clean --format jsonincludesschema_versionandtype: "clean", reports a failure as{"type": "error"}, and handles non-UTF-8 paths.human_bytesno longer prints1024.0 KB.- README and AGENTS.md cover the new sync rules, run-scoped masking, the matrix fold's blind spot for scripts outside the workflow, and the new skipped-job events.
Behavior changes to note
OutputTap::newandOutputTap::sendtake aStream(stdout or stderr), andlive_output::senddoes too.- NDJSON gains
job_startedandjob_finishedlines for skipped jobs. clean --format jsongainsschema_versionandtype.WRKFLW_FRESH_WORKSPACE=" 0"and other values with spaces now count as on in the executor too, matching the CLI.WorkflowExecution::live_job_stateandunfinished_jobsinwrkflw-uitake the known matrix sizes.
Not changed
- Hard-linked
.git/objectsstill share inodes with the repository. README now says a step writing there directly changes the repository's files. cleanstill holds a workspace's lock while it deletes. Only the message a waiting run logs changed.- Pre-existing gaps that #163 didn't touch: secrets under 3 characters are not masked,
container.envandservices.*.envare not scanned for secrets, and full step output is buffered in memory without a cap. - Not addressed: modal backdrop contrast over lit buttons, path canonicalisation in
refresh_runs, the env-mutating CLI test, and Windows-only or Docker-only tests.
Testing
cargo test --workspace --all-features: 1,563 passed, 0 failed.cargo clippy --workspace --all-features --all-targets -- -D warningsis clean on every commit.cargo fmt --checkandcargo check --no-default-features --workspaceare clean.- New tests cover:
- symlinks planted at a directory, at
.gitand at a file - tracked-but-ignored files with a real git index, removal of tracked dotfiles, and the git config filter
- relative workspace roots, unreadable clean roots, and reusable-workflow keys
- run-scoped masking, Debug-escaped secrets, and word-end name matching
- live output: stream separation, blank lines, redraw cuts, held and truncated commands, and long lookalike lines
- skipped-job events and the skipped-original fold note
- batched matrix state, cursor re-anchoring, late tails, earlier-line counts and capped failure lines
- duration rounding at every unit boundary, including
u64::MAX cleanend to end through the binary, and reading pre-#163 history records
A design pass over the TUI turned up one security bug, one broken feature, and a set of polish issues. This PR fixes all of them, then uses the executor's existing event stream to make the run easier to follow.
Secrets no longer reach the logs
- The emulation runtime logged every environment variable value at info level. Docker and Podman log the environment at debug level. The TUI keeps every level, so secret values showed up in the Logs tab, and
--verboseprinted them to the console. wrkflw_loggingnow has a one-time redaction hook. The executor installs a process-wide masker and registers every secret,--variablevalue and::add-mask::value as a run resolves it.- The emulation runtime now logs variable names only. Its diagnostics moved to debug level.
- On-disk run history was unaffected, because it only stores masked step output.
Fixes
- Run selection.
r("Run selected") ignored the checkboxes. It now runs every checked workflow in list order, or the highlighted one when nothing is checked. Enter no longer ticks a checkbox as a side effect. - List movement. Lists stop at the ends instead of wrapping. Home and End jump to the first or last row on Workflows, DAG, Execution and Runs.
- Naming. The Workflows card "Trigger filter" is now "Diff filter", so it no longer clashes with the Trigger tab. Tab 6 is now "Setup", with the runtime picker above the secret providers.
- Copy. Removed the stale "Press 'Enter' to start" message and the
--verbosehint inside the TUI. - Glyph. ◼ replaces the double-width ⛔ that misaligned the Runs table. A test now checks that every status symbol is one cell wide.
- Execution header. It now reads "started 12:21:31 · took 3s", or "running 11s" while live.
- Modals. Tweaks and Help open as centered modals over a muted backdrop, built on a shared helper. Tweaks no longer straddles panel borders.
Character
- Story view in Logs.
RunOptionstakes extra observers, and the TUI subscribes to the maskedExecutionEventstream. By default the Logs tab shows each job and step with its time, exit code and the step's own failure output.oswitches to the raw log. Debug lines are hidden unless the TUI starts with--verbose. A two-workflow run went from 291 raw lines to 16. - Workflows preview. It shows the last recorded run: outcome, time, duration and the failing job.
- DAG graph. It shows stage and job durations. Cards on the critical path, the slowest chain of dependent jobs, get a thick border.
Incremental local reruns and live output
The second feature commit makes a local rerun cheaper than a hosted runner's cold start.
- Kept workspaces. Each job keeps its workspace under the cache directory, keyed by repository, workflow file and job. Checkout syncs source files in by git's own ignore rules, keeps mtimes of unchanged files, deletes what the repository deleted, and leaves ignored build output alone.
.gitis mirrored without hooks, and its objects are hard-linked where the filesystem allows.wrkflw cleanremoves every workspace no run holds.--fresh-workspacerestores hosted-runner behavior. - Matrix folding. A leg that differs from another only in what
runs-onreads, and lands in the same image, reports that leg's result instead of running. Itsjob_finishedevent and history record carryrepeated_from.--every-matrix-legruns every leg. - Live step output. Every runtime streams what a step prints as
StepOutputevents, masked line by line, with::add-mask::applied as it streams. History and NDJSON skip these events;step_finishedstill carries the full output. - Run tab. Execution, DAG and Logs fold into one Run tab with jobs, graph and log views, in a DOS-style Blueprint theme with contrast tests for both palettes.
Review fixes
A principal review of the first push found issues that the last five commits address:
::add-mask::lines and later occurrences of the value reached the TUI unmasked through the live stream.- The TUI could drop a run's final events, leaving its last job shown as running.
- The Docker log follow could hang a step until its job timeout when the stream outlived the container.
- Folded matrix legs looked like real 0 ms successes.
- Workspace sync matched anchored ignore rules wrongly in subdirectories, skipped tracked dotfiles, copied hooks and the full object store, and keyed workspaces by workflow name.
Second review round
A second principal review asked for changes. The last fifteen commits address every finding:
- Tests no longer write to the user's cache.
cargo testfilled~/Library/Caches/wrkflw/workspaceswith hundreds of workspaces, and tests could see each other's files..cargo/config.tomlnow setsWRKFLW_FRESH_WORKSPACE=1, and a test checks that it is set. WRKFLW_FRESH_WORKSPACE=1no longer breaks the CLI. clap rejected1for both env flags, so the value the README recommends stopped every subcommand from starting. Both flags now accept1/0/yes/no.- The log masker only takes credential-like variables.
BRANCH=mainused to mask every later "main" in the process's log. Step output still masks every variable. - Live output keeps multibyte characters whole across pipe reads and Docker frames.
- A carriage return redraws a line in live output, so a progress bar no longer floods the tail.
::add-mask::still takes effect in states that get drawn over. - Checkout sync handles read-only files. On Linux it failed on them, and it lost their mtimes. Where hard links fail, it no longer copies the git object store again on every run.
- The CLI job summary marks folded matrix legs as not run.
wrkflw cleanreports the space it freed, including asbytesin JSON.- UI: the story settles jobs that never finished once the run ends. A matrix stage's time waits for its last leg.
nswitches to the raw log it searches. The Output pane marks a finished job's tail. - Cleanup: one shown-workflow helper replaces ten hand-written lookups. History uses the Run tab's duration format. Live output, matrix folding and checkout sync move out of
engine.rsinto their own modules, as a pure code move. - Tests: the every-size render test now draws a populated story and live tails. The dark contrast test covers every color the light one does.
Each commit passes fmt, clippy and the full test suite on its own. The full suite has 1,520 passing tests and no failures.
Third review round
A third principal review asked for changes. The last thirteen commits address every finding:
- Live output is masked with every value the run masks. It used only the log masker, which skips
--variablevalues that don't look like credentials, so those showed in the TUI while a step ran. An::add-mask::line too long to hold now takes effect when it ends, instead of when the step ends. WRKFLW_FRESH_WORKSPACE=nono longer turns fresh workspaces on. The executor now reads switch variables exactly as clap does, and a test checks the two agree.- A folded matrix result is not reused by
--every-matrix-leg. That mode is part of the result key for matrix jobs; default keys are unchanged. - Live output only streams when an observer asks. The recorder doesn't, so CLI runs no longer mask and dispatch every line twice.
wrkflw cleancarries on past a workspace it can't remove, reports each failure, addsfailedto its JSON, and exits 1.WRKFLW_WORKSPACES_DIRmoves kept workspaces.- A just-freed workspace lock is retried for up to 200ms. A process forked by another thread can briefly inherit the lock; this made a workspace test flaky.
rust-version = "1.89"is declared, since workspaces useFile::try_lock.- UI: job state follows the event stream, so the graph and Jobs pane agree with the story mid-run. The Jobs cursor reaches running jobs and pins the Output pane to them. The critical path is the slowest job of each stage, which is what sets run time. The story no longer says no job started after a validation run. 59.95s reads as "1m 00s". Dead run-start code and a double clear are gone.
Each commit passes fmt, clippy, cargo check --no-default-features and the full test suite on its own.
Behavior changes to note
RunOptionsgained a publicobserversfield and now implementsDebugby hand.ExecutionObservergainedwants_step_output(), defaultfalse. Observers that wantStepOutputevents must returntrue.SecretMaskergainedsnapshot().wrkflw clean --format jsonaddsfailed, andcleanexits 1 when a workspace could not be removed.- The minimum supported Rust version is 1.89.
- Two tests that asserted the job picker wraps around now assert it stops at the ends.
- The blocked glyph also changes in CLI output from the runtime crates.
- Jobs keep their workspace between runs by default. A job that never runs
actions/checkoutnow finds its last run's files instead of an empty directory, and files a step writes persist until overwritten or cleaned. - Matrix legs that would only repeat another leg don't run by default.
job_finishedgains an optionalrepeated_from; other NDJSON lines are unchanged.- New
wrkflw cleansubcommand, and new--fresh-workspaceand--every-matrix-legflags. JobResultgained a publicrepeated_fromfield, so code that builds one with a struct literal must set it.wrkflw clean --format jsonaddsbytes.- The Docker runtime now builds its combined setup image with
build-essential.
Testing
cargo test --workspace --all-features: 1,493 passed, 0 failed. New tests cover redaction, the live add-mask path, a secret split across a forced line cut, the timeline race, step-indexed tails,repeated_fromin events and NDJSON, workspace keying and cleaning, git-checkout sync rules, anchored ignores in subdirectories, and hook-free, linked git mirrors.cargo clippy --workspace --all-features -- -D warningsandcargo fmt --checkare clean.cargo check --no-default-features --workspaceis clean.- Manual checks from the first push still apply: secret values never appear at
--verboseor--debug, and every changed screen was driven at 160x45 and 80x24.