Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1202 commits
Select commit Hold shift + click to select a range
a0d3cb5
feat: reload runtime security engine
ebursztein May 22, 2026
99fcd4c
feat: propagate runtime security rules
ebursztein May 22, 2026
f2af523
feat: drain runtime rule matches
ebursztein May 22, 2026
75ba67b
feat: enforce http response bodies
ebursztein May 22, 2026
5b86c65
feat: persist runtime security results
ebursztein May 22, 2026
cd65831
feat: journal multi-phase runtime events
ebursztein May 22, 2026
fac2f9a
feat: journal mcp security events
ebursztein May 22, 2026
e96f88c
feat: journal dns security events
ebursztein May 22, 2026
aa5c8f0
feat: journal file security events
ebursztein May 22, 2026
0d16e83
feat: journal process security events
ebursztein May 22, 2026
f252383
feat: surface live security metrics
ebursztein May 22, 2026
9ee3ec9
feat: count canonical vm activity metrics
ebursztein May 22, 2026
bac4ac1
feat: seed live metrics from session db
ebursztein May 22, 2026
352a2b3
feat: enforce process exec events
ebursztein May 22, 2026
a3596b2
fix: align process rule classification
ebursztein May 22, 2026
3c1dccb
fix: generalize runtime process rule stats
ebursztein May 22, 2026
5f53b08
feat: log process security decisions
ebursztein May 22, 2026
c260d96
test: cover process decision log serialization
ebursztein May 22, 2026
646ae28
test: preserve process security logs route
ebursztein May 22, 2026
ee3f65f
test: preserve security logs in cli output
ebursztein May 22, 2026
7a5afc9
test: prove process enforcement logs in real vm
ebursztein May 22, 2026
5322274
feat: show security events in capsem logs
ebursztein May 22, 2026
bd16379
feat: include security logs in mcp vm logs
ebursztein May 22, 2026
456f2cf
test: preserve security logs through gateway
ebursztein May 22, 2026
1062197
feat: enrich security timeline attribution
ebursztein May 22, 2026
f711fe1
docs: advertise security logs in mcp tools
ebursztein May 22, 2026
bffa518
feat: report canonical backtest evidence fields
ebursztein May 22, 2026
b01679c
feat: enrich forensic matched fields
ebursztein May 22, 2026
0f64d3d
test: cover gateway security routes
ebursztein May 22, 2026
171d742
feat: show hunt evidence in cli
ebursztein May 22, 2026
80def38
test: cover gateway security route groups
ebursztein May 22, 2026
a4d8f98
feat: seed profile runtime rules
ebursztein May 22, 2026
e8d3185
fix: default deny unresolved asks
ebursztein May 22, 2026
5f8164c
feat: expose runtime security rules in settings
ebursztein May 22, 2026
2bedce9
feat: seed policy context rule corpus
ebursztein May 22, 2026
7b14ccb
feat: add admin detection backtest corpus
ebursztein May 22, 2026
099152a
feat: add admin policy backtest corpus
ebursztein May 22, 2026
5fdc11b
test: pin s08c enforcement parity artifact
ebursztein May 22, 2026
2db1259
test: pin s08c detection ir parity
ebursztein May 22, 2026
80a416b
feat: add admin policy compile
ebursztein May 22, 2026
3ac460c
docs: add rule corpus workflow
ebursztein May 22, 2026
2f9b0fd
test: expand s08c policy corpus diversity
ebursztein May 23, 2026
e5a1560
test: pin session detection hunt artifact
ebursztein May 23, 2026
631073a
test: pin session hunt projection paths
ebursztein May 23, 2026
b07101e
test: tighten admin policy path compile
ebursztein May 23, 2026
391eaec
fix: compile-check policy backtests before replay
ebursztein May 23, 2026
a12f920
test: pin s08c detection ir drift
ebursztein May 23, 2026
397c74b
test: prove live process security journal
ebursztein May 23, 2026
9944c7b
feat: expand admin policy context parity
ebursztein May 23, 2026
63eccc3
feat: support admin model tool policy paths
ebursztein May 23, 2026
b2fb7e3
feat: export session policy contexts
ebursztein May 23, 2026
923d603
test: add session process policy corpus
ebursztein May 23, 2026
7173fd5
docs: close s08c corpus parity
ebursztein May 23, 2026
e2f6d4c
bench: add security engine cel harness
ebursztein May 23, 2026
88e762c
bench: record security engine cel baseline
ebursztein May 23, 2026
365065c
bench: add vm security engine benchmark
ebursztein May 23, 2026
b749bf5
bench: extend security engine microbenchmarks
ebursztein May 23, 2026
550686a
bench: wire security engine into just bench
ebursztein May 23, 2026
9a628bf
bench: add http security engine benchmark
ebursztein May 23, 2026
91186d8
bench: break down http security timing
ebursztein May 23, 2026
8018329
fix: harden security event telemetry identity
ebursztein May 23, 2026
50b1c1f
bench: cover detection ir and plan rebuilds
ebursztein May 23, 2026
745938b
bench: add dns security engine benchmark
ebursztein May 23, 2026
91898df
bench: add mcp security engine benchmark
ebursztein May 23, 2026
b4309f0
docs: define bedrock release battle order
ebursztein May 23, 2026
2635cf2
refactor: extract file engine crate
ebursztein May 23, 2026
030ef2b
refactor: extract process engine crate
ebursztein May 23, 2026
46974d5
refactor: extract network policy crate
ebursztein May 23, 2026
efeab86
refactor: move dns parser to network engine
ebursztein May 23, 2026
4530606
refactor: move dns security projection to network engine
ebursztein May 23, 2026
f7c34ef
refactor: move http security projection to network engine
ebursztein May 23, 2026
5798e81
refactor: move mcp security projection to network engine
ebursztein May 23, 2026
cbefa77
refactor: move sse parser to network engine
ebursztein May 23, 2026
b046a5c
refactor: move model stream contract to network engine
ebursztein May 23, 2026
2ff2ad3
refactor: move model request parser to network engine
ebursztein May 23, 2026
f4ae7ba
refactor: move model evidence projection to network engine
ebursztein May 23, 2026
aa94c54
refactor: move model security projection to network engine
ebursztein May 23, 2026
4260765
feat: persist runtime security overlays
ebursztein May 23, 2026
d77409e
fix: disable runtime ask overlays until confirm ux
ebursztein May 23, 2026
27e985d
feat: expose runtime security debug health
ebursztein May 23, 2026
2322fbf
feat: surface security health in status
ebursztein May 23, 2026
f92525d
feat: summarize security events in logs
ebursztein May 23, 2026
5ffe14d
feat: surface security engine health in settings
ebursztein May 23, 2026
d5b6e0b
feat: show profile catalog in settings
ebursztein May 23, 2026
7edc1f5
feat: select profiles from settings
ebursztein May 23, 2026
6734461
feat: create sessions with profile identity
ebursztein May 23, 2026
ae5e6ec
feat: show vm profile state in sessions
ebursztein May 23, 2026
b236122
feat: show profile asset readiness in sessions
ebursztein May 23, 2026
b9e0bf3
feat: backtest runtime rules in settings
ebursztein May 23, 2026
f5cd826
feat: hunt session detections in settings
ebursztein May 23, 2026
f854d6a
docs: close profile ui sprint
ebursztein May 23, 2026
a8f7470
docs: add bedrock profile documentation
ebursztein May 23, 2026
efbeedb
docs: remove stale settings authority
ebursztein May 23, 2026
33f5b40
docs: gate release documentation review
ebursztein May 23, 2026
f1a612a
docs: align security rule authoring
ebursztein May 23, 2026
b23492e
docs: add service settings reference
ebursztein May 23, 2026
5a80d8e
docs: expand rule system reference
ebursztein May 23, 2026
e0ab953
docs: add telemetry and benchmark guides
ebursztein May 23, 2026
87b24a7
docs: close bedrock documentation sprint
ebursztein May 23, 2026
0fdd6cf
docs: start release gate replay
ebursztein May 23, 2026
24c846e
refactor: rename admin policy packs to enforcement
ebursztein May 23, 2026
3eb8f46
docs: record release gate observability proof
ebursztein May 23, 2026
718981b
docs: record admin release gate proof
ebursztein May 23, 2026
542e77e
fix: enforce profile http write defaults
ebursztein May 23, 2026
b06a544
fix: defer ask resolution to confirm sprint
ebursztein May 23, 2026
f20d0de
docs: clear colima release gate caveat
ebursztein May 23, 2026
6349874
docs: add colima recovery discipline
ebursztein May 23, 2026
f04f51e
feat: broaden runtime rule cli
ebursztein May 23, 2026
dd1344f
feat: add profile skills cli
ebursztein May 23, 2026
4232280
feat: add profile inspection cli
ebursztein May 23, 2026
95a6f8d
feat: add profile fork delete cli
ebursztein May 23, 2026
f4a1dc5
feat: expose confirm resolver status cli
ebursztein May 23, 2026
61586d1
feat: add typed profile document cli
ebursztein May 23, 2026
f6678a2
feat: add mcp list show cli
ebursztein May 23, 2026
8e87b0e
feat: enrich profile cli summaries
ebursztein May 23, 2026
5020c1a
feat: show profile provenance on vm provision
ebursztein May 23, 2026
38cc429
feat: show profile pins in vm info
ebursztein May 23, 2026
0514d28
docs: record release usability replay
ebursztein May 24, 2026
9978e13
fix: wire onboarding wizard to profiles
ebursztein May 24, 2026
55a2972
fix: show profile asset readiness before launch
ebursztein May 24, 2026
9ca1bbe
release: v1.2.1779658398
ebursztein May 24, 2026
2952cdf
fix: allow package setup without bundled vm assets
ebursztein May 24, 2026
1845ec8
fix: stop install harness service before error tests
ebursztein May 24, 2026
5e33a15
chore: align python lockfile release version
ebursztein May 24, 2026
a841716
fix: sign packaged admin python extensions
ebursztein May 25, 2026
6daf264
fix: point package profiles at release assets
ebursztein May 25, 2026
280bde3
docs: inventory sprint boards
ebursztein May 27, 2026
8424a44
docs: collapse sprint inventory
ebursztein May 27, 2026
5539049
docs: clarify profile v2 release gate
ebursztein May 27, 2026
fc9a399
docs: create post-ship profile followup sprint
ebursztein May 27, 2026
889917a
docs: make profile followup a meta sprint
ebursztein May 27, 2026
35f63ce
docs: add profile foundation meta sprint
ebursztein May 27, 2026
f7d6391
docs: clarify foundation integration scope
ebursztein May 27, 2026
b9c3674
docs: add foundation graph dashboard scope
ebursztein May 27, 2026
afc3c21
docs: expand foundation google integration scope
ebursztein May 29, 2026
69bd0e3
docs: split google integration sprint
ebursztein May 29, 2026
c6a7008
feat: add standalone capsem tui shell
ebursztein May 29, 2026
2e79056
style: simplify capsem tui chrome
ebursztein May 29, 2026
921b941
feat: add capsem tui gateway terminal shell
ebursztein May 29, 2026
1bdd27c
bench: record macos arm64 benchmark results
ebursztein May 29, 2026
78dc516
Merge pull request #58 from google/codex/mac-benchmark-results-20260529
ebursztein May 29, 2026
06cc31e
feat: checkpoint linux kvm proving ground
ebursztein May 28, 2026
5cee8c9
fix: preserve virtiofs inode paths on rename
ebursztein May 28, 2026
eb76d41
fix: use linux readlink opcode for virtiofs
ebursztein May 28, 2026
6be2d86
fix: keep uv cache off virtiofs workspace
ebursztein May 28, 2026
61b775a
fix: trust git workspaces in linux kvm guests
ebursztein May 28, 2026
e046977
test: cover tmp symlinks in linux kvm doctor
ebursztein May 28, 2026
e34817a
docs: record linux kvm doctor pass
ebursztein May 28, 2026
e7bae3a
test: smoke linux kvm doctor readiness
ebursztein May 28, 2026
8bf061b
test: assert suspend resume preserves guest process
ebursztein May 28, 2026
bdedb26
fix: preserve kvm vcpu mp state in checkpoints
ebursztein May 28, 2026
3bf9f18
fix: expand kvm warm restore state
ebursztein May 28, 2026
5a1397f
fix: resume kvm guests from warm checkpoints
ebursztein May 28, 2026
d9429e1
fix: stabilize linux kvm test gate
ebursztein May 29, 2026
1f09652
fix: stabilize linux vm lifecycle gate
ebursztein May 29, 2026
152caa2
test: stabilize full gate harness
ebursztein May 29, 2026
c1674a9
test: align python coverage gate
ebursztein May 29, 2026
56258d8
test: calibrate linux serial benchmark gates
ebursztein May 29, 2026
16433f5
fix: boot-test repacked linux packages
ebursztein May 29, 2026
0ca89a0
fix: isolate docker frontend dependencies
ebursztein May 29, 2026
c625f51
fix: isolate install test docker state
ebursztein May 29, 2026
dbdf336
test: accept kvm serial boot markers
ebursztein May 29, 2026
f4ea403
test: harden linux benchmark artifacts
ebursztein May 29, 2026
9e99610
bench: add storage split diagnostics
ebursztein May 29, 2026
d3c7d6d
bench: profile storage iops
ebursztein May 29, 2026
31b96eb
bench: record storage tuning context
ebursztein May 29, 2026
b971618
perf: use positional virtiofs io
ebursztein May 29, 2026
a52f7aa
perf: negotiate larger virtiofs requests
ebursztein May 29, 2026
89b04f8
perf: tune rootfs squashfs block size
ebursztein May 29, 2026
3d5a874
bench: split rootfs workload diagnostics
ebursztein May 29, 2026
5b9ee2c
bench: standardize benchmark recipe
ebursztein May 29, 2026
8e4e645
bench: record host native baselines
ebursztein May 29, 2026
8286bd3
bench: use project filesystem for native baseline
ebursztein May 29, 2026
67add8b
bench: distinguish source dirtiness in artifacts
ebursztein May 29, 2026
d56e07a
bench: parse git status paths correctly
ebursztein May 29, 2026
ab03714
bench: record linux benchmark artifacts
ebursztein May 29, 2026
968ae89
bench: archive criterion artifacts
ebursztein May 29, 2026
d6eddbc
bench: record criterion benchmark artifacts
ebursztein May 29, 2026
92a9992
feat: add capsem mcp terminal snapshot
ebursztein May 29, 2026
d5f67d7
bench: compare linux and mac artifacts
ebursztein May 29, 2026
a476d7a
chore: merge main into tui control branch
ebursztein May 29, 2026
4c75cbf
bench: enforce benchmark artifact contract
ebursztein May 29, 2026
f4308f0
perf: trim kvm rootfs overlays before fork
ebursztein May 29, 2026
901ca50
fix: trim kvm system overlay mount
ebursztein May 29, 2026
caf8243
perf: bound pre-fork trim extents
ebursztein May 29, 2026
84321a6
perf: keep trim out of fork hot path
ebursztein May 29, 2026
ec47398
feat: add confirmed capsem tui service actions
ebursztein May 29, 2026
c093f4b
bench: include storage diagnostics in canonical run
ebursztein May 29, 2026
0dbd509
perf: use vectored kvm block io
ebursztein May 29, 2026
6823cf1
feat: package capsem tui binary
ebursztein May 29, 2026
33684fc
fix: compile debug report disk stats on macos
ebursztein May 29, 2026
ad92082
fix: compile process shutdown on macos
ebursztein May 29, 2026
c4b07da
bench: record vectored kvm block io results
ebursztein May 29, 2026
b8ca858
fix: ignore manifest aliases in install profiles
ebursztein May 29, 2026
03fcce3
fix: skip asset alias directories in install profiles
ebursztein May 29, 2026
8a391cb
perf: move kvm block io off vcpu notify
ebursztein May 29, 2026
2d56217
Revert "perf: move kvm block io off vcpu notify"
ebursztein May 29, 2026
589494f
perf: batch kvm block used ring updates
ebursztein May 29, 2026
c93351e
fix: finish tui live terminal proof
ebursztein May 29, 2026
14dc456
Revert "perf: batch kvm block used ring updates"
ebursztein May 29, 2026
7e7c470
perf: route kvm block notify through ioeventfd
ebursztein May 29, 2026
ec0c715
fix: use vt parser for tui terminal
ebursztein May 29, 2026
f54d94a
fix: stabilize tui session navigation
ebursztein May 29, 2026
91a9cf9
fix: make tui shell controls alt-only
ebursztein May 29, 2026
20bb348
Revert "perf: route kvm block notify through ioeventfd"
ebursztein May 29, 2026
ba8f260
perf: combine kvm ioeventfd block batching
ebursztein May 29, 2026
9d4c1f2
bench: record combined kvm block stack results
ebursztein May 29, 2026
43716ab
fix: harden tui modal and resize behavior
ebursztein May 29, 2026
18f0e09
docs: plan virtio block firecracker path sprint
ebursztein May 29, 2026
161e40f
fix: simplify tui tab colors and modal input
ebursztein May 29, 2026
3b2c739
perf: add kvm virtio block event index
ebursztein May 29, 2026
a0f8df6
bench: record kvm event index results
ebursztein May 29, 2026
6601d6f
fix: close process IPC helper tasks
ebursztein May 29, 2026
a21e269
fix: stabilize tui latency display
ebursztein May 30, 2026
4ca0fb0
feat: add kvm virtio block telemetry
ebursztein May 30, 2026
0bbd539
bench: record virtio block telemetry results
ebursztein May 30, 2026
6138c0b
fix: gate endpoint latency hot paths
ebursztein May 30, 2026
7037bac
perf: add kvm virtio block io_uring backend
ebursztein May 30, 2026
1299bd5
fix: render stopped tui sessions
ebursztein May 30, 2026
a0ef66b
bench: record kvm io_uring block results
ebursztein May 30, 2026
c2422ad
perf: gate kvm io_uring block to writable disks
ebursztein May 30, 2026
7233acf
bench: record gated kvm io_uring results
ebursztein May 30, 2026
803bfba
perf: make kvm io_uring block opt in
ebursztein May 30, 2026
56b61a2
bench: record default off io_uring results
ebursztein May 30, 2026
f60bb67
fix: surface tui suspend shortcut
ebursztein May 30, 2026
05df412
docs: add hypervisor improvement sprint
ebursztein May 30, 2026
d47a889
fix: pin tui suspend hint left
ebursztein May 30, 2026
f5a7377
fix: make tui create profile aware
ebursztein May 30, 2026
fb98b2d
fix: add tui fork flow
ebursztein May 30, 2026
8e8c4a7
bench: archive superseded benchmark artifacts
ebursztein May 30, 2026
e3d0312
fix: polish tui controls and overlays
ebursztein May 30, 2026
b6f9b6e
bench: preserve artifacts before benchmark reruns
ebursztein May 30, 2026
b4ba5ce
bench: record linux wrap-up benchmark artifacts
ebursztein May 30, 2026
c2fb4b7
fix: move tui help hint to session stats
ebursztein May 30, 2026
9214311
fix: open tui new session on empty state
ebursztein May 30, 2026
53862ec
fix: block tui create without profiles
ebursztein May 30, 2026
f306830
fix: prompt tui service start when offline
ebursztein May 30, 2026
62b5dfe
Merge pull request #59 linux support
ebursztein May 30, 2026
0a42554
chore: merge main into tui control
ebursztein May 30, 2026
4d133bb
bench: rerun mac benchmark after linux merge
ebursztein May 30, 2026
860cc8e
feat: make capsem shell launch tui
ebursztein May 30, 2026
9b168fd
fix: focus tui create and hide corrupt tabs
ebursztein May 30, 2026
b50c811
fix: reconnect tui terminal after resume
ebursztein May 30, 2026
6902dc4
fix: show full-screen tui suspend progress
ebursztein May 30, 2026
0cf0a9a
fix: keep tui create focus pending
ebursztein May 30, 2026
238001f
Merge pull request #60 from google/codex/tui-control
ebursztein May 30, 2026
2b6a2ed
fix: offer tui recovery create and purge
ebursztein May 30, 2026
32102d6
fix: purge broken persistent tui sessions
ebursztein May 30, 2026
374859b
fix: disable in-vm shutdown
ebursztein May 30, 2026
6e33f3b
chore: restore main history
ebursztein Jun 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .codex/skills
1 change: 1 addition & 0 deletions .cursor/skills
1 change: 1 addition & 0 deletions .gemini/skills
151 changes: 103 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,63 +7,69 @@ on:
permissions:
contents: read

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
# ---------------------------------------------------------------------------
# Linux: compile + test KVM hypervisor backend (cfg(target_os = "linux"))
# Linux: compile KVM hypervisor backend (cfg(target_os = "linux"))
# ---------------------------------------------------------------------------
test-linux:
runs-on: ubuntu-24.04-arm
env:
# Hosted ARM runners can expose /dev/kvm but hang in nested/restricted
# KVM ioctls. PR CI compiles the Linux KVM backend and test binaries.
# The release pipeline owns real-KVM coverage.
CAPSEM_SKIP_KVM_TESTS: "1"
steps:
- uses: actions/checkout@v5

- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools

- uses: Swatinem/rust-cache@v2
- name: Normalize cargo proxy
run: bash scripts/ci/normalize-cargo.sh

# Try to enable KVM for integration tests. GitHub-hosted runners don't
# always expose nested virt -- when /dev/kvm is absent the udev trigger
# fails with "Failed to open the device 'kvm': Invalid argument". We
# let that pass and fall through to a compile-only/no-KVM run; the
# release pipeline owns real-KVM coverage. See sprints/done/ci-green.
- name: Enable KVM (best-effort)
continue-on-error: true
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: Swatinem/rust-cache@v2

- name: Install tools
# Collect KVM diagnostics only. GitHub-hosted runners don't always expose
# nested virt -- and when they do, restricted ioctls can hang. PR CI
# compiles the KVM backend with CAPSEM_SKIP_KVM_TESTS=1; the release
# pipeline owns real-KVM coverage.
- name: Collect KVM diagnostics
run: |
cargo install cargo-nextest --locked
cargo install cargo-llvm-cov --locked
if echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules >/dev/null; then
sudo udevadm control --reload-rules || echo "::notice::udev reload failed; keeping KVM diagnostics non-blocking"
sudo udevadm trigger --name-match=kvm || echo "::notice::udev trigger failed; keeping KVM diagnostics non-blocking"
else
echo "::notice::could not write KVM udev rule; keeping KVM diagnostics non-blocking"
fi
if [ -e /dev/kvm ]; then
ls -l /dev/kvm
else
echo "::notice::/dev/kvm is not present on this runner"
fi

# Library + service crate tests with coverage (capsem-core includes KVM backend on Linux).
# Compile Linux library + service crate tests without executing them. The
# macOS job owns runtime unit coverage for portable code; this job proves
# the Linux-only/KVM cfg surface and test binaries compile on aarch64.
# capsem-app (Tauri shell) and capsem-tray (macOS muda menu-bar) are macOS-only; every
# other host crate is portable and runs here so it gets Linux-specific regression coverage.
- name: Unit tests (KVM backend) with coverage
# other host crate is portable and compiles here for Linux-specific regression coverage.
- name: Compile tests (KVM backend, no live KVM)
timeout-minutes: 15
run: |
cargo llvm-cov nextest --no-cfg-coverage --profile ci --codecov --output-path codecov-linux.json --fail-under-lines 70 -p capsem-core -p capsem-agent -p capsem-logger -p capsem-proto -p capsem-guard -p capsem-gateway -p capsem-service -p capsem -p capsem-mcp -p capsem-mcp-aggregator -p capsem-mcp-builtin -p capsem-process
cargo llvm-cov report --no-cfg-coverage --summary-only -p capsem-core -p capsem-agent -p capsem-logger -p capsem-proto -p capsem-guard -p capsem-gateway -p capsem-service -p capsem -p capsem-mcp -p capsem-mcp-aggregator -p capsem-mcp-builtin -p capsem-process 2>&1 | tee coverage-summary-linux.txt
cargo test --no-run --all-targets -p capsem-core -p capsem-agent -p capsem-logger -p capsem-proto -p capsem-guard -p capsem-gateway -p capsem-service -p capsem -p capsem-mcp -p capsem-mcp-aggregator -p capsem-mcp-builtin -p capsem-process

