Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
62ea21b
empty
AlexandreYang May 4, 2026
0d034d6
feat(awk): add sandboxed awk builtin
AlexandreYang May 4, 2026
cdf52f6
[iter 1] Fix printf width OOM, -F'\t' tab split, and index() empty ne…
AlexandreYang May 4, 2026
6cb3502
feat(tools): add review-fix-loop Go CLI with deterministic loop control
AlexandreYang May 4, 2026
294aa22
fmt: format skills.go
AlexandreYang May 4, 2026
db75833
feat(tools/review-fix-loop): reduce verbosity, add --verbose flag
AlexandreYang May 4, 2026
f5ec6f1
test(tools/review-fix-loop): add unit tests for pure functions
AlexandreYang May 4, 2026
f67e090
feat(tools/review-fix-loop): always show bash command lines for progr…
AlexandreYang May 4, 2026
b4f165a
feat(review-fix-loop): add colors, dot heartbeats, and temp log file
AlexandreYang May 4, 2026
a4171a0
fix(review-fix-loop): accumulate dots on one line across tool-call ro…
AlexandreYang May 4, 2026
0278817
feat(review-fix-loop): write verbose output to log file regardless of…
AlexandreYang May 4, 2026
c93fab9
feat(review-fix-loop): log model name at startup
AlexandreYang May 4, 2026
a047f81
[iter 1] Address review comments on awk builtin
AlexandreYang May 4, 2026
3e6dd4b
[iter 1] Fix CI compliance failure: add copyright headers to tools/re…
AlexandreYang May 4, 2026
77aa405
[iter 2] Address review comments: fix 15 awk correctness/security/sty…
AlexandreYang May 4, 2026
5fcdd82
[iter 2] Fix fuzz failure: filter invalid UTF-8 in FuzzAwkFieldSep + …
AlexandreYang May 4, 2026
ad978f5
[iter 3] Address review comments: fix 6 awk correctness issues
AlexandreYang May 4, 2026
8fc2c18
review-fix-loop: base clean streak on review findings, not resolved t…
AlexandreYang May 4, 2026
00f0e77
review-fix-loop: suppress intermediate narration on stdout, show only…
AlexandreYang May 4, 2026
3b2698c
[iter 1] Address review comments: compare() looksNumeric guard, apply…
AlexandreYang May 4, 2026
f1be0eb
[iter 1] Fix CI failures: argv var assignments, gh checks error propa…
AlexandreYang May 4, 2026
2353169
review-fix-loop: render per-skill summaries as formatted markdown via…
AlexandreYang May 4, 2026
bd7f033
review-fix-loop: increase glamour output indent to 4 spaces
AlexandreYang May 4, 2026
c2561ff
[iter 1] Address review comments: missing-file continues, blockedName…
AlexandreYang May 4, 2026
bf7e92c
[iter 1] Add missing awk ENVIRON security scenario test files
AlexandreYang May 4, 2026
6e4eecb
[iter 2] Address review comments: multi-key in ENVIRON, RS comment, S…
AlexandreYang May 4, 2026
6604c51
[iter 2] Fix CI workflows: add ready_for_review and workflow_dispatch…
AlexandreYang May 4, 2026
90eeee5
Revert "[iter 2] Fix CI workflows: add ready_for_review and workflow_…
AlexandreYang May 4, 2026
8fe0d9c
[iter 1] Address review comments: forInStmt storeScalar, loopVar bloc…
AlexandreYang May 4, 2026
aa84561
[iter 1] Fix CI failures: FuzzAwkProgramText invalid UTF-8 + print_ge…
AlexandreYang May 4, 2026
4bf9812
[iter 2] Address review comments: printf safe casts and next-in-end test
AlexandreYang May 4, 2026
dc1aeef
[iter 2] Fix CI bash comparison failures: add skip_assert_against_bas…
AlexandreYang May 4, 2026
740d409
[iter 3] Address review comments: length cap guards, StatFile comment…
AlexandreYang May 4, 2026
144bfbf
[iter 3] Fix flaky TestHardeningArrayEntryLimit: increase timeout 10s…
AlexandreYang May 4, 2026
6573a31
[iter 4] Address review comments: exit negative wrap, length ENVIRON …
AlexandreYang May 4, 2026
97583a1
[iter 4] Fix TestAwkPentestExitNegative: update expected code from 0 …
AlexandreYang May 4, 2026
bd3881d
[iter 5] Address review comments: fix double awk: prefix and document…
AlexandreYang May 4, 2026
b51bff0
[iter 5] Address review comments: awk bugs and review-fix-loop improv…
AlexandreYang May 4, 2026
119e208
[iter 5] Fix array-as-scalar: error when ident resolves to an array i…
AlexandreYang May 4, 2026
60eea06
[iter 5] Add workflow_dispatch trigger to CI, Compliance, and Fuzz wo…
AlexandreYang May 4, 2026
12c5781
[iter 5] Fix FuzzAwkVarAssignment: filter invalid UTF-8 in variable a…
AlexandreYang May 4, 2026
1007ebd
[iter 5] Fix FuzzAwkProgramText: filter C1 control chars; handle shel…
AlexandreYang May 4, 2026
6f49b73
[iter 6] Address review comments: docs, comments, scenario tests
AlexandreYang May 4, 2026
61ebed1
[iter 6] Fix split() scalar destination: reject scalar names as split…
AlexandreYang May 4, 2026
e8949a6
[iter 7] Fix printf Inf/NaN formatting and document StatFile/OpenFile…
AlexandreYang May 4, 2026
06e2df5
[iter 8] Fix printLine OOM: add total-size pre-check before strings.J…
AlexandreYang May 4, 2026
760b716
[iter 8] Fix TestCmdPentestTailDevZeroByteMode timeout: reduce MaxTot…
AlexandreYang May 4, 2026
f1d7b0e
[iter 8] Fix bash comparison failure: skip split_scalar_dest against …
AlexandreYang May 4, 2026
f02ae89
Simplify review-fix-loop: remove redundant scaffolding
AlexandreYang May 4, 2026
90b0ac9
Fix review-fix-loop: match bare chatgpt-codex-connector login from Gr…
AlexandreYang May 4, 2026
985a0ef
Merge remote-tracking branch 'origin/main' into alex/impl-awk
AlexandreYang May 4, 2026
a12bda2
[iter 1] Address review comments: fix compare(), TOCTOU wording, loop…
AlexandreYang May 4, 2026
0422bd8
review-fix-loop: use caller PWD as working directory
AlexandreYang May 4, 2026
fbe224d
fmt: gofmt loop.go
AlexandreYang May 4, 2026
6570ee6
undo skills
AlexandreYang May 4, 2026
264a8cf
[iter 2] Address review comments: scalar/array type errors, -- file a…
AlexandreYang May 4, 2026
61c8075
[iter 2] Fix CI failures: awk error YAML skip_assert_against_bash pla…
AlexandreYang May 4, 2026
fcfc887
[iter 3] Address review comments: %F inf/nan lowercase, doc comment f…
AlexandreYang May 4, 2026
ee22158
review-fix-loop: flush dots newline on agent error via defer
AlexandreYang May 4, 2026
8c83011
[iter 4] Address review comments: printf %u/%o/%x/%X 32-bit clamping …
AlexandreYang May 4, 2026
bfca6fe
[iter 4] Fix CI failures: add math.MaxUint32 to the symbol allowlist
AlexandreYang May 4, 2026
bc7dee0
[iter 5] Address review comments: indexKey cap, looksNumeric nan/inf,…
AlexandreYang May 4, 2026
f671af4
[iter 6] Address review comments: fix gawk/mawk attribution, add ARGV…
AlexandreYang May 4, 2026
d927a11
[iter 7] Fix incorrect array materialize-on-read documentation and te…
AlexandreYang May 4, 2026
263b6f5
[iter 8] Address review comments: printf literal-char cap, gsub ctx n…
AlexandreYang May 4, 2026
32ff886
[iter 9] Address review comments: fix misleading comment and improve …
AlexandreYang May 4, 2026
f773602
[iter 10] Address review comments: fix rebuildRecord pre-check, impro…
AlexandreYang May 5, 2026
89a4d36
[iter 11] Address review comments: fix SHELL_FEATURES.md and MaxLoopI…
AlexandreYang May 5, 2026
11f834a
[iter 12] Address review comments: enforce MaxFields in splitFields a…
AlexandreYang May 5, 2026
b5575a8
[iter 13] Address review self-comments: split scalar guard, array byt…
AlexandreYang May 5, 2026
14de466
[iter 14] Address review comments: fix arrayTotalBytes accounting for…
AlexandreYang May 5, 2026
411643f
fix(address-pr-comments): process all unresolved threads regardless o…
AlexandreYang May 5, 2026
ca31289
feat(review-fix-loop): gate streak on P0/P1 only for both self-review…
AlexandreYang May 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 5 additions & 20 deletions .claude/skills/address-pr-comments/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,7 @@ MY_LOGIN=$(gh api user --jq '.login')

