Repository navigation
[docs] - Rebuild the CyClaw-Sandbox skill around a local audit that runs code and lint, leaving the suites to CI - #1650
Merged
Conversation
…uns code and lint, leaving the suites to CI Adds local_audit.py (Ladder L): one command that runs the stdlib checkers, ruff, every CLI and subsystem selftest, the in-process swarm, and a live gate.py probed against the CLAUDE.md route contract, all in scratch copies so the checkout's soul.md, logs/ and index/ are never written. It never runs pytest. SKILL.md and both slash commands now lead with it, mark which ladders GitHub Actions owns, and record the cloud-sandbox gotchas found while running every command (Hugging Face Xet download hang, no-index 503 masking the injection probe, the shared rate limit). smoke.sh gains SMOKE_SKIP_PYTEST=1; CI leaves it unset, so its behaviour there is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJXTdWRbDpkynPYbpL2pxd
|
PR is a complete fill of |
…explicit strings CodeQL flagged the implicit string concatenation inside the report's list literal. Both joins were intentional; naming them makes that explicit and drops the console summary's dependence on the list index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BJXTdWRbDpkynPYbpL2pxd
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Proposed changes
The CyClaw-Sandbox skill told an operator to clone fresh and run the full pytest suite locally. CLAUDE.md §5 has since moved that suite to GitHub Actions. This PR rebuilds the skill around what you can actually verify on your own machine: run the code, run the linters and checkers, and read CI for the rest.
New
local_audit.py(Ladder L). One stdlib command, run with the 3.12 venv. It runs:--strict) and ruff (theF,B,Sgate plus the advisory pass).cli test, the memory selftest,gate_runtime_check.py, every CLI's--helpand the shipped-offstatusreports.gate.pyprobed against the CLAUDE.md §2 route contract. That covers 401/403/404/413/422/429/503, the security headers, cross-site rejection,/index/buildrefusals, the console tests and the terminal emulation.The swarm and the gate run in scratch copies of the working tree, uncommitted edits included, so
soul.md,logs/andindex/are never written.sync.cli testwrites its rclone filter file into a scratchXDG_CONFIG_HOME, so~/.configis never touched either. It never runs pytest.SKILL.mdrewritten. It leads with Ladder L and states which ladders GitHub Actions owns (Cverify.sh, E platform smokes, the full suite and coverage). The opt-in steps (auth, memory, pre-action hook, Tier 2 Ollama, MCP, agentic sandbox) are listed as SKIP until done. Surfaces and numbers were re-derived by running every command against main @ 29f639a.New gotchas, found by running things here:
model.safetensors(HF_HUB_DISABLE_XET=1fixes it)./queryanswer 503 before the injection filter runs.smoke.shgainsSMOKE_SKIP_PYTEST=1. It skips section F locally. CI leaves the variable unset, so behaviour there is byte-for-byte the same path.Commands updated:
/CyClaw-Sandboxand/run./runclaimed a "draft PR"; this skill opens none.Invariant / Governance Impact: none of the six. No core file is touched.
check_invariants.pypasses 46/46.Agent instruction surface:
.claude/commands/*.md,SKILL.md,smoke.shandlocal_audit.pysteer later agent sessions. Everything in them was written from this repo's code and from runs in this session, with nothing copied from external content.Security-gate answers (local_audit.py):
127.0.0.1gate and mock), stdliburllib, with a timeout on every request.tempfiledirs it creates, plus--outif you pass one. Its only config edit raisesapi.rate_limit.max_requestsin the scratch copy for the functional launch, then restores the shipped value for the 429 launch.secrets.token_urlsafeper run and is never printed or logged.Types of changes
Scope:
.claude/agent tooling only (skill, its scripts, two slash commands).Benefits / why
config.yaml, the shipped rate limit, every subsystem pre-flight.Risks to monitor
smoke.shis CI-wired (verify-skills). The only change is a newifarm gated on an unset-by-default variable plus one movedecho.bash -nis clean, and I ran it with the variable set. CI runs it without the variable.pathlib/tempfile,terminate()/kill()for processes).XDG_CONFIG_HOMEis honoured bysync/config.pyon every OS.Checklist
docs/THREAT_MODEL.md,INVARIANTS.mdandSECURITY.md(and any relevant Phase docs)GROK_API_KEY=dummy pytest tests/ -q --tb=short, andbash .claude/skills/CyClaw-Sandbox/verify.shfor core RAG/agentic paths) and passes with no regressionsFurther comments
Checks run directly:
--mock-ollama, real index,HF_HUB_DISABLE_XET=1): 74 PASS, 0 FAIL, 1 SKIP in 70 s.sync.cli test, because rclone is not installed here.git status.SMOKE_SKIP_PYTEST=1: 10 passed, 4 skipped, 33 s.E,F,I,B,C4,UP,S) andmypy --strictare clean onlocal_audit.py.bash -n smoke.sh,doc_sync.py(0 drift) andcheck_invariants.py(46/46) all pass.verify.sh/smoke.sh/SKILL.md, such as the--no-proxy-headersrecipe test.SKILL.mdkeeps a compliantuvicorn gate:app --host … --no-proxy-headersrecipe.Not changed:
verify.sh,macos-smoke.sh,windows-smoke.ps1,run_full_verification.py, and the.codex/skills/Cyclaw-Sandbox/port.Rollback: revert this one commit.
Suggested merge order of open PRs
Trial merge verified (
git merge --no-commit --no-ff+ abort) against main @ 29f639a on 2026-10-13.#1650 · Safe ✅
Impact:
.claude/sandbox skill + two commands; independent, only open PR.Action: Merge anytime once CI is green.
ELI5
The CyClaw-Sandbox skill was a checklist written for a time when you ran every test on your own laptop. Now GitHub runs those tests for you on every PR, so the checklist was asking for 20 minutes of busywork, and it also wasn't clear which steps were yours.
This PR replaces the checklist with one script,
local_audit.py. It works on a photocopy of your project, never the original, and in about a minute it:It does not run the big test suite; GitHub does that. The guide now says which checks are yours to run and which belong to GitHub. It also lists the traps I hit while running everything here, like model downloads that hang forever in this cloud box unless you set
HF_HUB_DISABLE_XET=1.smoke.shgets a switch to skip its test-suite section when you run it by hand.What could still go wrong:
🤖 Generated with Claude Code
https://claude.ai/code/session_01BJXTdWRbDpkynPYbpL2pxd
Last updated: 2026-10-13 11:31 ET