- name: Upload Linux coverage
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
files: codecov-linux.json
flags: linux-unit
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

# Note KVM exercise status. Hosted ARM runners may lack /dev/kvm; the
# compile-only path still catches Linux build/lint regressions, and
# real-KVM coverage runs in the release pipeline. Surfacing as a
# warning (not an error) keeps CI honest about what was actually
# exercised without false-failing on a runner-fleet limitation.
# Note KVM exercise status. Hosted ARM runners may lack /dev/kvm or
# expose restricted nested KVM; PR CI keeps this compile/no-run and
# release CI owns live-KVM coverage. Surfacing as a warning keeps CI
# honest without false-failing or hanging on a runner-fleet limitation.
- name: Note KVM exercise status
run: |
if [ -e /dev/kvm ]; then
if [ "${CAPSEM_SKIP_KVM_TESTS:-}" = "1" ]; then
echo "::warning::CAPSEM_SKIP_KVM_TESTS=1 -- PR CI compiled the KVM backend but did not exercise live KVM. Real-KVM coverage runs in release pipeline."
elif [ -e /dev/kvm ]; then
echo "KVM is available at /dev/kvm -- KVM-backed tests exercised."
else
echo "::warning::/dev/kvm not available on this runner -- compile + non-KVM tests only. Real-KVM coverage runs in release pipeline."
Expand All @@ -73,18 +79,20 @@ jobs:
if: always()
run: |
KVM_STATUS="available"
[ -e /dev/kvm ] || KVM_STATUS="not available"
COV=$(grep 'TOTAL' coverage-summary-linux.txt 2>/dev/null | awk '{print $(NF)}' || echo "?")

