Skip to content

Make web/Linux sandbox sessions productive: portable check gate + setup hook - #15

Merged
alexkroman merged 1 commit into
mainfrom
claude/web-code-efficiency-hlzrms
Jul 1, 2026
Merged

alexkroman merged 1 commit into
mainfrom
claude/web-code-efficiency-hlzrms

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Claude Code on the web runs in a Linux sandbox where the macOS toolchain is
absent, so until now nothing in the repo could be verified there — not even
docs, site, scripts, or workflow changes.

  • scripts/check.sh --portable: runs the platform-independent subset
    (actionlint / prettier / xmllint / markdownlint / shellcheck /
    release.test.sh, plus swift-format & swiftlint lint when present). Without
    the flag, a missing Swift toolchain now fails fast with a pointer to
    --portable instead of exploding at swift test. The closing line states
    the Swift side was skipped so a portable pass can't be mistaken for green.
  • .claude/hooks/session-start.sh: SessionStart hook (web-only via
    CLAUDE_CODE_REMOTE) that installs the portable linters — markdownlint and
    prettier from npm, shellcheck from PyPI (shellcheck-py; apt's 0.9.0 flags
    SC2015 findings CI's newer shellcheck accepts), actionlint via the Go
    module proxy (GitHub release downloads are blocked by the default web
    network policy, which is also why SwiftLint/swift-format aren't installed).
    Prints a preflight so sessions start knowing CI is the authority on green.
  • .claude/hooks/swift-format.sh: fall back to a bare swift-format on PATH
    when xcrun is absent, so a Linux swift-format build formats edits too.
  • AGENTS.md + check skill: document the portable gate and the remote
    verification loop (push, watch check.yml, fix as CI reports).
  • .claude/settings.json: register the SessionStart hook; allowlist the
    portable commands.

Verified in a web sandbox: hook installs all tools and is idempotent;
check.sh --portable passes end-to-end; fail-fast and unknown-arg paths exit
1/2 with clear messages. Swift-side behavior on macOS is unchanged.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01KW6iPYSwpVNqpcYpthwuig

@alexkroman
alexkroman enabled auto-merge July 1, 2026 22:39
@alexkroman
alexkroman added this pull request to the merge queue Jul 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 1, 2026
@alexkroman
alexkroman enabled auto-merge July 1, 2026 22:53
…up hook

Claude Code on the web runs in a Linux sandbox where the macOS toolchain is
absent, so until now nothing in the repo could be verified there — not even
docs, site, scripts, or workflow changes.

- scripts/check.sh --portable: runs the platform-independent subset
  (actionlint / prettier / xmllint / markdownlint / shellcheck /
  release.test.sh, plus swift-format & swiftlint lint when present). Without
  the flag, a missing Swift toolchain now fails fast with a pointer to
  --portable instead of exploding at `swift test`. The closing line states
  the Swift side was skipped so a portable pass can't be mistaken for green.
- .claude/hooks/session-start.sh: SessionStart hook (web-only via
  CLAUDE_CODE_REMOTE) that installs the portable linters — markdownlint and
  prettier from npm, shellcheck from PyPI (shellcheck-py; apt's 0.9.0 flags
  SC2015 findings CI's newer shellcheck accepts), actionlint via the Go
  module proxy (GitHub release downloads are blocked by the default web
  network policy, which is also why SwiftLint/swift-format aren't installed).
  Prints a preflight so sessions start knowing CI is the authority on green.
- .claude/hooks/swift-format.sh: fall back to a bare swift-format on PATH
  when xcrun is absent, so a Linux swift-format build formats edits too.
- AGENTS.md + check skill: document the portable gate and the remote
  verification loop (push, watch check.yml, fix as CI reports).
- .claude/settings.json: register the SessionStart hook; allowlist the
  portable commands.

Verified in a web sandbox: hook installs all tools and is idempotent;
check.sh --portable passes end-to-end; fail-fast and unknown-arg paths exit
1/2 with clear messages. Swift-side behavior on macOS is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KW6iPYSwpVNqpcYpthwuig
@alexkroman
alexkroman force-pushed the claude/web-code-efficiency-hlzrms branch from 1e06925 to 2f603ea Compare July 1, 2026 22:56
@alexkroman
alexkroman added this pull request to the merge queue Jul 1, 2026
Merged via the queue into main with commit 6e800c9 Jul 1, 2026
6 checks passed
@alexkroman
alexkroman deleted the claude/web-code-efficiency-hlzrms branch July 1, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants