fix(cli): stamp the line that dates the restart - #1006
Merged
Conversation
#1002 stamped four sinks and missed the one that mattered most. The boot banner is a direct console.log in the `agent run` action, emitted before performRun is called, so it never passed through the injected `log:` the last PR fixed. It is the first line of every seat log and the truncation boundary. The fleet runs as `nohup … > log 2>&1`, so this line is written at boot and everything before it is gone — which makes it the only line that can date a restart from the log itself. Unstamped, establishing when nine seats came back on 2026-08-18 needed `ps -o lstart`, and that route works only while the processes are still alive; one more restart and it is gone too. Also stamps the bootstrap-success line and the SIGINT "stopping..." line, the other two direct console calls in this action. Between them the log now carries a dated open and a dated close, so a truncated file can be placed on a clock at both ends rather than neither. Left the interactive commands alone — register, connect, attach and detach print to a terminal a human is watching, where a timestamp on every line is noise, not evidence. Reported-by: sprint-review Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lilyshen0722
added a commit
that referenced
this pull request
Aug 19, 2026
npm 0.1.9 and main 0.1.9 are DIFFERENT CODE. Seven source commits have landed since the last bump, four of them real fixes: #995 a quota stall was classified as a runtime blip and probed every 5s #973 a directly-addressed seat can answer past the cascade cap #1002 a seat log recorded four failures and not one time #1006 stamp the line that dates the restart #961 pin an agent's model in the environment spec Anyone who installs the CLI today gets none of them. Our own seats have them only because their CLI is npm-linked into a worktree that was pulled by hand. Same defect as #979 one package over: a version that maps to two different artifacts defeats the only check available from outside the repo.
lilyshen0722
added a commit
that referenced
this pull request
Aug 19, 2026
… to nobody (#1017) * chore(release): @commonlyai/cli 0.1.10 npm 0.1.9 and main 0.1.9 are DIFFERENT CODE. Seven source commits have landed since the last bump, four of them real fixes: #995 a quota stall was classified as a runtime blip and probed every 5s #973 a directly-addressed seat can answer past the cascade cap #1002 a seat log recorded four failures and not one time #1006 stamp the line that dates the restart #961 pin an agent's model in the environment spec Anyone who installs the CLI today gets none of them. Our own seats have them only because their CLI is npm-linked into a worktree that was pulled by hand. Same defect as #979 one package over: a version that maps to two different artifacts defeats the only check available from outside the repo. * ci: fail when a published package's src moves without a version bump The published version is the only check available from OUTSIDE this repo. Ship source without bumping it and that check silently passes while the artifact and the repo disagree. Twice now: #979 @commonlyai/mcp — npm 0.3.0 and main 0.3.0 were different code; the PR-tool removal reached the repo and reached zero seats. Found months late, by unpacking the tarball. #1017 @commonlyai/cli — npm 0.1.9 and main 0.1.9 were different code, seven source commits deep, including #995 (a quota stall classified as a runtime blip and probed every 5s). Found the same day, by hand, only because someone thought to check content rather than version. Guards cli/src and commonly-mcp/src. Docs and tests are exempt — they do not require a release. Verified before landing: YAML parses, bash -n clean, and the comparison was dry-run against real history — 7 commits touched cli/src since its last bump, every one of which this would have failed.
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.
Found by @sprint-review. #1002 stamped four sinks and missed the one that cost the most.
Why this line and not the others
The boot banner is a direct
console.login theagent runaction, emitted beforeperformRunis called — so it never passed through the injectedlog:that #1002 fixed:It is the first line of every seat log and the truncation boundary. The fleet runs as
nohup … > log 2>&1, so this line is written at boot and everything before it is gone. That makes it the only line capable of dating a restart from the log itself.Unstamped, establishing when nine seats came back on 2026-08-18 required
ps -o lstart. That worked only because the processes were still alive — one more restart and the route is gone, and the log that replaced the evidence still cannot say when it started.Also stamped
The bootstrap-success line and the SIGINT
stopping...line — the other two directconsolecalls in this action. Between them the log now carries a dated open and a dated close, so a truncated file can be placed on a clock at both ends rather than neither.Deliberately not stamped
register,connect,attach,detach. Those print to a terminal a human is watching, where a timestamp on every line is noise rather than evidence. The distinction is redirected-and-outlives-its-process versus read-once-and-discarded.Full cli suite green;
registerAgentbuilds with the helper in scope (an out-of-scope reference throws at call time, which is how that bug class surfaces — see AX entry 28).Not verified: the rendered output, for the same reason as #1002 — these sinks live inside
.action(), which no test invokes. The honest check is a seat restart, which belongs to whoever fast-forwardslive/main-tracking. That check is now cheaper: the first line of the new log will either carry a stamp or it won't.🤖 Generated with Claude Code