if [ "${CAPSEM_SKIP_KVM_TESTS:-}" = "1" ]; then
KVM_STATUS="skipped in PR CI"
elif [ ! -e /dev/kvm ]; then
KVM_STATUS="not available"
fi
cat >> "$GITHUB_STEP_SUMMARY" << EOF
## Linux Test Results

| Metric | Result |
|--------|--------|
| Runner | ubuntu-24.04-arm (aarch64) |
| /dev/kvm | $KVM_STATUS |
| Line coverage | $COV |
| KVM backend | compiled (real-KVM tests run only when /dev/kvm is present) |
| Test execution | no-run in PR CI |
| KVM backend | compiled with test binaries (real-KVM tests run in release pipeline) |
EOF

# T5: preserve test artifacts on failure (Linux job).
Expand All @@ -96,6 +104,7 @@ jobs:
path: |
test-artifacts/
frontend/test-artifacts/
target/build.log
retention-days: 7
if-no-files-found: ignore

Expand All @@ -112,6 +121,9 @@ jobs:
targets: aarch64-unknown-linux-musl,x86_64-unknown-linux-musl
components: llvm-tools

- name: Normalize cargo proxy
run: bash scripts/ci/normalize-cargo.sh

- uses: Swatinem/rust-cache@v2

- uses: pnpm/action-setup@v5
Expand All @@ -127,6 +139,9 @@ jobs:
- uses: astral-sh/setup-uv@v5
- run: uv sync

