Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 10 additions & 65 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,72 +19,8 @@ on:
- agent/mod-diagnostics-m3
- agent/mod-diagnostics-m4
- agent/mod-diagnostics-m5-m7
# No path filter: every pull request runs this, whatever its source branch.
pull_request:
paths:
- "core/api/request_id.h"
- "core/api/request_limits.h"
- "core/api/pagination.h"
- "core/api/semantic_tools.h"
- "tests/request_id_tests.cpp"
- "tests/pagination_tests.cpp"
- "tests/semantic_plan_p1_tests.cpp"
- ".github/workflows/contracts.yml"
- "core/action/**"
- "core/scripting/**"
- "core/api/**"
- "tests/**"
- "CMakeLists.txt"
- "core/api/mcp_contract.h"
- "core/api/mcp_protocol.h"
- "core/api/mcp_tools.*"
- "core/api/mcp_pipe.*"
- "core/api/mcp_pipe_protocol.h"
- "core/api/native_routes.*"
- "core/api/routes_mcp.cpp"
- "core/api/routes_status.cpp"
- "mcp_bridge/main.cpp"
- "mcp_bridge/policy.h"
- "tests/mcp_protocol_tests.cpp"
- "tests/mcp_pipe_protocol_tests.cpp"
- "tests/mcp_schema_tests.cpp"
- "tests/call_scheduler_tests.cpp"
- "tests/mcp_query_schema_tests.cpp"
- "tests/mcp_bridge_policy_tests.cpp"
- "tests/semantic_tools_tests.cpp"
- "host/unified_main.cpp"
- "host/diagnostics/**"
- "test_target/main_opengl.cpp"
- "core/target/**"
- "tests/target_model_portable_tests.cpp"
- "tests/capability_model_tests.cpp"
- "core/prompt/**"
- "tests/prompt_queue_contract_tests.cpp"
- "core/diagnostics/**"
- "core/config.*"
- "core/dllmain.cpp"
- "tests/diagnostics_tests.cpp"
- "test_target/main.cpp"
- "sdk/**"
- "tests/diagnostics_m2_tests.cpp"
- "tests/diagnostics_sdk_smoke.cpp"
- "tests/diagnostics_bundle_smoke.cpp"
- "docs/mod-sdk.md"
- "core/symbols/**"
- "core/api/routes_symbols.cpp"
- "tools/symbolize_main.cpp"
- "tests/diagnostics_m3_tests.cpp"
- "tests/diagnostics_m3_bundle_smoke.cpp"
- "tests/dwarf_fixture.cpp"
- "docs/symbols.md"
- "core/diagnostics/hooks.*"
- "sdk/include/cortex/diag*.h"
- "tests/diagnostics_m4_*.cpp"
- "docs/hooks.md"
- "core/diagnostics/shared_channel.*"
- "tools/diagnostics_host/**"
- "tests/diagnostics_m5*.cpp"
- "tests/diagnostics_m5_m7_tests.cpp"
- "docs/external-diagnostics.md"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -279,6 +215,15 @@ jobs:
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_protocol_tests.exe

- name: Build and run MCP write-authority tests
shell: msys2 {0}
run: >-
c++ -std=c++17 -O2 -Icore tests/mcp_authority_tests.cpp
-Ibuild/p2-${{ matrix.arch }}/_deps/json-src/include
-o build/p2-${{ matrix.arch }}/mcp_authority_tests.exe
-static -static-libgcc -static-libstdc++
&& build/p2-${{ matrix.arch }}/mcp_authority_tests.exe

- name: Build and run native pipe contract tests
shell: msys2 {0}
run: >-
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,9 @@ on:
push:
branches:
- agent/automated-e2e-matrix
- main
# No path filter: every pull request runs this, whatever its source branch.
pull_request:
paths:
- "CMakeLists.txt"
- "app_imgui/**"
- "runtime_helper/**"
- "core/**"
- "host/**"
- "injector/**"
- "mcp_bridge/**"
- "sdk/**"
- "test_target/**"
- "tests/e2e/**"
- "tools/**"
- ".github/workflows/e2e-windows.yml"
workflow_dispatch:

