mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-07 10:36:05 -10:00
Lands the 0.10.3 program work that two Codex sessions left uncommitted on
canonical main (chats 01a176ff "Review latest MCP updates" / 01a176e0 "DSH
plugin compatibility"), on top of contributor PR #7086, which merged as itself (5c3d461d8a)
immediately before this commit. The pieces share compiler inputs
(the crate-split moves touch most of them), so they land as one verified
tree rather than as intermediate commits that would not build.
Contents:
- Crate split slices: `codewhale-net`, `codewhale-notify` and
`codewhale-sandbox` crates; runtime config, config persistence, oauth,
settings, catalog cache and Codex model roster moved from tui to runtime;
hooks, extension host config and instruction budget to config; callers
rewired, re-export facades removed (CW-6129).
- Follow-up repairs to #7086 instruction budgets (per-scope budgets,
canonical source labels, `instruction_assembly` session snapshot).
- MCP: official SDK 2.4 host backend by default with `server/discover`
and legacy fallback, metadata/output schema handling, OAuth issuer
binding, Engine/CU server modernization (CW-6713, CW-7543, CW-7544,
CW-7546).
- DSH plugin compatibility from the authorized exception lane `26ba80b06a`:
shared compatibility table, native command lifecycle, reviewed imports,
Native-only filesystem sandbox (CW-7054).
- Computer Use plugin-only cutover: vendored bundle removed, marketplace
install from the independent release (CW-6732).
- Image-heavy sessions: 256 KiB read budget, outbound image omission with
receipts, one smaller retry on HTTP 413 (CW-7550).
- Typed review operation (`core/engine/review.rs`, `runtime_api/review.rs`)
used by Platform structured reviews.
- Receipt-owned Unix uninstall (Refs #7091).
- Steering (CW-7552) and Linux Shift+Enter (CW-7551, Refs #7093) source
changes; runtime/manual proof still pending.
Fixes made during takeover verification:
- MCP: Rust now admits the legacy handshake whenever the SDK classifies the
discovery probe as legacy (any JSON-RPC error, or a result without the
modern supported version); before, servers answering the probe with a
result were refused after it.
- MCP: an admitted legacy handshake reports initialize's own failure (e.g.
401) instead of the probe's -32601.
- MCP: OAuth reactive refresh covers the side-effect-free probe.
- MCP: broker launch failures keep their diagnostic (missing command).
- Tool images must decode before delivery (truncated PNG was accepted).
- THIRD_PARTY_NOTICES lists MCP SDK 2.4.0 and DSH 0.2.1-rc.2 excerpts.
- Changelog entries for MCP, DSH, Computer Use and image validation.
- `#[cfg(test)]` on three test-only items; `cargo fmt --all`; tests updated
to post-cutover behavior (no built-in CU, `$schema` manifests, canonical
paths, lazy CU tools, SyncSession resets instruction assembly).
Verified on this exact tree (macOS, source sha 4353faf1 before changelog
edits; changelog/generated-doc edits only after):
- cargo check --workspace --all-targets --locked: exit 0, no warnings
- codewhale-config 806 passed; codewhale-runtime 850 passed;
codewhale-net 52 passed; codewhale-notify 31 passed; codewhale-cli 501
passed (nextest, 0 failed)
- codewhale-tui lib: 14515 passed, 0 failed, 21 skipped
- extension host npm test: 420 tests, 413 passed, 0 failed, 7 skipped
- web check-facts OK
Linux x86_64 (Boat VM, same source before the #7097 fold-in):
cargo check --workspace --all-targets --locked exit 0; codewhale-config
808, codewhale-runtime 849, codewhale-net 52, codewhale-notify 31,
codewhale-sandbox 100, codewhale-cli 501 passed, 0 failed. The tui lib
test binary was still compiling on the 16 GB VM at commit time.
#7097 (main) was three-way merged into approval_log.rs and clipboard.rs;
re-check after the fold-in: workspace check exit 0; tui approval_log,
clipboard, session_export, file_mention, pet_watch 213 passed.
Not run: hosted CI, clippy -D warnings, release packaging, live provider
or real MCP servers beyond local fixtures, Deepin run for #7093.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
91 lines
3.3 KiB
YAML
91 lines
3.3 KiB
YAML
name: Security audit
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
workflow_call: {}
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
self-audit:
|
|
name: cargo-audit
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Install cargo-audit
|
|
run: cargo install cargo-audit
|
|
- name: Run cargo audit
|
|
run: cargo audit
|
|
|
|
npm-audit:
|
|
name: npm-audit (${{ matrix.name }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Every committed package-lock.json, including build-only tooling.
|
|
include:
|
|
- { name: root, directory: . }
|
|
- { name: web, directory: web }
|
|
- { name: telemetry-ingest, directory: telemetry-ingest }
|
|
- { name: extension-host, directory: crates/tui/extension-host }
|
|
- { name: vscode, directory: extensions/vscode }
|
|
- { name: feishu-bridge, directory: integrations/feishu-bridge }
|
|
- { name: telegram-bridge, directory: integrations/telegram-bridge }
|
|
- { name: wecom-bridge, directory: integrations/wecom-bridge }
|
|
- { name: pet, directory: pet }
|
|
defaults:
|
|
run:
|
|
working-directory: ${{ matrix.directory }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/[email protected]
|
|
with:
|
|
node-version: '22'
|
|
# Audit the complete committed lock, including build dependencies, and
|
|
# keep the raw report. Runtime compatibility remains owned by surface CI.
|
|
- name: Audit locked dependencies
|
|
if: matrix.name != 'web' && matrix.name != 'vscode'
|
|
run: |
|
|
set +e
|
|
npm audit --json > "${{ runner.temp }}/npm-audit.json"
|
|
status=$?
|
|
set -e
|
|
node -e '
|
|
const r = require(process.argv[1]);
|
|
if (r.error || !r.metadata?.vulnerabilities) throw new Error("Incomplete dependency audit");
|
|
console.log(JSON.stringify(r.metadata.vulnerabilities));
|
|
' "${{ runner.temp }}/npm-audit.json"
|
|
exit "$status"
|
|
# The website also verifies its installed, reviewed build dependency
|
|
# mitigation (web/docs/DEPENDENCY_SECURITY.md); the raw report keeps every
|
|
# upstream finding.
|
|
- name: Install and verify website build dependency mitigation
|
|
if: matrix.name == 'web'
|
|
run: npm ci --no-audit
|
|
- name: Audit website with verified build dependency mitigation
|
|
if: matrix.name == 'web'
|
|
run: npm run audit:dependencies -- --report "${{ runner.temp }}/npm-audit.json"
|
|
# The VS Code extension's packager toolchain carries one unfixed high
|
|
# advisory that never runs for users (DEPENDENCY_SECURITY.md at the repo
|
|
# root). It is admitted by name; anything else fails the job.
|
|
- name: Audit extension with reviewed packager advisory acceptance
|
|
if: matrix.name == 'vscode'
|
|
run: npm run audit:dependencies -- --report "${{ runner.temp }}/npm-audit.json"
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
if: always()
|
|
with:
|
|
name: npm-audit-${{ matrix.name }}
|
|
path: ${{ runner.temp }}/npm-audit.json
|
|
if-no-files-found: error
|