- name: Normalize cargo proxy after Python setup
run: bash scripts/ci/normalize-cargo.sh

- name: Dependency audit
run: |
cargo install cargo-audit --locked
Expand All @@ -138,18 +153,24 @@ jobs:
cargo install cargo-llvm-cov --locked
cargo install cargo-nextest --locked

- name: Create frontend dist for Tauri test build
run: |
mkdir -p frontend/dist
printf '<!doctype html><html><body></body></html>\n' > frontend/dist/index.html

# Unit tests: all crates with coverage + JUnit XML for test analytics.
# capsem-app (Tauri bin) is macOS-only; capsem-mcp-aggregator and
# capsem-mcp-builtin are thin binaries that pull capsem-core logic.
- name: Unit tests with coverage
run: |
cargo llvm-cov nextest --no-cfg-coverage --profile ci --codecov --output-path codecov-unit.json --fail-under-lines 70 -p capsem-core -p capsem-agent -p capsem-logger -p capsem-proto -p capsem-guard -p capsem-gateway -p capsem-service -p capsem -p capsem-mcp -p capsem-mcp-aggregator -p capsem-mcp-builtin -p capsem-tray -p capsem-app -p capsem-process
cargo llvm-cov report --no-cfg-coverage --summary-only -p capsem-core -p capsem-agent -p capsem-logger -p capsem-proto -p capsem-guard -p capsem-gateway -p capsem-service -p capsem -p capsem-mcp -p capsem-mcp-aggregator -p capsem-mcp-builtin -p capsem-tray -p capsem-app -p capsem-process 2>&1 | tee coverage-summary.txt
set -o pipefail
cargo llvm-cov nextest --no-cfg-coverage --profile ci --codecov --output-path codecov-unit.json --fail-under-lines 65 -p capsem-core -p capsem-agent -p capsem-logger -p capsem-proto -p capsem-guard -p capsem-gateway -p capsem-service -p capsem -p capsem-mcp -p capsem-mcp-aggregator -p capsem-mcp-builtin -p capsem-tray -p capsem-app -p capsem-process
cargo llvm-cov report --summary-only -p capsem-core -p capsem-agent -p capsem-logger -p capsem-proto -p capsem-guard -p capsem-gateway -p capsem-service -p capsem -p capsem-mcp -p capsem-mcp-aggregator -p capsem-mcp-builtin -p capsem-tray -p capsem-app -p capsem-process 2>&1 | tee coverage-summary.txt

