You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flags(bash): files over 4 MB are dropped from --flags without disclosure #699
--flags drops a file larger than kMaxFlagFileBytes (4 MB) without saying so anywhere in the answer. readWhole returns ReadWholeFail::TooLarge, but the scan lambda discloses only Unreadable, then returns without harvesting the file. The root counts (gates=, env=, files=) look complete even though gates are missing. That breaks the "every truncation is disclosed / a count that cannot be a total is a floor" rule.
Repro (not yet run on a main build): a directory with big.sh = : "$RW_BIG_TOKEN" followed by more than 4 MB of comment padding, run with ripwire <dir> --flags. Expected: a distinct oversize disclosure (not counted in unreadable=), with the affected counts labelled as floors. Today the file's gate silently disappears.
The behavior predates #685 (#688 calls it pre-existing). It was raised by CodeRabbit on #685 (thread) and deferred when #685 landed through #688.
Fixed in #720 (open; it closes this issue when it merges). Reported by jflowers; thanks for the precise trace.
kMaxFlagFileBytes is now 64 MiB (it was 4 MB). It is a runaway guard. GitHub warns at 50 MB and refuses 100 MB.
A file too big to read is now disclosed on the --flags root, in the legend, in --json and in --help, never dropped silently. oversize=N counts it, and oversize_limit=B names the smallest ceiling that dropped one. The other root counts then read as floors, and files= does not include the file. The count covers both places a file can be dropped:
the crawl's own size ceiling (--max-file-size, default 4 MB; --skipped lists each file). This is the path your repro actually takes: on main the 5 MB big.sh never reached --flags at all (files="0").
the --flags read cap itself, for example a 64 MiB+1 .cmake file, or a file grown past the cap with --max-file-size raised.
JSON over the crawl's 256 KB JSON data ceiling is not counted. A .json file holds no #if, option() or env read.
Example (a 5 MB big.sh beside a small script): <flags gates="1" ... files="1" oversize="1" oversize_limit="4194304">.
oversize_limit= rather than limit=: limit= already means the paging cap on every root.
The crawl's 4 MB default is unchanged.
Gate: test/bashenvcheck.sh arm 15, using generated fixtures (no large file is committed). It is red on main e267e24 and green on the lane.
Activity
joyful-ii-V-I commentedon Nov 19, 2026
I think the 4 MB is small for a runaway safety check, what is a better limit, 32 MB? what is a large code file? also should be disclosed in unreadable
joyful-ii-V-I commentedon Nov 22, 2026
Fixed in #720 (open; it closes this issue when it merges). Reported by jflowers; thanks for the precise trace.
kMaxFlagFileBytesis now 64 MiB (it was 4 MB). It is a runaway guard. GitHub warns at 50 MB and refuses 100 MB.--flagsroot, in the legend, in--jsonand in--help, never dropped silently.oversize=Ncounts it, andoversize_limit=Bnames the smallest ceiling that dropped one. The other root counts then read as floors, andfiles=does not include the file. The count covers both places a file can be dropped:--max-file-size, default 4 MB;--skippedlists each file). This is the path your repro actually takes: on main the 5 MBbig.shnever reached--flagsat all (files="0").--flagsread cap itself, for example a 64 MiB+1.cmakefile, or a file grown past the cap with--max-file-sizeraised..jsonfile holds no#if,option()or env read.big.shbeside a small script):<flags gates="1" ... files="1" oversize="1" oversize_limit="4194304">.oversize_limit=rather thanlimit=:limit=already means the paging cap on every root.test/bashenvcheck.sharm 15, using generated fixtures (no large file is committed). It is red on main e267e24 and green on the lane.fix(flags): the 64 MiB read cap is --flags' own; every other readWhol…
fix(flags): Bash scope honesty — a child shell's local and declare -g…
fix(flags): the 64 MiB read cap is --flags' own; every other readWhol…