-
Notifications
You must be signed in to change notification settings - Fork 0
Misc tidy of prior PRs #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,9 @@ rules: | |||||
| paths: | ||||||
| include: | ||||||
| - "/config/ls-lint.yaml" | ||||||
| pattern-regex: '\*\*' | ||||||
| # Matches a list item (the `ignore:` entries are the file's only sequence) carrying any glob metacharacter. | ||||||
| # Scoping to `- ` keeps the `ls:` rules above clear, whose `regex:` values legitimately contain `[`. | ||||||
| pattern-regex: '-\s+\S*[*?\[{]' | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- rule ---'
cat -n config/semgrep/ls-lint-no-glob.yaml
printf '%s\n' '--- related configuration files ---'
git ls-files | rg '(^|/)(ls-lint|\.ls-lint|semgrep|mise|CLAUDE)' | head -80
printf '%s\n' '--- ignore entries and glob-like syntax ---'
rg -n --glob '!config/semgrep/ls-lint-no-glob.yaml' '\b(ignore|globs?)\b|[*?\[]' . | head -160
printf '%s\n' '--- repository diff summary ---'
git diff --stat -- config/semgrep/ls-lint-no-glob.yaml
printf '%s\n' '--- configured mise tasks ---'
if [ -f mise.toml ]; then
rg -n -A4 -B2 'semgrep-check|check-all|^check' mise.toml
fiRepository: edge-toolkit/core Length of output: 20269 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
import re
pattern = re.compile(r'-\s+\S*[*?\[{]')
proposed = re.compile(r'(?m)^[ \t]*-[ \t]+[^\r\n]*[*?\[{]')
samples = [
'- build/*',
'- "build artifacts/*"',
' - "build artifacts/*"',
' - plain-entry',
'- "literal [text]"',
'- "literal ? text"',
]
for sample in samples:
print(f'{sample!r}: current={bool(pattern.search(sample))} proposed={bool(proposed.search(sample))}')
PY
printf '%s\n' '--- semgrep-check ---'
if command -v mise >/dev/null 2>&1; then
mise run semgrep-check
else
printf '%s\n' 'mise is not available'
fiRepository: edge-toolkit/core Length of output: 495 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- ls-lint configuration ---'
cat -n config/ls-lint.yaml
printf '%s\n' '--- semgrep regex rule conventions ---'
rg -n -A8 -B4 'pattern-regex:|languages: \[generic\]|paths:' config/semgrep
printf '%s\n' '--- semgrep task definitions ---'
rg -n -A8 -B3 'semgrep-check' .mise mise.toml .mise.toml 2>/dev/null || true
printf '%s\n' '--- current and parent revisions ---'
git status --short
git diff -- config/semgrep/ls-lint-no-glob.yaml
git show HEAD:config/semgrep/ls-lint-no-glob.yaml 2>/dev/null | cat -nRepository: edge-toolkit/core Length of output: 41022 🌐 Web query:
💡 Result: In ls-lint 1.x, the Citations:
Make the glob detector line-scoped.
Proposed fix- pattern-regex: '-\s+\S*[*?\[{]'
+ pattern-regex: '(?m)^[ \t]*-[ \t]+[^\r\n]*[*?\[{]'Run 📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||
| message: >- | ||||||
| ls-lint config entries must be literal paths -- `**` (and any other glob syntax) is banned. ls-lint | ||||||
| snapshots glob-based ignores once at startup and deletes every key that matches nothing at that moment | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,5 +13,13 @@ packages: | |
| - services/ws-modules/js-data1 | ||
| # esbuild ships its platform binary via a postinstall build script; allow it so the js-data1 bundle can build. | ||
| # Everything else stays blocked by pnpm's default supply-chain policy. | ||
| # | ||
| # A blocked script still has to be named here with `false`. pnpm aborts an install that silently ignored one | ||
| # (`[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: protobufjs@7.6.5`, telling you to run | ||
| # `pnpm approve-builds`), so an undeclared entry fails every cold tree while a warm one passes on recorded | ||
| # state -- which is how build-ws-js-data1-module broke on a fresh linux-arm64 clone but nowhere else. | ||
| # protobufjs (transitive, via the aws-sdk graph) only uses its postinstall to pick a native codec, and the | ||
| # bundle runs the pure-JS path, so blocking it is the outcome we want -- just declared rather than implied. | ||
| allowBuilds: | ||
| esbuild: true | ||
| protobufjs: false | ||
|
Comment on lines
+16
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 3 'packageManager|pnpm' .mise package.json services/ws-server/DockerfileRepository: edge-toolkit/core Length of output: 12790 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- pnpm configuration sources ---'
sed -n '145,170p' .mise/config.toml
sed -n '1,45p' .mise/config.js.toml
sed -n '1,35p' package.json
printf '%s\n' '--- workspace configuration ---'
cat -n pnpm-workspace.yaml
printf '%s\n' '--- relevant lock entries ---'
sed -n '1375,1410p' .mise/mise.lock
sed -n '58,70p' .mise/mise.js.lock
printf '%s\n' '--- all pnpm version declarations ---'
rg -n -C 2 'pnpm(@|:|[[:space:]]*=|[[:space:]]|version)' --glob '!pnpm-lock.yaml' --glob '!node_modules/**' .Repository: edge-toolkit/core Length of output: 11942 🌐 Web query:
💡 Result: The Citations:
Pin pnpm for every install path. The mise locks use v11.5.1 and v11.21.0, which support 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,8 @@ export default async function init() { | |
|
|
||
| setModuleImports("dotnet-math1", { | ||
| wsConnect: (url) => { | ||
| // Cleared per connect: the page caches this module, so a second run() must not see the first run's id. | ||
| agentId = ""; | ||
|
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Protect current connection state from old WebSocket handlers. A previous socket can still emit messages and close events after a new socket starts. Bind handlers to the current socket, close the previous socket before replacement, and ignore events from stale sockets.
📍 Affects 5 files
🤖 Prompt for AI Agents
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Reset all per-run input state before reconnecting or starting a new run. Resetting only Apply this consistently to:
Confirm the repeat-run contract and add regression coverage. 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| ws = new WebSocket(url); | ||
| wsState = "connecting"; | ||
| ws.onopen = () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: edge-toolkit/core
Length of output: 50373
🏁 Script executed:
Repository: edge-toolkit/core
Length of output: 47965
🏁 Script executed:
Repository: edge-toolkit/core
Length of output: 37839
Replace
where.exewith a mise-managed linker path. Supported Nano Server hosts do not providewhere.exe, so line 312 can leave Cargo without the MSVC linker override. Use the staged MSVC path or another mise-managed, pinned lookup instead of a host utility.🤖 Prompt for AI Agents
Source: Coding guidelines