# Integration tests (tests/ directory, cross-crate)
- name: Integration tests with coverage
run: |
cargo llvm-cov nextest --no-cfg-coverage --profile ci --codecov --output-path codecov-integration.json -p capsem-core --test '*' || true
cargo llvm-cov nextest --no-cfg-coverage --profile ci --codecov --output-path codecov-integration.json -p capsem-core --test '*'

# Frontend tests with coverage + JUnit output
- name: Frontend type-check, test, and build
Expand All @@ -161,12 +182,15 @@ jobs:

# Python schema tests with coverage
- name: Python schema tests with coverage
run: uv run python -m pytest tests/ --cov=src/capsem --cov-report=xml:codecov-python.xml --cov-fail-under=90 --junitxml=python-junit.xml
run: uv run python -m pytest tests/test_*.py --cov=src/capsem --cov-report=xml:codecov-python.xml --cov-fail-under=89 --junitxml=python-junit.xml

# Python integration tests that need no VM
# Python integration tests that need no VM and no generated assets.
# Bootstrap/codesign suites are artifact-dependent: full `just test`
# runs them after assets and signed host binaries exist, while this PR
# lane import-collects them below to catch syntax/fixture drift.
- name: Python integration tests (non-VM suites)
run: |
uv run python -m pytest tests/capsem-bootstrap/ tests/capsem-codesign/ tests/capsem-rootfs-artifacts/ -v --tb=short
uv run python -m pytest tests/capsem-rootfs-artifacts/ -v --tb=short

