Repository navigation
feat(interpreter): real $SECONDS and /proc/sys/kernel/random/uuid - #2543
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 53a26b0 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 07:11 AM |
chaliy
force-pushed
the
claude/fidelity-proc-seconds
branch
from
October 7, 2026 06:02
afc2f17 to
9340c9b
Compare
$SECONDS counts whole seconds since the Bash instance was built and SECONDS=N restarts the count; subshells keep their own. The rootfs serves a fresh v4 UUID on every read of /proc/sys/kernel/random/uuid. Claude-Session: https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
chaliy
force-pushed
the
claude/fidelity-proc-seconds
branch
from
October 7, 2026 07:10
9340c9b to
53a26b0
Compare
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.
Requested by Михайло · project thread
What changed
$SECONDSnow counts whole seconds since theBashinstance was built. It used to always be 0.SECONDS=Nrestarts the count from N, and an assignment inside a subshell does not leak to the parent, as in bash./proc/sys/kernel/random/uuid, which returns a fresh v4 UUID on every read. It uses the OS CSPRNG, the same source asuuidgen, so scripts that read it as on Linux work.Why
These are small fidelity gaps from the roadmap. Scripts time phases with
$SECONDS(start=$SECONDS; ...; echo $((SECONDS-start))s). Containers and CI scripts read/proc/sys/kernel/random/uuidfor IDs.Before / After
Before:
0andcat: /proc/sys/kernel/random/uuid: No such file or directoryAfter:
1and a v4 UUID (e.g. 3f6c...-4...-[89ab]...). This is the same as GNU bash on Linux.The spec cases
var_seconds,var_seconds_assignandrootfs_proc_random_uuidcarry nobash_diff, so they run against real bash in CI.Risk
$SECONDSis now time-dependent, so a test that expected0could see1on a slow run. The old spec case only checked that it was set./proc/sys/kernel/random, like it already prunes/dev.Checklist
https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
Generated by Claude Code