### 2. Fetch review comments and summaries

#### 2a. Determine the latest review round

Find the timestamp of the most recent push to the PR branch — this marks the boundary of the current review round:

```bash
# Get the most recent push event (last commit pushed)
gh api repos/{owner}/{repo}/pulls/{pr-number}/commits \
--jq '.[-1].commit.committer.date'
```

Store this as `$LAST_PUSH_DATE`. Comments created **after** this timestamp are from the current (latest) review round. If no filtering by round is desired (e.g., first review), process all unresolved comments.

#### 2b. Fetch inline review comments
#### 2a. Fetch inline review comments

Retrieve inline review comments, keeping only those authored by `$MY_LOGIN` or `chatgpt-codex-connector[bot]`:

Expand All @@ -67,7 +55,7 @@ gh api repos/{owner}/{repo}/pulls/{pr-number}/comments \
2>&1 | head -500
```

#### 2c. Fetch review summaries
#### 2b. Fetch review summaries

Fetch top-level review summaries, keeping only those authored by `$MY_LOGIN` or `chatgpt-codex-connector[bot]`:

Expand All @@ -80,7 +68,7 @@ gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews \

**Pay special attention to review summaries** — they often list multiple action items in a single review body. Parse each action item from the summary as a separate work item.

#### 2d. Filter comments
#### 2c. Filter comments

**IMPORTANT: Only read and process comments from `$MY_LOGIN` (the authenticated user) and `chatgpt-codex-connector[bot]`. Never load, read, or act on comments from any other author.**

Expand Down Expand Up @@ -129,12 +117,9 @@ done

Only process **unresolved** threads whose first comment is from `$MY_LOGIN` or `chatgpt-codex-connector[bot]`. Silently skip all others.

#### 2e. Prioritize latest comments
#### 2d. Process all unresolved comments

When there are many unresolved comments, prioritize:
1. Comments from the **latest review round** (after `$LAST_PUSH_DATE`)
2. Comments from review summaries (they represent the reviewer's consolidated view)
3. Older unresolved comments that are still relevant
**Process every unresolved thread** — do not skip any based on age. Threads from earlier iterations accumulate and must be cleared in the same pass as new ones. When ordering work, process review summaries first (they represent the reviewer's consolidated view), then inline comments newest-first, but all must be addressed before moving on.

### 3. Understand each comment

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
Expand All @@ -18,6 +19,9 @@ jobs:
fail-fast: false
matrix:
include:
- pkg: ./builtins/tests/awk/
name: awk
corpus_path: builtins/tests/awk
- pkg: ./builtins/tests/head/
name: head
corpus_path: builtins/tests/head
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build fmt test test_all test_against_bash compliance
.PHONY: build fmt test test_all test_against_bash compliance review-fix-loop

build:
go build -o rshell ./cmd/rshell
Expand All @@ -17,3 +17,6 @@ test_against_bash:

compliance:
RSHELL_COMPLIANCE_TEST=1 go test -v ./tests/ -run TestCompliance -count=1

review-fix-loop:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Use CURDIR for the review-fix-loop repo path

When this target is invoked with make -C /workspace/rshell review-fix-loop from another directory, GNU make keeps $(PWD) as the caller's directory, so the tool is run from tools/review-fix-loop but receives --dir pointing outside the repo and then looks for the PR/skills in the wrong place. Use $(CURDIR) so the target consistently passes the repository root after make processes -C.

Useful? React with 👍 / 👎.

go -C tools/review-fix-loop run . --dir "$(PWD)" $(ARGS)
1 change: 1 addition & 0 deletions SHELL_FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The in-shell `help` command mirrors these feature categories: run `help` for a c

## Builtins
Comment thread
AlexandreYang marked this conversation as resolved.
Comment thread
AlexandreYang marked this conversation as resolved.

- ✅ `awk [-F sepstring] [-v var=value]... 'program' [FILE]...` — pattern scanning and processing language; supports BEGIN/END blocks, /regex/ patterns, fields (`$0`..`$NF`), special variables (`NR`, `NF`, `FS`, `OFS`, `ORS`, `RS`, `FILENAME`, `SUBSEP`, `CONVFMT`, `OFMT`, `RSTART`, `RLENGTH`), arithmetic, control flow (`if`/`while`/`for`/`for…in`/`do…while`/`break`/`continue`/`next`/`exit`/`delete`), associative arrays, and built-in functions (`length`, `substr`, `index`, `split`, `sub`, `gsub`, `match`, `sprintf`, `tolower`, `toupper`, `int`, `sqrt`, `exp`, `log`, `sin`, `cos`, `atan2`, `rand`, `srand`). Uses Go's RE2 regex engine (linear-time, no backtracking). Blocks: `system()`, `print > file` / `>> file`, `print | cmd`, `getline`, `ENVIRON`, user-defined `function ... { }`, `-f progfile` (program-from-file). Per-record cap 1 MiB; arrays capped at 1 M entries; per-record loops capped at 1 M iterations. **Iteration order**: `for (k in arr)` iterates keys in sorted (lexicographic) order for determinism; gawk/mawk use an unspecified order. **Division by zero**: treated as a fatal runtime error (exit 1); gawk/mawk produce `inf` instead. **`RS=""`**: falls back to `RS="\n"` (paragraph mode not implemented); blank lines become empty records rather than record separators. **Byte-indexing**: `substr`, `index`, `match`, `split` (empty FS), and `printf "%c"` operate on byte positions/values rather than Unicode code points (matching mawk; differs from gawk in a UTF-8 locale).
Comment thread
AlexandreYang marked this conversation as resolved.
- ✅ `break` — exit the innermost `for` loop
- ✅ `cat [-AbeEnstTuv] [FILE]...` — concatenate files to stdout; supports line numbering, blank squeezing, and non-printing character display
- ✅ `continue` — skip to the next iteration of the innermost `for` loop
Expand Down
78 changes: 78 additions & 0 deletions analysis/symbols_builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,64 @@ package analysis
// Every symbol listed here must also appear in builtinAllowedSymbols
// (which acts as the global ceiling).
var builtinPerCommandSymbols = map[string][]string{
"awk": {
"bufio.NewScanner", // 🟢 line-by-line input reading; no write or exec capability.
"bufio.SplitFunc", // 🟢 type for custom scanner split functions; pure type, no I/O.
"bufio.ErrTooLong", // 🟢 sentinel error for scanner buffer overflow; pure constant.
"context.Context", // 🟢 deadline/cancellation plumbing; pure interface, no side effects.
"errors.Is", // 🟢 error comparison; pure function, no I/O.
"errors.As", // 🟢 error type assertion via interface; pure function, no I/O.
"errors.New", // 🟢 creates a simple error value; pure function, no I/O.
"fmt.Errorf", // 🟢 error formatting; pure function, no I/O.
"fmt.Sprintf", // 🟢 string formatting; pure function, no I/O.
"io.NopCloser", // 🟢 wraps a Reader with a no-op Close; no side effects.
"io.ReadCloser", // 🟢 interface type; no side effects.
"io.Reader", // 🟢 interface type; no side effects.
"io.WriteString", // 🟠 writes a string to a writer; no filesystem access, delegates to Write.
"math.Atan2", // 🟢 pure arithmetic function; no I/O.
"math.MinInt32", // 🟢 integer constant; no side effects.
"math.Cos", // 🟢 pure arithmetic function; no I/O.
"math.Exp", // 🟢 pure arithmetic function; no I/O.
"math.Inf", // 🟢 returns positive or negative infinity; pure function, no I/O.
"math.IsInf", // 🟢 IEEE 754 infinity check; pure function, no I/O.
"math.IsNaN", // 🟢 IEEE 754 NaN check; pure function, no I/O.
"math.Log", // 🟢 pure arithmetic function; no I/O.
"math.NaN", // 🟢 returns IEEE 754 NaN value; pure function, no I/O.
"math.MaxInt64", // 🟢 integer constant; no side effects.
"math.MaxUint32", // 🟢 integer constant; no side effects.
"math.MinInt64", // 🟢 integer constant; no side effects.
"math.Mod", // 🟢 pure arithmetic function; no I/O.
"math.Pow", // 🟢 pure arithmetic function; no I/O.
"math.Sin", // 🟢 pure arithmetic function; no I/O.
"math.Sqrt", // 🟢 pure arithmetic function; no I/O.
"math.Trunc", // 🟢 pure arithmetic function; no I/O.
"os.O_RDONLY", // 🟢 read-only file flag constant; cannot open files by itself.
"regexp.Compile", // 🟢 compiles a regular expression; pure function, no I/O. Uses RE2 engine (linear-time, no backtracking).
"regexp.Regexp", // 🟢 compiled regular expression type; no I/O side effects. All matching methods are linear-time (RE2).
"strconv.ErrRange", // 🟢 sentinel error value for overflow; pure constant.
"strconv.FormatFloat", // 🟢 float-to-string conversion; pure function, no I/O.
"strconv.FormatInt", // 🟢 int-to-string conversion; pure function, no I/O.
"strconv.FormatUint", // 🟢 uint-to-string conversion; pure function, no I/O.
"strconv.Itoa", // 🟢 int-to-string conversion; pure function, no I/O.
"strconv.NumError", // 🟢 error type for numeric conversion failures; pure type.
"strconv.ParseFloat", // 🟢 string-to-float conversion; pure function, no I/O.
"strings.Builder", // 🟢 efficient string concatenation; pure in-memory buffer, no I/O.
"strings.Compare", // 🟢 lexicographic byte comparison; pure function, no I/O.
"strings.Fields", // 🟢 splits a string on whitespace; pure function, no I/O.
"strings.HasPrefix", // 🟢 pure function for prefix matching; no I/O.
"strings.Index", // 🟢 finds first occurrence of substring; pure function, no I/O.
"strings.IndexByte", // 🟢 finds byte in string; pure function, no I/O.
"slices.Sort", // 🟢 sorts a slice of ordered elements; pure function, no I/O.
"strings.Join", // 🟢 concatenates a slice of strings with a separator; pure function, no I/O.
"strings.Repeat", // 🟢 repeats a string n times; pure function, no I/O.
"strings.Split", // 🟢 splits a string by separator into a slice; pure function, no I/O.
"strings.ToLower", // 🟢 converts string to lowercase; pure function, no I/O.
"strings.ToUpper", // 🟢 converts string to uppercase; pure function, no I/O.
"strings.ContainsRune", // 🟢 checks if a rune is in a string; pure function, no I/O.
"strings.TrimLeft", // 🟢 removes leading characters; pure function, no I/O.
"strings.TrimSpace", // 🟢 removes leading/trailing whitespace; pure function, no I/O.
"time.Now", // 🟢 returns the current local time; used only for srand() seeding (no I/O).
},
"break": {
"context.Context", // 🟢 deadline/cancellation plumbing; pure interface, no side effects.
},
Expand Down Expand Up @@ -417,6 +475,7 @@ var builtinPerCommandSymbols = map[string][]string{
}

var builtinAllowedSymbols = []string{
"bufio.ErrTooLong", // 🟢 sentinel error for scanner buffer overflow; pure constant, no I/O.
"bufio.NewScanner", // 🟢 line-by-line input reading (e.g. head, cat); no write or exec capability.
"bufio.Scanner", // 🟢 scanner type for buffered input reading; no write or exec capability.
"bufio.SplitFunc", // 🟢 type for custom scanner split functions; pure type, no I/O.
Expand Down Expand Up @@ -460,16 +519,27 @@ var builtinAllowedSymbols = []string{
"io/fs.ModeSticky", // 🟢 file mode bit constant for sticky bit; pure constant.
"io/fs.ModeSymlink", // 🟢 file mode bit constant for symlinks; pure constant.
"io/fs.ReadDirFile", // 🟢 read-only directory handle interface; no write capability.
"math.Atan2", // 🟢 pure arithmetic function; no I/O.
"math.Ceil", // 🟢 pure arithmetic; no side effects.
"math.Cos", // 🟢 pure arithmetic function; no I/O.
"math.Exp", // 🟢 pure arithmetic function; no I/O.
"math.Floor", // 🟢 pure arithmetic; no side effects.
"math.Inf", // 🟢 returns positive or negative infinity; pure function, no I/O.
"math.IsInf", // 🟢 IEEE 754 infinity check; pure function, no I/O.
"math.IsNaN", // 🟢 IEEE 754 NaN check; pure function, no I/O.
"math.Log", // 🟢 pure arithmetic function; no I/O.
"math.MaxInt32", // 🟢 integer constant; no side effects.
"math.MaxInt64", // 🟢 integer constant; no side effects.
"math.MaxUint64", // 🟢 integer constant; no side effects.
"math.MaxUint32", // 🟢 integer constant; no side effects.
"math.MinInt32", // 🟢 integer constant; no side effects.
"math.MinInt64", // 🟢 integer constant; no side effects.
"math.Mod", // 🟢 pure arithmetic function; no I/O.
"math.NaN", // 🟢 returns IEEE 754 NaN value; pure function, no I/O.
"math.Pow", // 🟢 pure arithmetic function; no I/O.
"math.Sin", // 🟢 pure arithmetic function; no I/O.
"math.Sqrt", // 🟢 pure arithmetic function; no I/O.
"math.Trunc", // 🟢 pure arithmetic function; no I/O.
"net.DefaultResolver", // 🔴 default system DNS resolver; used for context-aware address lookup; network I/O is the explicit purpose of the ping builtin.
"net.FlagBroadcast", // 🟢 interface flag constant: broadcast capability; pure constant, no network connections.
"net.IPAddr", // 🟢 resolved IP address struct (IP + Zone); pure data type, no I/O.
Expand Down Expand Up @@ -500,10 +570,12 @@ var builtinAllowedSymbols = []string{
"regexp.Regexp", // 🟢 compiled regular expression type; no I/O side effects. All matching methods are linear-time (RE2).
"runtime.GOOS", // 🟢 current OS name constant; pure constant, no I/O.
"slices.Reverse", // 🟢 reverses a slice in-place; pure function, no I/O.
"slices.Sort", // 🟢 sorts a slice of ordered elements; pure function, no I/O.
"slices.SortFunc", // 🟢 sorts a slice with a comparison function; pure function, no I/O.
"slices.SortStableFunc", // 🟢 stable sort with a comparison function; pure function, no I/O.
"strconv.Atoi", // 🟢 string-to-int conversion; pure function, no I/O.
"strconv.ErrRange", // 🟢 sentinel error value for overflow; pure constant.
"strconv.FormatFloat", // 🟢 float-to-string conversion; pure function, no I/O.
"strconv.FormatInt", // 🟢 int-to-string conversion; pure function, no I/O.
"strconv.FormatUint", // 🟢 uint-to-string conversion; pure function, no I/O.
"strconv.IntSize", // 🟢 platform int size constant (32 or 64); pure constant, no I/O.
Expand All @@ -514,15 +586,20 @@ var builtinAllowedSymbols = []string{
"strconv.ParseInt", // 🟢 string-to-int conversion with base/bit-size; pure function, no I/O.
"strconv.ParseUint", // 🟢 string-to-unsigned-int conversion; pure function, no I/O.
"strings.Builder", // 🟢 efficient string concatenation; pure in-memory buffer, no I/O.
"strings.Compare", // 🟢 lexicographic byte comparison; pure function, no I/O.
"strings.Contains", // 🟢 substring search; pure function, no I/O.
"strings.ContainsRune", // 🟢 checks if a rune is in a string; pure function, no I/O.
"strings.Fields", // 🟢 splits a string on whitespace into a slice; pure function, no I/O.
"strings.HasPrefix", // 🟢 pure function for prefix matching; no I/O.
"strings.Index", // 🟢 finds first occurrence of substring; pure function, no I/O.
"strings.IndexByte", // 🟢 finds byte in string; pure function, no I/O.
"strings.Join", // 🟢 concatenates a slice of strings with a separator; pure function, no I/O.
"strings.Repeat", // 🟢 repeats a string n times; pure function, no I/O.
"strings.ReplaceAll", // 🟢 replaces all occurrences of a substring; pure function, no I/O.
"strings.Split", // 🟢 splits a string by separator into a slice; pure function, no I/O.
"strings.ToLower", // 🟢 converts string to lowercase; pure function, no I/O.
"strings.ToUpper", // 🟢 converts string to uppercase; pure function, no I/O.
"strings.TrimLeft", // 🟢 removes leading characters; pure function, no I/O.
"strings.TrimPrefix", // 🟢 removes a leading prefix from a string; pure function, no I/O.
"strings.TrimSpace", // 🟢 removes leading/trailing whitespace; pure function.
"syscall.ByHandleFileInformation", // 🟢 Windows file info struct for extracting nlink; read-only type, no I/O.
Expand All @@ -536,6 +613,7 @@ var builtinAllowedSymbols = []string{
"syscall.Handle", // 🟢 Windows file handle type; pure type alias, no I/O.
"syscall.Stat_t", // 🟢 file stat struct for extracting UID/GID/nlink; read-only type, no I/O.
"time.Duration", // 🟢 duration type; pure integer alias, no I/O.
"time.Now", // 🟢 returns current wall-clock time; used for PRNG seeding; no filesystem or network I/O.
"time.Hour", // 🟢 constant representing one hour; no side effects.
"time.Millisecond", // 🟢 constant representing one millisecond; no side effects.
"time.Minute", // 🟢 constant representing one minute; no side effects.
Expand Down
Loading
Loading