# Verify all integration test suites import cleanly (catches broken imports/syntax)
- name: Verify all integration test imports
Expand Down Expand Up @@ -219,10 +243,11 @@ jobs:
# Upload test results for test analytics
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
uses: codecov/codecov-action@v5
with:
files: target/nextest/ci/junit.xml,frontend-junit.xml,python-junit.xml
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results

# T5: preserve every test artifact (service.log / process.log /
# session.db etc.) on failure so PR reviewers can debug without
Expand All @@ -237,11 +262,15 @@ jobs:
path: |
test-artifacts/
frontend/test-artifacts/
target/build.log
retention-days: 7
if-no-files-found: ignore

# Check-only (no link) -- actual cross-compile runs on Linux in release workflow
- name: Cross-compile check (guest binaries)
# Keep release-profile checks on PR validation, but skip them on
# post-merge pushes to main.
if: ${{ github.event_name == 'pull_request' }}
run: |
cargo check --release --target aarch64-unknown-linux-musl -p capsem-agent
cargo check --release --target x86_64-unknown-linux-musl -p capsem-agent
Expand Down Expand Up @@ -273,8 +302,34 @@ jobs:
steps:
- uses: actions/checkout@v5

- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-unknown-linux-musl
components: llvm-tools

- name: Normalize cargo proxy
run: bash scripts/ci/normalize-cargo.sh

- uses: extractions/setup-just@v3

- uses: pnpm/action-setup@v5
with:
version: 10
- uses: actions/setup-node@v5
with:
node-version: 24

- uses: astral-sh/setup-uv@v5
- run: uv sync

- name: Install install-test host tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends b3sum minisign

- name: Build install VM assets
run: bash scripts/build-assets.sh --profile config/profiles/base/coding.profile.toml --assets-dir assets --arch arm64

- name: Build host builder Docker image
run: just build-host-image

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
deployments: write

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
steps:
Expand Down
Loading
Loading