concurrency:
Expand Down
46 changes: 35 additions & 11 deletions .github/workflows/imgui-gui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,15 @@ on:
- "core/prompt/**"
- "runtime_helper/**"
- "tests/gui/**"
- "tests/security_no_writes_regression.py"
- "tests/fixtures/mcp_tool_risks.json"
- "core/security/**"
- "mcp_bridge/**"
- "test_target/**"
- "CMakeLists.txt"
- ".github/workflows/imgui-gui-tests.yml"
# No path filter: every pull request runs this, whatever its source branch.
pull_request:
paths:
- "app_imgui/**"
- "host/debugger/**"
- "core/target/**"
- "core/services/**"
- "core/api/**"
- "core/prompt/**"
- "runtime_helper/**"
- "tests/gui/**"
- "CMakeLists.txt"
- ".github/workflows/imgui-gui-tests.yml"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -257,6 +252,35 @@ jobs:
$env:PATH = $oldPath
}

- name: Without --allow-writes no MCP call changes a target
shell: pwsh
run: |
# Calls every listed tool, always claiming mutation_permission, and
# requires the target's state hash to be unchanged. See
# tests/security_no_writes_regression.py.
$bundle = (Resolve-Path "stage/Cortex").Path
$failed = @()
python tests/security_no_writes_regression.py `
--cortex "$bundle/cortex.exe" `
--target "$bundle/e2e/cortex_test_target_x64.exe"
if ($LASTEXITCODE -ne 0) { $failed += "x64" }
python tests/security_no_writes_regression.py `
--cortex "$bundle/cortex.exe" `
--target "$bundle/e2e/cortex_test_target_x86.exe"
if ($LASTEXITCODE -ne 0) { $failed += "x86" }
if ($failed.Count -gt 0) { throw "write-authority regression failed on: $($failed -join ', ')" }

- name: Which tool stalls the target? (diagnostic, only after a failure)
if: failure()
continue-on-error: true
shell: pwsh
run: |
# Calls each tool on its own fresh target, so a stall or exit has exactly one suspect.
$bundle = (Resolve-Path "stage/Cortex").Path
python tests/security_no_writes_regression.py --isolate `
--cortex "$bundle/cortex.exe" `
--target "$bundle/e2e/cortex_test_target_x64.exe"

- name: Inject a 32-bit target from the command line
shell: pwsh
run: |
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/imgui-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- next/lightweight-imgui-ui
- test/imgui-full-migration
- main
paths:
- "app_imgui/**"
- "core/target/**"
Expand All @@ -20,15 +21,8 @@ on:
- "resources/windows/**"
- "CMakeLists.txt"
- ".github/workflows/imgui-ui.yml"
# No path filter: every pull request runs this, whatever its source branch.
pull_request:
paths:
- "app_imgui/**"
- "core/target/**"
- "core/services/**"
- "core/api/mcp_pipe_protocol.h"
- "runtime_helper/**"
- "CMakeLists.txt"
- ".github/workflows/imgui-ui.yml"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -87,7 +81,7 @@ jobs:
}

$version = Invoke-CortexCli @("--version")
if ($version -notmatch "1\.0\.0") { throw "Unexpected version output: $version" }
if ($version -notmatch "1\.0\.1") { throw "Unexpected version output: $version" }

$help = Invoke-CortexCli @("--help")
if ($help -notmatch "cortex mcp") { throw "MCP command missing from help" }
Expand Down Expand Up @@ -220,7 +214,7 @@ jobs:
$psi.RedirectStandardInput = $true
$psi.RedirectStandardOutput = $true
$psi.RedirectStandardError = $true
foreach ($arg in @("mcp","--transport","native","--tools","all","--token-file",$tokenPath)) {
foreach ($arg in @("mcp","--transport","native","--tools","all","--token-file",$tokenPath,"--allow-writes")) {
[void]$psi.ArgumentList.Add($arg)
}
$mcp = [System.Diagnostics.Process]::Start($psi)
Expand All @@ -246,6 +240,7 @@ jobs:
label = "ImGui prompt E2E"
current_value = "before"
target_value = "after"
mutation_permission = $true
}
}
} | ConvertTo-Json -Compress -Depth 8
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ permissions:
contents: write

concurrency:
group: publish-v1.0.0-${{ github.ref }}
group: publish-v1.0.1-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
RELEASE_TAG: v1.0.0
RELEASE_TAG: v1.0.1

jobs:
windows-x64-stage:
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, 'Release v1.0.0')
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'Release v1.0.1')
runs-on: windows-2025
timeout-minutes: 50
steps:
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
retention-days: 2

windows-x86-stage:
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, 'Release v1.0.0')
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'Release v1.0.1')
runs-on: windows-2025
timeout-minutes: 45
steps:
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
retention-days: 2

package:
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || startsWith(github.event.head_commit.message, 'Release v1.0.0')
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'Release v1.0.1')
needs: [windows-x64-stage, windows-x86-stage]
runs-on: windows-2025
timeout-minutes: 15
Expand Down Expand Up @@ -236,8 +236,8 @@ jobs:
$versionError = $versionProcess.StandardError.ReadToEnd()
$versionProcess.WaitForExit()
Write-Host ("release version output: {0}" -f $versionText.Trim())
if ($versionProcess.ExitCode -ne 0 -or $versionText -notmatch "1\.0\.0") {
throw "release binary does not report v1.0.0 (exit=$($versionProcess.ExitCode), stderr=$versionError)"
if ($versionProcess.ExitCode -ne 0 -or $versionText -notmatch "1\.0\.1") {
throw "release binary does not report v1.0.1 (exit=$($versionProcess.ExitCode), stderr=$versionError)"
}

$oldPath = $env:PATH
Expand Down Expand Up @@ -268,18 +268,18 @@ jobs:
}

New-Item -ItemType Directory -Force dist | Out-Null
Compress-Archive -Path "$bundle/*" -DestinationPath "dist/cortex-v1.0.0-windows-portable.zip" -CompressionLevel Optimal
Compress-Archive -Path "$bundle/*" -DestinationPath "dist/cortex-v1.0.1-windows-portable.zip" -CompressionLevel Optimal

- name: Upload release archive
uses: actions/upload-artifact@v4
with:
name: cortex-v1.0.0-windows-portable
path: dist/cortex-v1.0.0-windows-portable.zip
name: cortex-v1.0.1-windows-portable
path: dist/cortex-v1.0.1-windows-portable.zip
if-no-files-found: error
retention-days: 14

release:
if: github.event_name == 'push' && startsWith(github.event.head_commit.message, 'Release v1.0.0')
if: github.event_name == 'push' && contains(github.event.head_commit.message, 'Release v1.0.1')
needs: package
runs-on: ubuntu-latest
steps:
Expand All @@ -289,13 +289,13 @@ jobs:
shell: bash
run: |
set -euo pipefail
awk '/^## \[v1.0.0\]/{found=1; next} /^## \[/{if(found) exit} found' CHANGELOG.md > release-notes.md
awk '/^## \[v1.0.1\]/{found=1; next} /^## \[/{if(found) exit} found' CHANGELOG.md > release-notes.md
test -s release-notes.md

- name: Download release archive
uses: actions/download-artifact@v4
with:
name: cortex-v1.0.0-windows-portable
name: cortex-v1.0.1-windows-portable
path: dist

- name: Publish GitHub release
Expand All @@ -312,4 +312,4 @@ jobs:
--target "$GITHUB_SHA" \
--title "$RELEASE_TAG" \
--notes-file release-notes.md \
dist/cortex-v1.0.0-windows-portable.zip
dist/cortex-v1.0.1-windows-portable.zip
12 changes: 2 additions & 10 deletions .github/workflows/unified-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ on:
push:
branches:
- agent/unified-cortex-host
- main
# No path filter: every pull request runs this, whatever its source branch.
pull_request:
paths:
- "CMakeLists.txt"
- "host/**"
- "injector/**"
- "mcp_bridge/**"
- "tools/**"
- "core/symbols/**"
- "docs/**"
- "README.md"
- ".github/workflows/unified-host.yml"
workflow_dispatch:

jobs:
Expand Down
Loading
Loading